diff options
author | Olof Johansson <olof@lixom.net> | 2014-09-23 00:57:16 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-09-23 00:57:20 -0400 |
commit | 21c68e7cb07957ea61da8cc2f02376243dd3086b (patch) | |
tree | fc3f369e02f179fb96bc07b52d2af780e7d13529 /arch | |
parent | 602f58500664943cc885e34cd60a9661f96fb709 (diff) | |
parent | 7db143b89137de06ed289cf8b302f3bbbc5baa1f (diff) |
Merge tag 'fix-v3.17-io-chain-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
Regression fix for early omap3 revisions for wake-up events that
too some time to narrow down. Although a bit intrusive, this would
be good to get into the -rc cycle as there are quite a few boards
out there with omap3 es2.1 and es3.0, and we have those in at least
three boot test systems too that show errors without this patch.
* tag 'fix-v3.17-io-chain-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP3: Fix I/O chain clock line assertion timed out error
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm3xxx.c | 39 |
2 files changed, 36 insertions, 5 deletions
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 | */ | ||
377 | void 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 | */ |
380 | void omap3xxx_prm_reconfigure_io_chain(void) | 395 | void 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 | */ | ||
420 | void 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) |