PM / devfreq: Improve debug logs
- Add more debug logs - Change the format out the count logs to use hex instead of decimal to be consistent with the rest of the logs - Fix the type of the count variable from signed to unsigned to do the above Change-Id: I02a2968a3f10ce20ca00618e7aeeac9b9cd52bd3 Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
This commit is contained in:
parent
75ec522bf1
commit
55b343dd34
1 changed files with 12 additions and 4 deletions
|
@ -98,7 +98,14 @@ static void mon_irq_disable(struct bwmon *m)
|
|||
|
||||
static int mon_irq_status(struct bwmon *m)
|
||||
{
|
||||
return readl_relaxed(MON_INT_STATUS(m)) & 0x1;
|
||||
u32 mval, gval;
|
||||
|
||||
mval = readl_relaxed(MON_INT_STATUS(m)),
|
||||
gval = readl_relaxed(GLB_INT_STATUS(m));
|
||||
|
||||
dev_dbg(m->dev, "IRQ status p:%x, g:%x\n", mval, gval);
|
||||
|
||||
return mval & 0x1;
|
||||
}
|
||||
|
||||
static void mon_irq_clear(struct bwmon *m)
|
||||
|
@ -120,14 +127,15 @@ static u32 mon_get_limit(struct bwmon *m)
|
|||
return readl_relaxed(MON_THRES(m));
|
||||
}
|
||||
|
||||
static long mon_get_count(struct bwmon *m)
|
||||
static unsigned long mon_get_count(struct bwmon *m)
|
||||
{
|
||||
long count;
|
||||
unsigned long count;
|
||||
|
||||
count = readl_relaxed(MON_CNT(m));
|
||||
dev_dbg(m->dev, "Counter: %08lx\n", count);
|
||||
if (mon_irq_status(m))
|
||||
count += mon_get_limit(m);
|
||||
dev_dbg(m->dev, "Count: %ld\n", count);
|
||||
dev_dbg(m->dev, "Actual Count: %08lx\n", count);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue