aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-highbank/highbank.c
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2013-07-21 14:53:37 -0500
committerOlof Johansson <olof@lixom.net>2013-07-22 20:03:59 -0700
commite64bf95e68bf92e7f6d906da4715b937cec5646c (patch)
treea4ef560af961477ec4d6fb740d72399c09ef2c3d /arch/arm/mach-highbank/highbank.c
parentMerge tag 'nomadik-defconfig-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into fixes (diff)
downloadlinux-dev-e64bf95e68bf92e7f6d906da4715b937cec5646c.tar.xz
linux-dev-e64bf95e68bf92e7f6d906da4715b937cec5646c.zip
ARM: highbank: Only touch common coherency control register fields
Midway adds new register fields to the coherency control registers, so writing absolute values will break on Midway. Change the register accesses to only modify the necessary and common fields in order to support both Midway and Highbank. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-highbank/highbank.c')
-rw-r--r--arch/arm/mach-highbank/highbank.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index dc5d6becd8c7..88815795fe26 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -115,6 +115,7 @@ static int highbank_platform_notifier(struct notifier_block *nb,
{
struct resource *res;
int reg = -1;
+ u32 val;
struct device *dev = __dev;
if (event != BUS_NOTIFY_ADD_DEVICE)
@@ -141,10 +142,10 @@ static int highbank_platform_notifier(struct notifier_block *nb,
return NOTIFY_DONE;
if (of_property_read_bool(dev->of_node, "dma-coherent")) {
- writel(0xff31, sregs_base + reg);
+ val = readl(sregs_base + reg);
+ writel(val | 0xff01, sregs_base + reg);
set_dma_ops(dev, &arm_coherent_dma_ops);
- } else
- writel(0, sregs_base + reg);
+ }
return NOTIFY_OK;
}