aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-zoom-peripherals.c
diff options
context:
space:
mode:
authorvikram pandita <vikram.pandita@ti.com>2009-11-22 13:11:31 -0500
committerTony Lindgren <tony@atomide.com>2009-11-22 13:24:33 -0500
commit62d0b336d4b00bde6e3f0f155009975351823c54 (patch)
treef87c833df77d24b805589c7a6558d1890d5654aa /arch/arm/mach-omap2/board-zoom-peripherals.c
parent479f12c9e2743084ace94d8c65b98ec536cae3cf (diff)
omap3: zoom: rename zoom2 name to generic zoom
Replace zoom2 with zoom name in board-zoom-peripherals.c file and board-zoom-debugboard.c. Create mach/board-zoom.h. This file has functions reused for boards: Zoom2/Zoom3/sdp3630. Hence have all functions commonly named as zoom Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-peripherals.c')
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c77
1 files changed, 38 insertions, 39 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 75cbbe747246..3535b7a73af7 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;