sb/intel/common/spi.c: Add a pointer to the ich7 SPI registers

Change-Id: I7509dc2124ee7057af075c7d0607ec615b930fa3
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33506
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Arthur Heymans 2019-06-15 18:23:29 +02:00
parent a9c1a5f1f8
commit 21c5d43d72
1 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,10 @@ struct ich_spi_controller {
uint32_t flcomp;
uint32_t hsfs;
struct ich9_spi_regs *ich9_spi;
union {
struct ich9_spi_regs *ich9_spi;
struct ich7_spi_regs *ich7_spi;
};
uint8_t *opmenu;
int menubytes;
uint16_t *preop;
@ -283,6 +286,7 @@ void spi_init(void)
rcrb = (uint8_t *)(rcba & 0xffffc000);
if (CONFIG(SOUTHBRIDGE_INTEL_I82801GX)) {
ich7_spi = (struct ich7_spi_regs *)(rcrb + 0x3020);
cntlr->ich7_spi = ich7_spi;
cntlr->opmenu = ich7_spi->opmenu;
cntlr->menubytes = sizeof(ich7_spi->opmenu);
cntlr->optype = &ich7_spi->optype;