[coreboot-gerrit] New patch to review for coreboot: fsp_baytrail: The E3800 PCU-SPI does not have the BBAR register

Ben Gardner (gardner.ben@gmail.com) gerrit at coreboot.org
Mon Dec 7 18:35:35 CET 2015


Ben Gardner (gardner.ben at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12671

-gerrit

commit b8a99004e3e790fc37c40cdd266c62af5de17457
Author: Ben Gardner <gardner.ben at gmail.com>
Date:   Mon Dec 7 11:33:45 2015 -0600

    fsp_baytrail: The E3800 PCU-SPI does not have the BBAR register
    
    The BBAR regsiter (BIOS Base Address Configuration Register) defined in
    the ICH9 datasheet does not exist in the Bay Trail E3800 datasheet.
    Accessing it seems harmless, but should likely be avoided.
    
    Change-Id: I5d9a6a1ccead84c8996796f516a2bdc5f248cfef
    Signed-off-by: Ben Gardner <gardner.ben at gmail.com>
---
 src/soc/intel/fsp_baytrail/spi.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/src/soc/intel/fsp_baytrail/spi.c b/src/soc/intel/fsp_baytrail/spi.c
index 2719373..adbc0e2 100644
--- a/src/soc/intel/fsp_baytrail/spi.c
+++ b/src/soc/intel/fsp_baytrail/spi.c
@@ -77,8 +77,7 @@ typedef struct ich9_spi_regs {
 	uint16_t preop;
 	uint16_t optype;
 	uint8_t opmenu[8];
-	uint32_t bbar;
-	uint8_t _reserved3[12];
+	uint8_t _reserved3[16];
 	uint32_t fdoc;
 	uint32_t fdod;
 	uint8_t _reserved4[8];
@@ -105,7 +104,6 @@ typedef struct ich_spi_controller {
 	unsigned databytes;
 	uint8_t *status;
 	uint16_t *control;
-	uint32_t *bbar;
 } ich_spi_controller;
 
 static ich_spi_controller cntlr;
@@ -248,17 +246,6 @@ static void read_reg(const void *src, void *value, uint32_t size)
 	}
 }
 
-static void ich_set_bbar(uint32_t minaddr)
-{
-	const uint32_t bbar_mask = 0x00ffff00;
-	uint32_t ichspi_bbar;
-
-	minaddr &= bbar_mask;
-	ichspi_bbar = readl_(cntlr.bbar) & ~bbar_mask;
-	ichspi_bbar |= minaddr;
-	writel_(ichspi_bbar, cntlr.bbar);
-}
-
 struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs)
 {
 	ich_spi_slave *slave = malloc(sizeof(*slave));
@@ -304,9 +291,7 @@ void spi_init(void)
 	cntlr.databytes = sizeof(ich9_spi->fdata);
 	cntlr.status = &ich9_spi->ssfs;
 	cntlr.control = (uint16_t *)ich9_spi->ssfc;
-	cntlr.bbar = &ich9_spi->bbar;
 	cntlr.preop = &ich9_spi->preop;
-	ich_set_bbar(0);
 }
 
 int spi_claim_bus(struct spi_slave *slave)



More information about the coreboot-gerrit mailing list