提交 d0d133d9 编写于 作者: D Daniel Lezcano 提交者: Kevin Hilman

ARM: OMAP4: cpuidle - Initialize omap4_idle_data at compile time

We initialize the omap4_idle_data variable at compile time allowing us
to remove in the next patch the initialization done at boot time.
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: NJean Pihet <j-pihet@ti.com>
Reviewed-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: NKevin Hilman <khilman@ti.com>
Signed-off-by: NKevin Hilman <khilman@ti.com>
上级 cc6ae020
......@@ -31,9 +31,24 @@ struct omap4_idle_statedata {
u32 mpu_state;
};
#define OMAP4_NUM_STATES 3
static struct omap4_idle_statedata omap4_idle_data[] = {
{
.cpu_state = PWRDM_POWER_ON,
.mpu_state = PWRDM_POWER_ON,
.mpu_logic_state = PWRDM_POWER_RET,
},
{
.cpu_state = PWRDM_POWER_OFF,
.mpu_state = PWRDM_POWER_RET,
.mpu_logic_state = PWRDM_POWER_RET,
},
{
.cpu_state = PWRDM_POWER_OFF,
.mpu_state = PWRDM_POWER_RET,
.mpu_logic_state = PWRDM_POWER_OFF,
},
};
static struct omap4_idle_statedata omap4_idle_data[OMAP4_NUM_STATES];
static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd;
/**
......@@ -152,7 +167,7 @@ struct cpuidle_driver omap4_idle_driver = {
.desc = "MPUSS OSWR",
},
},
.state_count = OMAP4_NUM_STATES,
.state_count = ARRAY_SIZE(omap4_idle_data),
.safe_state_index = 0,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册