]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: SGI-IP27: fix readb/writeb addressing
authorThomas Bogendoerfer <tbogendoerfer@suse.de>
Thu, 9 Jan 2020 10:34:28 +0000 (11:34 +0100)
committerPaul Burton <paulburton@kernel.org>
Thu, 9 Jan 2020 23:30:56 +0000 (15:30 -0800)
commit0b1e26230e58518bf6601bd39667a9075965fced
treef7c4812c986b08cfc8e853c6cea57622c26de581
parenta17bfe27778950b982e6c4f1a5784c4ee248a505
MIPS: SGI-IP27: fix readb/writeb addressing

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: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul 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
arch/mips/include/asm/mach-ip27/mangle-port.h
arch/mips/include/asm/sn/ioc3.h
drivers/net/ethernet/sgi/ioc3-eth.c
drivers/rtc/rtc-m48t35.c