Re: [PATCH v2] clocksource: Add BE APIs support for clocksource counter reading.

From: Thomas Gleixner
Date: Fri Sep 26 2014 - 09:34:18 EST

On Fri, 26 Sep 2014, Xiubo Li wrote:
> For now I just added _be() support using ioread{16,32}be.
> And i have a check of the clocksource drivers, didn't find anyone
> using LE mode on one BE SoC, so _le() APIs is not needed.

Nonsense. The existing clocksource_mmio accessor function are
providing LE access independent of the CPU endianess. So we don't need
an _le() API simply because we have it already.

> cycle_t clocksource_mmio_readl_up(struct clocksource *c)
> {
> - return (cycle_t)readl_relaxed(to_mmio_clksrc(c)->reg);
> + return (cycle_t)ioread32(to_mmio_clksrc(c)->reg);

And how exactly is this change related to adding BE support?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at