aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2015-04-28 05:57:29 -0400
committerRalf Baechle <ralf@linux-mips.org>2015-05-26 10:46:52 -0400
commite21422de817ab0b67ed1902fe1383bcdeece855e (patch)
tree4d6ade38fa6638a82c49f0321f0401176ff7f5b1
parentba155e2d21f6bf05de86a78dbe5bfd8757604a65 (diff)
MIPS: Fix CDMM to use native endian MMIO reads
The MIPS Common Device Memory Map (CDMM) is internal to the core and has native endianness. There is therefore no need to byte swap the accesses on big endian targets, so convert the CDMM bus driver to use __raw_readl() rather than readl(). Fixes: 8286ae03308c ("MIPS: Add CDMM bus support") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9904/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--drivers/bus/mips_cdmm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bus/mips_cdmm.c b/drivers/bus/mips_cdmm.c
index 5bd792c68f9b..ab3bde16ecb4 100644
--- a/drivers/bus/mips_cdmm.c
+++ b/drivers/bus/mips_cdmm.c
@@ -453,7 +453,7 @@ void __iomem *mips_cdmm_early_probe(unsigned int dev_type)
453 453
454 /* Look for a specific device type */ 454 /* Look for a specific device type */
455 for (; drb < bus->drbs; drb += size + 1) { 455 for (; drb < bus->drbs; drb += size + 1) {
456 acsr = readl(cdmm + drb * CDMM_DRB_SIZE); 456 acsr = __raw_readl(cdmm + drb * CDMM_DRB_SIZE);
457 type = (acsr & CDMM_ACSR_DEVTYPE) >> CDMM_ACSR_DEVTYPE_SHIFT; 457 type = (acsr & CDMM_ACSR_DEVTYPE) >> CDMM_ACSR_DEVTYPE_SHIFT;
458 if (type == dev_type) 458 if (type == dev_type)
459 return cdmm + drb * CDMM_DRB_SIZE; 459 return cdmm + drb * CDMM_DRB_SIZE;
@@ -500,7 +500,7 @@ static void mips_cdmm_bus_discover(struct mips_cdmm_bus *bus)
500 bus->discovered = true; 500 bus->discovered = true;
501 pr_info("cdmm%u discovery (%u blocks)\n", cpu, bus->drbs); 501 pr_info("cdmm%u discovery (%u blocks)\n", cpu, bus->drbs);
502 for (; drb < bus->drbs; drb += size + 1) { 502 for (; drb < bus->drbs; drb += size + 1) {
503 acsr = readl(cdmm + drb * CDMM_DRB_SIZE); 503 acsr = __raw_readl(cdmm + drb * CDMM_DRB_SIZE);
504 type = (acsr & CDMM_ACSR_DEVTYPE) >> CDMM_ACSR_DEVTYPE_SHIFT; 504 type = (acsr & CDMM_ACSR_DEVTYPE) >> CDMM_ACSR_DEVTYPE_SHIFT;
505 size = (acsr & CDMM_ACSR_DEVSIZE) >> CDMM_ACSR_DEVSIZE_SHIFT; 505 size = (acsr & CDMM_ACSR_DEVSIZE) >> CDMM_ACSR_DEVSIZE_SHIFT;
506 rev = (acsr & CDMM_ACSR_DEVREV) >> CDMM_ACSR_DEVREV_SHIFT; 506 rev = (acsr & CDMM_ACSR_DEVREV) >> CDMM_ACSR_DEVREV_SHIFT;