From 9591d70bcd74cadb561ef880bb22e78a932a774f Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Fri, 31 Aug 2012 18:05:42 -0700 Subject: make pmu register dump more verbose This adds a row that displays register offset and increases highest register offset to 18. The new output is 79 columns wide. Signed-off-by: David Hendricks BRANCH=snow BUG=none TEST=see below Before: pmu PMU: 0c 00 3e 00 12 20 4b bf ff ff 00 12 pmu events b00001100 ac gpio 0 After: > pmu 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 PMU: 0c 00 fe ff 12 20 4b bf ff ff 00 12 1e 1e 1e 1f 1f 1f 02 1f 1f 02 20 00 00 pmu events b00001100 ac gpio 0 Change-Id: I5058e5aee1affadaa00f20de785c1ea70eaea82e Reviewed-on: https://gerrit.chromium.org/gerrit/32082 Reviewed-by: Rong Chang Reviewed-by: Simon Glass Reviewed-by: Vincent Palatin Commit-Ready: David Hendricks Tested-by: David Hendricks --- common/pmu_tps65090.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/pmu_tps65090.c b/common/pmu_tps65090.c index 3af89ad5bb..23027cd6a1 100644 --- a/common/pmu_tps65090.c +++ b/common/pmu_tps65090.c @@ -536,13 +536,16 @@ static int print_pmu_info(void) int reg, ret; int value; - for (reg = 0; reg < 0xc; reg++) { + ccprintf(" "); + for (reg = 0; reg <= 0x18; reg++) + ccprintf("%02x ", reg); + ccprintf("\n"); + + ccprintf("PMU: "); + for (reg = 0; reg <= 0x18; reg++) { ret = pmu_read(reg, &value); if (ret) return ret; - if (!reg) - ccputs("PMU: "); - ccprintf("%02x ", value); } ccputs("\n"); -- cgit v1.2.1