summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVignesh R <vigneshr@ti.com>2016-09-07 09:48:22 (GMT)
committerJagan Teki <jagannadh.teki@gmail.com>2016-09-21 19:28:26 (GMT)
commit260368507a15de9503f509b175796935f65fbfc3 (patch)
tree40d7f3ddeb162a78e919dd7132b2a930d07a62f4 /lib
parentd2998286fc58e3ac6c75ed4d3a1e77b618bbf2ae (diff)
downloadu-boot-fsl-qoriq-260368507a15de9503f509b175796935f65fbfc3.tar.xz
spi: ti_qspi: use 128 bit transfer mode when writing to flash
TI QSPI has four 32 bit data registers which can be used to transfer 16 bytes of data at once. The register group QSPI_SPI_DATA_REG_3, QSPI_SPI_DATA_REG_2, QSPI_SPI_DATA_REG_1 and QSPI_SPI_DATA_REG is treated as a single 128-bit word for shifting data in and out. The bit at QSPI_SPI_DATA_REG_3[31] position is the first bit to be shifted out in case of 128 bit transfer mode. Therefore the first byte to be written to flash should be at QSPI_SPI_DATA_REG_3[31-25] position. Instead of writing 1 byte at a time when interacting with SPI NOR flash, make use of all the four registers so that 16 bytes can be transferred in one go. With this patch, the flash write speed increases from ~250KBs/ to ~650KB/s on DRA74 EVM. Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions