Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rob Herring and committed by
Olof Johansson
e64bf95e eaed1352

+4 -3
+4 -3
arch/arm/mach-highbank/highbank.c
··· 115 115 { 116 116 struct resource *res; 117 117 int reg = -1; 118 + u32 val; 118 119 struct device *dev = __dev; 119 120 120 121 if (event != BUS_NOTIFY_ADD_DEVICE) ··· 142 141 return NOTIFY_DONE; 143 142 144 143 if (of_property_read_bool(dev->of_node, "dma-coherent")) { 145 - writel(0xff31, sregs_base + reg); 144 + val = readl(sregs_base + reg); 145 + writel(val | 0xff01, sregs_base + reg); 146 146 set_dma_ops(dev, &arm_coherent_dma_ops); 147 - } else 148 - writel(0, sregs_base + reg); 147 + } 149 148 150 149 return NOTIFY_OK; 151 150 }