HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34558 )
Change subject: nb/intel/i440bx: Remove never used 'dra' value
......................................................................
nb/intel/i440bx: Remove never used 'dra' value
Change-Id: I65c41f56d7a0639eac821844e653e5644aca4f0c
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M src/northbridge/intel/i440bx/raminit.c
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/34558/1
diff --git a/src/northbridge/intel/i440bx/raminit.c b/src/northbridge/intel/i440bx/raminit.c
index 91959c7..3a1b66a 100644
--- a/src/northbridge/intel/i440bx/raminit.c
+++ b/src/northbridge/intel/i440bx/raminit.c
@@ -799,7 +799,6 @@
}
/* "DRA" is our RPS for the two rows on this DIMM. */
- dra = 0;
/* Columns */
col = spd_read_byte(device, SPD_NUM_COLUMNS);
--
To view, visit https://review.coreboot.org/c/coreboot/+/34558
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I65c41f56d7a0639eac821844e653e5644aca4f0c
Gerrit-Change-Number: 34558
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-MessageType: newchange
Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36449 )
Change subject: mainboard/google: Allow Hatch variants to read SPD data over SMBus
......................................................................
mainboard/google: Allow Hatch variants to read SPD data over SMBus
All Hatch variants so far embed static SPD data encoded within the
firmware image. However we wish the flexibility for romstage
implementations that allow for reading the SPD data dynamically over
SMBus. This romstage variant allows for reading the SPD data over
SMBus.
BRANCH=none
BUG=b:143134702
TEST=./util/abuild/abuild -p none -t google/hatch -x -a
Change-Id: I3516a46b91840a9f6d1f4cffb2553d939d79cda2
Signed-off-by: Edward O'Callaghan <quasisec(a)chromium.org>
---
M src/mainboard/google/hatch/Kconfig
M src/mainboard/google/hatch/Makefile.inc
A src/mainboard/google/hatch/romstage_spd_smbus.c
3 files changed, 63 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/36449/1
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig
index 219be22..e339693 100644
--- a/src/mainboard/google/hatch/Kconfig
+++ b/src/mainboard/google/hatch/Kconfig
@@ -60,7 +60,11 @@
config ROMSTAGE_SPD_CBFS
bool
- default y
+ default y if !ROMSTAGE_SPD_SMBUS
+
+config ROMSTAGE_SPD_SMBUS
+ bool
+ default n
config DRIVER_TPM_SPI_BUS
default 0x1
diff --git a/src/mainboard/google/hatch/Makefile.inc b/src/mainboard/google/hatch/Makefile.inc
index 3ed82e7..0740c08 100644
--- a/src/mainboard/google/hatch/Makefile.inc
+++ b/src/mainboard/google/hatch/Makefile.inc
@@ -21,6 +21,7 @@
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c
romstage-$(CONFIG_ROMSTAGE_SPD_CBFS) += romstage_spd_cbfs.c
+romstage-$(CONFIG_ROMSTAGE_SPD_SMBUS) += romstage_spd_smbus.c
romstage-$(CONFIG_CHROMEOS) += chromeos.c
verstage-$(CONFIG_CHROMEOS) += chromeos.c
diff --git a/src/mainboard/google/hatch/romstage_spd_smbus.c b/src/mainboard/google/hatch/romstage_spd_smbus.c
new file mode 100644
index 0000000..245b61d
--- /dev/null
+++ b/src/mainboard/google/hatch/romstage_spd_smbus.c
@@ -0,0 +1,57 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <baseboard/variants.h>
+#include <soc/cnl_memcfg_init.h>
+#include <soc/romstage.h>
+#include <variant/gpio.h>
+#include <spd_bin.h>
+#include <gpio.h>
+
+/*
+ * GPIO_MEM_CH_SEL is set to 1 for single channel skus
+ * and 0 for dual channel skus.
+ */
+#define GPIO_MEM_CH_SEL GPP_F2
+
+void mainboard_memory_init_params(FSPM_UPD *memupd)
+{
+ int is_single_ch_mem;
+ struct cnl_mb_cfg memcfg;
+ variant_memory_params(&memcfg);
+
+ /*
+ * GPP_F2 is the MEM_CH_SEL gpio, which is set to 1 for single
+ * channel skus and 0 for dual channel skus.
+ */
+ is_single_ch_mem = gpio_get(GPIO_MEM_CH_SEL);
+
+ /* Read spd block to get memory config */
+ struct spd_block blk = {
+ .addr_map = { 0x50, 0x52 },
+ };
+
+ memcfg.dq_pins_interleaved = 1;
+ get_spd_smbus(&blk);
+ memcfg.spd[0].read_type = READ_SMBUS;
+ memcfg.spd[0].spd_spec.spd_smbus_address = (uintptr_t)blk.spd_array[0];
+ if (!is_single_ch_mem) {
+ memcfg.spd[1].read_type = READ_SMBUS;
+ memcfg.spd[1].spd_spec.spd_smbus_address = (uintptr_t)blk.spd_array[1];
+ }
+ dump_spd_info(&blk);
+
+ cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/36449
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3516a46b91840a9f6d1f4cffb2553d939d79cda2
Gerrit-Change-Number: 36449
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36176 )
Change subject: RFC) src/acpi: Update license headers to SPDX
......................................................................
RFC) src/acpi: Update license headers to SPDX
While I was working on updating the headers to move copyrights into
the AUTHORS file, I got a request to switch to SPDX headers as well.
Linux has moved completely to SPDX headers, which are easier to
maintain, have good definitions, are very short, and can be checked
automatically. This is completely unlike our current header situation.
Signed-off-by: Martin Roth <martin(a)coreboot.org>
Change-Id: Ie86d34f7fa7bf7434ad8a38aa1eadcfece7124b3
---
M src/acpi/Kconfig
M src/acpi/Makefile.inc
M src/acpi/sata.c
M src/acpi/sata.h
4 files changed, 9 insertions(+), 24 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/36176/1
diff --git a/src/acpi/Kconfig b/src/acpi/Kconfig
index 72cfff5..3c6aeb1 100644
--- a/src/acpi/Kconfig
+++ b/src/acpi/Kconfig
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only
+# This file is part of the coreboot project.
config ACPI_SATA_GENERATOR
bool
diff --git a/src/acpi/Makefile.inc b/src/acpi/Makefile.inc
index 53ac679..7c2092d 100644
--- a/src/acpi/Makefile.inc
+++ b/src/acpi/Makefile.inc
@@ -1 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+# This file is part of the coreboot project.
+
ramstage-$(CONFIG_ACPI_SATA_GENERATOR) += sata.c
diff --git a/src/acpi/sata.c b/src/acpi/sata.c
index d7fcbd6..ae43e7d 100644
--- a/src/acpi/sata.c
+++ b/src/acpi/sata.c
@@ -1,15 +1,5 @@
-/*
- * This file is part of the coreboot project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+// SPDX-License-Identifier: GPL-2.0-only
+/* This file is part of the coreboot project. */
#include "sata.h"
diff --git a/src/acpi/sata.h b/src/acpi/sata.h
index fecf4c6..04cd80c 100644
--- a/src/acpi/sata.h
+++ b/src/acpi/sata.h
@@ -1,15 +1,5 @@
-/*
- * This file is part of the coreboot project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+// SPDX-License-Identifier: GPL-2.0-only
+/* This file is part of the coreboot project. */
#ifndef __ACPI_SATA_H__
#define __ACPI_SATA_H__
--
To view, visit https://review.coreboot.org/c/coreboot/+/36176
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie86d34f7fa7bf7434ad8a38aa1eadcfece7124b3
Gerrit-Change-Number: 36176
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange