* update ps3 target kernel config
[openwrt.git] / target / linux / pxa / patches-2.6.21 / 004-board-init.patch
1 Index: linux-2.6.21.7/arch/arm/mach-pxa/gumstix.c
2 ===================================================================
3 --- /dev/null
4 +++ linux-2.6.21.7/arch/arm/mach-pxa/gumstix.c
5 @@ -0,0 +1,76 @@
6 +/*
7 + * linux/arch/arm/mach-pxa/gumstix.c
8 + *
9 + * Support for the Gumstix computer platform
10 + *
11 + * Author: Craig Hughes
12 + * Created: December 8 2004
13 + * Copyright: (C) 2004, Craig Hughes
14 + *
15 + * This program is free software; you can redistribute it and/or modify
16 + * it under the terms of the GNU General Public License version 2 as
17 + * published by the Free Software Foundation.
18 + */
19 +
20 +#include <asm/types.h>
21 +
22 +#include <linux/init.h>
23 +#include <linux/device.h>
24 +#include <linux/platform_device.h>
25 +
26 +#include <asm/hardware.h>
27 +#include <asm/mach-types.h>
28 +#include <asm/mach/arch.h>
29 +#include <asm/mach/irq.h>
30 +#include <asm/arch/udc.h>
31 +#include <asm/arch/mmc.h>
32 +#include <asm/arch/pxa-regs.h>
33 +#include <asm/arch/gumstix.h>
34 +
35 +#include "generic.h"
36 +
37 +static int gumstix_mci_init(struct device *dev, irqreturn_t (*lubbock_detect_int)(int, void *, struct pt_regs *), void *data)
38 +{
39 + // Set up MMC controller
40 + pxa_gpio_mode(GPIO6_MMCCLK_MD);
41 + pxa_gpio_mode(GPIO53_MMCCLK_MD);
42 + pxa_gpio_mode(GPIO8_MMCCS0_MD);
43 +
44 + return 0;
45 +}
46 +
47 +static struct pxamci_platform_data gumstix_mci_platform_data = {
48 + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
49 + .init = &gumstix_mci_init,
50 +};
51 +
52 +static struct pxa2xx_udc_mach_info gumstix_udc_info __initdata = {
53 + .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn,
54 + .gpio_pullup = GPIO_GUMSTIX_USB_GPIOx,
55 +};
56 +
57 +static struct platform_device gum_audio_device = {
58 + .name = "pxa2xx-ac97",
59 + .id = -1,
60 +};
61 +
62 +static struct platform_device *devices[] __initdata = {
63 + &gum_audio_device,
64 +};
65 +
66 +static void __init gumstix_init(void)
67 +{
68 + pxa_set_mci_info(&gumstix_mci_platform_data);
69 + pxa_set_udc_info(&gumstix_udc_info);
70 + (void) platform_add_devices(devices, ARRAY_SIZE(devices));
71 +}
72 +
73 +MACHINE_START(GUMSTIX, "The Gumstix Platform")
74 + .phys_io = 0x40000000,
75 + .boot_params = 0xa0000100,
76 + .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
77 + .timer = &pxa_timer,
78 + .map_io = pxa_map_io,
79 + .init_irq = pxa_init_irq,
80 + .init_machine = gumstix_init,
81 +MACHINE_END
This page took 0.046997 seconds and 5 git commands to generate.