1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-13 05:12:05 +03:00
openwrt-xburst/target/linux/brcm63xx/patches-2.6.32/012-mips_add_readl_writel_be_accessors.patch
florian e861730fef [brcm63xx] refresh 2.6.32 patches, fix livebox support (#6821)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20204 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-03-14 16:21:28 +00:00

20 lines
670 B
Diff

MIPS currently lacks the readl_be and writel_be accessors
which are required by BCM63xx for OHCI and EHCI support.
Let's define them globally for MIPS. This also fixes the
compilation of the bcm63xx defconfig against USB.
Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
---
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -447,6 +447,9 @@ __BUILDIO(q, u64)
#define readl_relaxed readl
#define readq_relaxed readq
+#define readl_be(addr) be32_to_cpu(__raw_readl((__force unsigned *)(addr)))
+#define writel_be(val, addr) __raw_writel(cpu_to_be32((val)), (__force unsigned *)(addr))
+
/*
* Some code tests for these symbols
*/