From patchwork Tue Mar 24 13:45:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 244211 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Tue, 24 Mar 2020 07:45:27 -0600 Subject: [PATCH] x86: spi: Only use the fast SPI peripheral when support Message-ID: <20200324074524.1.Ibc9c511db58caa8a1e4c56d7e7824d7690718aeb@changeid> At present we query the memory map on boards which don't support it. Fix this by only doing it on Apollo Lake. This fixes booting on chromebook_link. Signed-off-by: Simon Glass Fixes: 92842147c31 ("spi: ich: Add support for get_mmap() method") --- drivers/spi/ich.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index a9d7715a55..9f8af45242 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -637,7 +637,10 @@ static int ich_get_mmap(struct udevice *dev, ulong *map_basep, uint *map_sizep, uint *offsetp) { struct udevice *bus = dev_get_parent(dev); + struct ich_spi_platdata *plat = dev_get_platdata(bus); + if (plat->ich_version != ICHV_APL) + return -ENOENT; return ich_get_mmap_bus(bus, map_basep, map_sizep, offsetp); }