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/Kconfig3
-rw-r--r--arch/arm/mach-omap2/gpmc.c7
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c2
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c39
4 files changed, 39 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index e7189dcc9309..08d4167cc7c5 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -1,9 +1,6 @@
1menu "TI OMAP/AM/DM/DRA Family" 1menu "TI OMAP/AM/DM/DRA Family"
2 depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 2 depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
3 3
4config ARCH_OMAP
5 bool
6
7config ARCH_OMAP2 4config ARCH_OMAP2
8 bool "TI OMAP2" 5 bool "TI OMAP2"
9 depends on ARCH_MULTI_V6 6 depends on ARCH_MULTI_V6
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 9f42d5437fcc..2f97228f188a 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1207,8 +1207,7 @@ int gpmc_cs_program_settings(int cs, struct gpmc_settings *p)
1207 } 1207 }
1208 } 1208 }
1209 1209
1210 if ((p->wait_on_read || p->wait_on_write) && 1210 if (p->wait_pin > gpmc_nr_waitpins) {
1211 (p->wait_pin > gpmc_nr_waitpins)) {
1212 pr_err("%s: invalid wait-pin (%d)\n", __func__, p->wait_pin); 1211 pr_err("%s: invalid wait-pin (%d)\n", __func__, p->wait_pin);
1213 return -EINVAL; 1212 return -EINVAL;
1214 } 1213 }
@@ -1288,8 +1287,8 @@ void gpmc_read_settings_dt(struct device_node *np, struct gpmc_settings *p)
1288 p->wait_on_write = of_property_read_bool(np, 1287 p->wait_on_write = of_property_read_bool(np,
1289 "gpmc,wait-on-write"); 1288 "gpmc,wait-on-write");
1290 if (!p->wait_on_read && !p->wait_on_write) 1289 if (!p->wait_on_read && !p->wait_on_write)
1291 pr_warn("%s: read/write wait monitoring not enabled!\n", 1290 pr_debug("%s: rd/wr wait monitoring not enabled!\n",
1292 __func__); 1291 __func__);
1293 } 1292 }
1294} 1293}
1295 1294
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 8fd87a3055bf..9e91a4e7519a 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2065,7 +2065,7 @@ static void _reconfigure_io_chain(void)
2065 2065
2066 spin_lock_irqsave(&io_chain_lock, flags); 2066 spin_lock_irqsave(&io_chain_lock, flags);
2067 2067
2068 if (cpu_is_omap34xx() && omap3_has_io_chain_ctrl()) 2068 if (cpu_is_omap34xx())
2069 omap3xxx_prm_reconfigure_io_chain(); 2069 omap3xxx_prm_reconfigure_io_chain();
2070 else if (cpu_is_omap44xx()) 2070 else if (cpu_is_omap44xx())
2071 omap44xx_prm_reconfigure_io_chain(); 2071 omap44xx_prm_reconfigure_io_chain();
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index 2458be6fc67b..372de3edf4a5 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -45,7 +45,7 @@ static struct omap_prcm_irq_setup omap3_prcm_irq_setup = {
45 .ocp_barrier = &omap3xxx_prm_ocp_barrier, 45 .ocp_barrier = &omap3xxx_prm_ocp_barrier,
46 .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen, 46 .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen,
47 .restore_irqen = &omap3xxx_prm_restore_irqen, 47 .restore_irqen = &omap3xxx_prm_restore_irqen,
48 .reconfigure_io_chain = &omap3xxx_prm_reconfigure_io_chain, 48 .reconfigure_io_chain = NULL,
49}; 49};
50 50
51/* 51/*
@@ -369,15 +369,30 @@ void __init omap3_prm_init_pm(bool has_uart4, bool has_iva)
369} 369}
370 370
371/** 371/**
372 * omap3xxx_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain 372 * omap3430_pre_es3_1_reconfigure_io_chain - restart wake-up daisy chain
373 *
374 * The ST_IO_CHAIN bit does not exist in 3430 before es3.1. The only
375 * thing we can do is toggle EN_IO bit for earlier omaps.
376 */
377void omap3430_pre_es3_1_reconfigure_io_chain(void)
378{
379 omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
380 PM_WKEN);
381 omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
382 PM_WKEN);
383 omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
384}
385
386/**
387 * omap3_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain
373 * 388 *
374 * Clear any previously-latched I/O wakeup events and ensure that the 389 * Clear any previously-latched I/O wakeup events and ensure that the
375 * I/O wakeup gates are aligned with the current mux settings. Works 390 * I/O wakeup gates are aligned with the current mux settings. Works
376 * by asserting WUCLKIN, waiting for WUCLKOUT to be asserted, and then 391 * by asserting WUCLKIN, waiting for WUCLKOUT to be asserted, and then
377 * deasserting WUCLKIN and clearing the ST_IO_CHAIN WKST bit. No 392 * deasserting WUCLKIN and clearing the ST_IO_CHAIN WKST bit. No
378 * return value. 393 * return value. These registers are only available in 3430 es3.1 and later.
379 */ 394 */
380void omap3xxx_prm_reconfigure_io_chain(void) 395void omap3_prm_reconfigure_io_chain(void)
381{ 396{
382 int i = 0; 397 int i = 0;
383 398
@@ -400,6 +415,15 @@ void omap3xxx_prm_reconfigure_io_chain(void)
400} 415}
401 416
402/** 417/**
418 * omap3xxx_prm_reconfigure_io_chain - reconfigure I/O chain
419 */
420void omap3xxx_prm_reconfigure_io_chain(void)
421{
422 if (omap3_prcm_irq_setup.reconfigure_io_chain)
423 omap3_prcm_irq_setup.reconfigure_io_chain();
424}
425
426/**
403 * omap3xxx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches 427 * omap3xxx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches
404 * 428 *
405 * Activates the I/O wakeup event latches and allows events logged by 429 * Activates the I/O wakeup event latches and allows events logged by
@@ -656,6 +680,13 @@ static int omap3xxx_prm_late_init(void)
656 if (!(prm_features & PRM_HAS_IO_WAKEUP)) 680 if (!(prm_features & PRM_HAS_IO_WAKEUP))
657 return 0; 681 return 0;
658 682
683 if (omap3_has_io_chain_ctrl())
684 omap3_prcm_irq_setup.reconfigure_io_chain =
685 omap3_prm_reconfigure_io_chain;
686 else
687 omap3_prcm_irq_setup.reconfigure_io_chain =
688 omap3430_pre_es3_1_reconfigure_io_chain;
689
659 omap3xxx_prm_enable_io_wakeup(); 690 omap3xxx_prm_enable_io_wakeup();
660 ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); 691 ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
661 if (!ret) 692 if (!ret)