Daniel Maslowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33008
Change subject: sb/intel/lynxpoint: Fix flashconsole after lockdown
......................................................................
sb/intel/lynxpoint: Fix flashconsole after lockdown
Same as with sb/intel/bd82x6x:
SMM final locks the SPI BAR, which causes flashconsole to hang.
Re-init it like SMM does with CONFIG_SPI_FLASH_SMM.
Change-Id: Ie35af9610ebbba5c66351e9668e9a55cae3c7520
Signed-off-by: Daniel Maslowski <dan(a)orangecms.org>
---
M src/southbridge/intel/lynxpoint/lpc.c
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/33008/1
diff --git a/src/southbridge/intel/lynxpoint/lpc.c b/src/southbridge/intel/lynxpoint/lpc.c
index b0f57c1..714c696 100644
--- a/src/southbridge/intel/lynxpoint/lpc.c
+++ b/src/southbridge/intel/lynxpoint/lpc.c
@@ -965,8 +965,16 @@
RCBA32(0x3898) = SPI_OPMENU_LOWER;
RCBA32(0x389c) = SPI_OPMENU_UPPER;
- if (acpi_is_wakeup_s3() || CONFIG(INTEL_CHIPSET_LOCKDOWN))
+ if (acpi_is_wakeup_s3() || CONFIG(INTEL_CHIPSET_LOCKDOWN)) {
outb(APM_CNT_FINALIZE, APM_CNT);
+ if (CONFIG(CONSOLE_SPI_FLASH)) {
+ /* Re-init SPI driver to handle locked BAR.
+ This prevents flashconsole from hanging.
+ If other code needs to use SPI during
+ ramstage, whitelist it here. */
+ spi_init();
+ }
+ }
}
static struct pci_operations pci_ops = {
--
To view, visit https://review.coreboot.org/c/coreboot/+/33008
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie35af9610ebbba5c66351e9668e9a55cae3c7520
Gerrit-Change-Number: 33008
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Maslowski <info(a)orangecms.org>
Gerrit-MessageType: newchange
Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30757
Change subject: [RFC] src/device/smbus: add extended addressing functions
......................................................................
[RFC] src/device/smbus: add extended addressing functions
Found this on one of private repositories I have access to.
Do not have any use case for it yet.
Signed-off-by: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Change-Id: I5dcfc6bf33ef7baaa619f84b2ce0ab8e179a44b3
---
M src/device/smbus_ops.c
M src/include/device/smbus.h
M src/include/device/smbus_def.h
3 files changed, 64 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/30757/1
diff --git a/src/device/smbus_ops.c b/src/device/smbus_ops.c
index c91f415..26cd956 100644
--- a/src/device/smbus_ops.c
+++ b/src/device/smbus_ops.c
@@ -90,3 +90,20 @@
return ops_smbus_bus(get_pbus_smbus(dev))->block_write(dev, cmd,
bytes, buffer);
}
+
+int smbus_extended_read_byte(struct device *dev, u16 addr)
+{
+ CHECK_PRESENCE(extended_read_byte);
+
+ return ops_smbus_bus(get_pbus_smbus(dev))->extended_read_byte(dev,
+ addr);
+}
+
+int smbus_extended_write_byte(struct device *dev, u16 addr, u8 val)
+{
+ CHECK_PRESENCE(extended_write_byte);
+
+ return ops_smbus_bus(get_pbus_smbus(dev))->extended_write_byte(dev,
+ addr,
+ val);
+}
\ No newline at end of file
diff --git a/src/include/device/smbus.h b/src/include/device/smbus.h
index de6cf40..cb3f826 100644
--- a/src/include/device/smbus.h
+++ b/src/include/device/smbus.h
@@ -1,3 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Sage Electronic Engineering, 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ */
+
#ifndef DEVICE_SMBUS_H
#define DEVICE_SMBUS_H
@@ -15,6 +34,8 @@
int (*block_read)(struct device *dev, u8 cmd, u8 bytes, u8 *buffer);
int (*block_write)(struct device *dev, u8 cmd, u8 bytes,
const u8 *buffer);
+ int (*extended_read_byte)(struct device *dev, u16 addr);
+ int (*extended_write_byte)(struct device *dev, u16 addr, u8 value);
};
static inline const struct smbus_bus_operations *ops_smbus_bus(struct bus *bus)
@@ -54,6 +75,10 @@
int smbus_block_read(struct device *dev, u8 cmd, u8 bytes, u8 *buffer);
int smbus_block_write(struct device *dev, u8 cmd, u8 bytes, const u8 *buffer);
+int smbus_extended_read_byte(struct device *dev, u16 addr);
+int smbus_extended_write_byte(struct device *dev, u16 addr, u8 val);
+
+
#if IS_ENABLED(CONFIG_SMBUS_HAS_AUX_CHANNELS)
void smbus_switch_to_channel(uint8_t channel_number);
uint8_t smbus_get_current_channel(void);
diff --git a/src/include/device/smbus_def.h b/src/include/device/smbus_def.h
index 61d7861..cac08cc 100644
--- a/src/include/device/smbus_def.h
+++ b/src/include/device/smbus_def.h
@@ -1,10 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Sage Electronic Engineering, 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ */
+
+
#ifndef DEVICE_SMBUS_DEF_H
#define DEVICE_SMBUS_DEF_H
#include <types.h>
/* Error results are negative success is >= 0 */
-#define SMBUS_ERROR CB_ERR
+#define SMBUS_SUCCESS CB_SUCCESS
+#define SMBUS_ERROR CB_ERR
#define SMBUS_WAIT_UNTIL_READY_TIMEOUT CB_I2C_BUSY
#define SMBUS_WAIT_UNTIL_DONE_TIMEOUT CB_I2C_TIMEOUT
#define SMBUS_WAIT_UNTIL_ACTIVE_TIMEOUT CB_I2C_NO_DEVICE
--
To view, visit https://review.coreboot.org/c/coreboot/+/30757
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5dcfc6bf33ef7baaa619f84b2ce0ab8e179a44b3
Gerrit-Change-Number: 30757
Gerrit-PatchSet: 1
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-MessageType: newchange