Re: [PATCH 20/28] nios2: Time keeping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 18 April 2014, Ley Foon Tan wrote:
> +static inline unsigned long read_timersnapshot(void)
> +{
> +       unsigned long count;
> +
> +       outw(0, timer_membase + ALTERA_TIMER_SNAPL_REG);
> +       count =
> +               inw(timer_membase + ALTERA_TIMER_SNAPH_REG) << 16 |
> +               inw(timer_membase + ALTERA_TIMER_SNAPL_REG);
> +
> +       return count;
> +}
> +
> +static inline void write_timerperiod(unsigned long period)
> +{
> +       outw(period, timer_membase + ALTERA_TIMER_PERIODL_REG);
> +       outw(period >> 16, timer_membase + ALTERA_TIMER_PERIODH_REG);
> +}

It's wrong to use 'outw' if this device is not on an PC-style ISA bus,
which I assume it is not. Since timer_membase is an __iomem pointer,
I'm sure you want to use writew() instead.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux