mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-20 20:08:55 +07:00
ARM: OMAP2420: hwmod data/PM: use hwmod to block WFI when I2C active
Use the HWMOD_BLOCK_WFI flag in the hwmod data to prevent the MPU from entering WFI when the I2C devices are active. No idea why this is needed; this could certainly bear further investigation if anyone is interested. The objective here is to remove some custom code from the OMAP24xx PM code. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Kevin Hilman <khilman@deeprootsystems.com>
This commit is contained in:
parent
fa2002223e
commit
aff2f7d90f
@ -121,7 +121,12 @@ static struct omap_hwmod omap2420_i2c1_hwmod = {
|
|||||||
},
|
},
|
||||||
.class = &i2c_class,
|
.class = &i2c_class,
|
||||||
.dev_attr = &i2c_dev_attr,
|
.dev_attr = &i2c_dev_attr,
|
||||||
.flags = HWMOD_16BIT_REG,
|
/*
|
||||||
|
* From mach-omap2/pm24xx.c: "Putting MPU into the WFI state
|
||||||
|
* while a transfer is active seems to cause the I2C block to
|
||||||
|
* timeout. Why? Good question."
|
||||||
|
*/
|
||||||
|
.flags = (HWMOD_16BIT_REG | HWMOD_BLOCK_WFI),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* I2C2 */
|
/* I2C2 */
|
||||||
|
@ -140,14 +140,6 @@ static int omap2_enter_full_retention(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int omap2_i2c_active(void)
|
|
||||||
{
|
|
||||||
u32 l;
|
|
||||||
|
|
||||||
l = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1);
|
|
||||||
return l & (OMAP2420_EN_I2C2_MASK | OMAP2420_EN_I2C1_MASK);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int sti_console_enabled;
|
static int sti_console_enabled;
|
||||||
|
|
||||||
static int omap2_allow_mpu_retention(void)
|
static int omap2_allow_mpu_retention(void)
|
||||||
@ -172,11 +164,6 @@ static int omap2_allow_mpu_retention(void)
|
|||||||
|
|
||||||
static void omap2_enter_mpu_retention(void)
|
static void omap2_enter_mpu_retention(void)
|
||||||
{
|
{
|
||||||
/* Putting MPU into the WFI state while a transfer is active
|
|
||||||
* seems to cause the I2C block to timeout. Why? Good question. */
|
|
||||||
if (omap2_i2c_active())
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* The peripherals seem not to be able to wake up the MPU when
|
/* The peripherals seem not to be able to wake up the MPU when
|
||||||
* it is in retention mode. */
|
* it is in retention mode. */
|
||||||
if (omap2_allow_mpu_retention()) {
|
if (omap2_allow_mpu_retention()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user