Hi list, following the path I found yesterday I discovered the reason for the strange behavior of the chip select pins when toggled from the spi driver via the kernel gpio api.
The problem has its root in the calculation of the set-port offsets (macro MCFGPIO_SETR() in arch/m68k/include/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. Furthermore the base address of the spi controller was wrong in mcfqspi.h. Because I don't know the M532x series and it had a different base-adress in the same ifdef-branch I added an ifdef choice there. If sombody has access to an 532x device, please test it! Greg: Would you please check if this could be merged into mainline? Best regards, Peter
linux-3.0.0+-5208_spi.patch
Description: Binary data
_______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev