Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26656e24 authored by Saravana Kannan's avatar Saravana Kannan
Browse files

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: default avatarSaravana Kannan <skannan@codeaurora.org>
parent d3b594b9
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -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;
}