• Peter Turczak's avatar
    m68knommu: fix problems with SPI/GPIO on ColdFire 520x · 89127ed3
    Peter Turczak authored
    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: default avatarPeter Turczak <peter@turczak.de>
    Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
    89127ed3
m520xsim.h 5.73 KB