Add debug messages
This commit is contained in:
parent
c6dc05c335
commit
dcf4ad4f3a
|
|
@ -573,6 +573,7 @@ static void check_reset_reason(uint64_t reset_reason_shm_location)
|
||||||
* If this marker is not present, we have a power on reset
|
* If this marker is not present, we have a power on reset
|
||||||
*/
|
*/
|
||||||
ret = da9063_get_reg(PMIC_GP_ID_1, &state);
|
ret = da9063_get_reg(PMIC_GP_ID_1, &state);
|
||||||
|
printf("check_reset_reason, ret: %d state: %d\n", ret, state);
|
||||||
if ((ret == 0) && (state != 0xC5)) {
|
if ((ret == 0) && (state != 0xC5)) {
|
||||||
(void)da9063_set_reg(PMIC_GP_ID_1, 0xC5);
|
(void)da9063_set_reg(PMIC_GP_ID_1, 0xC5);
|
||||||
start_reason |= SR_POR;
|
start_reason |= SR_POR;
|
||||||
|
|
@ -584,6 +585,7 @@ static void check_reset_reason(uint64_t reset_reason_shm_location)
|
||||||
* - Watchdog
|
* - Watchdog
|
||||||
*/
|
*/
|
||||||
ret = da9063_get_reg(PMIC_REG_FAULT_LOG, &state);
|
ret = da9063_get_reg(PMIC_REG_FAULT_LOG, &state);
|
||||||
|
printf("check_reset_reason, ret: %d state: %d\n", ret, state);
|
||||||
if ((ret == 0) && (state != 0)) {
|
if ((ret == 0) && (state != 0)) {
|
||||||
/* clear pmic fault log by writing back all bits currently set */
|
/* clear pmic fault log by writing back all bits currently set */
|
||||||
(void)da9063_set_reg(PMIC_REG_FAULT_LOG, state);
|
(void)da9063_set_reg(PMIC_REG_FAULT_LOG, state);
|
||||||
|
|
@ -610,6 +612,7 @@ static void check_reset_reason(uint64_t reset_reason_shm_location)
|
||||||
* - COMP 1V2: Ignition
|
* - COMP 1V2: Ignition
|
||||||
*/
|
*/
|
||||||
ret = da9063_get_reg(PMIC_REG_EVENT_A, &state);
|
ret = da9063_get_reg(PMIC_REG_EVENT_A, &state);
|
||||||
|
printf("check_reset_reason, ret: %d state: %d\n", ret, state);
|
||||||
if ((ret == 0) && (state != 0)) {
|
if ((ret == 0) && (state != 0)) {
|
||||||
(void)da9063_set_reg(PMIC_REG_EVENT_A, state);
|
(void)da9063_set_reg(PMIC_REG_EVENT_A, state);
|
||||||
|
|
||||||
|
|
@ -646,6 +649,7 @@ static void check_reset_reason(uint64_t reset_reason_shm_location)
|
||||||
*/
|
*/
|
||||||
if (rr_is_reset_reason_valid(reset_regs))
|
if (rr_is_reset_reason_valid(reset_regs))
|
||||||
{
|
{
|
||||||
|
printf("check_reset_reason valid rr\n");
|
||||||
if (reset_regs->rr_value == RR_REBOOT_PATTERN) {
|
if (reset_regs->rr_value == RR_REBOOT_PATTERN) {
|
||||||
start_reason |= SR_REBOOT;
|
start_reason |= SR_REBOOT;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue