Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33036
Change subject: sb/intel/common: Add a common interface to set final OPs settings
......................................................................
sb/intel/common: Add a common interface to set final OPs settings
This adds a common place to set the final opprefix, optype and opmenu,
with a hook to override the opmenu.
Change-Id: I162ae6bad7da3ea02b96854ee28e70594e210947
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/southbridge/intel/common/spi.c
A src/southbridge/intel/common/spi.h
2 files changed, 79 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/33036/1
diff --git a/src/southbridge/intel/common/spi.c b/src/southbridge/intel/common/spi.c
index bf2a44c..0794bb7 100644
--- a/src/southbridge/intel/common/spi.c
+++ b/src/southbridge/intel/common/spi.c
@@ -31,6 +31,8 @@
#include <spi-generic.h>
+#include "spi.h"
+
#define HSFC_FCYCLE_OFF 1 /* 1-2: FLASH Cycle */
#define HSFC_FCYCLE (0x3 << HSFC_FCYCLE_OFF)
#define HSFC_FDBC_OFF 8 /* 8-13: Flash Data Byte Count */
@@ -1041,6 +1043,45 @@
return 0;
}
+void spi_finalize_ops(void)
+{
+ ich_spi_controller *cntlr = &g_cntlr;
+ u16 spi_opprefix;;
+ u16 optype = 0;
+ struct intel_spi_config spi_config = {
+ {0x06, 0x50}, /* OPPREFIXES: EWSR and WREN */
+ { /* OPTYPE and OPCODE */
+ {0x01, WRITE_NO_ADDR}, /* WRSR: Write Status Register */
+ {0x02, WRITE_WITH_ADDR}, /* BYPR: Byte Program */
+ {0x03, READ_WITH_ADDR}, /* READ: Read Data */
+ {0x05, READ_NO_ADDR}, /* RDSR: Read Status Register */
+ {0x20, WRITE_WITH_ADDR}, /* SE20: Sector Erase 0x20 */
+ {0x9f, READ_NO_ADDR}, /* RDID: Read ID */
+ {0xd8, WRITE_WITH_ADDR}, /* BED8: Block Erase 0xd8 */
+ {0x0b, READ_WITH_ADDR}, /* FAST: Fast Read */
+ }
+ };
+ int i;
+
+ if (g_ichspi_lock)
+ return;
+
+ intel_southbridge_override_spi(&spi_config);
+
+ spi_opprefix = spi_config.opprefixes[0]
+ | (spi_config.opprefixes[1] << 8);
+ writew_(spi_opprefix, cntlr->preop);
+ for (i = 0; i < ARRAY_SIZE(spi_config.ops); i++) {
+ optype |= (spi_config.ops[i].type & 3) << (i * 2);
+ writeb_(spi_config.ops[i].op, &cntlr->opmenu[i]);
+ }
+ writew_(optype, &cntlr->optype);
+}
+
+__weak void intel_southbridge_override_spi(struct intel_spi_config *spi_config)
+{
+}
+
static const struct spi_ctrlr spi_ctrlr = {
.xfer_vector = xfer_vectors,
.max_xfer_size = member_size(ich9_spi_regs, fdata),
diff --git a/src/southbridge/intel/common/spi.h b/src/southbridge/intel/common/spi.h
new file mode 100644
index 0000000..fcc5cd8
--- /dev/null
+++ b/src/southbridge/intel/common/spi.h
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+#ifndef SOUTHBRIDGE_INTEL_SPI_H
+#define SOUTHBRIDGE_INTEL_SPI_H
+
+enum optype {
+ READ_NO_ADDR = 0,
+ WRITE_NO_ADDR = 1,
+ READ_WITH_ADDR = 2,
+ WRITE_WITH_ADDR = 3
+};
+
+struct intel_spi_op {
+ u8 op;
+ enum optype type;
+};
+
+struct intel_spi_config {
+ u8 opprefixes[2];
+ struct intel_spi_op ops[8];
+};
+
+void spi_finalize_ops(void);
+void intel_southbridge_override_spi(struct intel_spi_config *spi_config);
+
+#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/33036
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I162ae6bad7da3ea02b96854ee28e70594e210947
Gerrit-Change-Number: 33036
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31425
Change subject: qemu-q35: die if started on wrong machine
......................................................................
qemu-q35: die if started on wrong machine
The QEMU machine "PC" doesn't support MCFG.
Die in bootblock if the user selected the wrong qemu machine and
print a message to use the correct machine type.
Without this patch ramstage dies with non-helpful message:
"get_pbus: dev is NULL!"
Change-Id: I9d1b24176de971c5f827091bc5bc1bac8426f3f6
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
M src/mainboard/emulation/qemu-q35/bootblock.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/31425/1
diff --git a/src/mainboard/emulation/qemu-q35/bootblock.c b/src/mainboard/emulation/qemu-q35/bootblock.c
index 18a083d..96d3457 100644
--- a/src/mainboard/emulation/qemu-q35/bootblock.c
+++ b/src/mainboard/emulation/qemu-q35/bootblock.c
@@ -14,6 +14,7 @@
#include <arch/io.h>
#include <bootblock_common.h>
#include <southbridge/intel/i82801ix/i82801ix.h>
+#include <console/console.h>
/* Just define these here, there is no gm35.h file to include. */
#define D0F0_PCIEXBAR_LO 0x60
@@ -39,6 +40,11 @@
pci_io_write_config32(PCI_DEV(0,0,0), D0F0_PCIEXBAR_HI, reg);
reg = CONFIG_MMCONF_BASE_ADDRESS | 1; /* 256MiB - 0-255 buses. */
pci_io_write_config32(PCI_DEV(0,0,0), D0F0_PCIEXBAR_LO, reg);
+
+ /* MCFG is now active. If it's not qemu was started for machine PC */
+ if (pci_read_config32(PCI_DEV(0,0,0), D0F0_PCIEXBAR_LO) !=
+ (CONFIG_MMCONF_BASE_ADDRESS | 1))
+ die("You must run qemu for machine Q35");
}
static void enable_spi_prefetch(void)
--
To view, visit https://review.coreboot.org/c/coreboot/+/31425
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9d1b24176de971c5f827091bc5bc1bac8426f3f6
Gerrit-Change-Number: 31425
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
Martin Kepplinger has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32613
Change subject: payloads/external/Memtest86Plus: update to version 002 stable
......................................................................
payloads/external/Memtest86Plus: update to version 002 stable
The memtest86plus project has been tagged as stable. Update the coreboot
build accordingly.
Change-Id: I078ac5d91e60a424efb5e14f39ae59e7ae9cbfe2
Signed-off-by: Martin Kepplinger <martink(a)posteo.de>
---
M payloads/external/Memtest86Plus/Makefile
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/32613/1
diff --git a/payloads/external/Memtest86Plus/Makefile b/payloads/external/Memtest86Plus/Makefile
index 4b3132d..b799f9e 100644
--- a/payloads/external/Memtest86Plus/Makefile
+++ b/payloads/external/Memtest86Plus/Makefile
@@ -15,7 +15,7 @@
TAG-$(CONFIG_MEMTEST_MASTER)=origin/master
NAME-$(CONFIG_MEMTEST_MASTER)=Master
-TAG-$(CONFIG_MEMTEST_STABLE)=3754fd440f4009b62244e0f95c56bbb12c2fffcb
+TAG-$(CONFIG_MEMTEST_STABLE)=0bd34c22604660e4283316331f3e7bf8a3863753
NAME-$(CONFIG_MEMTEST_STABLE)=Stable
TAG-$(CONFIG_MEMTEST_REVISION)=$(CONFIG_MEMTEST_REVISION_ID)
--
To view, visit https://review.coreboot.org/c/coreboot/+/32613
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I078ac5d91e60a424efb5e14f39ae59e7ae9cbfe2
Gerrit-Change-Number: 32613
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Kepplinger <martink(a)posteo.de>
Gerrit-MessageType: newchange
Ran Bi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32339
Change subject: mediatek/mt8183: Enable RTC eosc calibration feature to save power
......................................................................
mediatek/mt8183: Enable RTC eosc calibration feature to save power
When system shutdown, RTC enable eosc calibration feature to save
power. Then coreboot RTC driver need to call rtc_enable_dcxo function
at every boot up to switch RTC clock source to a more accurate one.
BUG=b:128467245
BRANCH=none
TEST=Boots correctly on Kukui
Change-Id: Iee21e7611df8959cbbc63b6e6655cfb462147748
Signed-off-by: Ran Bi <ran.bi(a)mediatek.com>
---
M src/soc/mediatek/mt8183/rtc.c
1 file changed, 4 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/32339/1
diff --git a/src/soc/mediatek/mt8183/rtc.c b/src/soc/mediatek/mt8183/rtc.c
index 62256eb..ba05f86 100644
--- a/src/soc/mediatek/mt8183/rtc.c
+++ b/src/soc/mediatek/mt8183/rtc.c
@@ -197,12 +197,6 @@
goto err;
}
- /* using dcxo 32K clock */
- if (!rtc_enable_dcxo()) {
- ret = -RTC_STATUS_OSC_SETTING_FAIL;
- goto err;
- }
-
if (recover)
mdelay(20);
@@ -311,6 +305,10 @@
pwrap_write_field(PMIC_RG_DCXO_CW02, 0xF, 0xF, 0);
pwrap_write_field(PMIC_RG_SCK_TOP_CON0, 0x1, 0x1, 0);
+ /* using dcxo 32K clock */
+ if (!rtc_enable_dcxo())
+ rtc_info("rtc_enable_dcxo() fail\n");
+
rtc_boot_common();
rtc_bbpu_power_on();
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/32339
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iee21e7611df8959cbbc63b6e6655cfb462147748
Gerrit-Change-Number: 32339
Gerrit-PatchSet: 1
Gerrit-Owner: Ran Bi <ran.bi(a)mediatek.com>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31311
Change subject: arch/riscv: Don't select ARCH_RISCV_M on non-ARCH_RISCV platforms
......................................................................
arch/riscv: Don't select ARCH_RISCV_M on non-ARCH_RISCV platforms
Change-Id: I3e8c1cc5696d621e243696a3b5e34f62ab69a688
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/arch/riscv/Kconfig
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/31311/1
diff --git a/src/arch/riscv/Kconfig b/src/arch/riscv/Kconfig
index 9d325af..f5253bb 100644
--- a/src/arch/riscv/Kconfig
+++ b/src/arch/riscv/Kconfig
@@ -24,6 +24,7 @@
# one implementation that will not have it due
# to security concerns.
bool
+ depends on ARCH_RISCV
default n if ARCH_RISCV_M_DISABLED
default y
--
To view, visit https://review.coreboot.org/c/coreboot/+/31311
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3e8c1cc5696d621e243696a3b5e34f62ab69a688
Gerrit-Change-Number: 31311
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange