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