diff options
author | Furquan Shaikh <furquan@chromium.org> | 2017-05-17 19:14:06 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2017-05-19 21:23:11 +0200 |
commit | a1491574ef2c91ff8b89df70feba67ad34836c75 (patch) | |
tree | 6bba1c05f7bf87eb5cdac4c2a884d37cff59b6a5 /src/soc/mediatek/mt8173/include | |
parent | bd9e32efdd8f06063c9ee37dd6d0bebf535b86c1 (diff) | |
download | coreboot-a1491574ef2c91ff8b89df70feba67ad34836c75.tar.xz |
drivers/spi/spi_flash: Clean up SPI flash probe
1. Rename __spi_flash_probe to spi_flash_generic_probe and export it
so that drivers can use it outside spi_flash.c.
2. Make southbridge intel spi driver use spi_flash_generic_probe if
spi_is_multichip returns 0.
3. Add spi_flash_probe to spi_ctrlr structure to allow platforms to
provide specialized probe functions. With this change, the specialized
spi flash probe functions are now associated with a particular spi
ctrlr structure and no longer disconnected from the spi controller.
BUG=b:38330715
Change-Id: I35f3bd8ddc5e71515df3ef0c1c4b1a68ee56bf4b
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/19708
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/soc/mediatek/mt8173/include')
-rw-r--r-- | src/soc/mediatek/mt8173/include/soc/flash_controller.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8173/include/soc/flash_controller.h b/src/soc/mediatek/mt8173/include/soc/flash_controller.h index 458f357f5d..82d167a054 100644 --- a/src/soc/mediatek/mt8173/include/soc/flash_controller.h +++ b/src/soc/mediatek/mt8173/include/soc/flash_controller.h @@ -87,4 +87,6 @@ struct mt8173_nor_regs { check_member(mt8173_nor_regs, fdma_end_dadr, 0x724); static struct mt8173_nor_regs * const mt8173_nor = (void *)SFLASH_REG_BASE; +int mtk_spi_flash_probe(const struct spi_slave *spi, struct spi_flash *flash); + #endif /* __SOC_MEDIATEK_MT8173_FLASH_CONTROLLER_H__ */ |