]> Pileus Git - ~andy/linux/commitdiff
m68knommu: remove use of MBAR value for ColdFire 528x peripheral addressing
authorGreg Ungerer <gerg@uclinux.org>
Sat, 5 Mar 2011 14:20:01 +0000 (00:20 +1000)
committerGreg Ungerer <gerg@uclinux.org>
Tue, 15 Mar 2011 11:01:54 +0000 (21:01 +1000)
The ColdFire 528x family of CPUs does not have an MBAR register, so don't
define its peripheral addresses relative to one. Its internal peripherals
are relative to the IPSBAR register, so make sure to use that.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
arch/m68k/include/asm/m528xsim.h
arch/m68knommu/platform/528x/config.c

index 014098a7de893fc0b78e66bc71564b2576a80a94..d7c92419f2b569e76db1228f182c7cb139e0a518 100644 (file)
 /*
  *     UART module.
  */
-#define MCFUART_BASE1          0x200           /* Base address of UART1 */
-#define MCFUART_BASE2          0x240           /* Base address of UART2 */
-#define MCFUART_BASE3          0x280           /* Base address of UART3 */
+#define        MCFUART_BASE1           (MCF_IPSBAR + 0x00000200)
+#define        MCFUART_BASE2           (MCF_IPSBAR + 0x00000240)
+#define        MCFUART_BASE3           (MCF_IPSBAR + 0x00000280)
+
+/*
+ *     FEC ethernet module.
+ */
+#define        MCFFEC_BASE             (MCF_IPSBAR + 0x00001000)
+#define        MCFFEC_SIZE             0x800
 
 /*
  *     GPIO registers
index 76b743343bfa46d4967fab7af6d1caf406cf6da2..ac39fc661219092a354643e577f69efc29d00b1e 100644 (file)
 
 static struct mcf_platform_uart m528x_uart_platform[] = {
        {
-               .mapbase        = MCF_MBAR + MCFUART_BASE1,
+               .mapbase        = MCFUART_BASE1,
                .irq            = MCFINT_VECBASE + MCFINT_UART0,
        },
        {
-               .mapbase        = MCF_MBAR + MCFUART_BASE2,
+               .mapbase        = MCFUART_BASE2,
                .irq            = MCFINT_VECBASE + MCFINT_UART0 + 1,
        },
        {
-               .mapbase        = MCF_MBAR + MCFUART_BASE3,
+               .mapbase        = MCFUART_BASE3,
                .irq            = MCFINT_VECBASE + MCFINT_UART0 + 2,
        },
        { },
@@ -51,8 +51,8 @@ static struct platform_device m528x_uart = {
 
 static struct resource m528x_fec_resources[] = {
        {
-               .start          = MCF_MBAR + 0x1000,
-               .end            = MCF_MBAR + 0x1000 + 0x7ff,
+               .start          = MCFFEC_BASE,
+               .end            = MCFFEC_BASE + MCFFEC_SIZE - 1,
                .flags          = IORESOURCE_MEM,
        },
        {
@@ -227,9 +227,9 @@ static void __init m528x_uart_init_line(int line, int irq)
 
        /* make sure PUAPAR is set for UART0 and UART1 */
        if (line < 2) {
-               port = readb(MCF_MBAR + MCF5282_GPIO_PUAPAR);
+               port = readb(MCF5282_GPIO_PUAPAR);
                port |= (0x03 << (line * 2));
-               writeb(port, MCF_MBAR + MCF5282_GPIO_PUAPAR);
+               writeb(port, MCF5282_GPIO_PUAPAR);
        }
 }