[coreboot-gerrit] New patch to review for coreboot: intel/southbridge/bd82x6x: Add option to set SPI VSCC registers

Nico Huber (nico.h@gmx.de) gerrit at coreboot.org
Mon Oct 5 15:18:55 CET 2015


Nico Huber (nico.h at gmx.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11798

-gerrit

commit c2cbdb7215fab446f039e54cecf9487e6b6bf8c3
Author: Nico Huber <nico.huber at secunet.com>
Date:   Thu Oct 1 19:00:51 2015 +0200

    intel/southbridge/bd82x6x: Add option to set SPI VSCC registers
    
    These are needed for the hardware-sequencing function of the PCH SPI
    interface. Values are specific to the flash chip used on a board.
    
    Change-Id: Id06766b4bac2686406bc09b8afa02f311f40dee7
    Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
 src/southbridge/intel/bd82x6x/chip.h |  3 +++
 src/southbridge/intel/bd82x6x/lpc.c  | 17 +++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/src/southbridge/intel/bd82x6x/chip.h b/src/southbridge/intel/bd82x6x/chip.h
index 3fa9192..41adc9a 100644
--- a/src/southbridge/intel/bd82x6x/chip.h
+++ b/src/southbridge/intel/bd82x6x/chip.h
@@ -96,6 +96,9 @@ struct southbridge_intel_bd82x6x_config {
 	uint32_t superspeed_capable_ports;
 	/* Overcurrent Mapping for USB 3.0 Ports */
 	uint32_t xhci_overcurrent_mapping;
+
+	uint32_t spi_uvscc;
+	uint32_t spi_lvscc;
 };
 
 #endif				/* SOUTHBRIDGE_INTEL_BD82X6X_CHIP_H */
diff --git a/src/southbridge/intel/bd82x6x/lpc.c b/src/southbridge/intel/bd82x6x/lpc.c
index 6bf43de..a9e3ec5 100644
--- a/src/southbridge/intel/bd82x6x/lpc.c
+++ b/src/southbridge/intel/bd82x6x/lpc.c
@@ -480,6 +480,21 @@ static void pch_decode_init(struct device *dev)
 	pci_write_config32(dev, LPC_GEN4_DEC, config->gen4_dec);
 }
 
+static void pch_spi_init(const struct device *const dev)
+{
+	const config_t *const config = dev->chip_info;
+
+	printk(BIOS_DEBUG, "pch_spi_init\n");
+
+	if (config->spi_uvscc)
+		RCBA32(0x3800 + 0xc8) = config->spi_uvscc;
+	if (config->spi_lvscc)
+		RCBA32(0x3800 + 0xc4) = config->spi_lvscc;
+
+	if (config->spi_uvscc || config->spi_lvscc)
+		RCBA32_OR(0x3800 + 0xc4, 1 << 23); /* lock both UVSCC + LVSCC */
+}
+
 static void lpc_init(struct device *dev)
 {
 	printk(BIOS_DEBUG, "pch: lpc_init\n");
@@ -536,6 +551,8 @@ static void lpc_init(struct device *dev)
 	pch_set_acpi_mode();
 
 	pch_fixups(dev);
+
+	pch_spi_init(dev);
 }
 
 static void pch_lpc_read_resources(device_t dev)



More information about the coreboot-gerrit mailing list