summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-2.6.32/012-mips_add_readl_writel_be_accessors.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2010-02-28 20:50:51 +0000
committerFlorian Fainelli <florian@openwrt.org>2010-02-28 20:50:51 +0000
commit984ac762e463a84395d1d7903234207c6bd984dd (patch)
treedf091f9c6f0aaf4809295c9157673469193b8a78 /target/linux/brcm63xx/patches-2.6.32/012-mips_add_readl_writel_be_accessors.patch
parent32bba7d1540cae89123978a1d1e96f822f4131c6 (diff)
downloadmaster-31e0f0ae-984ac762e463a84395d1d7903234207c6bd984dd.tar.gz
master-31e0f0ae-984ac762e463a84395d1d7903234207c6bd984dd.tar.bz2
master-31e0f0ae-984ac762e463a84395d1d7903234207c6bd984dd.zip
add support for 2.6.32, dropped the SPI patch for now
SVN-Revision: 19919
Diffstat (limited to 'target/linux/brcm63xx/patches-2.6.32/012-mips_add_readl_writel_be_accessors.patch')
-rw-r--r--target/linux/brcm63xx/patches-2.6.32/012-mips_add_readl_writel_be_accessors.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-2.6.32/012-mips_add_readl_writel_be_accessors.patch b/target/linux/brcm63xx/patches-2.6.32/012-mips_add_readl_writel_be_accessors.patch
new file mode 100644
index 0000000000..3a42bdefea
--- /dev/null
+++ b/target/linux/brcm63xx/patches-2.6.32/012-mips_add_readl_writel_be_accessors.patch
@@ -0,0 +1,24 @@
+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>
+---
+diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
+index 436878e..65d7843 100644
+--- 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
+ */
+--
+
+