summaryrefslogtreecommitdiff
path: root/arch/m68k/platform/520x/config.c
diff options
context:
space:
mode:
authorPeter Turczak <peter@turczak.de>2011-08-09 14:11:19 +1000
committerGreg Ungerer <gerg@uclinux.org>2011-10-18 14:22:25 +1000
commit89127ed381fb244aa51c1a74ed695a1f3578ef7d (patch)
tree7c0f331b438cb1f56b73bd18e39766274d43cbe5 /arch/m68k/platform/520x/config.c
parentf230e80b423f6cb002015ab4771c06a53d5a2287 (diff)
m68knommu: fix problems with SPI/GPIO on ColdFire 520x
The problem has its root in the calculation of the set-port offsets (macro MCFGPIO_SETR() in arch/m68k/include/asm/gpio.h), this assumes that all ports have the same offset from the base port address (MCFGPIO_SETR) which is defined in mcf520xsim.h as an alias of MCFGIO_PSETR_BUSCTL. Because the BUSCTL and BE port do not have a set-register (see MCF5208 Reference Manual Page 13-10, Table 13-3) the offset calculations went wrong. Because the BE and BUSCTL port do not seem useful in these parts, as they lack a set register, I removed them and adapted the gpio chip bases which are also used for the offset-calculations. Now both setting and resetting the chip selects works as expected from userland and from the kernelspace. Signed-off-by: Peter Turczak <peter@turczak.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/platform/520x/config.c')
-rw-r--r--arch/m68k/platform/520x/config.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/m68k/platform/520x/config.c b/arch/m68k/platform/520x/config.c
index 621238f1a219..8a98683f1b15 100644
--- a/arch/m68k/platform/520x/config.c
+++ b/arch/m68k/platform/520x/config.c
@@ -91,9 +91,9 @@ static struct resource m520x_qspi_resources[] = {
},
};
-#define MCFQSPI_CS0 62
-#define MCFQSPI_CS1 63
-#define MCFQSPI_CS2 44
+#define MCFQSPI_CS0 46
+#define MCFQSPI_CS1 47
+#define MCFQSPI_CS2 27
static int m520x_cs_setup(struct mcfqspi_cs_control *cs_control)
{