diff options
author | Greg Ungerer <gerg@uclinux.org> | 2011-12-24 06:38:40 +0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2012-03-05 03:43:09 +0400 |
commit | 2424f549020b6f87ea3b6e89fd7bd26ddf1f717b (patch) | |
tree | c1adc43406e79ad5bf2d0e412852a748eca6f956 /arch/m68k | |
parent | 36d175a4b249235927d75fb681484bd97cc4ea41 (diff) | |
download | linux-2424f549020b6f87ea3b6e89fd7bd26ddf1f717b.tar.xz |
m68knommu: make 5249 QSPI platform addressing consistent
If we make all QSPI (SPI protocol) addressing consistent across all ColdFire
family members then we will be able to remove the duplicated plaform data
and code and use a single setup for all.
So modify the ColdFire 5249 QSPI addressing so that:
. base addresses are absolute (not relative to MBAR peripheral register)
. use a common name for IRQs used
. move chip select definitions (CS) to appropriate header
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/include/asm/m5249sim.h | 11 | ||||
-rw-r--r-- | arch/m68k/include/asm/mcfqspi.h | 2 | ||||
-rw-r--r-- | arch/m68k/platform/5249/config.c | 9 |
3 files changed, 13 insertions, 9 deletions
diff --git a/arch/m68k/include/asm/m5249sim.h b/arch/m68k/include/asm/m5249sim.h index 3e31508619c1..7f0c2c3660fd 100644 --- a/arch/m68k/include/asm/m5249sim.h +++ b/arch/m68k/include/asm/m5249sim.h @@ -80,6 +80,17 @@ #define MCFUART_BASE1 (MCF_MBAR + 0x200) /* Base address UART1 */ /* + * QSPI module. + */ +#define MCFQSPI_BASE (MCF_MBAR + 0x300) /* Base address QSPI */ +#define MCFQSPI_SIZE 0x40 /* Register set size */ + +#define MCFQSPI_CS0 29 +#define MCFQSPI_CS1 24 +#define MCFQSPI_CS2 21 +#define MCFQSPI_CS3 22 + +/* * DMA unit base addresses. */ #define MCFDMA_BASE0 (MCF_MBAR + 0x300) /* Base address DMA 0 */ diff --git a/arch/m68k/include/asm/mcfqspi.h b/arch/m68k/include/asm/mcfqspi.h index 62148b72825e..e9a7e1a2c995 100644 --- a/arch/m68k/include/asm/mcfqspi.h +++ b/arch/m68k/include/asm/mcfqspi.h @@ -23,8 +23,6 @@ #if defined(CONFIG_M527x) || defined(CONFIG_M528x) #define MCFQSPI_IOBASE (MCF_IPSBAR + 0x340) -#elif defined(CONFIG_M5249) -#define MCFQSPI_IOBASE (MCF_MBAR + 0x300) #elif defined(CONFIG_M532x) #define MCFQSPI_IOBASE 0xFC058000 #endif diff --git a/arch/m68k/platform/5249/config.c b/arch/m68k/platform/5249/config.c index 58dc2c9c186d..1e176376010b 100644 --- a/arch/m68k/platform/5249/config.c +++ b/arch/m68k/platform/5249/config.c @@ -48,8 +48,8 @@ static struct platform_device m5249_smc91x = { #if defined(CONFIG_SPI_COLDFIRE_QSPI) || defined(CONFIG_SPI_COLDFIRE_QSPI_MODULE) static struct resource m5249_qspi_resources[] = { { - .start = MCFQSPI_IOBASE, - .end = MCFQSPI_IOBASE + MCFQSPI_IOSIZE - 1, + .start = MCFQSPI_BASE, + .end = MCFQSPI_BASE + MCFQSPI_SIZE - 1, .flags = IORESOURCE_MEM, }, { @@ -59,11 +59,6 @@ static struct resource m5249_qspi_resources[] = { }, }; -#define MCFQSPI_CS0 29 -#define MCFQSPI_CS1 24 -#define MCFQSPI_CS2 21 -#define MCFQSPI_CS3 22 - static int m5249_cs_setup(struct mcfqspi_cs_control *cs_control) { int status; |