]> git.karo-electronics.de Git - karo-tx-linux.git/commit
m68knommu: fix problems with SPI/GPIO on ColdFire 520x
authorPeter Turczak <peter@turczak.de>
Tue, 9 Aug 2011 04:11:19 +0000 (14:11 +1000)
committerGreg Ungerer <gerg@uclinux.org>
Tue, 16 Aug 2011 00:03:27 +0000 (10:03 +1000)
commitd3f4656855417d058e21a4e6e60b4f77010981a5
tree0adc690936848f6a9239d604d57b32a5159532d4
parentd18c1daf42d6732c616ae446b4a404b2e7063f41
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>
arch/m68k/include/asm/m520xsim.h
arch/m68k/include/asm/mcfqspi.h
arch/m68k/platform/520x/config.c
arch/m68k/platform/520x/gpio.c