linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: highbank: Only touch common coherency control register fields
@ 2013-07-21 19:53 Rob Herring
  2013-07-23  3:04 ` Olof Johansson
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2013-07-21 19:53 UTC (permalink / raw)
  To: linux-arm-kernel

From: Rob Herring <rob.herring@calxeda.com>

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>
---
 arch/arm/mach-highbank/highbank.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index dc5d6be..8881579 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;
 }
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ARM: highbank: Only touch common coherency control register fields
  2013-07-21 19:53 [PATCH] ARM: highbank: Only touch common coherency control register fields Rob Herring
@ 2013-07-23  3:04 ` Olof Johansson
  0 siblings, 0 replies; 2+ messages in thread
From: Olof Johansson @ 2013-07-23  3:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jul 21, 2013 at 02:53:37PM -0500, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> 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>

Applied to fixes, thanks.


-Olof

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-23  3:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-21 19:53 [PATCH] ARM: highbank: Only touch common coherency control register fields Rob Herring
2013-07-23  3:04 ` Olof Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).