Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35601 )
Change subject: arch/x86: Fix __ROMCC__ automatic prerequisities
......................................................................
arch/x86: Fix __ROMCC__ automatic prerequisities
While the list of prerequisities is not created with romcc,
we need to simulate it since different set of header files
will is used.
Change-Id: Ib799c872b5280e2035126f9660e04e51acc4b1a8
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/arch/x86/Makefile.inc
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/35601/1
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 554107f..612424d 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -161,7 +161,7 @@
$(objgenerated)/bootblock.inc: $(src)/arch/x86/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(objutil)/romcc/romcc $(OPTION_TABLE_H) $(KCONFIG_AUTOHEADER)
# The open quote in the subst messes with syntax highlighting. Fix it - ")
@printf " ROMCC $(subst $(obj)/,,$(@))\n"
- $(CC_bootblock) $(CPPFLAGS_bootblock) -MM -MT$(objgenerated)/bootblock.inc \
+ $(CC_bootblock) -D__ROMCC__ -D__PRE_RAM__ -D__BOOTBLOCK__ $(CPPFLAGS_bootblock) -MM -MT$(objgenerated)/bootblock.inc \
$< > $(objgenerated)/bootblock.inc.d
$(ROMCC) -c -S $(bootblock_romccflags) -I. $(CPPFLAGS_bootblock) $< -o $@
--
To view, visit https://review.coreboot.org/c/coreboot/+/35601
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib799c872b5280e2035126f9660e04e51acc4b1a8
Gerrit-Change-Number: 35601
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35475 )
Change subject: drivers/i2c/lm96000: Add more settings for fan control
......................................................................
drivers/i2c/lm96000: Add more settings for fan control
Allow to set a lower temperature limit, as the currently hard-coded
25C may be to low for a given temperature sensor. Also enable smoo-
thing, currently hard-coded to the maximum interval of 35s, and set
the hysteresis value.
Change-Id: I5fde1cf909e8fbbaf8a345790b00c58a73c19ef8
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
M src/drivers/i2c/lm96000/chip.h
M src/drivers/i2c/lm96000/lm96000.c
2 files changed, 15 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/35475/1
diff --git a/src/drivers/i2c/lm96000/chip.h b/src/drivers/i2c/lm96000/chip.h
index ab782db..cbf8601 100644
--- a/src/drivers/i2c/lm96000/chip.h
+++ b/src/drivers/i2c/lm96000/chip.h
@@ -93,6 +93,7 @@
};
struct lm96000_temp_zone {
+ u8 low_temp; /* temperature for min. duty cycle (in °C) */
u8 target_temp; /* temperature for 100% duty cycle (in °C) */
u8 panic_temp; /* temperature for 100% duty cycle on all fans */
@@ -100,9 +101,12 @@
with. (Datasheet clearly states the opposite, that this
is tied to each PWM output so YMMV.) */
enum {
- LM96000_LOW_TEMP_OFF = 0, /* turn fan off below low temp. */
- LM96000_LOW_TEMP_MIN = 1, /* keep PWM at mininum duty cycle */
+ /* turn fan off below `low_temp - hysteresis` */
+ LM96000_LOW_TEMP_OFF = 0,
+ /* keep PWM at mininum duty cycle */
+ LM96000_LOW_TEMP_MIN = 1,
} min_off;
+ u8 hysteresis;
};
/* Implements only those parts currently used by coreboot mainboards. */
diff --git a/src/drivers/i2c/lm96000/lm96000.c b/src/drivers/i2c/lm96000/lm96000.c
index 4a3c2eb..7fbb31b 100644
--- a/src/drivers/i2c/lm96000/lm96000.c
+++ b/src/drivers/i2c/lm96000/lm96000.c
@@ -156,9 +156,9 @@
{ 2, 3, 3, 4, 5, 7, 8, 10, 13, 16, 20, 27, 32, 40, 53, 80 };
unsigned int i;
- /* find longest range that starts from 25°C */
+ /* find longest range that starts from `low_temp` */
for (i = ARRAY_SIZE(temp_range) - 1; i > 0; --i) {
- if (temp_range[i] + 25 <= config->target_temp)
+ if (config->low_temp + temp_range[i] <= config->target_temp)
break;
}
@@ -170,9 +170,16 @@
: 0);
lm96000_write(dev, LM96000_ZONE_TEMP_PANIC(zone),
config->panic_temp ? config->panic_temp : 100);
+ lm96000_update(dev, LM96000_ZONE_SMOOTH(zone),
+ LM96000_ZONE_SMOOTH_MASK(zone),
+ LM96000_ZONE_SMOOTH_EN(zone) | 0); /* 0: 35s */
lm96000_update(dev, LM96000_FAN_MIN_OFF,
LM96000_FAN_MIN(zone),
config->min_off ? LM96000_FAN_MIN(zone) : 0);
+ lm96000_update(dev, LM96000_ZONE_HYSTERESIS(zone),
+ LM96000_ZONE_HYST_MASK(zone),
+ config->hysteresis << LM96000_ZONE_HYST_SHIFT(zone)
+ & LM96000_ZONE_HYST_MASK(zone));
}
static void lm96000_init(struct device *const dev)
--
To view, visit https://review.coreboot.org/c/coreboot/+/35475
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5fde1cf909e8fbbaf8a345790b00c58a73c19ef8
Gerrit-Change-Number: 35475
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35472 )
Change subject: drivers/i2c/at24rf08c: Add proper Kconfig option
......................................................................
drivers/i2c/at24rf08c: Add proper Kconfig option
The existing Kconfig code made SMBIOS_PROVIDED_BY_MOBO depend
on VENDOR_LENOVO. Thus, it couldn't be selected by boards from
other vendors. So we add another Kconfig that selects it
here.
NB. It's still unclear how the two drivers in this directory
are related (at24rf08c and lenovo_serial). From the code, it
doesn't look like the latter belongs here.
Change-Id: Iaa5c5a584f2a5e2426352ec6aa681f99a55efa49
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
M src/drivers/i2c/at24rf08c/Kconfig
M src/drivers/i2c/at24rf08c/Makefile.inc
2 files changed, 5 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/35472/1
diff --git a/src/drivers/i2c/at24rf08c/Kconfig b/src/drivers/i2c/at24rf08c/Kconfig
index e8ee986..8a5eb20 100644
--- a/src/drivers/i2c/at24rf08c/Kconfig
+++ b/src/drivers/i2c/at24rf08c/Kconfig
@@ -1,7 +1,4 @@
-if VENDOR_LENOVO
-
-config SMBIOS_PROVIDED_BY_MOBO
+config DRIVER_LENOVO_SERIALS
bool
- default y
-
-endif
+ default y if VENDOR_LENOVO
+ select SMBIOS_PROVIDED_BY_MOBO
diff --git a/src/drivers/i2c/at24rf08c/Makefile.inc b/src/drivers/i2c/at24rf08c/Makefile.inc
index 10c91d1..985aa68 100644
--- a/src/drivers/i2c/at24rf08c/Makefile.inc
+++ b/src/drivers/i2c/at24rf08c/Makefile.inc
@@ -1,2 +1,2 @@
-ramstage-$(CONFIG_VENDOR_LENOVO) += at24rf08c.c
-ramstage-$(CONFIG_VENDOR_LENOVO) += lenovo_serials.c
+ramstage-$(CONFIG_DRIVER_LENOVO_SERIALS) += at24rf08c.c
+ramstage-$(CONFIG_DRIVER_LENOVO_SERIALS) += lenovo_serials.c
--
To view, visit https://review.coreboot.org/c/coreboot/+/35472
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iaa5c5a584f2a5e2426352ec6aa681f99a55efa49
Gerrit-Change-Number: 35472
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange