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

m68knommu: remove use of MBAR value for ColdFire 528x peripheral addressing

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>

+16 -10
+9 -3
arch/m68k/include/asm/m528xsim.h
··· 49 49 /* 50 50 * UART module. 51 51 */ 52 - #define MCFUART_BASE1 0x200 /* Base address of UART1 */ 53 - #define MCFUART_BASE2 0x240 /* Base address of UART2 */ 54 - #define MCFUART_BASE3 0x280 /* Base address of UART3 */ 52 + #define MCFUART_BASE1 (MCF_IPSBAR + 0x00000200) 53 + #define MCFUART_BASE2 (MCF_IPSBAR + 0x00000240) 54 + #define MCFUART_BASE3 (MCF_IPSBAR + 0x00000280) 55 + 56 + /* 57 + * FEC ethernet module. 58 + */ 59 + #define MCFFEC_BASE (MCF_IPSBAR + 0x00001000) 60 + #define MCFFEC_SIZE 0x800 55 61 56 62 /* 57 63 * GPIO registers
+7 -7
arch/m68knommu/platform/528x/config.c
··· 29 29 30 30 static struct mcf_platform_uart m528x_uart_platform[] = { 31 31 { 32 - .mapbase = MCF_MBAR + MCFUART_BASE1, 32 + .mapbase = MCFUART_BASE1, 33 33 .irq = MCFINT_VECBASE + MCFINT_UART0, 34 34 }, 35 35 { 36 - .mapbase = MCF_MBAR + MCFUART_BASE2, 36 + .mapbase = MCFUART_BASE2, 37 37 .irq = MCFINT_VECBASE + MCFINT_UART0 + 1, 38 38 }, 39 39 { 40 - .mapbase = MCF_MBAR + MCFUART_BASE3, 40 + .mapbase = MCFUART_BASE3, 41 41 .irq = MCFINT_VECBASE + MCFINT_UART0 + 2, 42 42 }, 43 43 { }, ··· 51 51 52 52 static struct resource m528x_fec_resources[] = { 53 53 { 54 - .start = MCF_MBAR + 0x1000, 55 - .end = MCF_MBAR + 0x1000 + 0x7ff, 54 + .start = MCFFEC_BASE, 55 + .end = MCFFEC_BASE + MCFFEC_SIZE - 1, 56 56 .flags = IORESOURCE_MEM, 57 57 }, 58 58 { ··· 227 227 228 228 /* make sure PUAPAR is set for UART0 and UART1 */ 229 229 if (line < 2) { 230 - port = readb(MCF_MBAR + MCF5282_GPIO_PUAPAR); 230 + port = readb(MCF5282_GPIO_PUAPAR); 231 231 port |= (0x03 << (line * 2)); 232 - writeb(port, MCF_MBAR + MCF5282_GPIO_PUAPAR); 232 + writeb(port, MCF5282_GPIO_PUAPAR); 233 233 } 234 234 } 235 235