diff options
author | Florian Fainelli <ffainelli@freebox.fr> | 2009-12-16 05:29:06 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:53:12 -0500 |
commit | f868ba29723be46e0981226d7455090d515b08ef (patch) | |
tree | 77b0fde68563ab8b8b458839608577223d787d81 /arch/mips | |
parent | 9df7d1647fdd729c5bf3f087ae69d07fecf60bdd (diff) |
MIPS: add readl/write_be accessors
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>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@linux-mips.org
Cc: Maxime Bizon <mbizon@freebox.fr>
Patchwork: http://patchwork.linux-mips.org/patch/793/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/io.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 436878e4e063..c98bf514ec7d 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h | |||
@@ -447,6 +447,24 @@ __BUILDIO(q, u64) | |||
447 | #define readl_relaxed readl | 447 | #define readl_relaxed readl |
448 | #define readq_relaxed readq | 448 | #define readq_relaxed readq |
449 | 449 | ||
450 | #define readb_be(addr) \ | ||
451 | __raw_readb((__force unsigned *)(addr)) | ||
452 | #define readw_be(addr) \ | ||
453 | be16_to_cpu(__raw_readw((__force unsigned *)(addr))) | ||
454 | #define readl_be(addr) \ | ||
455 | be32_to_cpu(__raw_readl((__force unsigned *)(addr))) | ||
456 | #define readq_be(addr) \ | ||
457 | be64_to_cpu(__raw_readq((__force unsigned *)(addr))) | ||
458 | |||
459 | #define writeb_be(val, addr) \ | ||
460 | __raw_writeb((val), (__force unsigned *)(addr)) | ||
461 | #define writew_be(val, addr) \ | ||
462 | __raw_writew(cpu_to_be16((val)), (__force unsigned *)(addr)) | ||
463 | #define writel_be(val, addr) \ | ||
464 | __raw_writel(cpu_to_be32((val)), (__force unsigned *)(addr)) | ||
465 | #define writeq_be(val, addr) \ | ||
466 | __raw_writeq(cpu_to_be64((val)), (__force unsigned *)(addr)) | ||
467 | |||
450 | /* | 468 | /* |
451 | * Some code tests for these symbols | 469 | * Some code tests for these symbols |
452 | */ | 470 | */ |