• Vignesh R's avatar
    mtd: spi-nor: cadence-quadspi: Add support for direct access mode · a27f2eaf
    Vignesh R authored
    Cadence QSPI controller provides direct access mode through which flash
    can be accessed in a memory-mapped IO mode. This enables read/write to
    flash using memcpy*() functions. This mode provides higher throughput
    for both read/write operations when compared to current indirect mode of
    operation.
    
    This patch therefore adds support to use QSPI in direct mode. If the
    window reserved in SoC's memory map for MMIO access is less that of
    flash size(like on most SoCFPGA variants), then the driver falls back
    to indirect mode of operation.
    
    On TI's 66AK2G SoC, with ARM running at 600MHz and QSPI at 96MHz
    switching to direct mode improves read throughput from 3MB/s to 8MB/s.
    Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
    Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@wedev4u.fr>
    a27f2eaf
cadence-quadspi.c 35.2 KB