]> git.baikalelectronics.ru Git - uboot.git/commit
x86: spi: Add a way to access the SPI mapping via registers
authorSimon Glass <sjg@chromium.org>
Wed, 27 May 2020 12:58:46 +0000 (06:58 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 2 Jun 2020 01:16:13 +0000 (09:16 +0800)
commita7d021b56ce11e6db255be77e6021b56462e6582
treea78b84536befe740edd09f48417996a74d99d6b8
parent5d1515c4ea74dbc33c6540140fb41562922fe5d9
x86: spi: Add a way to access the SPI mapping via registers

At present the PCI BDF (bus/device/function) is needed to access the SPI
mapping, since the registers are at BAR0. This doesn't work when PCI
auto-config has not been done yet, since BARs are unassigned.

Add another way to find the mapping, using the MMIO base, if the caller
knows this.

Also add a missing function comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/intel_common/fast_spi.c
arch/x86/include/asm/fast_spi.h