Make BBSI driver callback oriented

We previously used spi_sync to access the SPI bus. This turned out to be
very slow. spi_sync kicks off a SPI transaction and then puts our thread
to sleep. It is woken up as soon as the SPI transaction has finished. At
least for read operations, the old design transfered only four bytes at
a time which meant that our thread had to be woken up and scheduled for
every four bytes which turned out to be time consuming.

The new design is callback oriented and uses spi_async to kick off SPI
transactions. The callback routine which is invoked on completion
reloads the next SPI transaction immediately without the need to wake up
a different kernel thread.

To improve performance even further, we exploit the full 32 bytes of the
FIFO in our SPI controller and read multiple words (4 bytes each) in one
SPI transaction.

Change-Id: I12dbe9d9e901db052c7a7a74eb43d02e0ac75cb9
1 file changed
tree: 9ed9b675d82510caf3cecf1210630a886332dcc6
  1. 3.3/
  2. 3.8/
  3. bbsi.h
  4. bmoca-6802.c
  5. bmoca.h
  6. Makefile