• Thomas Bogendoerfer's avatar
    MIPS: SGI-IP27: fix readb/writeb addressing · 10cf8300
    Thomas Bogendoerfer authored
    Our chosen byte swapping, which is what firmware already uses, is to
    do readl/writel by normal lw/sw intructions (data invariance). This
    also means we need to mangle addresses for u8 and u16 accesses. The
    mangling for 16bit has been done aready, but 8bit one was missing.
    Correcting this causes different addresses for accesses to the
    SuperIO and local bus of the IOC3 chip. This is fixed by changing
    byte order in ioc3 and m48rtc_rtc structs.
    Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
    Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
    Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: James Hogan <jhogan@kernel.org>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: Alessandro Zummo <a.zummo@towertech.it>
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: linux-rtc@vger.kernel.org
    10cf8300
ioc3.h 21.2 KB