|
发表于 2020-8-20 17:32:01
6674 浏览 0 回复
MT6771,如何让reset key重启,而不是掉电关机?
硬件拉出来了Restkey 引脚,但是默认按下reset key ,只是关机了,却并不重启,需要修改如下代码:
- In vendor\mediatek\proprietary\bootable\bootloader\preloader\platform\mt6771\src\drivers\pmic.c
- static U32 g_sts_crst;
- static U32 g_sts_apwdt;
- static U32 g_just_rst;
- static U32 g_pwrkey_release;
- U32 is_pmic_ap_wdt(void)
- {
- return g_sts_apwdt;
- }
- ...
- void pmic_dbg_status(unsigned char option)
- {
- ...
- g_sts_crst = (poff_sts >> PMIC_STS_CRST_SHIFT) & PMIC_STS_CRST_MASK;
- g_sts_apwdt = (poff_sts >> PMIC_STS_WDT_SHIFT) & PMIC_STS_WDT_MASK;
- pal_log_warn("[PMIC]POFFSTS[0x%x]=0x%x\n",
- MT6358_POFFSTS, poff_sts);
- ...
- }
- In vendor\mediatek\proprietary\bootable\bootloader\preloader\platform\mt6771\src\drivers\platform.c
- static boot_reason_t platform_boot_status(void)
- {
- ...
- if (is_pmic_ap_wdt()) {
- pal_log_err("PRESS RESET KEY, reset now\n");
- rtc_mark_bypass_pwrkey();
- return BR_WDT_BY_PASS_PWK;
- }
- if(drdi_get_hw_ver() == HW_VER_V1) {
- ...
- }
复制代码
|
|
手机微信同号:13682654092
|
|
|
|
|
登录或注册
|