aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Kconfig6
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c1
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c4
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c39
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c8
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c18
-rw-r--r--arch/arm/mach-omap2/board-sdp-flash.c8
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c1
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c8
-rw-r--r--arch/arm/mach-omap2/clockdomain.c6
-rw-r--r--arch/arm/mach-omap2/devices.c2
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c3
-rw-r--r--arch/arm/mach-omap2/include/mach/entry-macro.S2
-rw-r--r--arch/arm/mach-omap2/omap-headsmp.S6
-rw-r--r--arch/arm/mach-omap2/omap44xx-smc.S2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c3
-rw-r--r--arch/arm/mach-omap2/powerdomain.c2
-rw-r--r--arch/arm/mach-omap2/prcm.c4
-rw-r--r--arch/arm/mach-omap2/serial.c35
21 files changed, 75 insertions, 87 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
61config MACH_DEVKIT8000 61config 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
65config MACH_OMAP_LDP 67config MACH_OMAP_LDP
66 bool "OMAP3 LDP board" 68 bool "OMAP3 LDP board"
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index a0a2a113465c..504d2bd222fe 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -96,6 +96,7 @@ static struct omap_board_mux board_mux[] __initdata = {
96static void __init omap_sdp_init(void) 96static 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-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 6ae880585d54..c1c4389fbd8f 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -294,9 +294,9 @@ static struct omap_board_mux board_mux[] __initdata = {
294 294
295static void __init am3517_evm_init(void) 295static 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-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 5bfc13b3176c..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};
@@ -639,17 +624,21 @@ static struct omap_musb_board_data musb_board_data = {
639static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 624static 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
651static void __init devkit8000_init(void) 636static 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
683static void __init devkit8000_map_io(void) 662static 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 3c7789d45051..d55c57b761a9 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -458,13 +458,13 @@ static struct omap_musb_board_data musb_board_data = {
458}; 458};
459 459
460static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 460static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
461 .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, 461 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
462 .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, 462 .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
463 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, 463 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
464 464
465 .phy_reset = true, 465 .phy_reset = true,
466 .reset_gpio_port[0] = -EINVAL, 466 .reset_gpio_port[0] = IGEP2_GPIO_USBH_NRESET,
467 .reset_gpio_port[1] = IGEP2_GPIO_USBH_NRESET, 467 .reset_gpio_port[1] = -EINVAL,
468 .reset_gpio_port[2] = -EINVAL, 468 .reset_gpio_port[2] = -EINVAL,
469}; 469};
470 470
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index da9bcb898991..3ccc34ebdcc7 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -216,7 +216,7 @@ static void __init n8x0_onenand_init(void) {}
216 */ 216 */
217#define N8X0_SLOT_SWITCH_GPIO 96 217#define N8X0_SLOT_SWITCH_GPIO 96
218#define N810_EMMC_VSD_GPIO 23 218#define N810_EMMC_VSD_GPIO 23
219#define NN810_EMMC_VIO_GPIO 9 219#define N810_EMMC_VIO_GPIO 9
220 220
221static int n8x0_mmc_switch_slot(struct device *dev, int slot) 221static int n8x0_mmc_switch_slot(struct device *dev, int slot)
222{ 222{
@@ -304,10 +304,10 @@ static void n810_set_power_emmc(struct device *dev,
304 if (power_on) { 304 if (power_on) {
305 gpio_set_value(N810_EMMC_VSD_GPIO, 1); 305 gpio_set_value(N810_EMMC_VSD_GPIO, 1);
306 msleep(1); 306 msleep(1);
307 gpio_set_value(NN810_EMMC_VIO_GPIO, 1); 307 gpio_set_value(N810_EMMC_VIO_GPIO, 1);
308 msleep(1); 308 msleep(1);
309 } else { 309 } else {
310 gpio_set_value(NN810_EMMC_VIO_GPIO, 0); 310 gpio_set_value(N810_EMMC_VIO_GPIO, 0);
311 msleep(50); 311 msleep(50);
312 gpio_set_value(N810_EMMC_VSD_GPIO, 0); 312 gpio_set_value(N810_EMMC_VSD_GPIO, 0);
313 msleep(50); 313 msleep(50);
@@ -468,7 +468,7 @@ static void n8x0_mmc_cleanup(struct device *dev)
468 468
469 if (machine_is_nokia_n810()) { 469 if (machine_is_nokia_n810()) {
470 gpio_free(N810_EMMC_VSD_GPIO); 470 gpio_free(N810_EMMC_VSD_GPIO);
471 gpio_free(NN810_EMMC_VIO_GPIO); 471 gpio_free(N810_EMMC_VIO_GPIO);
472 } 472 }
473} 473}
474 474
@@ -529,7 +529,7 @@ void __init n8x0_mmc_init(void)
529 529
530 err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch"); 530 err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch");
531 if (err) 531 if (err)
532 return err; 532 return;
533 533
534 gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0); 534 gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0);
535 535
@@ -537,17 +537,17 @@ void __init n8x0_mmc_init(void)
537 err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf"); 537 err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf");
538 if (err) { 538 if (err) {
539 gpio_free(N8X0_SLOT_SWITCH_GPIO); 539 gpio_free(N8X0_SLOT_SWITCH_GPIO);
540 return err; 540 return;
541 } 541 }
542 gpio_direction_output(N810_EMMC_VSD_GPIO, 0); 542 gpio_direction_output(N810_EMMC_VSD_GPIO, 0);
543 543
544 err = gpio_request(NN810_EMMC_VIO_GPIO, "MMC slot 2 Vdd"); 544 err = gpio_request(N810_EMMC_VIO_GPIO, "MMC slot 2 Vdd");
545 if (err) { 545 if (err) {
546 gpio_free(N8X0_SLOT_SWITCH_GPIO); 546 gpio_free(N8X0_SLOT_SWITCH_GPIO);
547 gpio_free(N810_EMMC_VSD_GPIO); 547 gpio_free(N810_EMMC_VSD_GPIO);
548 return err; 548 return;
549 } 549 }
550 gpio_direction_output(NN810_EMMC_VIO_GPIO, 0); 550 gpio_direction_output(N810_EMMC_VIO_GPIO, 0);
551 } 551 }
552 552
553 mmc_data[0] = &mmc1_data; 553 mmc_data[0] = &mmc1_data;
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
97static struct platform_device zoom_debugboard_serial_device = { 97static 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 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)
280void __init zoom_peripherals_init(void) 280void __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/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index d5153b6bd6cb..9cba5560519b 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 23e4d7733610..2271b9bd1f50 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -726,7 +726,7 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
726 if (!cpu_is_omap44xx()) 726 if (!cpu_is_omap44xx())
727 return; 727 return;
728 base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET; 728 base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET;
729 irq = OMAP44XX_IRQ_MMC4; 729 irq = OMAP44XX_IRQ_MMC5;
730 break; 730 break;
731 default: 731 default:
732 continue; 732 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/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 @@
33ENTRY(omap_secondary_startup) 33ENTRY(omap_secondary_startup)
34hold: ldr r12,=0x103 34hold: 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}
57END(omap_modify_auxcoreboot0) 57END(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}
65END(omap_auxcoreboot_addr) 65END(omap_auxcoreboot_addr)
diff --git a/arch/arm/mach-omap2/omap44xx-smc.S b/arch/arm/mach-omap2/omap44xx-smc.S
index 89bb2b141473..f61c7771ca47 100644
--- a/arch/arm/mach-omap2/omap44xx-smc.S
+++ b/arch/arm/mach-omap2/omap44xx-smc.S
@@ -27,6 +27,6 @@ ENTRY(omap_smc1)
27 mov r12, r0 27 mov r12, r0
28 mov r0, r1 28 mov r0, r1
29 dsb 29 dsb
30 smc 30 smc #0
31 ldmfd sp!, {r2-r12, pc} 31 ldmfd sp!, {r2-r12, pc}
32END(omap_smc1) 32END(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/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 9537f6f2352d..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;
123u32 omap_prcm_get_reset_sources(void) 123u32 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;
@@ -157,7 +157,7 @@ void omap_prcm_arch_reset(char mode, const char *cmd)
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 da77930480e9..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)
119static struct plat_serial8250_port serial_platform_data3[] = { 118static 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
131static 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
136static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals)
137{
138}
139#endif
140
141void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) 130void __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
150static inline unsigned int __serial_read_reg(struct uart_port *up, 138static 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
@@ -664,27 +652,33 @@ void __init omap_serial_early_init(void)
664 struct device *dev = &pdev->dev; 652 struct device *dev = &pdev->dev;
665 struct plat_serial8250_port *p = dev->platform_data; 653 struct plat_serial8250_port *p = dev->platform_data;
666 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 }
667 /* 661 /*
668 * Module 4KB + L4 interconnect 4KB 662 * Module 4KB + L4 interconnect 4KB
669 * Static mapping, never released 663 * Static mapping, never released
670 */ 664 */
671 p->membase = ioremap(p->mapbase, SZ_8K); 665 p->membase = ioremap(p->mapbase, SZ_8K);
672 if (!p->membase) { 666 if (!p->membase) {
673 printk(KERN_ERR "ioremap failed for uart%i\n", i + 1); 667 dev_err(dev, "ioremap failed for uart%i\n", i + 1);
674 continue; 668 continue;
675 } 669 }
676 670
677 sprintf(name, "uart%d_ick", i + 1); 671 sprintf(name, "uart%d_ick", i + 1);
678 uart->ick = clk_get(NULL, name); 672 uart->ick = clk_get(NULL, name);
679 if (IS_ERR(uart->ick)) { 673 if (IS_ERR(uart->ick)) {
680 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);
681 uart->ick = NULL; 675 uart->ick = NULL;
682 } 676 }
683 677
684 sprintf(name, "uart%d_fck", i+1); 678 sprintf(name, "uart%d_fck", i+1);
685 uart->fck = clk_get(NULL, name); 679 uart->fck = clk_get(NULL, name);
686 if (IS_ERR(uart->fck)) { 680 if (IS_ERR(uart->fck)) {
687 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);
688 uart->fck = NULL; 682 uart->fck = NULL;
689 } 683 }
690 684
@@ -727,6 +721,13 @@ void __init omap_serial_init_port(int port)
727 pdev = &uart->pdev; 721 pdev = &uart->pdev;
728 dev = &pdev->dev; 722 dev = &pdev->dev;
729 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
730 omap_uart_enable_clocks(uart); 731 omap_uart_enable_clocks(uart);
731 732
732 omap_uart_reset(uart); 733 omap_uart_reset(uart);