spi/spi-dw: Rework message processing
This patch reworks the message pump worker thread function to run
until all messages queued to the driver have been handled. The
function to handle individual spi_transfers is now a synchronus
function the tasklet to handle spi_transfers has been removed. Work
for the worker thread is only queued in host controller transfer
function.
Psuedo code for new thread function:
message = get_message()
while (message){
for_each_transfer_in_msg(message){
transfer_setup(transfer)
do_transfer()
}
complete_message()
message = get_message()
}
Changes that fell out of the message thread changes:
Non-DMA transfers that are larger than the size of the controller FIFO
are handled as interrupt driven transfers.
Common FIFO handling functions shared PIO and interrupt transfers.
Simplified queue stop/start funcitons.
Cleanup fixes:
Changed exported all exported function names to have spi_dw_ prefix
Set fifo lenght in dw_spi_mid_init()
Added dw_spi_{en,dis}able inline functions to replace spi_enable_chip()
Added dw_spi_{mask,umask}_intr inline functions
Change-Id: I6a5f015ff1dbfa5d41297ca4c37bd3fbd9859959
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>