mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
cr50: print '.' every time cr50 resumes from sleep
Right now there is no way to verify cr50 is asleep just by looking at the UART output. You can check by running taskinfo and seeing that the GC_IRQNUM_PMU_INTR_WAKEUP_INT irq count has increased or by measuring cr50 power. In the past we have had Cr50 issues that we think are related to sleep. Devices like poppy will have the Cr50 uart connected to servo, so we can capture the Cr50 console output. It would be helpful if there was an easy way to tell that cr50 is asleep from the UART output to more easily confirm issues might be related to sleep. This change will print '.' every time Cr50 resumes from sleep. Cr50 wakes up every half second for HOOK_TICK, so with this change '.' prints every half second while cr50 is asleep. BUG=none BRANCH=none TEST=boot a device, wait a while, and verify cr50 starts printing '.' every half second. Turn off the device and verify the '.'s stop. Change-Id: I94a82db00076062dbba2c3bc273cbe0731430520 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/463990 Reviewed-by: Scott Collyer <scollyer@chromium.org>
This commit is contained in:
@@ -345,6 +345,7 @@ static void init_pmu(void)
|
||||
void pmu_wakeup_interrupt(void)
|
||||
{
|
||||
int exiten, wakeup_src;
|
||||
static int count;
|
||||
|
||||
delay_sleep_by(1 * MSEC);
|
||||
|
||||
@@ -356,6 +357,16 @@ void pmu_wakeup_interrupt(void)
|
||||
/* Clear pmu reset */
|
||||
GWRITE(PMU, CLRRST, 1);
|
||||
|
||||
/*
|
||||
* This will print '.' every time cr50 resumes from regular sleep.
|
||||
* During sleep Cr50 wakes up every half second for HOOK_TICK, so that
|
||||
* is around the rate cr50 will print '.' while it is idle.
|
||||
*/
|
||||
ccprintf(".");
|
||||
if (!(count % 50))
|
||||
ccprintf("\n");
|
||||
count++;
|
||||
|
||||
if (wakeup_src & GC_PMU_EXITPD_SRC_PIN_PD_EXIT_MASK) {
|
||||
/*
|
||||
* If any wake pins are edge triggered, the pad logic latches
|
||||
|
||||
Reference in New Issue
Block a user