aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c70
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c77
-rw-r--r--arch/arm/mach-omap2/board-zoom2.c7
-rw-r--r--arch/arm/mach-omap2/include/mach/board-zoom.h5
4 files changed, 81 insertions, 78 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 91ecddc9057..bb4018b6064 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
27static struct resource zoom2_smsc911x_resources[] = { 27static 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
38static struct smsc911x_platform_config zoom2_smsc911x_config = { 38static 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
45static struct platform_device zoom2_smsc911x_device = { 45static 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
55static inline void __init zoom2_init_smsc911x(void) 55static 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
97static struct platform_device zoom2_debugboard_serial_device = { 97static 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
105static inline void __init zoom2_init_quaduart(void) 105static 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
129static inline int omap_zoom2_debugboard_detect(void) 129static 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
150static struct platform_device *zoom2_devices[] __initdata = { 150static 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
155int __init omap_zoom2_debugboard_init(void) 155int __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}
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 75cbbe74724..3535b7a73af 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -86,27 +86,27 @@ static struct matrix_keymap_data board_map_data = {
86 .keymap_size = ARRAY_SIZE(board_keymap), 86 .keymap_size = ARRAY_SIZE(board_keymap),
87}; 87};
88 88
89static struct twl4030_keypad_data zoom2_kp_twl4030_data = { 89static struct twl4030_keypad_data zoom_kp_twl4030_data = {
90 .keymap_data = &board_map_data, 90 .keymap_data = &board_map_data,
91 .rows = 8, 91 .rows = 8,
92 .cols = 8, 92 .cols = 8,
93 .rep = 1, 93 .rep = 1,
94}; 94};
95 95
96static struct regulator_consumer_supply zoom2_vmmc1_supply = { 96static struct regulator_consumer_supply zoom_vmmc1_supply = {
97 .supply = "vmmc", 97 .supply = "vmmc",
98}; 98};
99 99
100static struct regulator_consumer_supply zoom2_vsim_supply = { 100static struct regulator_consumer_supply zoom_vsim_supply = {
101 .supply = "vmmc_aux", 101 .supply = "vmmc_aux",
102}; 102};
103 103
104static struct regulator_consumer_supply zoom2_vmmc2_supply = { 104static struct regulator_consumer_supply zoom_vmmc2_supply = {
105 .supply = "vmmc", 105 .supply = "vmmc",
106}; 106};
107 107
108/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ 108/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
109static struct regulator_init_data zoom2_vmmc1 = { 109static struct regulator_init_data zoom_vmmc1 = {
110 .constraints = { 110 .constraints = {
111 .min_uV = 1850000, 111 .min_uV = 1850000,
112 .max_uV = 3150000, 112 .max_uV = 3150000,
@@ -117,11 +117,11 @@ static struct regulator_init_data zoom2_vmmc1 = {
117 | REGULATOR_CHANGE_STATUS, 117 | REGULATOR_CHANGE_STATUS,
118 }, 118 },
119 .num_consumer_supplies = 1, 119 .num_consumer_supplies = 1,
120 .consumer_supplies = &zoom2_vmmc1_supply, 120 .consumer_supplies = &zoom_vmmc1_supply,
121}; 121};
122 122
123/* VMMC2 for MMC2 card */ 123/* VMMC2 for MMC2 card */
124static struct regulator_init_data zoom2_vmmc2 = { 124static struct regulator_init_data zoom_vmmc2 = {
125 .constraints = { 125 .constraints = {
126 .min_uV = 1850000, 126 .min_uV = 1850000,
127 .max_uV = 1850000, 127 .max_uV = 1850000,
@@ -132,11 +132,11 @@ static struct regulator_init_data zoom2_vmmc2 = {
132 | REGULATOR_CHANGE_STATUS, 132 | REGULATOR_CHANGE_STATUS,
133 }, 133 },
134 .num_consumer_supplies = 1, 134 .num_consumer_supplies = 1,
135 .consumer_supplies = &zoom2_vmmc2_supply, 135 .consumer_supplies = &zoom_vmmc2_supply,
136}; 136};
137 137
138/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ 138/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
139static struct regulator_init_data zoom2_vsim = { 139static struct regulator_init_data zoom_vsim = {
140 .constraints = { 140 .constraints = {
141 .min_uV = 1800000, 141 .min_uV = 1800000,
142 .max_uV = 3000000, 142 .max_uV = 3000000,
@@ -147,7 +147,7 @@ static struct regulator_init_data zoom2_vsim = {
147 | REGULATOR_CHANGE_STATUS, 147 | REGULATOR_CHANGE_STATUS,
148 }, 148 },
149 .num_consumer_supplies = 1, 149 .num_consumer_supplies = 1,
150 .consumer_supplies = &zoom2_vsim_supply, 150 .consumer_supplies = &zoom_vsim_supply,
151}; 151};
152 152
153static struct twl4030_hsmmc_info mmc[] __initdata = { 153static struct twl4030_hsmmc_info mmc[] __initdata = {
@@ -164,7 +164,7 @@ static struct twl4030_hsmmc_info mmc[] __initdata = {
164 {} /* Terminator */ 164 {} /* Terminator */
165}; 165};
166 166
167static int zoom2_twl_gpio_setup(struct device *dev, 167static int zoom_twl_gpio_setup(struct device *dev,
168 unsigned gpio, unsigned ngpio) 168 unsigned gpio, unsigned ngpio)
169{ 169{
170 /* gpio + 0 is "mmc0_cd" (input/IRQ), 170 /* gpio + 0 is "mmc0_cd" (input/IRQ),
@@ -177,15 +177,15 @@ static int zoom2_twl_gpio_setup(struct device *dev,
177 /* link regulators to MMC adapters ... we "know" the 177 /* link regulators to MMC adapters ... we "know" the
178 * regulators will be set up only *after* we return. 178 * regulators will be set up only *after* we return.
179 */ 179 */
180 zoom2_vmmc1_supply.dev = mmc[0].dev; 180 zoom_vmmc1_supply.dev = mmc[0].dev;
181 zoom2_vsim_supply.dev = mmc[0].dev; 181 zoom_vsim_supply.dev = mmc[0].dev;
182 zoom2_vmmc2_supply.dev = mmc[1].dev; 182 zoom_vmmc2_supply.dev = mmc[1].dev;
183 183
184 return 0; 184 return 0;
185} 185}
186 186
187 187
188static int zoom2_batt_table[] = { 188static int zoom_batt_table[] = {
189/* 0 C*/ 189/* 0 C*/
19030800, 29500, 28300, 27100, 19030800, 29500, 28300, 27100,
19126000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, 19126000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
@@ -196,65 +196,64 @@ static int zoom2_batt_table[] = {
1964040, 3910, 3790, 3670, 3550 1964040, 3910, 3790, 3670, 3550
197}; 197};
198 198
199static struct twl4030_bci_platform_data zoom2_bci_data = { 199static struct twl4030_bci_platform_data zoom_bci_data = {
200 .battery_tmp_tbl = zoom2_batt_table, 200 .battery_tmp_tbl = zoom_batt_table,
201 .tblsize = ARRAY_SIZE(zoom2_batt_table), 201 .tblsize = ARRAY_SIZE(zoom_batt_table),
202}; 202};
203 203
204static struct twl4030_usb_data zoom2_usb_data = { 204static struct twl4030_usb_data zoom_usb_data = {
205 .usb_mode = T2_USB_MODE_ULPI, 205 .usb_mode = T2_USB_MODE_ULPI,
206}; 206};
207 207
208static struct twl4030_gpio_platform_data zoom2_gpio_data = { 208static struct twl4030_gpio_platform_data zoom_gpio_data = {
209 .gpio_base = OMAP_MAX_GPIO_LINES, 209 .gpio_base = OMAP_MAX_GPIO_LINES,
210 .irq_base = TWL4030_GPIO_IRQ_BASE, 210 .irq_base = TWL4030_GPIO_IRQ_BASE,
211 .irq_end = TWL4030_GPIO_IRQ_END, 211 .irq_end = TWL4030_GPIO_IRQ_END,
212 .setup = zoom2_twl_gpio_setup, 212 .setup = zoom_twl_gpio_setup,
213}; 213};
214 214
215static struct twl4030_madc_platform_data zoom2_madc_data = { 215static struct twl4030_madc_platform_data zoom_madc_data = {
216 .irq_line = 1, 216 .irq_line = 1,
217}; 217};
218 218
219static struct twl4030_codec_audio_data zoom2_audio_data = { 219static struct twl4030_codec_audio_data zoom_audio_data = {
220 .audio_mclk = 26000000, 220 .audio_mclk = 26000000,
221}; 221};
222 222
223static struct twl4030_codec_data zoom2_codec_data = { 223static struct twl4030_codec_data zoom_codec_data = {
224 .audio_mclk = 26000000, 224 .audio_mclk = 26000000,
225 .audio = &zoom2_audio_data, 225 .audio = &zoom_audio_data,
226}; 226};
227 227
228static struct twl4030_platform_data zoom2_twldata = { 228static struct twl4030_platform_data zoom_twldata = {
229 .irq_base = TWL4030_IRQ_BASE, 229 .irq_base = TWL4030_IRQ_BASE,
230 .irq_end = TWL4030_IRQ_END, 230 .irq_end = TWL4030_IRQ_END,
231 231
232 /* platform_data for children goes here */ 232 /* platform_data for children goes here */
233 .bci = &zoom2_bci_data, 233 .bci = &zoom_bci_data,
234 .madc = &zoom2_madc_data, 234 .madc = &zoom_madc_data,
235 .usb = &zoom2_usb_data, 235 .usb = &zoom_usb_data,
236 .gpio = &zoom2_gpio_data, 236 .gpio = &zoom_gpio_data,
237 .keypad = &zoom2_kp_twl4030_data, 237 .keypad = &zoom_kp_twl4030_data,
238 .codec = &zoom2_codec_data, 238 .codec = &zoom_codec_data,
239 .vmmc1 = &zoom2_vmmc1, 239 .vmmc2 = &zoom_vmmc2,
240 .vmmc2 = &zoom2_vmmc2, 240 .vsim = &zoom_vsim,
241 .vsim = &zoom2_vsim,
242 241
243}; 242};
244 243
245static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = { 244static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = {
246 { 245 {
247 I2C_BOARD_INFO("twl4030", 0x48), 246 I2C_BOARD_INFO("twl4030", 0x48),
248 .flags = I2C_CLIENT_WAKE, 247 .flags = I2C_CLIENT_WAKE,
249 .irq = INT_34XX_SYS_NIRQ, 248 .irq = INT_34XX_SYS_NIRQ,
250 .platform_data = &zoom2_twldata, 249 .platform_data = &zoom_twldata,
251 }, 250 },
252}; 251};
253 252
254static int __init omap_i2c_init(void) 253static int __init omap_i2c_init(void)
255{ 254{
256 omap_register_i2c_bus(1, 2600, zoom2_i2c_boardinfo, 255 omap_register_i2c_bus(1, 2600, zoom_i2c_boardinfo,
257 ARRAY_SIZE(zoom2_i2c_boardinfo)); 256 ARRAY_SIZE(zoom_i2c_boardinfo));
258 omap_register_i2c_bus(2, 400, NULL, 0); 257 omap_register_i2c_bus(2, 400, NULL, 0);
259 omap_register_i2c_bus(3, 400, NULL, 0); 258 omap_register_i2c_bus(3, 400, NULL, 0);
260 return 0; 259 return 0;
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 31d485b6859..2f980e36ebf 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -21,6 +21,8 @@
21#include <plat/common.h> 21#include <plat/common.h>
22#include <plat/board.h> 22#include <plat/board.h>
23 23
24#include <mach/board-zoom.h>
25
24#include "sdram-micron-mt46h32m32lf-6.h" 26#include "sdram-micron-mt46h32m32lf-6.h"
25 27
26static void __init omap_zoom2_init_irq(void) 28static void __init omap_zoom2_init_irq(void)
@@ -56,13 +58,10 @@ static struct twl4030_platform_data zoom2_twldata = {
56 58
57#endif 59#endif
58 60
59extern int __init omap_zoom2_debugboard_init(void);
60extern void __init zoom_peripherals_init(void);
61
62static void __init omap_zoom2_init(void) 61static void __init omap_zoom2_init(void)
63{ 62{
64 zoom_peripherals_init(); 63 zoom_peripherals_init();
65 omap_zoom2_debugboard_init(); 64 zoom_debugboard_init();
66} 65}
67 66
68static void __init omap_zoom2_map_io(void) 67static void __init omap_zoom2_map_io(void)
diff --git a/arch/arm/mach-omap2/include/mach/board-zoom.h b/arch/arm/mach-omap2/include/mach/board-zoom.h
new file mode 100644
index 00000000000..c93b29e21b7
--- /dev/null
+++ b/arch/arm/mach-omap2/include/mach/board-zoom.h
@@ -0,0 +1,5 @@
1/*
2 * Defines for zoom boards
3 */
4extern int __init zoom_debugboard_init(void);
5extern void __init zoom_peripherals_init(void);