libdmx: Add fso-specs to DEPENDS
[openembedded.git] / recipes / linux / linux-gumstix-2.6.15 / board-init.patch
blob062e97f029646a1b01c05b1672c4b167a753ebd5
1 Index: linux-2.6.15gum/arch/arm/mach-pxa/gumstix.c
2 ===================================================================
3 --- /dev/null
4 +++ linux-2.6.15gum/arch/arm/mach-pxa/gumstix.c
5 @@ -0,0 +1,93 @@
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 + */
20 +#include <asm/types.h>
22 +#include <linux/init.h>
23 +#include <linux/device.h>
24 +#include <linux/platform_device.h>
26 +#include <asm/hardware.h>
27 +#include <asm/mach-types.h>
28 +#include <asm/mach/arch.h>
29 +#include <asm/arch/udc.h>
30 +#include <asm/arch/mmc.h>
31 +#include <asm/arch/pxa-regs.h>
32 +#include <asm/arch/gumstix.h>
34 +#include "generic.h"
36 +static int gumstix_mci_init(struct device *dev, irqreturn_t (*lubbock_detect_int)(int, void *, struct pt_regs *), void *data)
38 + // Set up MMC controller
39 + pxa_gpio_mode(GPIO6_MMCCLK_MD);
40 + pxa_gpio_mode(GPIO53_MMCCLK_MD);
41 + pxa_gpio_mode(GPIO8_MMCCS0_MD);
43 + return 0;
46 +static struct pxamci_platform_data gumstix_mci_platform_data = {
47 + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
48 + .init = &gumstix_mci_init,
49 +};
51 +static int gumstix_udc_is_connected(void)
53 + return !! (GPLR(GPIO_GUMSTIX_USB_GPIOn) & GPIO_bit(GPIO_GUMSTIX_USB_GPIOn));
56 +static void gumstix_udc_command(int connect_command)
58 + if (connect_command == PXA2XX_UDC_CMD_CONNECT) {
59 + pxa_gpio_mode(GPIO_GUMSTIX_USB_GPIOx_CON_MD);
60 + GPSR(GPIO_GUMSTIX_USB_GPIOx) = GPIO_bit(GPIO_GUMSTIX_USB_GPIOx);
61 + }
62 + if (connect_command == PXA2XX_UDC_CMD_DISCONNECT) {
63 + GPCR(GPIO_GUMSTIX_USB_GPIOx) = GPIO_bit(GPIO_GUMSTIX_USB_GPIOx);
64 + pxa_gpio_mode(GPIO_GUMSTIX_USB_GPIOx_DIS_MD);
65 + }
68 +static struct pxa2xx_udc_mach_info gumstix_udc_info __initdata = {
69 + .udc_is_connected = gumstix_udc_is_connected,
70 + .udc_command = gumstix_udc_command,
71 +};
73 +static struct platform_device gum_audio_device = {
74 + .name = "pxa2xx-ac97",
75 + .id = -1,
76 +};
78 +static struct platform_device *devices[] __initdata = {
79 + &gum_audio_device,
80 +};
82 +static void __init gumstix_init(void)
84 + pxa_set_mci_info(&gumstix_mci_platform_data);
85 + pxa_set_udc_info(&gumstix_udc_info);
86 + (void) platform_add_devices(devices, ARRAY_SIZE(devices));
89 +MACHINE_START(GUMSTIX, "The Gumstix Platform")
90 + .phys_ram = 0xa0000000,
91 + .phys_io = 0x40000000,
92 + .boot_params = 0xa0000100,
93 + .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
94 + .timer = &pxa_timer,
95 + .map_io = pxa_map_io,
96 + .init_irq = pxa_init_irq,
97 + .init_machine = gumstix_init,
98 +MACHINE_END