diff options
author | Greg Ungerer <gerg@uclinux.org> | 2012-09-14 23:57:39 +1000 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2012-09-27 23:33:53 +1000 |
commit | 041a89a41993e6023f110bf0cbbda847173e795c (patch) | |
tree | 761458b32cc26ec9afb0c8f26236c4f7ffc252f8 /arch/m68k/platform | |
parent | d72a5abb7edfccde54776b2600f735c4e10234a6 (diff) |
m68knommu: make ColdFire 5249 MBAR2 register definitions absolute addresses
Make the ColdFire 5249 MBAR peripheral register definitions absolute
addresses, instead of offsets into the region.
The various ColdFire parts use different methods to address the internal
registers, some are absolute, some are relative to peripheral regions
which can be mapped at different address ranges (such as the MBAR and IPSBAR
registers). We don't want to deal with this in the code when we are
accessing these registers, so make all register definitions the absolute
address - factoring out whether it is an offset into a peripheral region.
This makes them all consistently defined, and reduces the occasional bugs
caused by inconsistent definition of the register addresses.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/platform')
-rw-r--r-- | arch/m68k/platform/coldfire/intc-5249.c | 10 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/m5249.c | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/arch/m68k/platform/coldfire/intc-5249.c b/arch/m68k/platform/coldfire/intc-5249.c index f343bf7bf5b0..0864b836699a 100644 --- a/arch/m68k/platform/coldfire/intc-5249.c +++ b/arch/m68k/platform/coldfire/intc-5249.c @@ -20,22 +20,22 @@ static void intc2_irq_gpio_mask(struct irq_data *d) { u32 imr; - imr = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE); + imr = readl(MCFSIM2_GPIOINTENABLE); imr &= ~(0x1 << (d->irq - MCFINTC2_GPIOIRQ0)); - writel(imr, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE); + writel(imr, MCFSIM2_GPIOINTENABLE); } static void intc2_irq_gpio_unmask(struct irq_data *d) { u32 imr; - imr = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE); + imr = readl(MCFSIM2_GPIOINTENABLE); imr |= (0x1 << (d->irq - MCFINTC2_GPIOIRQ0)); - writel(imr, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE); + writel(imr, MCFSIM2_GPIOINTENABLE); } static void intc2_irq_gpio_ack(struct irq_data *d) { - writel(0x1 << (d->irq - MCFINTC2_GPIOIRQ0), MCF_MBAR2 + MCFSIM2_GPIOINTCLEAR); + writel(0x1 << (d->irq - MCFINTC2_GPIOIRQ0), MCFSIM2_GPIOINTCLEAR); } static struct irq_chip intc2_irq_gpio_chip = { diff --git a/arch/m68k/platform/coldfire/m5249.c b/arch/m68k/platform/coldfire/m5249.c index df2968d67357..23b19cb7ab50 100644 --- a/arch/m68k/platform/coldfire/m5249.c +++ b/arch/m68k/platform/coldfire/m5249.c @@ -72,11 +72,11 @@ static void __init m5249_smc91x_init(void) u32 gpio; /* Set the GPIO line as interrupt source for smc91x device */ - gpio = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE); - writel(gpio | 0x40, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE); + gpio = readl(MCFSIM2_GPIOINTENABLE); + writel(gpio | 0x40, MCFSIM2_GPIOINTENABLE); - gpio = readl(MCF_MBAR2 + MCFSIM2_INTLEVEL5); - writel(gpio | 0x04000000, MCF_MBAR2 + MCFSIM2_INTLEVEL5); + gpio = readl(MCFSIM2_INTLEVEL5); + writel(gpio | 0x04000000, MCFSIM2_INTLEVEL5); } #endif /* CONFIG_M5249C3 */ |