Files
OpenCellular/chip
Vadim Bendebury 2e9ab7cbe4 cr50: restore SPS driver performance
There have been a few changes made to the sps driver recently, which
were not necessary but caused performance degradation: the continuous
loopback test is showing transmit underrun (0xff bytes stuck into the
frames).

This patch restores the driver to its state before the recent changes
and then makes a few modification to account for the new API:

 - added a way to specify idle byte transmitted on MISO
 - port number is dropped

The actual differences between the old and new version of the driver
can be seen as follows:

 git diff dbf027f chip/g/sps.c

The restored driver passes the loopback test successfully.

BRANCH=none
BUG=none
TEST=used the enhanced 'spiraw' utility which sends frames of random
     size in 10..1010 bytes, and then clocks the line to receive the
     same amount of bytes back, syncs up in the returning stream of
     bytes and compares received and transmitted data.

    # run 'spst 100' on the target
    $ src/examples/spiraw.py -l 100 -f 2000000
    FT232H Future Technology Devices International, Ltd initialized at 2000000 hertz
    $

    which is an indication of the successful loop back of 100 frames.
    The cli command on the target exits and reports the stats:

    > spst 100
    Processed 100 frames
    rx count 108532, tx count 51366, tx_empty count 100, max rx batch 11

   Before this change spiraw.py was reporting numerous mismatches on
   the host side.

Change-Id: Iaa8c94e439ac32a6f10f12ddbdbf445865807386
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/286015
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2015-07-17 07:51:04 +00:00
..
2015-07-17 07:51:04 +00:00
2015-06-18 19:07:00 +00:00