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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUGLhLAAoJEBvUPslcq6Vz9fgQANwvR2gIB8SMNRzNsyJdKwIU
 xgaXDgdhOHqD0tJ57EgqvPbnzHxajseJNyctN6SZZSl4Eyr5zF1WH9SuMiuHUywu
 vJ9eVku+UPKFK/rQGmXZAZ1i1HnXVajw7QSKMR7fRbs4q0sA5vQeJZJs/UHfZj6S
 zaCkSmcDuRDrEF0zVBvwVPwc4OrpVeSoNHaXiOqfDcB07zsUURnRt3VySZT2xNTC
 fRgsxHQtG+E7BxTAxvIVmBkP73KSZB8/cdhcTIM42RDgjfw8s1QRTWS4S2/DXlC2
 sxtlAu/4LuvU/lx7zi1SuVMV730X4SgK0TCsvWmVnp26YzPpG3XpA3nxFeglkbzQ
 yOWwNHkG/DOBFK8HZC+8Yd63jJEAotmG6GoCZX55+DnH6+Ji0yv1nyRBcpowiXhv
 Cxhka/LHkftaY0ziph7p4h/E7sc3zpM3SG+rRmzniBf1teKiFoJ9rfVD184bWkvG
 tRczlxRrilGODV+9A9Uak2MaUEOIRoIYvkoY52stJm4IUfNt4SMPJUKDE/xChr9P
 tgmQVjarvIunH3dXmq1kEof4sxR6SRnvlS2oVRgF/B4dsoX1Ex3OUg9NRIGHmHy3
 BDpklMiMABPJBxTMCJoHwHNVYHf+Gb8q7fNJq+GlC09qfdDktRG/PMq7sQ6oxuLy
 4VvRfPSZ3Mw/SaTiAygW
 =3MaO
 -----END PGP SIGNATURE-----

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>
This commit is contained in:
Olof Johansson 2014-09-22 21:57:16 -07:00
commit 21c68e7cb0
2 changed files with 36 additions and 5 deletions

View File

@ -2065,7 +2065,7 @@ static void _reconfigure_io_chain(void)
spin_lock_irqsave(&io_chain_lock, flags);
if (cpu_is_omap34xx() && omap3_has_io_chain_ctrl())
if (cpu_is_omap34xx())
omap3xxx_prm_reconfigure_io_chain();
else if (cpu_is_omap44xx())
omap44xx_prm_reconfigure_io_chain();

View File

@ -45,7 +45,7 @@ static struct omap_prcm_irq_setup omap3_prcm_irq_setup = {
.ocp_barrier = &omap3xxx_prm_ocp_barrier,
.save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen,
.restore_irqen = &omap3xxx_prm_restore_irqen,
.reconfigure_io_chain = &omap3xxx_prm_reconfigure_io_chain,
.reconfigure_io_chain = NULL,
};
/*
@ -369,15 +369,30 @@ void __init omap3_prm_init_pm(bool has_uart4, bool has_iva)
}
/**
* omap3xxx_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain
* omap3430_pre_es3_1_reconfigure_io_chain - restart wake-up daisy chain
*
* The ST_IO_CHAIN bit does not exist in 3430 before es3.1. The only
* thing we can do is toggle EN_IO bit for earlier omaps.
*/
void omap3430_pre_es3_1_reconfigure_io_chain(void)
{
omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
PM_WKEN);
omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
PM_WKEN);
omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
}
/**
* omap3_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain
*
* Clear any previously-latched I/O wakeup events and ensure that the
* I/O wakeup gates are aligned with the current mux settings. Works
* by asserting WUCLKIN, waiting for WUCLKOUT to be asserted, and then
* deasserting WUCLKIN and clearing the ST_IO_CHAIN WKST bit. No
* return value.
* return value. These registers are only available in 3430 es3.1 and later.
*/
void omap3xxx_prm_reconfigure_io_chain(void)
void omap3_prm_reconfigure_io_chain(void)
{
int i = 0;
@ -399,6 +414,15 @@ void omap3xxx_prm_reconfigure_io_chain(void)
omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST);
}
/**
* omap3xxx_prm_reconfigure_io_chain - reconfigure I/O chain
*/
void omap3xxx_prm_reconfigure_io_chain(void)
{
if (omap3_prcm_irq_setup.reconfigure_io_chain)
omap3_prcm_irq_setup.reconfigure_io_chain();
}
/**
* omap3xxx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches
*
@ -656,6 +680,13 @@ static int omap3xxx_prm_late_init(void)
if (!(prm_features & PRM_HAS_IO_WAKEUP))
return 0;
if (omap3_has_io_chain_ctrl())
omap3_prcm_irq_setup.reconfigure_io_chain =
omap3_prm_reconfigure_io_chain;
else
omap3_prcm_irq_setup.reconfigure_io_chain =
omap3430_pre_es3_1_reconfigure_io_chain;
omap3xxx_prm_enable_io_wakeup();
ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
if (!ret)