• Kamal Dasu's avatar
    spi: bcm-qspi: Remove hardcoded settings and spi-nor.h dependency · 054e532f
    Kamal Dasu authored
    The newly added broadcom qspi driver in drivers/spi produces a build
    warning when CONFIG_MTD is disabled:
    include/linux/mtd/cfi.h:76:2: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp]
    
    There has been discussion on this in the link provided below. This fix in
    SPI controller drivers implementing the ->spi_flash_read handler, now uses the
    settings provided inside the 'struct spi_flash_read_message' parameter instead
    of hardcoding them. Made changes to bcm_qspi_bspi_set_flex_mode() to set the BSPI
    controller using the passed msg structure and remove the need to include
    <linux/mtd/spi-nor.h> file by removing all use of SPINOR_OP_READ* macros.
    
    Fixes: 4e3b2d23 ("spi: bcm-qspi: Add BSPI spi-nor flash controller driver")
    Link: https://patchwork.kernel.org/patch/9624585/Signed-off-by: default avatarKamal Dasu <kdasu.kdev@gmail.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    054e532f
spi-bcm-qspi.c 36.1 KB