arm: K64 SPI module driver
Support for Freescale/NXP K64 SPI modules, limited to: - Master mode - A single active set of clock and transfer attributes (CTAR0), which includes non-adjustable delay parameters - Tx FIFO fill and Rx FIFO drain interrupt handling - Standard, continuous select and continuous SCK SPI transfer formats Also, divide-by-zero code generation in this driver is prevented. The 'volatile' attribute is added to some of the variables in the baud rate and delay calculation functions of the K64 SPI driver in order to prevent bad code generation by gcc toolchains for ARM seen when an optimization setting above -O0 is used. Specifically, a register is loaded with the constant 0 and is used as the divisor in a following divide instruction, resulting in a divide-by-zero exception. This issue has been seen with gcc versions 4.8.1 (the VxWorks toolchain) and 5.2.0 (the Zephyr SDK toolchain). Change-Id: Ib5b2b748aad8fdfd5e8d40544e6e1abef3713abe Signed-off-by: Jeff Blais <jeff.blais@windriver.com>
This commit is contained in:
parent
f428d511f3
commit
995a9ba72a
7 changed files with 1556 additions and 4 deletions
1115
drivers/spi/spi_k64.c
Normal file
1115
drivers/spi/spi_k64.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue