diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2019-01-24 16:50:02 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2019-01-29 09:26:41 +0800 |
commit | e6cf7a468e18143672219caaa7bb0e143833d6a6 (patch) | |
tree | 5d0906df8e145786b053b09a7922d441f9b40c28 /plat/imx/imx8qx/imx8qx_bl31_setup.c | |
parent | 3a2b51993d0c9666a6e1bdc4fd45a987ef6f1266 (diff) |
imx: power optimization for i.mx8qx
Current implementation of i.MX8QX power management related
features does NOT optimize power number, all system resources
like CCI, DDR, and A cluster etc. are kept in STBY mode (powered
ON) when system suspend or CPU hotplug.
To lower the power number, OFF mode should be adopted for those
system resources whenever they can be OFF, A cluster will be OFF
if the CPUs in the cluster are all off line, DDR/MU/DB can be OFF
if system suspend, IRQ steer can be OFF if the wakeup source is
belonged to system controller partition, so wakeup source runtime
check is used to determine if IRQ steer can be OFF before system
suspend.
If resources are powered off for suspend, they should be restored
properly after system resume.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Diffstat (limited to 'plat/imx/imx8qx/imx8qx_bl31_setup.c')
-rw-r--r-- | plat/imx/imx8qx/imx8qx_bl31_setup.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plat/imx/imx8qx/imx8qx_bl31_setup.c b/plat/imx/imx8qx/imx8qx_bl31_setup.c index c90794a8..bfe40528 100644 --- a/plat/imx/imx8qx/imx8qx_bl31_setup.c +++ b/plat/imx/imx8qx/imx8qx_bl31_setup.c @@ -44,10 +44,7 @@ static entry_point_info_t bl33_image_ep_info; (SC_PAD_28FDSOI_PS_PD << PADRING_PULL_SHIFT)) static const mmap_region_t imx_mmap[] = { - MAP_REGION_FLAT(IMX_BOOT_UART_BASE, IMX_BOOT_UART_SIZE, MT_DEVICE | MT_RW), - MAP_REGION_FLAT(SC_IPC_BASE, SC_IPC_SIZE, MT_DEVICE | MT_RW), - MAP_REGION_FLAT(PLAT_GICD_BASE, PLAT_GICD_SIZE, MT_DEVICE | MT_RW), - MAP_REGION_FLAT(PLAT_GICR_BASE, PLAT_GICR_SIZE, MT_DEVICE | MT_RW), + MAP_REGION_FLAT(IMX_REG_BASE, IMX_REG_SIZE, MT_DEVICE | MT_RW), {0} }; @@ -281,6 +278,11 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, /* Turn on MU1 for non-secure OS/Hypervisor */ sc_pm_set_resource_power_mode(ipc_handle, SC_R_MU_1A, SC_PM_PW_MODE_ON); + /* Turn on GPT_0's power & clock for non-secure OS/Hypervisor */ + sc_pm_set_resource_power_mode(ipc_handle, SC_R_GPT_0, SC_PM_PW_MODE_ON); + sc_pm_clock_enable(ipc_handle, SC_R_GPT_0, SC_PM_CLK_PER, true, 0); + mmio_write_32(IMX_GPT0_LPCG_BASE, mmio_read_32(IMX_GPT0_LPCG_BASE) | (1 << 25)); + /* * create new partition for non-secure OS/Hypervisor * uses global structs defined in sec_rsrc.h |