diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2010-05-02 23:28:58 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2010-05-02 23:28:58 -0400 |
commit | df2071bd081408318d659cd14a9cf6ff23d874c9 (patch) | |
tree | b31291b5fd4b9f84c629833afbfaa8d431857475 /arch/arm/mach-omap2 | |
parent | 97e3d94aac1c3e95bd04d1b186479a4df3663ab8 (diff) | |
parent | be1066bbcd443a65df312fdecea7e4959adedb45 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/arm/mach-omap2')
41 files changed, 306 insertions, 172 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index a8a3d1e23e26..2455dcc744a0 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -59,8 +59,10 @@ config MACH_OMAP3_BEAGLE | |||
59 | select OMAP_PACKAGE_CBB | 59 | select OMAP_PACKAGE_CBB |
60 | 60 | ||
61 | config MACH_DEVKIT8000 | 61 | config MACH_DEVKIT8000 |
62 | bool "DEVKIT8000 board" | 62 | bool "DEVKIT8000 board" |
63 | depends on ARCH_OMAP3 | 63 | depends on ARCH_OMAP3 |
64 | select OMAP_PACKAGE_CUS | ||
65 | select OMAP_MUX | ||
64 | 66 | ||
65 | config MACH_OMAP_LDP | 67 | config MACH_OMAP_LDP |
66 | bool "OMAP3 LDP board" | 68 | bool "OMAP3 LDP board" |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 2069fb33baaa..4b9fc57770db 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -22,6 +22,9 @@ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o | |||
22 | # SMP support ONLY available for OMAP4 | 22 | # SMP support ONLY available for OMAP4 |
23 | obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o | 23 | obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o |
24 | obj-$(CONFIG_LOCAL_TIMERS) += timer-mpu.o | 24 | obj-$(CONFIG_LOCAL_TIMERS) += timer-mpu.o |
25 | obj-$(CONFIG_ARCH_OMAP4) += omap44xx-smc.o | ||
26 | |||
27 | AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a | ||
25 | 28 | ||
26 | # Functions loaded to SRAM | 29 | # Functions loaded to SRAM |
27 | obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o | 30 | obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index a101029ceb6f..5822bcf7b15f 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -648,7 +648,7 @@ static void enable_board_wakeup_source(void) | |||
648 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | 648 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); |
649 | } | 649 | } |
650 | 650 | ||
651 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 651 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
652 | 652 | ||
653 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 653 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
654 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 654 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 4386d2b4a785..504d2bd222fe 100755..100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -54,7 +54,7 @@ static void enable_board_wakeup_source(void) | |||
54 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | 54 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); |
55 | } | 55 | } |
56 | 56 | ||
57 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 57 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
58 | 58 | ||
59 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 59 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
60 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 60 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
@@ -96,6 +96,7 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
96 | static void __init omap_sdp_init(void) | 96 | static void __init omap_sdp_init(void) |
97 | { | 97 | { |
98 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); | 98 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); |
99 | omap_serial_init(); | ||
99 | zoom_peripherals_init(); | 100 | zoom_peripherals_init(); |
100 | board_smc91x_init(); | 101 | board_smc91x_init(); |
101 | enable_board_wakeup_source(); | 102 | enable_board_wakeup_source(); |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 180ac112e527..b88f28c5814b 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -50,33 +50,9 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = { | |||
50 | }; | 50 | }; |
51 | 51 | ||
52 | #ifdef CONFIG_CACHE_L2X0 | 52 | #ifdef CONFIG_CACHE_L2X0 |
53 | noinline void omap_smc1(u32 fn, u32 arg) | ||
54 | { | ||
55 | register u32 r12 asm("r12") = fn; | ||
56 | register u32 r0 asm("r0") = arg; | ||
57 | |||
58 | /* This is common routine cache secure monitor API used to | ||
59 | * modify the PL310 secure registers. | ||
60 | * r0 contains the value to be modified and "r12" contains | ||
61 | * the monitor API number. It uses few CPU registers | ||
62 | * internally and hence they need be backed up including | ||
63 | * link register "lr". | ||
64 | * Explicitly save r11 and r12 the compiler generated code | ||
65 | * won't save it. | ||
66 | */ | ||
67 | asm volatile( | ||
68 | "stmfd r13!, {r11,r12}\n" | ||
69 | "dsb\n" | ||
70 | "smc\n" | ||
71 | "ldmfd r13!, {r11,r12}\n" | ||
72 | : "+r" (r0), "+r" (r12) | ||
73 | : | ||
74 | : "r4", "r5", "r10", "lr", "cc"); | ||
75 | } | ||
76 | EXPORT_SYMBOL(omap_smc1); | ||
77 | |||
78 | static int __init omap_l2_cache_init(void) | 53 | static int __init omap_l2_cache_init(void) |
79 | { | 54 | { |
55 | extern void omap_smc1(u32 fn, u32 arg); | ||
80 | void __iomem *l2cache_base; | 56 | void __iomem *l2cache_base; |
81 | 57 | ||
82 | /* To avoid code running on other OMAPs in | 58 | /* To avoid code running on other OMAPs in |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 70c18614773c..c1c4389fbd8f 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -273,7 +273,7 @@ static void __init am3517_evm_init_irq(void) | |||
273 | omap_gpio_init(); | 273 | omap_gpio_init(); |
274 | } | 274 | } |
275 | 275 | ||
276 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | 276 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
277 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 277 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
278 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 278 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
279 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 279 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
@@ -294,9 +294,9 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
294 | 294 | ||
295 | static void __init am3517_evm_init(void) | 295 | static void __init am3517_evm_init(void) |
296 | { | 296 | { |
297 | am3517_evm_i2c_init(); | ||
298 | |||
299 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 297 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
298 | |||
299 | am3517_evm_i2c_init(); | ||
300 | platform_add_devices(am3517_evm_devices, | 300 | platform_add_devices(am3517_evm_devices, |
301 | ARRAY_SIZE(am3517_evm_devices)); | 301 | ARRAY_SIZE(am3517_evm_devices)); |
302 | 302 | ||
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index afa77caaff4d..2de4f79f03a0 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -612,7 +612,7 @@ static struct omap2_hsmmc_info mmc[] = { | |||
612 | {} /* Terminator */ | 612 | {} /* Terminator */ |
613 | }; | 613 | }; |
614 | 614 | ||
615 | static struct ehci_hcd_omap_platform_data ehci_pdata = { | 615 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
616 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 616 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
617 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 617 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
618 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 618 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 371019054b49..47e3af2166d4 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -50,7 +50,6 @@ | |||
50 | #include <linux/input/matrix_keypad.h> | 50 | #include <linux/input/matrix_keypad.h> |
51 | #include <linux/spi/spi.h> | 51 | #include <linux/spi/spi.h> |
52 | #include <linux/spi/ads7846.h> | 52 | #include <linux/spi/ads7846.h> |
53 | #include <linux/usb/otg.h> | ||
54 | #include <linux/dm9000.h> | 53 | #include <linux/dm9000.h> |
55 | #include <linux/interrupt.h> | 54 | #include <linux/interrupt.h> |
56 | 55 | ||
@@ -269,20 +268,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev, | |||
269 | devkit8000_vmmc1_supply.dev = mmc[0].dev; | 268 | devkit8000_vmmc1_supply.dev = mmc[0].dev; |
270 | devkit8000_vsim_supply.dev = mmc[0].dev; | 269 | devkit8000_vsim_supply.dev = mmc[0].dev; |
271 | 270 | ||
272 | /* REVISIT: need ehci-omap hooks for external VBUS | ||
273 | * power switch and overcurrent detect | ||
274 | */ | ||
275 | |||
276 | gpio_request(gpio + 1, "EHCI_nOC"); | ||
277 | gpio_direction_input(gpio + 1); | ||
278 | |||
279 | /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ | ||
280 | gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); | ||
281 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); | ||
282 | |||
283 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ | ||
284 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | ||
285 | |||
286 | return 0; | 271 | return 0; |
287 | } | 272 | } |
288 | 273 | ||
@@ -303,7 +288,7 @@ static struct regulator_consumer_supply devkit8000_vpll2_supplies[] = { | |||
303 | .dev = &devkit8000_lcd_device.dev, | 288 | .dev = &devkit8000_lcd_device.dev, |
304 | }, | 289 | }, |
305 | { | 290 | { |
306 | .supply = "vdss_dsi", | 291 | .supply = "vdds_dsi", |
307 | .dev = &devkit8000_dss_device.dev, | 292 | .dev = &devkit8000_dss_device.dev, |
308 | } | 293 | } |
309 | }; | 294 | }; |
@@ -636,20 +621,24 @@ static struct omap_musb_board_data musb_board_data = { | |||
636 | .power = 100, | 621 | .power = 100, |
637 | }; | 622 | }; |
638 | 623 | ||
639 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 624 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
640 | 625 | ||
641 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 626 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
642 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 627 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
643 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 628 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
644 | 629 | ||
645 | .phy_reset = true, | 630 | .phy_reset = true, |
646 | .reset_gpio_port[0] = -EINVAL, | 631 | .reset_gpio_port[0] = -EINVAL, |
647 | .reset_gpio_port[1] = 147, | 632 | .reset_gpio_port[1] = -EINVAL, |
648 | .reset_gpio_port[2] = -EINVAL | 633 | .reset_gpio_port[2] = -EINVAL |
649 | }; | 634 | }; |
650 | 635 | ||
651 | static void __init devkit8000_init(void) | 636 | static void __init devkit8000_init(void) |
652 | { | 637 | { |
638 | omap_serial_init(); | ||
639 | |||
640 | omap_dm9000_init(); | ||
641 | |||
653 | devkit8000_i2c_init(); | 642 | devkit8000_i2c_init(); |
654 | platform_add_devices(devkit8000_devices, | 643 | platform_add_devices(devkit8000_devices, |
655 | ARRAY_SIZE(devkit8000_devices)); | 644 | ARRAY_SIZE(devkit8000_devices)); |
@@ -659,25 +648,15 @@ static void __init devkit8000_init(void) | |||
659 | spi_register_board_info(devkit8000_spi_board_info, | 648 | spi_register_board_info(devkit8000_spi_board_info, |
660 | ARRAY_SIZE(devkit8000_spi_board_info)); | 649 | ARRAY_SIZE(devkit8000_spi_board_info)); |
661 | 650 | ||
662 | omap_serial_init(); | ||
663 | |||
664 | omap_dm9000_init(); | ||
665 | |||
666 | devkit8000_ads7846_init(); | 651 | devkit8000_ads7846_init(); |
667 | 652 | ||
668 | omap_mux_init_gpio(170, OMAP_PIN_INPUT); | ||
669 | |||
670 | gpio_request(170, "DVI_nPD"); | ||
671 | /* REVISIT leave DVI powered down until it's needed ... */ | ||
672 | gpio_direction_output(170, true); | ||
673 | |||
674 | usb_musb_init(&musb_board_data); | 653 | usb_musb_init(&musb_board_data); |
675 | usb_ehci_init(&ehci_pdata); | 654 | usb_ehci_init(&ehci_pdata); |
676 | devkit8000_flash_init(); | 655 | devkit8000_flash_init(); |
677 | 656 | ||
678 | /* Ensure SDRC pins are mux'd for self-refresh */ | 657 | /* Ensure SDRC pins are mux'd for self-refresh */ |
679 | omap_mux_init_signal("sdr_cke0", OMAP_PIN_OUTPUT); | 658 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
680 | omap_mux_init_signal("sdr_cke1", OMAP_PIN_OUTPUT); | 659 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
681 | } | 660 | } |
682 | 661 | ||
683 | static void __init devkit8000_map_io(void) | 662 | static void __init devkit8000_map_io(void) |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 9958987a3d0a..d55c57b761a9 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/leds.h> | ||
20 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
21 | 20 | ||
22 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
@@ -39,8 +38,8 @@ | |||
39 | #define IGEP2_SMSC911X_CS 5 | 38 | #define IGEP2_SMSC911X_CS 5 |
40 | #define IGEP2_SMSC911X_GPIO 176 | 39 | #define IGEP2_SMSC911X_GPIO 176 |
41 | #define IGEP2_GPIO_USBH_NRESET 24 | 40 | #define IGEP2_GPIO_USBH_NRESET 24 |
42 | #define IGEP2_GPIO_LED0_RED 26 | 41 | #define IGEP2_GPIO_LED0_GREEN 26 |
43 | #define IGEP2_GPIO_LED0_GREEN 27 | 42 | #define IGEP2_GPIO_LED0_RED 27 |
44 | #define IGEP2_GPIO_LED1_RED 28 | 43 | #define IGEP2_GPIO_LED1_RED 28 |
45 | #define IGEP2_GPIO_DVI_PUP 170 | 44 | #define IGEP2_GPIO_DVI_PUP 170 |
46 | #define IGEP2_GPIO_WIFI_NPD 94 | 45 | #define IGEP2_GPIO_WIFI_NPD 94 |
@@ -355,34 +354,50 @@ static void __init igep2_display_init(void) | |||
355 | gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1)) | 354 | gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1)) |
356 | pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n"); | 355 | pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n"); |
357 | } | 356 | } |
358 | #ifdef CONFIG_LEDS_TRIGGERS | 357 | |
359 | static struct gpio_led gpio_leds[] = { | 358 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
359 | #include <linux/leds.h> | ||
360 | |||
361 | static struct gpio_led igep2_gpio_leds[] = { | ||
360 | { | 362 | { |
361 | .name = "GPIO_LED1_RED", | 363 | .name = "led0:red", |
364 | .gpio = IGEP2_GPIO_LED0_RED, | ||
365 | }, | ||
366 | { | ||
367 | .name = "led0:green", | ||
362 | .default_trigger = "heartbeat", | 368 | .default_trigger = "heartbeat", |
369 | .gpio = IGEP2_GPIO_LED0_GREEN, | ||
370 | }, | ||
371 | { | ||
372 | .name = "led1:red", | ||
363 | .gpio = IGEP2_GPIO_LED1_RED, | 373 | .gpio = IGEP2_GPIO_LED1_RED, |
364 | }, | 374 | }, |
365 | }; | 375 | }; |
366 | 376 | ||
367 | static struct gpio_led_platform_data gpio_leds_info = { | 377 | static struct gpio_led_platform_data igep2_led_pdata = { |
368 | .leds = gpio_leds, | 378 | .leds = igep2_gpio_leds, |
369 | .num_leds = ARRAY_SIZE(gpio_leds), | 379 | .num_leds = ARRAY_SIZE(igep2_gpio_leds), |
370 | }; | 380 | }; |
371 | 381 | ||
372 | static struct platform_device leds_gpio = { | 382 | static struct platform_device igep2_led_device = { |
373 | .name = "leds-gpio", | 383 | .name = "leds-gpio", |
374 | .id = -1, | 384 | .id = -1, |
375 | .dev = { | 385 | .dev = { |
376 | .platform_data = &gpio_leds_info, | 386 | .platform_data = &igep2_led_pdata, |
377 | }, | 387 | }, |
378 | }; | 388 | }; |
389 | |||
390 | static void __init igep2_init_led(void) | ||
391 | { | ||
392 | platform_device_register(&igep2_led_device); | ||
393 | } | ||
394 | |||
395 | #else | ||
396 | static inline void igep2_init_led(void) {} | ||
379 | #endif | 397 | #endif |
380 | 398 | ||
381 | static struct platform_device *igep2_devices[] __initdata = { | 399 | static struct platform_device *igep2_devices[] __initdata = { |
382 | &igep2_dss_device, | 400 | &igep2_dss_device, |
383 | #ifdef CONFIG_LEDS_TRIGGERS | ||
384 | &leds_gpio, | ||
385 | #endif | ||
386 | }; | 401 | }; |
387 | 402 | ||
388 | static void __init igep2_init_irq(void) | 403 | static void __init igep2_init_irq(void) |
@@ -442,14 +457,14 @@ static struct omap_musb_board_data musb_board_data = { | |||
442 | .power = 100, | 457 | .power = 100, |
443 | }; | 458 | }; |
444 | 459 | ||
445 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 460 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
446 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 461 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
447 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 462 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
448 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 463 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
449 | 464 | ||
450 | .phy_reset = true, | 465 | .phy_reset = true, |
451 | .reset_gpio_port[0] = -EINVAL, | 466 | .reset_gpio_port[0] = IGEP2_GPIO_USBH_NRESET, |
452 | .reset_gpio_port[1] = IGEP2_GPIO_USBH_NRESET, | 467 | .reset_gpio_port[1] = -EINVAL, |
453 | .reset_gpio_port[2] = -EINVAL, | 468 | .reset_gpio_port[2] = -EINVAL, |
454 | }; | 469 | }; |
455 | 470 | ||
@@ -471,31 +486,34 @@ static void __init igep2_init(void) | |||
471 | usb_ehci_init(&ehci_pdata); | 486 | usb_ehci_init(&ehci_pdata); |
472 | 487 | ||
473 | igep2_flash_init(); | 488 | igep2_flash_init(); |
489 | igep2_init_led(); | ||
474 | igep2_display_init(); | 490 | igep2_display_init(); |
475 | igep2_init_smsc911x(); | 491 | igep2_init_smsc911x(); |
476 | 492 | ||
477 | /* GPIO userspace leds */ | 493 | /* GPIO userspace leds */ |
478 | if ((gpio_request(IGEP2_GPIO_LED0_RED, "GPIO_LED0_RED") == 0) && | 494 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) |
495 | if ((gpio_request(IGEP2_GPIO_LED0_RED, "led0:red") == 0) && | ||
479 | (gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) { | 496 | (gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) { |
480 | gpio_export(IGEP2_GPIO_LED0_RED, 0); | 497 | gpio_export(IGEP2_GPIO_LED0_RED, 0); |
481 | gpio_set_value(IGEP2_GPIO_LED0_RED, 0); | 498 | gpio_set_value(IGEP2_GPIO_LED0_RED, 0); |
482 | } else | 499 | } else |
483 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_RED\n"); | 500 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_RED\n"); |
484 | 501 | ||
485 | if ((gpio_request(IGEP2_GPIO_LED0_GREEN, "GPIO_LED0_GREEN") == 0) && | 502 | if ((gpio_request(IGEP2_GPIO_LED0_GREEN, "led0:green") == 0) && |
486 | (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) { | 503 | (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) { |
487 | gpio_export(IGEP2_GPIO_LED0_GREEN, 0); | 504 | gpio_export(IGEP2_GPIO_LED0_GREEN, 0); |
488 | gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0); | 505 | gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0); |
489 | } else | 506 | } else |
490 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n"); | 507 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n"); |
491 | #ifndef CONFIG_LEDS_TRIGGERS | 508 | |
492 | if ((gpio_request(IGEP2_GPIO_LED1_RED, "GPIO_LED1_RED") == 0) && | 509 | if ((gpio_request(IGEP2_GPIO_LED1_RED, "led1:red") == 0) && |
493 | (gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) { | 510 | (gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) { |
494 | gpio_export(IGEP2_GPIO_LED1_RED, 0); | 511 | gpio_export(IGEP2_GPIO_LED1_RED, 0); |
495 | gpio_set_value(IGEP2_GPIO_LED1_RED, 0); | 512 | gpio_set_value(IGEP2_GPIO_LED1_RED, 0); |
496 | } else | 513 | } else |
497 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n"); | 514 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n"); |
498 | #endif | 515 | #endif |
516 | |||
499 | /* GPIO W-LAN + Bluetooth combo module */ | 517 | /* GPIO W-LAN + Bluetooth combo module */ |
500 | if ((gpio_request(IGEP2_GPIO_WIFI_NPD, "GPIO_WIFI_NPD") == 0) && | 518 | if ((gpio_request(IGEP2_GPIO_WIFI_NPD, "GPIO_WIFI_NPD") == 0) && |
501 | (gpio_direction_output(IGEP2_GPIO_WIFI_NPD, 1) == 0)) { | 519 | (gpio_direction_output(IGEP2_GPIO_WIFI_NPD, 1) == 0)) { |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 4cab0522d7ce..3ccc34ebdcc7 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -37,6 +37,103 @@ static int slot1_cover_open; | |||
37 | static int slot2_cover_open; | 37 | static int slot2_cover_open; |
38 | static struct device *mmc_device; | 38 | static struct device *mmc_device; |
39 | 39 | ||
40 | #define TUSB6010_ASYNC_CS 1 | ||
41 | #define TUSB6010_SYNC_CS 4 | ||
42 | #define TUSB6010_GPIO_INT 58 | ||
43 | #define TUSB6010_GPIO_ENABLE 0 | ||
44 | #define TUSB6010_DMACHAN 0x3f | ||
45 | |||
46 | #if defined(CONFIG_USB_TUSB6010) || \ | ||
47 | defined(CONFIG_USB_TUSB6010_MODULE) | ||
48 | /* | ||
49 | * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and | ||
50 | * 1.5 V voltage regulators of PM companion chip. Companion chip will then | ||
51 | * provide then PGOOD signal to TUSB6010 which will release it from reset. | ||
52 | */ | ||
53 | static int tusb_set_power(int state) | ||
54 | { | ||
55 | int i, retval = 0; | ||
56 | |||
57 | if (state) { | ||
58 | gpio_set_value(TUSB6010_GPIO_ENABLE, 1); | ||
59 | msleep(1); | ||
60 | |||
61 | /* Wait until TUSB6010 pulls INT pin down */ | ||
62 | i = 100; | ||
63 | while (i && gpio_get_value(TUSB6010_GPIO_INT)) { | ||
64 | msleep(1); | ||
65 | i--; | ||
66 | } | ||
67 | |||
68 | if (!i) { | ||
69 | printk(KERN_ERR "tusb: powerup failed\n"); | ||
70 | retval = -ENODEV; | ||
71 | } | ||
72 | } else { | ||
73 | gpio_set_value(TUSB6010_GPIO_ENABLE, 0); | ||
74 | msleep(10); | ||
75 | } | ||
76 | |||
77 | return retval; | ||
78 | } | ||
79 | |||
80 | static struct musb_hdrc_config musb_config = { | ||
81 | .multipoint = 1, | ||
82 | .dyn_fifo = 1, | ||
83 | .num_eps = 16, | ||
84 | .ram_bits = 12, | ||
85 | }; | ||
86 | |||
87 | static struct musb_hdrc_platform_data tusb_data = { | ||
88 | #if defined(CONFIG_USB_MUSB_OTG) | ||
89 | .mode = MUSB_OTG, | ||
90 | #elif defined(CONFIG_USB_MUSB_PERIPHERAL) | ||
91 | .mode = MUSB_PERIPHERAL, | ||
92 | #else /* defined(CONFIG_USB_MUSB_HOST) */ | ||
93 | .mode = MUSB_HOST, | ||
94 | #endif | ||
95 | .set_power = tusb_set_power, | ||
96 | .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */ | ||
97 | .power = 100, /* Max 100 mA VBUS for host mode */ | ||
98 | .config = &musb_config, | ||
99 | }; | ||
100 | |||
101 | static void __init n8x0_usb_init(void) | ||
102 | { | ||
103 | int ret = 0; | ||
104 | static char announce[] __initdata = KERN_INFO "TUSB 6010\n"; | ||
105 | |||
106 | /* PM companion chip power control pin */ | ||
107 | ret = gpio_request(TUSB6010_GPIO_ENABLE, "TUSB6010 enable"); | ||
108 | if (ret != 0) { | ||
109 | printk(KERN_ERR "Could not get TUSB power GPIO%i\n", | ||
110 | TUSB6010_GPIO_ENABLE); | ||
111 | return; | ||
112 | } | ||
113 | gpio_direction_output(TUSB6010_GPIO_ENABLE, 0); | ||
114 | |||
115 | tusb_set_power(0); | ||
116 | |||
117 | ret = tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_19, 2, | ||
118 | TUSB6010_ASYNC_CS, TUSB6010_SYNC_CS, | ||
119 | TUSB6010_GPIO_INT, TUSB6010_DMACHAN); | ||
120 | if (ret != 0) | ||
121 | goto err; | ||
122 | |||
123 | printk(announce); | ||
124 | |||
125 | return; | ||
126 | |||
127 | err: | ||
128 | gpio_free(TUSB6010_GPIO_ENABLE); | ||
129 | } | ||
130 | #else | ||
131 | |||
132 | static void __init n8x0_usb_init(void) {} | ||
133 | |||
134 | #endif /*CONFIG_USB_TUSB6010 */ | ||
135 | |||
136 | |||
40 | static struct omap2_mcspi_device_config p54spi_mcspi_config = { | 137 | static struct omap2_mcspi_device_config p54spi_mcspi_config = { |
41 | .turbo_mode = 0, | 138 | .turbo_mode = 0, |
42 | .single_channel = 1, | 139 | .single_channel = 1, |
@@ -119,7 +216,7 @@ static void __init n8x0_onenand_init(void) {} | |||
119 | */ | 216 | */ |
120 | #define N8X0_SLOT_SWITCH_GPIO 96 | 217 | #define N8X0_SLOT_SWITCH_GPIO 96 |
121 | #define N810_EMMC_VSD_GPIO 23 | 218 | #define N810_EMMC_VSD_GPIO 23 |
122 | #define NN810_EMMC_VIO_GPIO 9 | 219 | #define N810_EMMC_VIO_GPIO 9 |
123 | 220 | ||
124 | static int n8x0_mmc_switch_slot(struct device *dev, int slot) | 221 | static int n8x0_mmc_switch_slot(struct device *dev, int slot) |
125 | { | 222 | { |
@@ -207,10 +304,10 @@ static void n810_set_power_emmc(struct device *dev, | |||
207 | if (power_on) { | 304 | if (power_on) { |
208 | gpio_set_value(N810_EMMC_VSD_GPIO, 1); | 305 | gpio_set_value(N810_EMMC_VSD_GPIO, 1); |
209 | msleep(1); | 306 | msleep(1); |
210 | gpio_set_value(NN810_EMMC_VIO_GPIO, 1); | 307 | gpio_set_value(N810_EMMC_VIO_GPIO, 1); |
211 | msleep(1); | 308 | msleep(1); |
212 | } else { | 309 | } else { |
213 | gpio_set_value(NN810_EMMC_VIO_GPIO, 0); | 310 | gpio_set_value(N810_EMMC_VIO_GPIO, 0); |
214 | msleep(50); | 311 | msleep(50); |
215 | gpio_set_value(N810_EMMC_VSD_GPIO, 0); | 312 | gpio_set_value(N810_EMMC_VSD_GPIO, 0); |
216 | msleep(50); | 313 | msleep(50); |
@@ -371,7 +468,7 @@ static void n8x0_mmc_cleanup(struct device *dev) | |||
371 | 468 | ||
372 | if (machine_is_nokia_n810()) { | 469 | if (machine_is_nokia_n810()) { |
373 | gpio_free(N810_EMMC_VSD_GPIO); | 470 | gpio_free(N810_EMMC_VSD_GPIO); |
374 | gpio_free(NN810_EMMC_VIO_GPIO); | 471 | gpio_free(N810_EMMC_VIO_GPIO); |
375 | } | 472 | } |
376 | } | 473 | } |
377 | 474 | ||
@@ -432,7 +529,7 @@ void __init n8x0_mmc_init(void) | |||
432 | 529 | ||
433 | err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch"); | 530 | err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch"); |
434 | if (err) | 531 | if (err) |
435 | return err; | 532 | return; |
436 | 533 | ||
437 | gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0); | 534 | gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0); |
438 | 535 | ||
@@ -440,17 +537,17 @@ void __init n8x0_mmc_init(void) | |||
440 | err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf"); | 537 | err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf"); |
441 | if (err) { | 538 | if (err) { |
442 | gpio_free(N8X0_SLOT_SWITCH_GPIO); | 539 | gpio_free(N8X0_SLOT_SWITCH_GPIO); |
443 | return err; | 540 | return; |
444 | } | 541 | } |
445 | gpio_direction_output(N810_EMMC_VSD_GPIO, 0); | 542 | gpio_direction_output(N810_EMMC_VSD_GPIO, 0); |
446 | 543 | ||
447 | err = gpio_request(NN810_EMMC_VIO_GPIO, "MMC slot 2 Vdd"); | 544 | err = gpio_request(N810_EMMC_VIO_GPIO, "MMC slot 2 Vdd"); |
448 | if (err) { | 545 | if (err) { |
449 | gpio_free(N8X0_SLOT_SWITCH_GPIO); | 546 | gpio_free(N8X0_SLOT_SWITCH_GPIO); |
450 | gpio_free(N810_EMMC_VSD_GPIO); | 547 | gpio_free(N810_EMMC_VSD_GPIO); |
451 | return err; | 548 | return; |
452 | } | 549 | } |
453 | gpio_direction_output(NN810_EMMC_VIO_GPIO, 0); | 550 | gpio_direction_output(N810_EMMC_VIO_GPIO, 0); |
454 | } | 551 | } |
455 | 552 | ||
456 | mmc_data[0] = &mmc1_data; | 553 | mmc_data[0] = &mmc1_data; |
@@ -562,6 +659,7 @@ static void __init n8x0_init_machine(void) | |||
562 | n8x0_menelaus_init(); | 659 | n8x0_menelaus_init(); |
563 | n8x0_onenand_init(); | 660 | n8x0_onenand_init(); |
564 | n8x0_mmc_init(); | 661 | n8x0_mmc_init(); |
662 | n8x0_usb_init(); | ||
565 | } | 663 | } |
566 | 664 | ||
567 | MACHINE_START(NOKIA_N800, "Nokia N800") | 665 | MACHINE_START(NOKIA_N800, "Nokia N800") |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 6eb77e1f7c82..962d377970e9 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -410,7 +410,7 @@ static void __init omap3beagle_flash_init(void) | |||
410 | } | 410 | } |
411 | } | 411 | } |
412 | 412 | ||
413 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 413 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
414 | 414 | ||
415 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 415 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
416 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 416 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index d6bc88c426b5..017bb2f4f7d2 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -635,7 +635,7 @@ static struct platform_device *omap3_evm_devices[] __initdata = { | |||
635 | &omap3_evm_dss_device, | 635 | &omap3_evm_dss_device, |
636 | }; | 636 | }; |
637 | 637 | ||
638 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 638 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
639 | 639 | ||
640 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 640 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
641 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 641 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 4827f4658df3..395d049bf010 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -459,12 +459,20 @@ static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = { | |||
459 | }, | 459 | }, |
460 | }; | 460 | }; |
461 | 461 | ||
462 | static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = { | ||
463 | { | ||
464 | I2C_BOARD_INFO("bq27500", 0x55), | ||
465 | .flags = I2C_CLIENT_WAKE, | ||
466 | }, | ||
467 | }; | ||
468 | |||
462 | static int __init omap3pandora_i2c_init(void) | 469 | static int __init omap3pandora_i2c_init(void) |
463 | { | 470 | { |
464 | omap_register_i2c_bus(1, 2600, omap3pandora_i2c_boardinfo, | 471 | omap_register_i2c_bus(1, 2600, omap3pandora_i2c_boardinfo, |
465 | ARRAY_SIZE(omap3pandora_i2c_boardinfo)); | 472 | ARRAY_SIZE(omap3pandora_i2c_boardinfo)); |
466 | /* i2c2 pins are not connected */ | 473 | /* i2c2 pins are not connected */ |
467 | omap_register_i2c_bus(3, 100, NULL, 0); | 474 | omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo, |
475 | ARRAY_SIZE(omap3pandora_i2c3_boardinfo)); | ||
468 | return 0; | 476 | return 0; |
469 | } | 477 | } |
470 | 478 | ||
@@ -537,7 +545,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { | |||
537 | &pandora_dss_device, | 545 | &pandora_dss_device, |
538 | }; | 546 | }; |
539 | 547 | ||
540 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 548 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
541 | 549 | ||
542 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 550 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
543 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 551 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 3943d0f8322c..2504d41f923e 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -493,7 +493,7 @@ static void __init omap3touchbook_flash_init(void) | |||
493 | } | 493 | } |
494 | } | 494 | } |
495 | 495 | ||
496 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 496 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
497 | 497 | ||
498 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 498 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
499 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 499 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
@@ -518,14 +518,14 @@ static void omap3_touchbook_poweroff(void) | |||
518 | gpio_direction_output(TB_KILL_POWER_GPIO, 0); | 518 | gpio_direction_output(TB_KILL_POWER_GPIO, 0); |
519 | } | 519 | } |
520 | 520 | ||
521 | static void __init early_touchbook_revision(char **p) | 521 | static int __init early_touchbook_revision(char *p) |
522 | { | 522 | { |
523 | if (!*p) | 523 | if (!p) |
524 | return; | 524 | return 0; |
525 | 525 | ||
526 | strict_strtoul(*p, 10, &touchbook_revision); | 526 | return strict_strtoul(p, 10, &touchbook_revision); |
527 | } | 527 | } |
528 | __early_param("tbr=", early_touchbook_revision); | 528 | early_param("tbr", early_touchbook_revision); |
529 | 529 | ||
530 | static struct omap_musb_board_data musb_board_data = { | 530 | static struct omap_musb_board_data musb_board_data = { |
531 | .interface_type = MUSB_INTERFACE_ULPI, | 531 | .interface_type = MUSB_INTERFACE_ULPI, |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 50872a42bec7..8848c7c5ce48 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -394,7 +394,7 @@ static struct platform_device *overo_devices[] __initdata = { | |||
394 | &overo_lcd_device, | 394 | &overo_lcd_device, |
395 | }; | 395 | }; |
396 | 396 | ||
397 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 397 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
398 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 398 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
399 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 399 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
400 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 400 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/board-sdp-flash.c b/arch/arm/mach-omap2/board-sdp-flash.c index b1b88deec7f2..2d026328e385 100644 --- a/arch/arm/mach-omap2/board-sdp-flash.c +++ b/arch/arm/mach-omap2/board-sdp-flash.c | |||
@@ -253,20 +253,20 @@ void __init sdp_flash_init(struct flash_partitions sdp_partition_info[]) | |||
253 | } | 253 | } |
254 | 254 | ||
255 | if (norcs > GPMC_CS_NUM) | 255 | if (norcs > GPMC_CS_NUM) |
256 | printk(KERN_INFO "OneNAND: Unable to find configuration " | 256 | printk(KERN_INFO "NOR: Unable to find configuration " |
257 | " in GPMC\n "); | 257 | "in GPMC\n"); |
258 | else | 258 | else |
259 | board_nor_init(sdp_partition_info[0], norcs); | 259 | board_nor_init(sdp_partition_info[0], norcs); |
260 | 260 | ||
261 | if (onenandcs > GPMC_CS_NUM) | 261 | if (onenandcs > GPMC_CS_NUM) |
262 | printk(KERN_INFO "OneNAND: Unable to find configuration " | 262 | printk(KERN_INFO "OneNAND: Unable to find configuration " |
263 | " in GPMC\n "); | 263 | "in GPMC\n"); |
264 | else | 264 | else |
265 | board_onenand_init(sdp_partition_info[1], onenandcs); | 265 | board_onenand_init(sdp_partition_info[1], onenandcs); |
266 | 266 | ||
267 | if (nandcs > GPMC_CS_NUM) | 267 | if (nandcs > GPMC_CS_NUM) |
268 | printk(KERN_INFO "NAND: Unable to find configuration " | 268 | printk(KERN_INFO "NAND: Unable to find configuration " |
269 | " in GPMC\n "); | 269 | "in GPMC\n"); |
270 | else | 270 | else |
271 | board_nand_init(sdp_partition_info[2], nandcs); | 271 | board_nand_init(sdp_partition_info[2], nandcs); |
272 | } | 272 | } |
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index bb4018b60642..e15d2e87cfc1 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c | |||
@@ -96,7 +96,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
96 | 96 | ||
97 | static struct platform_device zoom_debugboard_serial_device = { | 97 | static struct platform_device zoom_debugboard_serial_device = { |
98 | .name = "serial8250", | 98 | .name = "serial8250", |
99 | .id = 3, | 99 | .id = PLAT8250_DEV_PLATFORM, |
100 | .dev = { | 100 | .dev = { |
101 | .platform_data = serial_platform_data, | 101 | .platform_data = serial_platform_data, |
102 | }, | 102 | }, |
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index ca95d8d64136..6b3984964cc5 100755..100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -280,7 +280,6 @@ static void enable_board_wakeup_source(void) | |||
280 | void __init zoom_peripherals_init(void) | 280 | void __init zoom_peripherals_init(void) |
281 | { | 281 | { |
282 | omap_i2c_init(); | 282 | omap_i2c_init(); |
283 | omap_serial_init(); | ||
284 | usb_musb_init(&musb_board_data); | 283 | usb_musb_init(&musb_board_data); |
285 | enable_board_wakeup_source(); | 284 | enable_board_wakeup_source(); |
286 | } | 285 | } |
diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c index d3e3cd5170d1..cd3e40cf3ac1 100644 --- a/arch/arm/mach-omap2/board-zoom3.c +++ b/arch/arm/mach-omap2/board-zoom3.c | |||
@@ -52,7 +52,7 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
52 | #define board_mux NULL | 52 | #define board_mux NULL |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 55 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
56 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 56 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
57 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 57 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
58 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 58 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index 3b1eac4d5390..e60ca4e47bbd 100644 --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/cpufreq.h> | 33 | #include <linux/cpufreq.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <plat/clock.h> | 36 | #include <plat/clock.h> |
36 | #include <plat/sram.h> | 37 | #include <plat/sram.h> |
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index fc55ab4c32e3..1820a556361b 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c | |||
@@ -1841,6 +1841,7 @@ static struct omap_clk omap2420_clks[] = { | |||
1841 | CLK(NULL, "aes_ick", &aes_ick, CK_242X), | 1841 | CLK(NULL, "aes_ick", &aes_ick, CK_242X), |
1842 | CLK(NULL, "pka_ick", &pka_ick, CK_242X), | 1842 | CLK(NULL, "pka_ick", &pka_ick, CK_242X), |
1843 | CLK(NULL, "usb_fck", &usb_fck, CK_242X), | 1843 | CLK(NULL, "usb_fck", &usb_fck, CK_242X), |
1844 | CLK("musb_hdrc", "fck", &osc_ck, CK_242X), | ||
1844 | }; | 1845 | }; |
1845 | 1846 | ||
1846 | /* | 1847 | /* |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 5a974dcbcecc..52638df1545b 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -895,7 +895,7 @@ static struct clk dpll4_m4x2_ck = { | |||
895 | .ops = &clkops_omap2_dflt_wait, | 895 | .ops = &clkops_omap2_dflt_wait, |
896 | .parent = &dpll4_m4_ck, | 896 | .parent = &dpll4_m4_ck, |
897 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), | 897 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), |
898 | .enable_bit = OMAP3430_PWRDN_CAM_SHIFT, | 898 | .enable_bit = OMAP3430_PWRDN_DSS1_SHIFT, |
899 | .flags = INVERT_ENABLE, | 899 | .flags = INVERT_ENABLE, |
900 | .clkdm_name = "dpll4_clkdm", | 900 | .clkdm_name = "dpll4_clkdm", |
901 | .recalc = &omap3_clkoutx2_recalc, | 901 | .recalc = &omap3_clkoutx2_recalc, |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 28b107967c86..a5c0c9c8e496 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -2671,10 +2671,10 @@ static struct omap_clk omap44xx_clks[] = { | |||
2671 | CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), | 2671 | CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), |
2672 | CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), | 2672 | CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), |
2673 | CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X), | 2673 | CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X), |
2674 | CLK("omap-mcspi.1", "ick", &dummy_ck, CK_443X), | 2674 | CLK("omap2_mcspi.1", "ick", &dummy_ck, CK_443X), |
2675 | CLK("omap-mcspi.2", "ick", &dummy_ck, CK_443X), | 2675 | CLK("omap2_mcspi.2", "ick", &dummy_ck, CK_443X), |
2676 | CLK("omap-mcspi.3", "ick", &dummy_ck, CK_443X), | 2676 | CLK("omap2_mcspi.3", "ick", &dummy_ck, CK_443X), |
2677 | CLK("omap-mcspi.4", "ick", &dummy_ck, CK_443X), | 2677 | CLK("omap2_mcspi.4", "ick", &dummy_ck, CK_443X), |
2678 | CLK(NULL, "uart1_ick", &dummy_ck, CK_443X), | 2678 | CLK(NULL, "uart1_ick", &dummy_ck, CK_443X), |
2679 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), | 2679 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), |
2680 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), | 2680 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index b87ad66f083e..6e568ec995ee 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -240,7 +240,7 @@ static void _omap2_clkdm_set_hwsup(struct clockdomain *clkdm, int enable) | |||
240 | bits = OMAP24XX_CLKSTCTRL_ENABLE_AUTO; | 240 | bits = OMAP24XX_CLKSTCTRL_ENABLE_AUTO; |
241 | else | 241 | else |
242 | bits = OMAP24XX_CLKSTCTRL_DISABLE_AUTO; | 242 | bits = OMAP24XX_CLKSTCTRL_DISABLE_AUTO; |
243 | } else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { | 243 | } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) { |
244 | if (enable) | 244 | if (enable) |
245 | bits = OMAP34XX_CLKSTCTRL_ENABLE_AUTO; | 245 | bits = OMAP34XX_CLKSTCTRL_ENABLE_AUTO; |
246 | else | 246 | else |
@@ -812,7 +812,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm) | |||
812 | cm_set_mod_reg_bits(OMAP24XX_FORCESTATE, | 812 | cm_set_mod_reg_bits(OMAP24XX_FORCESTATE, |
813 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); | 813 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); |
814 | 814 | ||
815 | } else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { | 815 | } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) { |
816 | 816 | ||
817 | u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_SLEEP << | 817 | u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_SLEEP << |
818 | __ffs(clkdm->clktrctrl_mask)); | 818 | __ffs(clkdm->clktrctrl_mask)); |
@@ -856,7 +856,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm) | |||
856 | cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE, | 856 | cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE, |
857 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); | 857 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); |
858 | 858 | ||
859 | } else if (cpu_is_omap34xx() | cpu_is_omap44xx()) { | 859 | } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) { |
860 | 860 | ||
861 | u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_WAKEUP << | 861 | u32 bits = (OMAP34XX_CLKSTCTRL_FORCE_WAKEUP << |
862 | __ffs(clkdm->clktrctrl_mask)); | 862 | __ffs(clkdm->clktrctrl_mask)); |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 7e7acc19bed0..beac46c48c5a 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -764,7 +764,7 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
764 | if (!cpu_is_omap44xx()) | 764 | if (!cpu_is_omap44xx()) |
765 | return; | 765 | return; |
766 | base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET; | 766 | base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET; |
767 | irq = OMAP44XX_IRQ_MMC4; | 767 | irq = OMAP44XX_IRQ_MMC5; |
768 | break; | 768 | break; |
769 | default: | 769 | default: |
770 | continue; | 770 | continue; |
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 64d74f05abbe..e57fb29ff855 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
@@ -39,6 +39,9 @@ static int omap2_nand_gpmc_retime(void) | |||
39 | struct gpmc_timings t; | 39 | struct gpmc_timings t; |
40 | int err; | 40 | int err; |
41 | 41 | ||
42 | if (!gpmc_nand_data->gpmc_t) | ||
43 | return 0; | ||
44 | |||
42 | memset(&t, 0, sizeof(t)); | 45 | memset(&t, 0, sizeof(t)); |
43 | t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk); | 46 | t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk); |
44 | t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on); | 47 | t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on); |
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S index ff25c7e4e606..50fd74916643 100644 --- a/arch/arm/mach-omap2/include/mach/entry-macro.S +++ b/arch/arm/mach-omap2/include/mach/entry-macro.S | |||
@@ -52,7 +52,7 @@ omap_irq_base: .word 0 | |||
52 | 52 | ||
53 | mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision | 53 | mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision |
54 | and \tmp, \tmp, #0x000f0000 @ only check architecture | 54 | and \tmp, \tmp, #0x000f0000 @ only check architecture |
55 | cmp \tmp, #0x00060000 @ is v6? | 55 | cmp \tmp, #0x00070000 @ is v6? |
56 | beq 2400f @ found v6 so it's omap24xx | 56 | beq 2400f @ found v6 so it's omap24xx |
57 | mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision | 57 | mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision |
58 | and \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9 | 58 | and \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9 |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 402e8f0d0f21..87f676acf61d 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -237,7 +237,7 @@ static void __init _omap2_map_common_io(void) | |||
237 | } | 237 | } |
238 | 238 | ||
239 | #ifdef CONFIG_ARCH_OMAP2420 | 239 | #ifdef CONFIG_ARCH_OMAP2420 |
240 | void __init omap242x_map_common_io() | 240 | void __init omap242x_map_common_io(void) |
241 | { | 241 | { |
242 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); | 242 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); |
243 | iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc)); | 243 | iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc)); |
@@ -246,7 +246,7 @@ void __init omap242x_map_common_io() | |||
246 | #endif | 246 | #endif |
247 | 247 | ||
248 | #ifdef CONFIG_ARCH_OMAP2430 | 248 | #ifdef CONFIG_ARCH_OMAP2430 |
249 | void __init omap243x_map_common_io() | 249 | void __init omap243x_map_common_io(void) |
250 | { | 250 | { |
251 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); | 251 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); |
252 | iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc)); | 252 | iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc)); |
@@ -255,7 +255,7 @@ void __init omap243x_map_common_io() | |||
255 | #endif | 255 | #endif |
256 | 256 | ||
257 | #ifdef CONFIG_ARCH_OMAP3 | 257 | #ifdef CONFIG_ARCH_OMAP3 |
258 | void __init omap34xx_map_common_io() | 258 | void __init omap34xx_map_common_io(void) |
259 | { | 259 | { |
260 | iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc)); | 260 | iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc)); |
261 | _omap2_map_common_io(); | 261 | _omap2_map_common_io(); |
@@ -263,7 +263,7 @@ void __init omap34xx_map_common_io() | |||
263 | #endif | 263 | #endif |
264 | 264 | ||
265 | #ifdef CONFIG_ARCH_OMAP4 | 265 | #ifdef CONFIG_ARCH_OMAP4 |
266 | void __init omap44xx_map_common_io() | 266 | void __init omap44xx_map_common_io(void) |
267 | { | 267 | { |
268 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); | 268 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); |
269 | _omap2_map_common_io(); | 269 | _omap2_map_common_io(); |
@@ -309,7 +309,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
309 | { | 309 | { |
310 | pwrdm_init(powerdomains_omap); | 310 | pwrdm_init(powerdomains_omap); |
311 | clkdm_init(clockdomains_omap, clkdm_autodeps); | 311 | clkdm_init(clockdomains_omap, clkdm_autodeps); |
312 | #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */ | ||
313 | if (cpu_is_omap242x()) | 312 | if (cpu_is_omap242x()) |
314 | omap2420_hwmod_init(); | 313 | omap2420_hwmod_init(); |
315 | else if (cpu_is_omap243x()) | 314 | else if (cpu_is_omap243x()) |
@@ -319,7 +318,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
319 | omap2_mux_init(); | 318 | omap2_mux_init(); |
320 | /* The OPP tables have to be registered before a clk init */ | 319 | /* The OPP tables have to be registered before a clk init */ |
321 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); | 320 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); |
322 | #endif | ||
323 | 321 | ||
324 | if (cpu_is_omap2420()) | 322 | if (cpu_is_omap2420()) |
325 | omap2420_clk_init(); | 323 | omap2420_clk_init(); |
@@ -333,11 +331,12 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
333 | pr_err("Could not init clock framework - unknown CPU\n"); | 331 | pr_err("Could not init clock framework - unknown CPU\n"); |
334 | 332 | ||
335 | omap_serial_early_init(); | 333 | omap_serial_early_init(); |
336 | #ifndef CONFIG_ARCH_OMAP4 | 334 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) /* FIXME: OMAP4 */ |
337 | omap_hwmod_late_init(); | 335 | omap_hwmod_late_init(); |
338 | omap_pm_if_init(); | 336 | omap_pm_if_init(); |
339 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); | 337 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { |
340 | _omap2_init_reprogram_sdrc(); | 338 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); |
341 | #endif | 339 | _omap2_init_reprogram_sdrc(); |
340 | } | ||
342 | gpmc_init(); | 341 | gpmc_init(); |
343 | } | 342 | } |
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index 6f4b7cc8f4d1..4f63dc6859a4 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/jiffies.h> | 16 | #include <linux/jiffies.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/stringify.h> | 19 | #include <linux/stringify.h> |
19 | 20 | ||
20 | #include <plat/iommu.h> | 21 | #include <plat/iommu.h> |
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 52a981cb8fdd..318f3638653c 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
@@ -430,19 +430,19 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) | |||
430 | if (unlikely(!res)) { | 430 | if (unlikely(!res)) { |
431 | dev_err(&pdev->dev, "invalid irq resource\n"); | 431 | dev_err(&pdev->dev, "invalid irq resource\n"); |
432 | ret = -ENODEV; | 432 | ret = -ENODEV; |
433 | goto err_iva1; | 433 | omap_mbox_unregister(&mbox_dsp_info); |
434 | goto err_dsp; | ||
434 | } | 435 | } |
435 | mbox_iva_info.irq = res->start; | 436 | mbox_iva_info.irq = res->start; |
436 | ret = omap_mbox_register(&pdev->dev, &mbox_iva_info); | 437 | ret = omap_mbox_register(&pdev->dev, &mbox_iva_info); |
437 | if (ret) | 438 | if (ret) { |
438 | goto err_iva1; | 439 | omap_mbox_unregister(&mbox_dsp_info); |
440 | goto err_dsp; | ||
441 | } | ||
439 | } | 442 | } |
440 | #endif | 443 | #endif |
441 | return 0; | 444 | return 0; |
442 | 445 | ||
443 | err_iva1: | ||
444 | omap_mbox_unregister(&mbox_dsp_info); | ||
445 | |||
446 | err_dsp: | 446 | err_dsp: |
447 | iounmap(mbox_base); | 447 | iounmap(mbox_base); |
448 | return ret; | 448 | return ret; |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index be8fce395a58..2f3cad6f9402 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
21 | #include <plat/dma.h> | 22 | #include <plat/dma.h> |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index b4ca84ee0a95..8b3d26935a39 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | #include <linux/list.h> | 31 | #include <linux/list.h> |
31 | #include <linux/ctype.h> | 32 | #include <linux/ctype.h> |
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S index aa3f65c2ac97..ef0e7a00dd6c 100644 --- a/arch/arm/mach-omap2/omap-headsmp.S +++ b/arch/arm/mach-omap2/omap-headsmp.S | |||
@@ -33,7 +33,7 @@ | |||
33 | ENTRY(omap_secondary_startup) | 33 | ENTRY(omap_secondary_startup) |
34 | hold: ldr r12,=0x103 | 34 | hold: ldr r12,=0x103 |
35 | dsb | 35 | dsb |
36 | smc @ read from AuxCoreBoot0 | 36 | smc #0 @ read from AuxCoreBoot0 |
37 | mov r0, r0, lsr #9 | 37 | mov r0, r0, lsr #9 |
38 | mrc p15, 0, r4, c0, c0, 5 | 38 | mrc p15, 0, r4, c0, c0, 5 |
39 | and r4, r4, #0x0f | 39 | and r4, r4, #0x0f |
@@ -52,7 +52,7 @@ ENTRY(omap_modify_auxcoreboot0) | |||
52 | stmfd sp!, {r1-r12, lr} | 52 | stmfd sp!, {r1-r12, lr} |
53 | ldr r12, =0x104 | 53 | ldr r12, =0x104 |
54 | dsb | 54 | dsb |
55 | smc | 55 | smc #0 |
56 | ldmfd sp!, {r1-r12, pc} | 56 | ldmfd sp!, {r1-r12, pc} |
57 | END(omap_modify_auxcoreboot0) | 57 | END(omap_modify_auxcoreboot0) |
58 | 58 | ||
@@ -60,6 +60,6 @@ ENTRY(omap_auxcoreboot_addr) | |||
60 | stmfd sp!, {r2-r12, lr} | 60 | stmfd sp!, {r2-r12, lr} |
61 | ldr r12, =0x105 | 61 | ldr r12, =0x105 |
62 | dsb | 62 | dsb |
63 | smc | 63 | smc #0 |
64 | ldmfd sp!, {r2-r12, pc} | 64 | ldmfd sp!, {r2-r12, pc} |
65 | END(omap_auxcoreboot_addr) | 65 | END(omap_auxcoreboot_addr) |
diff --git a/arch/arm/mach-omap2/omap44xx-smc.S b/arch/arm/mach-omap2/omap44xx-smc.S new file mode 100644 index 000000000000..f61c7771ca47 --- /dev/null +++ b/arch/arm/mach-omap2/omap44xx-smc.S | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * OMAP44xx secure APIs file. | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments, Inc. | ||
5 | * Written by Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
6 | * | ||
7 | * | ||
8 | * This program is free software,you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/linkage.h> | ||
14 | |||
15 | /* | ||
16 | * This is common routine to manage secure monitor API | ||
17 | * used to modify the PL310 secure registers. | ||
18 | * 'r0' contains the value to be modified and 'r12' contains | ||
19 | * the monitor API number. It uses few CPU registers | ||
20 | * internally and hence they need be backed up including | ||
21 | * link register "lr". | ||
22 | * Function signature : void omap_smc1(u32 fn, u32 arg) | ||
23 | */ | ||
24 | |||
25 | ENTRY(omap_smc1) | ||
26 | stmfd sp!, {r2-r12, lr} | ||
27 | mov r12, r0 | ||
28 | mov r0, r1 | ||
29 | dsb | ||
30 | smc #0 | ||
31 | ldmfd sp!, {r2-r12, pc} | ||
32 | END(omap_smc1) | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index c6649472ce0d..e436dcb19795 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1511,6 +1511,9 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) | |||
1511 | c = oh->slaves[oh->_mpu_port_index]->_clk; | 1511 | c = oh->slaves[oh->_mpu_port_index]->_clk; |
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | if (!c->clkdm) | ||
1515 | return NULL; | ||
1516 | |||
1514 | return c->clkdm->pwrdm.ptr; | 1517 | return c->clkdm->pwrdm.ptr; |
1515 | 1518 | ||
1516 | } | 1519 | } |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index c18f7f2f19bc..6cac9817c243 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <plat/clock.h> | 30 | #include <plat/clock.h> |
30 | #include <plat/board.h> | 31 | #include <plat/board.h> |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index fee2efb172e7..ea0000bc5358 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <plat/sram.h> | 32 | #include <plat/sram.h> |
32 | #include <plat/clockdomain.h> | 33 | #include <plat/clockdomain.h> |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 9a0fb385622b..ebfce7d1a5d3 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -222,7 +222,7 @@ void pwrdm_init(struct powerdomain **pwrdm_list) | |||
222 | { | 222 | { |
223 | struct powerdomain **p = NULL; | 223 | struct powerdomain **p = NULL; |
224 | 224 | ||
225 | if (cpu_is_omap24xx() | cpu_is_omap34xx()) { | 225 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { |
226 | pwrstctrl_reg_offs = OMAP2_PM_PWSTCTRL; | 226 | pwrstctrl_reg_offs = OMAP2_PM_PWSTCTRL; |
227 | pwrstst_reg_offs = OMAP2_PM_PWSTST; | 227 | pwrstst_reg_offs = OMAP2_PM_PWSTST; |
228 | } else if (cpu_is_omap44xx()) { | 228 | } else if (cpu_is_omap44xx()) { |
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index 81872aacb801..07a60f1204ca 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c | |||
@@ -123,7 +123,7 @@ struct omap3_prcm_regs prcm_context; | |||
123 | u32 omap_prcm_get_reset_sources(void) | 123 | u32 omap_prcm_get_reset_sources(void) |
124 | { | 124 | { |
125 | /* XXX This presumably needs modification for 34XX */ | 125 | /* XXX This presumably needs modification for 34XX */ |
126 | if (cpu_is_omap24xx() | cpu_is_omap34xx()) | 126 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) |
127 | return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f; | 127 | return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f; |
128 | if (cpu_is_omap44xx()) | 128 | if (cpu_is_omap44xx()) |
129 | return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f; | 129 | return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f; |
@@ -133,7 +133,7 @@ u32 omap_prcm_get_reset_sources(void) | |||
133 | EXPORT_SYMBOL(omap_prcm_get_reset_sources); | 133 | EXPORT_SYMBOL(omap_prcm_get_reset_sources); |
134 | 134 | ||
135 | /* Resets clock rates and reboots the system. Only called from system.h */ | 135 | /* Resets clock rates and reboots the system. Only called from system.h */ |
136 | void omap_prcm_arch_reset(char mode) | 136 | void omap_prcm_arch_reset(char mode, const char *cmd) |
137 | { | 137 | { |
138 | s16 prcm_offs = 0; | 138 | s16 prcm_offs = 0; |
139 | 139 | ||
@@ -145,7 +145,7 @@ void omap_prcm_arch_reset(char mode) | |||
145 | u32 l; | 145 | u32 l; |
146 | 146 | ||
147 | prcm_offs = OMAP3430_GR_MOD; | 147 | prcm_offs = OMAP3430_GR_MOD; |
148 | l = ('B' << 24) | ('M' << 16) | mode; | 148 | l = ('B' << 24) | ('M' << 16) | (cmd ? (u8)*cmd : 0); |
149 | /* Reserve the first word in scratchpad for communicating | 149 | /* Reserve the first word in scratchpad for communicating |
150 | * with the boot ROM. A pointer to a data structure | 150 | * with the boot ROM. A pointer to a data structure |
151 | * describing the boot process can be stored there, | 151 | * describing the boot process can be stored there, |
@@ -157,7 +157,7 @@ void omap_prcm_arch_reset(char mode) | |||
157 | else | 157 | else |
158 | WARN_ON(1); | 158 | WARN_ON(1); |
159 | 159 | ||
160 | if (cpu_is_omap24xx() | cpu_is_omap34xx()) | 160 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) |
161 | prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, | 161 | prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, |
162 | OMAP2_RM_RSTCTRL); | 162 | OMAP2_RM_RSTCTRL); |
163 | if (cpu_is_omap44xx()) | 163 | if (cpu_is_omap44xx()) |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index b79bc8926cc9..3771254dfa81 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -115,7 +115,6 @@ static struct plat_serial8250_port serial_platform_data2[] = { | |||
115 | } | 115 | } |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | ||
119 | static struct plat_serial8250_port serial_platform_data3[] = { | 118 | static struct plat_serial8250_port serial_platform_data3[] = { |
120 | { | 119 | { |
121 | .irq = 70, | 120 | .irq = 70, |
@@ -128,23 +127,12 @@ static struct plat_serial8250_port serial_platform_data3[] = { | |||
128 | } | 127 | } |
129 | }; | 128 | }; |
130 | 129 | ||
131 | static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals) | ||
132 | { | ||
133 | serial_platform_data3[0].mapbase = omap2_globals->uart4_phys; | ||
134 | } | ||
135 | #else | ||
136 | static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals) | ||
137 | { | ||
138 | } | ||
139 | #endif | ||
140 | |||
141 | void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) | 130 | void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) |
142 | { | 131 | { |
143 | serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; | 132 | serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; |
144 | serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; | 133 | serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; |
145 | serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; | 134 | serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; |
146 | if (cpu_is_omap3630() || cpu_is_omap44xx()) | 135 | serial_platform_data3[0].mapbase = omap2_globals->uart4_phys; |
147 | omap2_set_globals_uart4(omap2_globals); | ||
148 | } | 136 | } |
149 | 137 | ||
150 | static inline unsigned int __serial_read_reg(struct uart_port *up, | 138 | static inline unsigned int __serial_read_reg(struct uart_port *up, |
@@ -550,7 +538,7 @@ static ssize_t sleep_timeout_store(struct device *dev, | |||
550 | unsigned int value; | 538 | unsigned int value; |
551 | 539 | ||
552 | if (sscanf(buf, "%u", &value) != 1) { | 540 | if (sscanf(buf, "%u", &value) != 1) { |
553 | printk(KERN_ERR "sleep_timeout_store: Invalid value\n"); | 541 | dev_err(dev, "sleep_timeout_store: Invalid value\n"); |
554 | return -EINVAL; | 542 | return -EINVAL; |
555 | } | 543 | } |
556 | 544 | ||
@@ -644,42 +632,53 @@ static void serial_out_override(struct uart_port *up, int offset, int value) | |||
644 | } | 632 | } |
645 | void __init omap_serial_early_init(void) | 633 | void __init omap_serial_early_init(void) |
646 | { | 634 | { |
647 | int i; | 635 | int i, nr_ports; |
648 | char name[16]; | 636 | char name[16]; |
649 | 637 | ||
638 | if (!(cpu_is_omap3630() || cpu_is_omap4430())) | ||
639 | nr_ports = 3; | ||
640 | else | ||
641 | nr_ports = ARRAY_SIZE(omap_uart); | ||
642 | |||
650 | /* | 643 | /* |
651 | * Make sure the serial ports are muxed on at this point. | 644 | * Make sure the serial ports are muxed on at this point. |
652 | * You have to mux them off in device drivers later on | 645 | * You have to mux them off in device drivers later on |
653 | * if not needed. | 646 | * if not needed. |
654 | */ | 647 | */ |
655 | 648 | ||
656 | for (i = 0; i < ARRAY_SIZE(omap_uart); i++) { | 649 | for (i = 0; i < nr_ports; i++) { |
657 | struct omap_uart_state *uart = &omap_uart[i]; | 650 | struct omap_uart_state *uart = &omap_uart[i]; |
658 | struct platform_device *pdev = &uart->pdev; | 651 | struct platform_device *pdev = &uart->pdev; |
659 | struct device *dev = &pdev->dev; | 652 | struct device *dev = &pdev->dev; |
660 | struct plat_serial8250_port *p = dev->platform_data; | 653 | struct plat_serial8250_port *p = dev->platform_data; |
661 | 654 | ||
655 | /* Don't map zero-based physical address */ | ||
656 | if (p->mapbase == 0) { | ||
657 | dev_warn(dev, "no physical address for uart#%d," | ||
658 | " so skipping early_init...\n", i); | ||
659 | continue; | ||
660 | } | ||
662 | /* | 661 | /* |
663 | * Module 4KB + L4 interconnect 4KB | 662 | * Module 4KB + L4 interconnect 4KB |
664 | * Static mapping, never released | 663 | * Static mapping, never released |
665 | */ | 664 | */ |
666 | p->membase = ioremap(p->mapbase, SZ_8K); | 665 | p->membase = ioremap(p->mapbase, SZ_8K); |
667 | if (!p->membase) { | 666 | if (!p->membase) { |
668 | printk(KERN_ERR "ioremap failed for uart%i\n", i + 1); | 667 | dev_err(dev, "ioremap failed for uart%i\n", i + 1); |
669 | continue; | 668 | continue; |
670 | } | 669 | } |
671 | 670 | ||
672 | sprintf(name, "uart%d_ick", i+1); | 671 | sprintf(name, "uart%d_ick", i + 1); |
673 | uart->ick = clk_get(NULL, name); | 672 | uart->ick = clk_get(NULL, name); |
674 | if (IS_ERR(uart->ick)) { | 673 | if (IS_ERR(uart->ick)) { |
675 | printk(KERN_ERR "Could not get uart%d_ick\n", i+1); | 674 | dev_err(dev, "Could not get uart%d_ick\n", i + 1); |
676 | uart->ick = NULL; | 675 | uart->ick = NULL; |
677 | } | 676 | } |
678 | 677 | ||
679 | sprintf(name, "uart%d_fck", i+1); | 678 | sprintf(name, "uart%d_fck", i+1); |
680 | uart->fck = clk_get(NULL, name); | 679 | uart->fck = clk_get(NULL, name); |
681 | if (IS_ERR(uart->fck)) { | 680 | if (IS_ERR(uart->fck)) { |
682 | printk(KERN_ERR "Could not get uart%d_fck\n", i+1); | 681 | dev_err(dev, "Could not get uart%d_fck\n", i + 1); |
683 | uart->fck = NULL; | 682 | uart->fck = NULL; |
684 | } | 683 | } |
685 | 684 | ||
@@ -722,6 +721,13 @@ void __init omap_serial_init_port(int port) | |||
722 | pdev = &uart->pdev; | 721 | pdev = &uart->pdev; |
723 | dev = &pdev->dev; | 722 | dev = &pdev->dev; |
724 | 723 | ||
724 | /* Don't proceed if there's no clocks available */ | ||
725 | if (unlikely(!uart->ick || !uart->fck)) { | ||
726 | WARN(1, "%s: can't init uart%d, no clocks available\n", | ||
727 | kobject_name(&dev->kobj), port); | ||
728 | return; | ||
729 | } | ||
730 | |||
725 | omap_uart_enable_clocks(uart); | 731 | omap_uart_enable_clocks(uart); |
726 | 732 | ||
727 | omap_uart_reset(uart); | 733 | omap_uart_reset(uart); |
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c index f1df873d59db..ee9f548d5d81 100644 --- a/arch/arm/mach-omap2/usb-ehci.c +++ b/arch/arm/mach-omap2/usb-ehci.c | |||
@@ -70,7 +70,7 @@ static struct platform_device ehci_device = { | |||
70 | /* | 70 | /* |
71 | * setup_ehci_io_mux - initialize IO pad mux for USBHOST | 71 | * setup_ehci_io_mux - initialize IO pad mux for USBHOST |
72 | */ | 72 | */ |
73 | static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | 73 | static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) |
74 | { | 74 | { |
75 | switch (port_mode[0]) { | 75 | switch (port_mode[0]) { |
76 | case EHCI_HCD_OMAP_MODE_PHY: | 76 | case EHCI_HCD_OMAP_MODE_PHY: |
@@ -213,7 +213,7 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | |||
213 | return; | 213 | return; |
214 | } | 214 | } |
215 | 215 | ||
216 | void __init usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata) | 216 | void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) |
217 | { | 217 | { |
218 | platform_device_add_data(&ehci_device, pdata, sizeof(*pdata)); | 218 | platform_device_add_data(&ehci_device, pdata, sizeof(*pdata)); |
219 | 219 | ||
@@ -229,7 +229,7 @@ void __init usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata) | |||
229 | 229 | ||
230 | #else | 230 | #else |
231 | 231 | ||
232 | void __init usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata) | 232 | void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) |
233 | 233 | ||
234 | { | 234 | { |
235 | } | 235 | } |