1. 09 Feb, 2016 2 commits
    • Vignesh R's avatar
      spi: spi-ti-qspi: add mmap mode read support · 4dea6c9b
      Vignesh R authored
      ti-qspi controller provides mmap port to read data from SPI flashes.
      mmap port is enabled in QSPI_SPI_SWITCH_REG. ctrl module register may
      also need to be accessed for some SoCs. The QSPI_SPI_SETUP_REGx needs to
      be populated with flash specific information like read opcode, read
      mode(quad, dual, normal), address width and dummy bytes. Once,
      controller is in mmap mode, the whole flash memory is available as a
      memory region at SoC specific address. This region can be accessed using
      normal memcpy() (or mem-to-mem dma copy). The ti-qspi controller hardware
      will internally communicate with SPI flash over SPI bus and get the
      requested data.
      
      Implement spi_flash_read() callback to support mmap read over SPI
      flash devices. With this, the read throughput increases from ~100kB/s to
      ~2.5 MB/s.
      Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      4dea6c9b
    • Vignesh R's avatar
      spi: introduce accelerated read support for spi flash devices · 556351f1
      Vignesh R authored
      In addition to providing direct access to SPI bus, some spi controller
      hardwares (like ti-qspi) provide special port (like memory mapped port)
      that are optimized to improve SPI flash read performance.
      This means the controller can automatically send the SPI signals
      required to read data from the SPI flash device.
      For this, SPI controller needs to know flash specific information like
      read command to use, dummy bytes and address width.
      
      Introduce spi_flash_read() interface to support accelerated read
      over SPI flash devices. SPI master drivers can implement this callback to
      support interfaces such as memory mapped read etc. m25p80 flash driver
      and other flash drivers can call this make use of such interfaces. The
      interface should only be used with SPI flashes and cannot be used with
      other SPI devices.
      Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      556351f1
  2. 24 Jan, 2016 38 commits