From 6ad1b614007c556129989b9f6b020d0d2e058121 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 16 Jan 2012 09:31:47 +0000 Subject: ARM: sa11x0: neponset: provide function to manipulate NCR_0 Rather than having direct register accesses to NCR_0 scattered amongst the code, provide a function instead. This contains the necessary race protection for this platform, ensuring that updates to this register are safe. Signed-off-by: Russell King --- arch/arm/mach-sa1100/neponset.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/mach-sa1100/neponset.c') diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 6a14d3760ccd..10be07e2bd56 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c @@ -20,6 +20,15 @@ #include #include +void neponset_ncr_frob(unsigned int mask, unsigned int val) +{ + unsigned long flags; + + local_irq_save(flags); + NCR_0 = (NCR_0 & ~mask) | val; + local_irq_restore(flags); +} + /* * Install handler for Neponset IRQ. Note that we have to loop here * since the ETHERNET and USAR IRQs are level based, and we need to -- cgit v1.2.1