diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-debugboard.c')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-debugboard.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index 91ecddc9057a..bb4018b60642 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c | |||
@@ -16,18 +16,18 @@ | |||
16 | 16 | ||
17 | #include <plat/gpmc.h> | 17 | #include <plat/gpmc.h> |
18 | 18 | ||
19 | #define ZOOM2_SMSC911X_CS 7 | 19 | #define ZOOM_SMSC911X_CS 7 |
20 | #define ZOOM2_SMSC911X_GPIO 158 | 20 | #define ZOOM_SMSC911X_GPIO 158 |
21 | #define ZOOM2_QUADUART_CS 3 | 21 | #define ZOOM_QUADUART_CS 3 |
22 | #define ZOOM2_QUADUART_GPIO 102 | 22 | #define ZOOM_QUADUART_GPIO 102 |
23 | #define QUART_CLK 1843200 | 23 | #define QUART_CLK 1843200 |
24 | #define DEBUG_BASE 0x08000000 | 24 | #define DEBUG_BASE 0x08000000 |
25 | #define ZOOM2_ETHR_START DEBUG_BASE | 25 | #define ZOOM_ETHR_START DEBUG_BASE |
26 | 26 | ||
27 | static struct resource zoom2_smsc911x_resources[] = { | 27 | static struct resource zoom_smsc911x_resources[] = { |
28 | [0] = { | 28 | [0] = { |
29 | .start = ZOOM2_ETHR_START, | 29 | .start = ZOOM_ETHR_START, |
30 | .end = ZOOM2_ETHR_START + SZ_4K, | 30 | .end = ZOOM_ETHR_START + SZ_4K, |
31 | .flags = IORESOURCE_MEM, | 31 | .flags = IORESOURCE_MEM, |
32 | }, | 32 | }, |
33 | [1] = { | 33 | [1] = { |
@@ -35,42 +35,42 @@ static struct resource zoom2_smsc911x_resources[] = { | |||
35 | }, | 35 | }, |
36 | }; | 36 | }; |
37 | 37 | ||
38 | static struct smsc911x_platform_config zoom2_smsc911x_config = { | 38 | static struct smsc911x_platform_config zoom_smsc911x_config = { |
39 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | 39 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
40 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | 40 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, |
41 | .flags = SMSC911X_USE_32BIT, | 41 | .flags = SMSC911X_USE_32BIT, |
42 | .phy_interface = PHY_INTERFACE_MODE_MII, | 42 | .phy_interface = PHY_INTERFACE_MODE_MII, |
43 | }; | 43 | }; |
44 | 44 | ||
45 | static struct platform_device zoom2_smsc911x_device = { | 45 | static struct platform_device zoom_smsc911x_device = { |
46 | .name = "smsc911x", | 46 | .name = "smsc911x", |
47 | .id = -1, | 47 | .id = -1, |
48 | .num_resources = ARRAY_SIZE(zoom2_smsc911x_resources), | 48 | .num_resources = ARRAY_SIZE(zoom_smsc911x_resources), |
49 | .resource = zoom2_smsc911x_resources, | 49 | .resource = zoom_smsc911x_resources, |
50 | .dev = { | 50 | .dev = { |
51 | .platform_data = &zoom2_smsc911x_config, | 51 | .platform_data = &zoom_smsc911x_config, |
52 | }, | 52 | }, |
53 | }; | 53 | }; |
54 | 54 | ||
55 | static inline void __init zoom2_init_smsc911x(void) | 55 | static inline void __init zoom_init_smsc911x(void) |
56 | { | 56 | { |
57 | int eth_cs; | 57 | int eth_cs; |
58 | unsigned long cs_mem_base; | 58 | unsigned long cs_mem_base; |
59 | int eth_gpio = 0; | 59 | int eth_gpio = 0; |
60 | 60 | ||
61 | eth_cs = ZOOM2_SMSC911X_CS; | 61 | eth_cs = ZOOM_SMSC911X_CS; |
62 | 62 | ||
63 | if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { | 63 | if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { |
64 | printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n"); | 64 | printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n"); |
65 | return; | 65 | return; |
66 | } | 66 | } |
67 | 67 | ||
68 | zoom2_smsc911x_resources[0].start = cs_mem_base + 0x0; | 68 | zoom_smsc911x_resources[0].start = cs_mem_base + 0x0; |
69 | zoom2_smsc911x_resources[0].end = cs_mem_base + 0xff; | 69 | zoom_smsc911x_resources[0].end = cs_mem_base + 0xff; |
70 | 70 | ||
71 | eth_gpio = ZOOM2_SMSC911X_GPIO; | 71 | eth_gpio = ZOOM_SMSC911X_GPIO; |
72 | 72 | ||
73 | zoom2_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); | 73 | zoom_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); |
74 | 74 | ||
75 | if (gpio_request(eth_gpio, "smsc911x irq") < 0) { | 75 | if (gpio_request(eth_gpio, "smsc911x irq") < 0) { |
76 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", | 76 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", |
@@ -94,7 +94,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
94 | } | 94 | } |
95 | }; | 95 | }; |
96 | 96 | ||
97 | static struct platform_device zoom2_debugboard_serial_device = { | 97 | static struct platform_device zoom_debugboard_serial_device = { |
98 | .name = "serial8250", | 98 | .name = "serial8250", |
99 | .id = 3, | 99 | .id = 3, |
100 | .dev = { | 100 | .dev = { |
@@ -102,13 +102,13 @@ static struct platform_device zoom2_debugboard_serial_device = { | |||
102 | }, | 102 | }, |
103 | }; | 103 | }; |
104 | 104 | ||
105 | static inline void __init zoom2_init_quaduart(void) | 105 | static inline void __init zoom_init_quaduart(void) |
106 | { | 106 | { |
107 | int quart_cs; | 107 | int quart_cs; |
108 | unsigned long cs_mem_base; | 108 | unsigned long cs_mem_base; |
109 | int quart_gpio = 0; | 109 | int quart_gpio = 0; |
110 | 110 | ||
111 | quart_cs = ZOOM2_QUADUART_CS; | 111 | quart_cs = ZOOM_QUADUART_CS; |
112 | 112 | ||
113 | if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) { | 113 | if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) { |
114 | printk(KERN_ERR "Failed to request GPMC mem" | 114 | printk(KERN_ERR "Failed to request GPMC mem" |
@@ -116,7 +116,7 @@ static inline void __init zoom2_init_quaduart(void) | |||
116 | return; | 116 | return; |
117 | } | 117 | } |
118 | 118 | ||
119 | quart_gpio = ZOOM2_QUADUART_GPIO; | 119 | quart_gpio = ZOOM_QUADUART_GPIO; |
120 | 120 | ||
121 | if (gpio_request(quart_gpio, "TL16CP754C GPIO") < 0) { | 121 | if (gpio_request(quart_gpio, "TL16CP754C GPIO") < 0) { |
122 | printk(KERN_ERR "Failed to request GPIO%d for TL16CP754C\n", | 122 | printk(KERN_ERR "Failed to request GPIO%d for TL16CP754C\n", |
@@ -126,15 +126,15 @@ static inline void __init zoom2_init_quaduart(void) | |||
126 | gpio_direction_input(quart_gpio); | 126 | gpio_direction_input(quart_gpio); |
127 | } | 127 | } |
128 | 128 | ||
129 | static inline int omap_zoom2_debugboard_detect(void) | 129 | static inline int omap_zoom_debugboard_detect(void) |
130 | { | 130 | { |
131 | int debug_board_detect = 0; | 131 | int debug_board_detect = 0; |
132 | int ret = 1; | 132 | int ret = 1; |
133 | 133 | ||
134 | debug_board_detect = ZOOM2_SMSC911X_GPIO; | 134 | debug_board_detect = ZOOM_SMSC911X_GPIO; |
135 | 135 | ||
136 | if (gpio_request(debug_board_detect, "Zoom2 debug board detect") < 0) { | 136 | if (gpio_request(debug_board_detect, "Zoom debug board detect") < 0) { |
137 | printk(KERN_ERR "Failed to request GPIO%d for Zoom2 debug" | 137 | printk(KERN_ERR "Failed to request GPIO%d for Zoom debug" |
138 | "board detect\n", debug_board_detect); | 138 | "board detect\n", debug_board_detect); |
139 | return 0; | 139 | return 0; |
140 | } | 140 | } |
@@ -147,17 +147,17 @@ static inline int omap_zoom2_debugboard_detect(void) | |||
147 | return ret; | 147 | return ret; |
148 | } | 148 | } |
149 | 149 | ||
150 | static struct platform_device *zoom2_devices[] __initdata = { | 150 | static struct platform_device *zoom_devices[] __initdata = { |
151 | &zoom2_smsc911x_device, | 151 | &zoom_smsc911x_device, |
152 | &zoom2_debugboard_serial_device, | 152 | &zoom_debugboard_serial_device, |
153 | }; | 153 | }; |
154 | 154 | ||
155 | int __init omap_zoom2_debugboard_init(void) | 155 | int __init zoom_debugboard_init(void) |
156 | { | 156 | { |
157 | if (!omap_zoom2_debugboard_detect()) | 157 | if (!omap_zoom_debugboard_detect()) |
158 | return 0; | 158 | return 0; |
159 | 159 | ||
160 | zoom2_init_smsc911x(); | 160 | zoom_init_smsc911x(); |
161 | zoom2_init_quaduart(); | 161 | zoom_init_quaduart(); |
162 | return platform_add_devices(zoom2_devices, ARRAY_SIZE(zoom2_devices)); | 162 | return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices)); |
163 | } | 163 | } |