Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17805
-gerrit
commit cfdc96fa79ed0e67fdf74894716754b467940618
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sun Dec 11 15:54:11 2016 +0200
intel/i82801ix: Add HAVE_INTEL_FIRMWARE
Select this to provide menu in menuconfig to add flash
descriptor file. ME or GbE firmwares themselves are not
required, but integrated NIC MAC and SPI configuration
fields are still useful.
Change-Id: I14b86e2f38ec39924d2cbf0932d82f66ed356a03
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/southbridge/intel/i82801ix/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/southbridge/intel/i82801ix/Kconfig b/src/southbridge/intel/i82801ix/Kconfig
index b3e5069..e4d1f91 100644
--- a/src/southbridge/intel/i82801ix/Kconfig
+++ b/src/southbridge/intel/i82801ix/Kconfig
@@ -24,6 +24,7 @@ config SOUTHBRIDGE_INTEL_I82801IX
select HAVE_SMI_HANDLER
select HAVE_USBDEBUG_OPTIONS
select SOUTHBRIDGE_INTEL_COMMON_GPIO
+ select HAVE_INTEL_FIRMWARE
if SOUTHBRIDGE_INTEL_I82801IX
Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17829
-gerrit
commit dc900aeea38106c618b443b3e9b0f26517792efd
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Tue Dec 13 08:03:10 2016 +0100
pcf8523: Fix wrong initialization of several registers
In the case where the RTC is initialized after the battery was
completely drained the bits for power_mode and cof_selection were set up
with wrongly applied masks.
In the case where the RTC is re-initialized again with no power-loss
after the last initialization the bits for cap_sel, power_mode and
cof_selection were not shifted to the right position.
Both errors leads to a wrong initialization of the RTC and in turn to a
way larger current consumption (instead of 120 nA the RTC current rises
to over 2 µA).
This patch fixes both errors and the current consumption is in the right
range again.
Change-Id: I8594f6ac121a175844393952db2169dbc5cbd2b2
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
src/drivers/i2c/pcf8523/pcf8523.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/drivers/i2c/pcf8523/pcf8523.c b/src/drivers/i2c/pcf8523/pcf8523.c
index eb0bf25..416499b 100644
--- a/src/drivers/i2c/pcf8523/pcf8523.c
+++ b/src/drivers/i2c/pcf8523/pcf8523.c
@@ -63,15 +63,15 @@ static void pcf8523_init(struct device *dev)
* corrupted and OS bit was not set. */
reg = smbus_read_byte(dev, CTRL_REG_1);
reg &= ~(STOP_BIT | CAP_SEL);
- reg |= config->cap_sel;
+ reg |= ((!!config->cap_sel) << 7);
smbus_write_byte(dev, CTRL_REG_1, reg);
reg = smbus_read_byte(dev, CTRL_REG_3);
reg &= ~PM_MASK;
- reg |= config->power_mode;
+ reg |= ((config->power_mode & 0x07) << 5);
smbus_write_byte(dev, CTRL_REG_3, reg);
reg = smbus_read_byte(dev, TMR_CLKOUT_REG);
reg &= ~COF_MASK;
- reg |= config->cof_selection;
+ reg |= ((config->cof_selection & 0x07) << 3);
smbus_write_byte(dev, TMR_CLKOUT_REG, reg);
return;
}
@@ -87,7 +87,7 @@ static void pcf8523_init(struct device *dev)
((!!config->tmrA_int_en) << 1) |
(!!config->tmrB_int_en));
- smbus_write_byte(dev, CTRL_REG_3, ((config->power_mode & 0x03) << 5) |
+ smbus_write_byte(dev, CTRL_REG_3, ((config->power_mode & 0x07) << 5) |
((!!config->bat_switch_int_en) << 1) |
(!!config->bat_low_int_en));
@@ -96,7 +96,7 @@ static void pcf8523_init(struct device *dev)
smbus_write_byte(dev, TMR_CLKOUT_REG, ((!!config->tmrA_int_mode) << 7) |
((!!config->tmrB_int_mode) << 6) |
- ((config->cof_selection & 0x38) << 3) |
+ ((config->cof_selection & 0x07) << 3) |
((config->tmrA_mode & 0x03) << 1) |
(!!config->tmrB_mode));
Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17829
-gerrit
commit 851441f66ac9870ade21b9ba1fb03373ed16f6bd
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Tue Dec 13 08:03:10 2016 +0100
pcf8523: Fix wrong initialization of several registers
In the case where the RTC is initialized after the battery was
completely drained the bits for power_mode and cof_selection were set up
with wrongly applied masks.
In the case where the RTC is re-initialized again with no power-loss
after the last initialization the bits for cap_sel, power_mode and
cof_selection were not shifted to the right position.
Both errors leads to a wrong initialization of the RTC and in turn to a
way larger current consumption (instead of 120 nA the RTC current rises
to over 2 µA).
This patch fixes both errors and the current consumption is in the right
range again.
Change-Id: I8594f6ac121a175844393952db2169dbc5cbd2b2
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
src/drivers/i2c/pcf8523/pcf8523.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/drivers/i2c/pcf8523/pcf8523.c b/src/drivers/i2c/pcf8523/pcf8523.c
index eb0bf25..ee95882 100644
--- a/src/drivers/i2c/pcf8523/pcf8523.c
+++ b/src/drivers/i2c/pcf8523/pcf8523.c
@@ -63,15 +63,15 @@ static void pcf8523_init(struct device *dev)
* corrupted and OS bit was not set. */
reg = smbus_read_byte(dev, CTRL_REG_1);
reg &= ~(STOP_BIT | CAP_SEL);
- reg |= config->cap_sel;
+ reg |= ((!!config->cap_sel) << 7);
smbus_write_byte(dev, CTRL_REG_1, reg);
reg = smbus_read_byte(dev, CTRL_REG_3);
reg &= ~PM_MASK;
- reg |= config->power_mode;
+ reg |= ((config->power_mode & 0x07) << 5);
smbus_write_byte(dev, CTRL_REG_3, reg);
reg = smbus_read_byte(dev, TMR_CLKOUT_REG);
reg &= ~COF_MASK;
- reg |= config->cof_selection;
+ reg |= ((config->cof_selection & 0x07) << 3);
smbus_write_byte(dev, TMR_CLKOUT_REG, reg);
return;
}
@@ -87,7 +87,7 @@ static void pcf8523_init(struct device *dev)
((!!config->tmrA_int_en) << 1) |
(!!config->tmrB_int_en));
- smbus_write_byte(dev, CTRL_REG_3, ((config->power_mode & 0x03) << 5) |
+ smbus_write_byte(dev, CTRL_REG_3, ((config->power_mode & 0x07) << 5) |
((!!config->bat_switch_int_en) << 1) |
(!!config->bat_low_int_en));
@@ -96,12 +96,11 @@ static void pcf8523_init(struct device *dev)
smbus_write_byte(dev, TMR_CLKOUT_REG, ((!!config->tmrA_int_mode) << 7) |
((!!config->tmrB_int_mode) << 6) |
- ((config->cof_selection & 0x38) << 3) |
+ ((config->cof_selection & 0x07) << 3) |
((config->tmrA_mode & 0x03) << 1) |
(!!config->tmrB_mode));
smbus_write_byte(dev, TMR_A_FREQ_REG, (config->tmrA_prescaler & 0x7));
-
smbus_write_byte(dev, TMR_B_FREQ_REG, (config->tmrB_prescaler & 0x7) |
((config->tmrB_pulse_cfg & 0x7) << 4));
Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17829
-gerrit
commit 4d2bcf8b331fda7196cdfb94603cced8ee230d4a
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Tue Dec 13 08:03:10 2016 +0100
pcf8523: Fix wrong initialization of several registers
In the case where the RTC is initialized after the battery was
completely drained the bits for power_mode and cof_selection were set up
with wrongly applied masks.
In the case where the RTC is re-initialized again with no power-loss
after the last initialization the bits for cap_sel, power_mode and
cof_selection were not shifted to the right position.
Both errors leads to a wrong initialization of the RTC and in turn to a
way larger current consumption (instead of 120 nA the RTC current rises
to over 2 µA).
This patch fixes both errors and the current consumption is in the right
range again.
Change-Id: I8594f6ac121a175844393952db2169dbc5cbd2b2
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
src/drivers/i2c/pcf8523/pcf8523.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/drivers/i2c/pcf8523/pcf8523.c b/src/drivers/i2c/pcf8523/pcf8523.c
index eb0bf25..1f68042 100644
--- a/src/drivers/i2c/pcf8523/pcf8523.c
+++ b/src/drivers/i2c/pcf8523/pcf8523.c
@@ -63,15 +63,15 @@ static void pcf8523_init(struct device *dev)
* corrupted and OS bit was not set. */
reg = smbus_read_byte(dev, CTRL_REG_1);
reg &= ~(STOP_BIT | CAP_SEL);
- reg |= config->cap_sel;
+ reg |= ((!!config->cap_sel) << 7);
smbus_write_byte(dev, CTRL_REG_1, reg);
reg = smbus_read_byte(dev, CTRL_REG_3);
reg &= ~PM_MASK;
- reg |= config->power_mode;
+ reg |= ((config->power_mode & 0x07) << 5);
smbus_write_byte(dev, CTRL_REG_3, reg);
reg = smbus_read_byte(dev, TMR_CLKOUT_REG);
reg &= ~COF_MASK;
- reg |= config->cof_selection;
+ reg |= ((config->cof_selection & 0x07) << 3);
smbus_write_byte(dev, TMR_CLKOUT_REG, reg);
return;
}
@@ -82,26 +82,20 @@ static void pcf8523_init(struct device *dev)
((!!config->second_int_en) << 2) |
((!!config->alarm_int_en) << 1) |
(!!config->correction_int_en));
-
smbus_write_byte(dev, CTRL_REG_2, ((!!config->wdt_int_en) << 2) |
((!!config->tmrA_int_en) << 1) |
(!!config->tmrB_int_en));
-
- smbus_write_byte(dev, CTRL_REG_3, ((config->power_mode & 0x03) << 5) |
+ smbus_write_byte(dev, CTRL_REG_3, ((config->power_mode & 0x07) << 5) |
((!!config->bat_switch_int_en) << 1) |
(!!config->bat_low_int_en));
-
smbus_write_byte(dev, OFFSET_REG, ((!!config->offset_mode) << 7) |
(config->offset_val & 0x7f));
-
smbus_write_byte(dev, TMR_CLKOUT_REG, ((!!config->tmrA_int_mode) << 7) |
((!!config->tmrB_int_mode) << 6) |
- ((config->cof_selection & 0x38) << 3) |
+ ((config->cof_selection & 0x07) << 3) |
((config->tmrA_mode & 0x03) << 1) |
(!!config->tmrB_mode));
-
smbus_write_byte(dev, TMR_A_FREQ_REG, (config->tmrA_prescaler & 0x7));
-
smbus_write_byte(dev, TMR_B_FREQ_REG, (config->tmrB_prescaler & 0x7) |
((config->tmrB_pulse_cfg & 0x7) << 4));
Matt DeVillier (matt.devillier(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17828
-gerrit
commit 51fb31f15bdd370ea8c0aadc58b2cf7140682541
Author: Matt DeVillier <matt.devillier(a)gmail.com>
Date: Fri Jan 8 17:22:09 2016 -0800
soc/intel/broadwell/lpc.c: don't zeroize existing gnvs table
The gnvs table only needs to be zeroized after init;
zeroizing an existing/populated table renders all I2C devices
completely non-functional.
TEST: boot Linux and observe all I2C devices functional
Change-Id: Id149ad645dfe5ed999a65d10e786e17585abc477
Signed-off-by: Matt DeVillier <matt.devillier(a)gmail.com>
---
src/soc/intel/broadwell/lpc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/soc/intel/broadwell/lpc.c b/src/soc/intel/broadwell/lpc.c
index 850583b..e4db498 100644
--- a/src/soc/intel/broadwell/lpc.c
+++ b/src/soc/intel/broadwell/lpc.c
@@ -599,7 +599,6 @@ static void southcluster_inject_dsdt(device_t device)
}
if (gnvs) {
- memset(gnvs, 0, sizeof(*gnvs));
acpi_create_gnvs(gnvs);
acpi_save_gnvs((unsigned long)gnvs);
/* And tell SMI about it */