Google
  Web www.spinics.net

Re: [PATCH] clean up access to locomo registers

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


On Thu, Jul 24, 2008 at 2:48 AM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Wed, Jul 23, 2008 at 04:17:11PM +0200, Thomas Kunze wrote:
>> the locomo registers are accessed through ioremaped memory. Currently register read/writes
>> use the locomo_readl/writel macros defined in include/asm-arm/hardware/locomo.h. This patch
>> replaces the nonstandard locomo_readl/locomo_writel with the standard ioread16/iowrite16
>> calls. The conversion to 16 bit access is intended. The locomo registers have a size of 16 bit.
>
> As I've said elsewhere, the readw/writew interfaces aren't deprecated.
> If you only support MMIO (which, if you're using only ioremap on
> resources, that's the case) then there's absolutely no point using
> io{read,write}*.
>

Unfortunately, it looks like some such code has already been
stuffed somehow into the mainline (I remember scoop to be
such an example).

Yet I don't think scoop is supposed to be used on architectures
featuring individual I/O space (like x86), where io{read,write}*
becomes handy to use.

The problem I see with locomo is the incorrect naming of
locomo_{read,write}l(), where it can actually do read/write
on 16-bit boundary _only_, and maybe __raw_{read,write}w()
should be sufficient if it's used on little endian _only_ systems.

Apart from that, it looks to me the architectural issue is more
severe than the coding style ones. Esp. since now the new
bus type is not encouraged any more, we may need to work it
out in another way.

> -------------------------------------------------------------------
> List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
> FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
> Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
>



-- 
Cheers
- eric

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Site Home]     [Linux Arm]     [Fedora ARM]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux Book List]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Google PageRank Checking tool