aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c69
-rw-r--r--arch/arm/mach-omap1/devices.c43
-rw-r--r--arch/arm/mach-omap1/include/mach/camera.h11
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c9
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c46
-rw-r--r--arch/arm/mach-omap2/devices.c8
-rw-r--r--arch/arm/mach-omap2/hsmmc.c7
-rw-r--r--arch/arm/mach-omap2/id.c72
-rw-r--r--arch/arm/mach-omap2/mux.c13
-rw-r--r--arch/arm/mach-omap2/mux.h2
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h36
-rw-r--r--arch/arm/plat-omap/include/plat/mmc.h4
12 files changed, 254 insertions, 66 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 41992ab71961..248e8bb64b6a 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -16,9 +16,12 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/input.h> 17#include <linux/input.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/leds.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/serial_8250.h> 21#include <linux/serial_8250.h>
21 22
23#include <media/soc_camera.h>
24
22#include <asm/serial.h> 25#include <asm/serial.h>
23#include <mach/hardware.h> 26#include <mach/hardware.h>
24#include <asm/mach-types.h> 27#include <asm/mach-types.h>
@@ -32,6 +35,7 @@
32#include <plat/usb.h> 35#include <plat/usb.h>
33#include <plat/board.h> 36#include <plat/board.h>
34#include <plat/common.h> 37#include <plat/common.h>
38#include <mach/camera.h>
35 39
36#include <mach/ams-delta-fiq.h> 40#include <mach/ams-delta-fiq.h>
37 41
@@ -213,10 +217,56 @@ static struct platform_device ams_delta_led_device = {
213 .id = -1 217 .id = -1
214}; 218};
215 219
220static struct i2c_board_info ams_delta_camera_board_info[] = {
221 {
222 I2C_BOARD_INFO("ov6650", 0x60),
223 },
224};
225
226#ifdef CONFIG_LEDS_TRIGGERS
227DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
228
229static int ams_delta_camera_power(struct device *dev, int power)
230{
231 /*
232 * turn on camera LED
233 */
234 if (power)
235 led_trigger_event(ams_delta_camera_led_trigger, LED_FULL);
236 else
237 led_trigger_event(ams_delta_camera_led_trigger, LED_OFF);
238 return 0;
239}
240#else
241#define ams_delta_camera_power NULL
242#endif
243
244static struct soc_camera_link __initdata ams_delta_iclink = {
245 .bus_id = 0, /* OMAP1 SoC camera bus */
246 .i2c_adapter_id = 1,
247 .board_info = &ams_delta_camera_board_info[0],
248 .module_name = "ov6650",
249 .power = ams_delta_camera_power,
250};
251
252static struct platform_device ams_delta_camera_device = {
253 .name = "soc-camera-pdrv",
254 .id = 0,
255 .dev = {
256 .platform_data = &ams_delta_iclink,
257 },
258};
259
260static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
261 .camexclk_khz = 12000, /* default 12MHz clock, no extra DPLL */
262 .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */
263};
264
216static struct platform_device *ams_delta_devices[] __initdata = { 265static struct platform_device *ams_delta_devices[] __initdata = {
217 &ams_delta_kp_device, 266 &ams_delta_kp_device,
218 &ams_delta_lcd_device, 267 &ams_delta_lcd_device,
219 &ams_delta_led_device, 268 &ams_delta_led_device,
269 &ams_delta_camera_device,
220}; 270};
221 271
222static void __init ams_delta_init(void) 272static void __init ams_delta_init(void)
@@ -225,6 +275,20 @@ static void __init ams_delta_init(void)
225 omap_cfg_reg(UART1_TX); 275 omap_cfg_reg(UART1_TX);
226 omap_cfg_reg(UART1_RTS); 276 omap_cfg_reg(UART1_RTS);
227 277
278 /* parallel camera interface */
279 omap_cfg_reg(H19_1610_CAM_EXCLK);
280 omap_cfg_reg(J15_1610_CAM_LCLK);
281 omap_cfg_reg(L18_1610_CAM_VS);
282 omap_cfg_reg(L15_1610_CAM_HS);
283 omap_cfg_reg(L19_1610_CAM_D0);
284 omap_cfg_reg(K14_1610_CAM_D1);
285 omap_cfg_reg(K15_1610_CAM_D2);
286 omap_cfg_reg(K19_1610_CAM_D3);
287 omap_cfg_reg(K18_1610_CAM_D4);
288 omap_cfg_reg(J14_1610_CAM_D5);
289 omap_cfg_reg(J19_1610_CAM_D6);
290 omap_cfg_reg(J18_1610_CAM_D7);
291
228 iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); 292 iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));
229 293
230 omap_board_config = ams_delta_config; 294 omap_board_config = ams_delta_config;
@@ -236,6 +300,11 @@ static void __init ams_delta_init(void)
236 ams_delta_latch2_write(~0, 0); 300 ams_delta_latch2_write(~0, 0);
237 301
238 omap1_usb_init(&ams_delta_usb_config); 302 omap1_usb_init(&ams_delta_usb_config);
303 omap1_set_camera_info(&ams_delta_camera_platform_data);
304#ifdef CONFIG_LEDS_TRIGGERS
305 led_trigger_register_simple("ams_delta_camera",
306 &ams_delta_camera_led_trigger);
307#endif
239 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); 308 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
240 309
241#ifdef CONFIG_AMS_DELTA_FIQ 310#ifdef CONFIG_AMS_DELTA_FIQ
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index aa0725608fb1..2c9a030c5595 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -9,6 +9,7 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/dma-mapping.h>
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/kernel.h> 14#include <linux/kernel.h>
14#include <linux/init.h> 15#include <linux/init.h>
@@ -191,6 +192,48 @@ static inline void omap_init_spi100k(void)
191} 192}
192#endif 193#endif
193 194
195
196#define OMAP1_CAMERA_BASE 0xfffb6800
197#define OMAP1_CAMERA_IOSIZE 0x1c
198
199static struct resource omap1_camera_resources[] = {
200 [0] = {
201 .start = OMAP1_CAMERA_BASE,
202 .end = OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1,
203 .flags = IORESOURCE_MEM,
204 },
205 [1] = {
206 .start = INT_CAMERA,
207 .flags = IORESOURCE_IRQ,
208 },
209};
210
211static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32);
212
213static struct platform_device omap1_camera_device = {
214 .name = "omap1-camera",
215 .id = 0, /* This is used to put cameras on this interface */
216 .dev = {
217 .dma_mask = &omap1_camera_dma_mask,
218 .coherent_dma_mask = DMA_BIT_MASK(32),
219 },
220 .num_resources = ARRAY_SIZE(omap1_camera_resources),
221 .resource = omap1_camera_resources,
222};
223
224void __init omap1_camera_init(void *info)
225{
226 struct platform_device *dev = &omap1_camera_device;
227 int ret;
228
229 dev->dev.platform_data = info;
230
231 ret = platform_device_register(dev);
232 if (ret)
233 dev_err(&dev->dev, "unable to register device: %d\n", ret);
234}
235
236
194/*-------------------------------------------------------------------------*/ 237/*-------------------------------------------------------------------------*/
195 238
196static inline void omap_init_sti(void) {} 239static inline void omap_init_sti(void) {}
diff --git a/arch/arm/mach-omap1/include/mach/camera.h b/arch/arm/mach-omap1/include/mach/camera.h
new file mode 100644
index 000000000000..fd54b452eb22
--- /dev/null
+++ b/arch/arm/mach-omap1/include/mach/camera.h
@@ -0,0 +1,11 @@
1#ifndef __ASM_ARCH_CAMERA_H_
2#define __ASM_ARCH_CAMERA_H_
3
4void omap1_camera_init(void *);
5
6static inline void omap1_set_camera_info(struct omap1_cam_platform_data *info)
7{
8 omap1_camera_init(info);
9}
10
11#endif /* __ASM_ARCH_CAMERA_H_ */
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index d70b58002d2b..1d7d70ae7cb8 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -243,6 +243,7 @@ static struct omap2_hsmmc_info mmc[] = {
243 .gpio_cd = -EINVAL, 243 .gpio_cd = -EINVAL,
244 .gpio_wp = -EINVAL, 244 .gpio_wp = -EINVAL,
245 .nonremovable = true, 245 .nonremovable = true,
246 .ocr_mask = MMC_VDD_29_30,
246 }, 247 },
247 {} /* Terminator */ 248 {} /* Terminator */
248}; 249};
@@ -276,8 +277,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
276 277
277static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) 278static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
278{ 279{
279 struct omap_mmc_platform_data *pdata = dev->platform_data; 280 struct omap_mmc_platform_data *pdata;
280 281
282 /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
283 if (!dev) {
284 pr_err("Failed %s\n", __func__);
285 return;
286 }
287 pdata = dev->platform_data;
281 pdata->init = omap4_twl6030_hsmmc_late_init; 288 pdata->init = omap4_twl6030_hsmmc_late_init;
282} 289}
283 290
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 2d2e6fc127ac..7192635161c1 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -34,6 +34,7 @@
34#include <linux/gpio_keys.h> 34#include <linux/gpio_keys.h>
35#include <linux/mmc/host.h> 35#include <linux/mmc/host.h>
36#include <linux/mmc/card.h> 36#include <linux/mmc/card.h>
37#include <linux/regulator/fixed.h>
37 38
38#include <asm/mach-types.h> 39#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
@@ -345,6 +346,9 @@ static struct regulator_consumer_supply pandora_vmmc1_supply =
345static struct regulator_consumer_supply pandora_vmmc2_supply = 346static struct regulator_consumer_supply pandora_vmmc2_supply =
346 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); 347 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
347 348
349static struct regulator_consumer_supply pandora_vmmc3_supply =
350 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2");
351
348static struct regulator_consumer_supply pandora_vdda_dac_supply = 352static struct regulator_consumer_supply pandora_vdda_dac_supply =
349 REGULATOR_SUPPLY("vdda_dac", "omapdss"); 353 REGULATOR_SUPPLY("vdda_dac", "omapdss");
350 354
@@ -489,6 +493,33 @@ static struct regulator_init_data pandora_vsim = {
489 .consumer_supplies = &pandora_adac_supply, 493 .consumer_supplies = &pandora_adac_supply,
490}; 494};
491 495
496/* Fixed regulator internal to Wifi module */
497static struct regulator_init_data pandora_vmmc3 = {
498 .constraints = {
499 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
500 },
501 .num_consumer_supplies = 1,
502 .consumer_supplies = &pandora_vmmc3_supply,
503};
504
505static struct fixed_voltage_config pandora_vwlan = {
506 .supply_name = "vwlan",
507 .microvolts = 1800000, /* 1.8V */
508 .gpio = PANDORA_WIFI_NRESET_GPIO,
509 .startup_delay = 50000, /* 50ms */
510 .enable_high = 1,
511 .enabled_at_boot = 0,
512 .init_data = &pandora_vmmc3,
513};
514
515static struct platform_device pandora_vwlan_device = {
516 .name = "reg-fixed-voltage",
517 .id = 1,
518 .dev = {
519 .platform_data = &pandora_vwlan,
520 },
521};
522
492static struct twl4030_usb_data omap3pandora_usb_data = { 523static struct twl4030_usb_data omap3pandora_usb_data = {
493 .usb_mode = T2_USB_MODE_ULPI, 524 .usb_mode = T2_USB_MODE_ULPI,
494}; 525};
@@ -502,6 +533,8 @@ static struct twl4030_codec_data omap3pandora_codec_data = {
502 .audio = &omap3pandora_audio_data, 533 .audio = &omap3pandora_audio_data,
503}; 534};
504 535
536static struct twl4030_bci_platform_data pandora_bci_data;
537
505static struct twl4030_platform_data omap3pandora_twldata = { 538static struct twl4030_platform_data omap3pandora_twldata = {
506 .irq_base = TWL4030_IRQ_BASE, 539 .irq_base = TWL4030_IRQ_BASE,
507 .irq_end = TWL4030_IRQ_END, 540 .irq_end = TWL4030_IRQ_END,
@@ -517,6 +550,7 @@ static struct twl4030_platform_data omap3pandora_twldata = {
517 .vaux4 = &pandora_vaux4, 550 .vaux4 = &pandora_vaux4,
518 .vsim = &pandora_vsim, 551 .vsim = &pandora_vsim,
519 .keypad = &pandora_kp_data, 552 .keypad = &pandora_kp_data,
553 .bci = &pandora_bci_data,
520}; 554};
521 555
522static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = { 556static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = {
@@ -645,19 +679,8 @@ static void pandora_wl1251_init(void)
645 if (pandora_wl1251_pdata.irq < 0) 679 if (pandora_wl1251_pdata.irq < 0)
646 goto fail_irq; 680 goto fail_irq;
647 681
648 ret = gpio_request(PANDORA_WIFI_NRESET_GPIO, "wl1251 nreset");
649 if (ret < 0)
650 goto fail_irq;
651
652 /* start powered so that it probes with MMC subsystem */
653 ret = gpio_direction_output(PANDORA_WIFI_NRESET_GPIO, 1);
654 if (ret < 0)
655 goto fail_nreset;
656
657 return; 682 return;
658 683
659fail_nreset:
660 gpio_free(PANDORA_WIFI_NRESET_GPIO);
661fail_irq: 684fail_irq:
662 gpio_free(PANDORA_WIFI_IRQ_GPIO); 685 gpio_free(PANDORA_WIFI_IRQ_GPIO);
663fail: 686fail:
@@ -669,6 +692,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
669 &pandora_keys_gpio, 692 &pandora_keys_gpio,
670 &pandora_dss_device, 693 &pandora_dss_device,
671 &pandora_wl1251_data, 694 &pandora_wl1251_data,
695 &pandora_vwlan_device,
672}; 696};
673 697
674static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 698static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 9e5d51bee94a..9bd4b3452453 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -817,13 +817,13 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
817 case 3: 817 case 3:
818 if (!cpu_is_omap44xx()) 818 if (!cpu_is_omap44xx())
819 return; 819 return;
820 base = OMAP4_MMC4_BASE + OMAP4_MMC_REG_OFFSET; 820 base = OMAP4_MMC4_BASE;
821 irq = OMAP44XX_IRQ_MMC4; 821 irq = OMAP44XX_IRQ_MMC4;
822 break; 822 break;
823 case 4: 823 case 4:
824 if (!cpu_is_omap44xx()) 824 if (!cpu_is_omap44xx())
825 return; 825 return;
826 base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET; 826 base = OMAP4_MMC5_BASE;
827 irq = OMAP44XX_IRQ_MMC5; 827 irq = OMAP44XX_IRQ_MMC5;
828 break; 828 break;
829 default: 829 default:
@@ -834,10 +834,8 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
834 size = OMAP2420_MMC_SIZE; 834 size = OMAP2420_MMC_SIZE;
835 name = "mmci-omap"; 835 name = "mmci-omap";
836 } else if (cpu_is_omap44xx()) { 836 } else if (cpu_is_omap44xx()) {
837 if (i < 3) { 837 if (i < 3)
838 base += OMAP4_MMC_REG_OFFSET;
839 irq += OMAP44XX_IRQ_GIC_START; 838 irq += OMAP44XX_IRQ_GIC_START;
840 }
841 size = OMAP4_HSMMC_SIZE; 839 size = OMAP4_HSMMC_SIZE;
842 name = "mmci-omap-hs"; 840 name = "mmci-omap-hs";
843 } else { 841 } else {
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index eb92b8107d2c..ab78a5a8d9b0 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -266,6 +266,10 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
266 mmc->slots[0].caps = c->caps; 266 mmc->slots[0].caps = c->caps;
267 mmc->slots[0].internal_clock = !c->ext_clock; 267 mmc->slots[0].internal_clock = !c->ext_clock;
268 mmc->dma_mask = 0xffffffff; 268 mmc->dma_mask = 0xffffffff;
269 if (cpu_is_omap44xx())
270 mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
271 else
272 mmc->reg_offset = 0;
269 273
270 mmc->get_context_loss_count = hsmmc_get_context_loss; 274 mmc->get_context_loss_count = hsmmc_get_context_loss;
271 275
@@ -303,6 +307,9 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
303 else 307 else
304 mmc->slots[0].features |= HSMMC_HAS_PBIAS; 308 mmc->slots[0].features |= HSMMC_HAS_PBIAS;
305 309
310 if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
311 mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
312
306 switch (c->mmc) { 313 switch (c->mmc) {
307 case 1: 314 case 1:
308 if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { 315 if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 0412233da2b3..04a2fa240bc3 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -385,30 +385,54 @@ static void __init omap3_cpuinfo(void)
385 strcpy(cpu_name, "OMAP3503"); 385 strcpy(cpu_name, "OMAP3503");
386 } 386 }
387 387
388 switch (rev) { 388 if (cpu_is_omap3630()) {
389 case OMAP_REVBITS_00: 389 switch (rev) {
390 strcpy(cpu_rev, "1.0"); 390 case OMAP_REVBITS_00:
391 break; 391 strcpy(cpu_rev, "1.0");
392 case OMAP_REVBITS_01: 392 break;
393 strcpy(cpu_rev, "1.1"); 393 case OMAP_REVBITS_01:
394 break; 394 strcpy(cpu_rev, "1.1");
395 case OMAP_REVBITS_02: 395 break;
396 strcpy(cpu_rev, "1.2"); 396 case OMAP_REVBITS_02:
397 break; 397 /* FALLTHROUGH */
398 case OMAP_REVBITS_10: 398 default:
399 strcpy(cpu_rev, "2.0"); 399 /* Use the latest known revision as default */
400 break; 400 strcpy(cpu_rev, "1.2");
401 case OMAP_REVBITS_20: 401 }
402 strcpy(cpu_rev, "2.1"); 402 } else if (cpu_is_omap3505() || cpu_is_omap3517()) {
403 break; 403 switch (rev) {
404 case OMAP_REVBITS_30: 404 case OMAP_REVBITS_00:
405 strcpy(cpu_rev, "3.0"); 405 strcpy(cpu_rev, "1.0");
406 break; 406 break;
407 case OMAP_REVBITS_40: 407 case OMAP_REVBITS_01:
408 /* FALLTHROUGH */ 408 /* FALLTHROUGH */
409 default: 409 default:
410 /* Use the latest known revision as default */ 410 /* Use the latest known revision as default */
411 strcpy(cpu_rev, "3.1"); 411 strcpy(cpu_rev, "1.1");
412 }
413 } else {
414 switch (rev) {
415 case OMAP_REVBITS_00:
416 strcpy(cpu_rev, "1.0");
417 break;
418 case OMAP_REVBITS_01:
419 strcpy(cpu_rev, "2.0");
420 break;
421 case OMAP_REVBITS_02:
422 strcpy(cpu_rev, "2.1");
423 break;
424 case OMAP_REVBITS_03:
425 strcpy(cpu_rev, "3.0");
426 break;
427 case OMAP_REVBITS_04:
428 strcpy(cpu_rev, "3.1");
429 break;
430 case OMAP_REVBITS_05:
431 /* FALLTHROUGH */
432 default:
433 /* Use the latest known revision as default */
434 strcpy(cpu_rev, "3.1.2");
435 }
412 } 436 }
413 437
414 /* Print verbose information */ 438 /* Print verbose information */
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 6c2f8f0c0edb..e33740c091be 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -127,17 +127,16 @@ int __init omap_mux_init_gpio(int gpio, int val)
127 return 0; 127 return 0;
128} 128}
129 129
130int __init omap_mux_init_signal(char *muxname, int val) 130int __init omap_mux_init_signal(const char *muxname, int val)
131{ 131{
132 struct omap_mux_entry *e; 132 struct omap_mux_entry *e;
133 char *m0_name = NULL, *mode_name = NULL; 133 const char *mode_name;
134 int found = 0; 134 int found = 0, mode0_len = 0;
135 135
136 mode_name = strchr(muxname, '.'); 136 mode_name = strchr(muxname, '.');
137 if (mode_name) { 137 if (mode_name) {
138 *mode_name = '\0'; 138 mode0_len = strlen(muxname) - strlen(mode_name);
139 mode_name++; 139 mode_name++;
140 m0_name = muxname;
141 } else { 140 } else {
142 mode_name = muxname; 141 mode_name = muxname;
143 } 142 }
@@ -147,9 +146,11 @@ int __init omap_mux_init_signal(char *muxname, int val)
147 char *m0_entry = m->muxnames[0]; 146 char *m0_entry = m->muxnames[0];
148 int i; 147 int i;
149 148
150 if (m0_name && strcmp(m0_name, m0_entry)) 149 /* First check for full name in mode0.muxmode format */
150 if (mode0_len && strncmp(muxname, m0_entry, mode0_len))
151 continue; 151 continue;
152 152
153 /* Then check for muxmode only */
153 for (i = 0; i < OMAP_MUX_NR_MODES; i++) { 154 for (i = 0; i < OMAP_MUX_NR_MODES; i++) {
154 char *mode_cur = m->muxnames[i]; 155 char *mode_cur = m->muxnames[i];
155 156
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h
index a8e040c2c7e9..350c04f27383 100644
--- a/arch/arm/mach-omap2/mux.h
+++ b/arch/arm/mach-omap2/mux.h
@@ -120,7 +120,7 @@ int omap_mux_init_gpio(int gpio, int val);
120 * @muxname: Mux name in mode0_name.signal_name format 120 * @muxname: Mux name in mode0_name.signal_name format
121 * @val: Options for the mux register value 121 * @val: Options for the mux register value
122 */ 122 */
123int omap_mux_init_signal(char *muxname, int val); 123int omap_mux_init_signal(const char *muxname, int val);
124 124
125#else 125#else
126 126
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 9b38e4bddf57..3fd8b4055727 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -68,10 +68,9 @@ unsigned int omap_rev(void);
68#define OMAP_REVBITS_00 0x00 68#define OMAP_REVBITS_00 0x00
69#define OMAP_REVBITS_01 0x01 69#define OMAP_REVBITS_01 0x01
70#define OMAP_REVBITS_02 0x02 70#define OMAP_REVBITS_02 0x02
71#define OMAP_REVBITS_10 0x10 71#define OMAP_REVBITS_03 0x03
72#define OMAP_REVBITS_20 0x20 72#define OMAP_REVBITS_04 0x04
73#define OMAP_REVBITS_30 0x30 73#define OMAP_REVBITS_05 0x05
74#define OMAP_REVBITS_40 0x40
75 74
76/* 75/*
77 * Get the CPU revision for OMAP devices 76 * Get the CPU revision for OMAP devices
@@ -363,23 +362,24 @@ IS_OMAP_TYPE(3517, 0x3517)
363 362
364/* Various silicon revisions for omap2 */ 363/* Various silicon revisions for omap2 */
365#define OMAP242X_CLASS 0x24200024 364#define OMAP242X_CLASS 0x24200024
366#define OMAP2420_REV_ES1_0 0x24200024 365#define OMAP2420_REV_ES1_0 OMAP242X_CLASS
367#define OMAP2420_REV_ES2_0 0x24201024 366#define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (OMAP_REVBITS_01 << 8))
368 367
369#define OMAP243X_CLASS 0x24300024 368#define OMAP243X_CLASS 0x24300024
370#define OMAP2430_REV_ES1_0 0x24300024 369#define OMAP2430_REV_ES1_0 OMAP243X_CLASS
371 370
372#define OMAP343X_CLASS 0x34300034 371#define OMAP343X_CLASS 0x34300034
373#define OMAP3430_REV_ES1_0 0x34300034 372#define OMAP3430_REV_ES1_0 OMAP343X_CLASS
374#define OMAP3430_REV_ES2_0 0x34301034 373#define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (OMAP_REVBITS_01 << 8))
375#define OMAP3430_REV_ES2_1 0x34302034 374#define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (OMAP_REVBITS_02 << 8))
376#define OMAP3430_REV_ES3_0 0x34303034 375#define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (OMAP_REVBITS_03 << 8))
377#define OMAP3430_REV_ES3_1 0x34304034 376#define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (OMAP_REVBITS_04 << 8))
378#define OMAP3430_REV_ES3_1_2 0x34305034 377#define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (OMAP_REVBITS_05 << 8))
379 378
380#define OMAP3630_REV_ES1_0 0x36300034 379#define OMAP363X_CLASS 0x36300034
381#define OMAP3630_REV_ES1_1 0x36300134 380#define OMAP3630_REV_ES1_0 OMAP363X_CLASS
382#define OMAP3630_REV_ES1_2 0x36300234 381#define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (OMAP_REVBITS_01 << 8))
382#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (OMAP_REVBITS_02 << 8))
383 383
384#define OMAP35XX_CLASS 0x35000034 384#define OMAP35XX_CLASS 0x35000034
385#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) 385#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
@@ -390,7 +390,7 @@ IS_OMAP_TYPE(3517, 0x3517)
390#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) 390#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8))
391 391
392#define OMAP443X_CLASS 0x44300044 392#define OMAP443X_CLASS 0x44300044
393#define OMAP4430_REV_ES1_0 0x44300044 393#define OMAP4430_REV_ES1_0 OMAP443X_CLASS
394#define OMAP4430_REV_ES2_0 0x44301044 394#define OMAP4430_REV_ES2_0 0x44301044
395 395
396/* 396/*
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h
index c5f35f87deaa..f57f36abb07e 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -71,6 +71,9 @@ struct omap_mmc_platform_data {
71 71
72 u64 dma_mask; 72 u64 dma_mask;
73 73
74 /* Register offset deviation */
75 u16 reg_offset;
76
74 struct omap_mmc_slot_data { 77 struct omap_mmc_slot_data {
75 78
76 /* 79 /*
@@ -106,6 +109,7 @@ struct omap_mmc_platform_data {
106 109
107 /* we can put the features above into this variable */ 110 /* we can put the features above into this variable */
108#define HSMMC_HAS_PBIAS (1 << 0) 111#define HSMMC_HAS_PBIAS (1 << 0)
112#define HSMMC_HAS_UPDATED_RESET (1 << 1)
109 unsigned features; 113 unsigned features;
110 114
111 int switch_pin; /* gpio (card detect) */ 115 int switch_pin; /* gpio (card detect) */