Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17671
-gerrit
commit 266d6ee65e2a67b8692a81b1d3cafdaaeeb17147
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Thu Dec 1 10:57:34 2016 +0100
mc_tcu3: Do not abort initialization of PTN3460 when HW-ID is missing
Do not abort the initialization of PTN3460 if HW-ID could not be
retrieved and just assume that the HW-ID does not match 7.9.2.0.
In this case PTN3460 will be setup to a working condition even
if this field is missing.
This makes this driver more robust with faulty blocks.
Change-Id: I301fb165a7924768e44182d92be820294beb0280
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
src/mainboard/siemens/mc_tcu3/ptn3460.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/mainboard/siemens/mc_tcu3/ptn3460.c b/src/mainboard/siemens/mc_tcu3/ptn3460.c
index cd59492..347bc9c 100644
--- a/src/mainboard/siemens/mc_tcu3/ptn3460.c
+++ b/src/mainboard/siemens/mc_tcu3/ptn3460.c
@@ -58,11 +58,6 @@ int ptn3460_init(char *hwi_block)
hwi_block);
return 1;
}
- if (hwilib_get_field(HWID, hwid, sizeof(hwid)) != sizeof(hwid)) {
- printk(BIOS_ERR, "LCD: Missing HW-ID from %s\n",
- hwi_block);
- return 1;
- }
/* Here, all the desired information for setting up DP2LVDS converter*/
/* are present. Inside the converter, table 6 will be used for */
/* the timings. */
@@ -85,10 +80,12 @@ int ptn3460_init(char *hwi_block)
cfg.lvds_interface_ctrl1 |= 0x20; /* Use 18 bits per pixel */
cfg.lvds_interface_ctrl2 = 0x03; /* no clock spreading, 300 mV LVDS swing */
- if (memcmp(hwid, tcu31_hwid, sizeof(hwid)))
- cfg.lvds_interface_ctrl3 = 0x00; /* no LVDS signal swap */
- else
+ /* Swap LVDS even and odd lanes for HW-ID 7.9.2.0 only. */
+ if (hwilib_get_field(HWID, hwid, sizeof(hwid)) == sizeof(hwid) &&
+ !(memcmp(hwid, tcu31_hwid, sizeof(hwid)))) {
cfg.lvds_interface_ctrl3 = 0x01; /* swap LVDS even and odd */
+ } else
+ cfg.lvds_interface_ctrl3 = 0x00; /* no LVDS signal swap */
cfg.t2_delay = 1; /* Delay T2 (VDD to LVDS active) by 16 ms */
cfg.t3_timing = 10; /* 500 ms from LVDS to backlight active */
cfg.t12_timing = 20; /* 1 second re-power delay */
Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17670
-gerrit
commit ccf30b5f264e24ed6d190cb348fc685d306875ca
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Thu Dec 1 10:53:14 2016 +0100
vendorcode/siemens: Ensure a given info block is available for a field
While searching for a field in all blocks ensure that the checked block
is available and can be used. In this way a field can be retrieved from
every block and not just the first one.
Change-Id: Idbd7656ab0664763cb065f5e817193ad1d9e0871
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
src/vendorcode/siemens/hwilib/hwilib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/vendorcode/siemens/hwilib/hwilib.c b/src/vendorcode/siemens/hwilib/hwilib.c
index 18880ff..df9bd22 100644
--- a/src/vendorcode/siemens/hwilib/hwilib.c
+++ b/src/vendorcode/siemens/hwilib/hwilib.c
@@ -396,7 +396,8 @@ static uint32_t hwilib_read_bytes (const struct param_info *param, uint8_t *dst,
return 0;
/* Take the first valid block to get the parameter from */
do {
- if ((param->pos[i].len) && (param->pos[i].offset)) {
+ if ((param->pos[i].len) && (param->pos[i].offset) &&
+ (blk_ptr[param->pos[i].blk_type])) {
blk = blk_ptr[param->pos[i].blk_type];
break;
}
Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17659
-gerrit
commit 092e1740526d27f3f6c293731a8abf7f113e0849
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Wed Nov 30 18:40:38 2016 +0100
nb/x4x: Fix raminit unconditionally resetting
The raminit only succeeds when it starts from a cold boot.
To achieve this it unconditionally did a cold reset.
This patch uses the sticky scratchpad MCHBAR to issue a cold reset
only when not started from a cold boot.
This sticky scratchpad register is only empty on cold boot or on cold
reset (outb(0xe, 0xcf9)).
It also adds a 2s delay before reset because some disk drives
expect a warm reboot when the OS wants to reboot and therefore are not
shut down properly / in time. If the drive is unexpectedly powered off
which happens during a cold reset, it can cause data loss. Giving the
drive 2 extra seconds can work around this issue.
(A proper fix would be to fix the raminit such that it works on a hot reset)
Change-Id: I6063dd6aed908558155d2523f35d7241ff1f4fde
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/northbridge/intel/x4x/raminit_ddr2.c | 11 +++++++++--
src/northbridge/intel/x4x/x4x.h | 4 +---
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/northbridge/intel/x4x/raminit_ddr2.c b/src/northbridge/intel/x4x/raminit_ddr2.c
index b3ee34a..bfc918e 100644
--- a/src/northbridge/intel/x4x/raminit_ddr2.c
+++ b/src/northbridge/intel/x4x/raminit_ddr2.c
@@ -259,9 +259,15 @@ static void checkreset_ddr2(struct sysinfo *s)
u8 pmcon2;
u8 reset = 0;
+ if ((MCHBAR16(SSKPD_MCHBAR) == 0xCAFE)) {
+ printk(BIOS_DEBUG, "Waiting for disks to timeout...\n");
+ mdelay(2000);
+ reset = 1;
+ }
+
pmcon2 = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xa2);
- if (!(pmcon2 & 0x80)) {
- pmcon2 |= 0x80;
+ if (pmcon2 & 0x80) {
+ pmcon2 &= ~0x80;
pci_write_config8(PCI_DEV(0, 0x1f, 0), 0xa2, pmcon2);
reset = 1;
@@ -2058,4 +2064,5 @@ void raminit_ddr2(struct sysinfo *s)
MCHBAR32(0xa30) = MCHBAR32(0xa30) | (1 << 26);
printk(BIOS_DEBUG, "Done ddr2\n");
+ MCHBAR16(SSKPD_MCHBAR) = 0xCAFE;
}
diff --git a/src/northbridge/intel/x4x/x4x.h b/src/northbridge/intel/x4x/x4x.h
index e4eb8dd..ab9ba80 100644
--- a/src/northbridge/intel/x4x/x4x.h
+++ b/src/northbridge/intel/x4x/x4x.h
@@ -97,9 +97,7 @@
#define CLKCFG_MEMCLK_MASK (7 << CLKCFG_MEMCLK_SHIFT)
#define CLKCFG_UPDATE (1 << 12)
-#define SSKPD_MCHBAR 0x0c1c
-#define SSKPD_CLK_SHIFT 0
-#define SSKPD_CLK_MASK (7 << SSKPD_CLK_SHIFT)
+#define SSKPD_MCHBAR 0x0c20 /* 64bit */
/*
* DMIBAR
Marty Plummer (ntzrmtthihu777(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17669
-gerrit
commit d0d0730d1c454cb7b98206370786fcc20f9338ef
Author: Marty Plummer <ntzrmtthihu777(a)gmail.com>
Date: Thu Dec 1 02:14:39 2016 -0600
superio/fintek: Add support for Fintek F71889A.
Datasheet: F71889A rev V0.21P
Change-Id: I91c60a3b48cd4872ae7a27de8f49faa40e877a27
Signed-off-by: Marty Plummer <ntzrmtthihu777(a)gmail.com>
---
src/superio/fintek/Makefile.inc | 1 +
src/superio/fintek/f71889a/Kconfig | 20 ++++++++++
src/superio/fintek/f71889a/Makefile.inc | 18 +++++++++
src/superio/fintek/f71889a/f71889a.h | 31 ++++++++++++++
src/superio/fintek/f71889a/superio.c | 71 +++++++++++++++++++++++++++++++++
5 files changed, 141 insertions(+)
diff --git a/src/superio/fintek/Makefile.inc b/src/superio/fintek/Makefile.inc
index 0d0ae66..5d117e2 100644
--- a/src/superio/fintek/Makefile.inc
+++ b/src/superio/fintek/Makefile.inc
@@ -24,3 +24,4 @@ subdirs-y += f71872
subdirs-y += f81216h
subdirs-y += f81865f
subdirs-y += f81866d
+supdirs-y += f71889a
diff --git a/src/superio/fintek/f71889a/Kconfig b/src/superio/fintek/f71889a/Kconfig
new file mode 100644
index 0000000..641621e
--- /dev/null
+++ b/src/superio/fintek/f71889a/Kconfig
@@ -0,0 +1,20 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2016 Marty Plummer <netz.kernel(a)gmail.com>
+#
+# 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, either version 3 of the License, or
+# (at your option) any later version.
+#
+# 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.
+#
+
+config SUPERIO_FINTEK_F71889A
+ bool
+ select SUPERIO_FINTEK_COMMON_ROMSTAGE
+
diff --git a/src/superio/fintek/f71889a/Makefile.inc b/src/superio/fintek/f71889a/Makefile.inc
new file mode 100644
index 0000000..4642c46
--- /dev/null
+++ b/src/superio/fintek/f71889a/Makefile.inc
@@ -0,0 +1,18 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2016 Marty Plummer <netz.kernel(a)gmail.com>
+##
+## 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, either version 3 of the License, or
+## (at your option) any later version.
+##
+## 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.
+##
+
+ramstage-$(CONFIG_SUPERIO_FINTEK_F71889A) += superio.c
+
diff --git a/src/superio/fintek/f71889a/f71889a.h b/src/superio/fintek/f71889a/f71889a.h
new file mode 100644
index 0000000..a129e41
--- /dev/null
+++ b/src/superio/fintek/f71889a/f71889a.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Marty Plummer <netz.kernel(a)gmail.com>
+ *
+ * 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, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 SUPERIO_FINTEK_F71889A_H
+#define SUPERIO_FINTEK_F71889A_H
+
+/* Logical Device Numbers (LDN). */
+#define F71889A_SP1 0x01 /* UART1 */
+#define F71889A_SP2 0x02 /* UART2 */
+#define F71889A_PP 0x03 /* Parallel Port */
+#define F71889A_HWM 0x04 /* Hardware Monitor */
+#define F71889A_KBC 0x05 /* Keyboard/Mouse */
+#define F71889A_GPIO 0x06 /* GPIO */
+#define F71889A_VID 0x07 /* VID */
+#define F71889A_PM 0x0a /* ACPI/PME */
+
+#endif /* SUPERIO_FINTEK_F71889A_H */
+
diff --git a/src/superio/fintek/f71889a/superio.c b/src/superio/fintek/f71889a/superio.c
new file mode 100644
index 0000000..34d4806
--- /dev/null
+++ b/src/superio/fintek/f71889a/superio.c
@@ -0,0 +1,71 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Marty Plummer <netz.kernel(a)gmail.com>
+ *
+ * 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, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 <arch/io.h>
+#include <device/device.h>
+#include <device/pnp.h>
+#include <superio/conf_mode.h>
+#include <console/console.h>
+#include <stdlib.h>
+#include <pc80/keyboard.h>
+#include "f71889a.h"
+
+static void f71889a_init(struct device *dev)
+{
+ if (!dev->enabled)
+ return;
+
+ switch (dev->path.pnp.device) {
+
+ case F71889A_KBC:
+ pc_keyboard_init(NO_AUX_DEVICE);
+ break;
+ }
+}
+
+static struct device_operations ops = {
+ .read_resources = pnp_read_resources,
+ .set_resources = pnp_set_resources,
+ .enable_resources = pnp_enable_resources,
+ .enable = pnp_alt_enable,
+ .init = f71889a_init,
+ .ops_pnp_mode = &pnp_conf_mode_8787_aa,
+};
+
+static struct pnp_info pnp_dev_info[] = {
+ /* TODO: Some of the 0x07f8 etc. values may not be correct.
+ * double check bitmasks
+ */
+ { &ops, F71889A_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
+ { &ops, F71889A_SP2, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
+ { &ops, F71889A_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x07f8, 0}, },
+ { &ops, F71889A_HWM, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
+ { &ops, F71889A_KBC, PNP_IO0 | PNP_IRQ0 | PNP_IRQ1, {0x07ff, 0}, },
+ { &ops, F71889A_GPIO, PNP_IRQ0, },
+ { &ops, F71889A_VID, PNP_IO0, {0x0ff8, 0}, },
+ { &ops, F71889A_PM, },
+};
+
+static void enable_dev(struct device *dev)
+{
+ pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
+}
+
+struct chip_operations superio_fintek_f71889a_ops = {
+ CHIP_NAME("Fintek F71889A Super I/O")
+ .enable_Dev = enable_dev
+};
+
the following patch was just integrated into master:
commit d0a648e18a7162f7361a13296beb0c1293acb16e
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Nov 29 23:20:07 2016 -0600
mainboard/google/reef: allow variants to modify nhlt oem revision
In order to mirror the full flexibility of the NHLT library that
allows a caller to set the OEM revision field in the ACPI header
modify the variant callback to override the value.
Change-Id: I16e539b350a50e3c163be1439c8637b82e53a759
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: https://review.coreboot.org/17651
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
Tested-by: build bot (Jenkins)
See https://review.coreboot.org/17651 for details.
-gerrit
the following patch was just integrated into master:
commit b4afe3c19747758412c734132e5e342a9b3572b1
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Nov 29 23:14:25 2016 -0600
lib/nhlt: add support for setting the oem_revision
In the ACPI header there's an OEM revision field that was previously
just being implicitly set to 0. Allow for a board to provide a
non-zero value for this field.
Change-Id: Icd40c1c162c2645b3990a6f3361c592706251f82
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: https://review.coreboot.org/17650
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
See https://review.coreboot.org/17650 for details.
-gerrit
the following patch was just integrated into master:
commit d008413a3c46d4346f3cc398bbfd60b875ff3084
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Nov 29 15:52:08 2016 -0600
arch/x86: cache postcar in stage cache
Stash and reload postcar stage in the stage cache for increased
S3 resume speed. It's impact is small (2 ms or so), but there's
no need to go to the boot media on resume to reload something
that was already loaded. This aligns with the same paths we take
on ramstage as well.
Change-Id: I4313794826120853163c7366e81346858747ed0a
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: https://review.coreboot.org/17649
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
See https://review.coreboot.org/17649 for details.
-gerrit