x86: spi: Rewrite logic for obtaining the SPI memory map
authorSimon Glass <sjg@chromium.org>
Wed, 27 May 2020 12:58:47 +0000 (06:58 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 2 Jun 2020 01:16:13 +0000 (09:16 +0800)
commit609b90a6a9c0da42c4e52cd519bfd546367fa880
treec9912dc5c16fe83413a4adece8fd37827a2ae5f2
parent8e2922e357fe0157593063d46f8e9bd2c25a00e0
x86: spi: Rewrite logic for obtaining the SPI memory map

At present this logic does not work on link and samus, since their SPI
controller is not a PCI device, but a child of the PCH.

Unfortunately, fixing this involves a lot of extra logic. Still, this was
requested in the review of the fix-up patch, so here it is.

Fixes: 92842147c31 ("spi: ich: Add support for get_mmap() method")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com> (on Intel minnowmax)
drivers/spi/ich.c