[PATCHv2 2/2] clocksource: dw_apb_timer_of: Fix read_sched_clock

Linus Walleij linus.walleij at linaro.org
Wed Aug 21 03:04:07 EDT 2013


On Thu, Aug 15, 2013 at 1:29 AM,  <dinguyen at altera.com> wrote:

> -       sched_io_base = iobase + 0x04;
> +       sched_io_base = iobase;
>         sched_rate = rate;
>  }
>
>  static u32 read_sched_clock(void)
>  {
> -       return __raw_readl(sched_io_base);
> +       return ~__raw_readl(sched_io_base + 0x4);

So what about #define what 0x04 is?

#define MY_FOO_REGISTER_OFFSET 0x04

raw_readl(sched_io_base + MY_FOO_REGISTER_OFFSET);

You get the idea.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list