diff options
author | Ye Li <ye.li@nxp.com> | 2022-08-01 12:12:04 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2022-08-01 15:28:08 +0800 |
commit | 29624e4a3e635effcc4f4d676908d4b1ea29808b (patch) | |
tree | b891630239f2293b2a3c4eb566b7f1a49655d99e /arch/arm/mach-imx/imx8ulp | |
parent | e83e6f5855e57544e2a6b585fcc7e2cadd47c546 (diff) |
LFU-373 imx8ulp: upower: Do not send AFFB enable message for A1
On A1 part, upower ROM will default enable AFFB for APD/AVD/RTD before
power on domains. We don't need to send the AFFB enable message
any more. Actually enabling the AFFB of APD should happen during power
mode switch which needs put APD to hold mode. It is hard to implement
for boot, so upower ROM's implementation is necessary and simple.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'arch/arm/mach-imx/imx8ulp')
-rw-r--r-- | arch/arm/mach-imx/imx8ulp/upower/upower_hal.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/arch/arm/mach-imx/imx8ulp/upower/upower_hal.c b/arch/arm/mach-imx/imx8ulp/upower/upower_hal.c index c24bc079ec..87152ca818 100644 --- a/arch/arm/mach-imx/imx8ulp/upower/upower_hal.c +++ b/arch/arm/mach-imx/imx8ulp/upower/upower_hal.c @@ -6,6 +6,7 @@ #include <log.h> #include <asm/io.h> #include <linux/delay.h> +#include <asm/arch/sys_proto.h> #include "upower_soc_defs.h" #include "upower_api.h" @@ -191,20 +192,22 @@ int upower_init(void) if (ret != UPWR_REQ_OK) printk("Faliure %d\n", ret); - /* Enable AFBB for AP domain */ - bias.apply = BIAS_APPLY_APD; - bias.dommode = AFBB_BIAS_MODE; - ret = upwr_pwm_chng_dom_bias(&bias, NULL); + if (is_soc_rev(CHIP_REV_1_0)) { + /* Enable AFBB for AP domain */ + bias.apply = BIAS_APPLY_APD; + bias.dommode = AFBB_BIAS_MODE; + ret = upwr_pwm_chng_dom_bias(&bias, NULL); - if (ret) - printf("Enable AFBB for APD bias fail %d\n", ret); - else - printf("Enable AFBB for APD bias ok\n"); + if (ret) + printf("Enable AFBB for APD bias fail %d\n", ret); + else + printf("Enable AFBB for APD bias ok\n"); - upower_wait_resp(); - ret = upwr_poll_req_status(UPWR_SG_PWRMGMT, NULL, NULL, &ret_val, 1000); - if (ret != UPWR_REQ_OK) - printk("Faliure %d\n", ret); + upower_wait_resp(); + ret = upwr_poll_req_status(UPWR_SG_PWRMGMT, NULL, NULL, &ret_val, 1000); + if (ret != UPWR_REQ_OK) + printk("Faliure %d\n", ret); + } return 0; } |