Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7945
-gerrit
commit 0e87dcaea1b37d7d39384d0ae74e6cce8ad2c03e
Author: Shawn Nematbakhsh <shawnn(a)chromium.org>
Date: Fri May 16 15:40:21 2014 -0700
rambi: Add _PRW for LID0 ACPI Device
The kernel will not track wakeup events for devices unless they have
a defined _PRW. There is no EC output of the lid signal coming to
a GPIO and instead it pulses PCH_WAKE#.
BUG=chrome-os-partner:27631
TEST=Manual on Rambi.
- Run lidclose + lidopen on EC console, verify that wakeup_count
increments.
- Run lidclose + lidopen in rapid succession, verify that suspend
request is aborted.
BRANCH=Rambi.
Original-Change-Id: I8d4c58a7bb37d7e474ec094fe96e46e1bfd980de
Original-Signed-off-by: Shawn Nematbakhsh <shawnn(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/200289
Original-Reviewed-by: Duncan Laurie <dlaurie(a)chromium.org>
(cherry picked from commit 08c6b42f1ed1af7fff6217e6b71469edd7ff4b2e)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: Iee813ed6f39cd3d5e0a2bdd395c740f82a1cf01a
---
src/mainboard/google/rambi/acpi/mainboard.asl | 1 +
src/mainboard/google/rambi/onboard.h | 3 +++
2 files changed, 4 insertions(+)
diff --git a/src/mainboard/google/rambi/acpi/mainboard.asl b/src/mainboard/google/rambi/acpi/mainboard.asl
index f0f7a4c..e6a7448 100644
--- a/src/mainboard/google/rambi/acpi/mainboard.asl
+++ b/src/mainboard/google/rambi/acpi/mainboard.asl
@@ -26,6 +26,7 @@ Scope (\_SB)
Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D"))
+ Name (_PRW, Package() { BOARD_PCH_WAKE_GPIO, 0x5 })
Method (_LID, 0)
{
Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
diff --git a/src/mainboard/google/rambi/onboard.h b/src/mainboard/google/rambi/onboard.h
index 18ceca3..8ea2e8a 100644
--- a/src/mainboard/google/rambi/onboard.h
+++ b/src/mainboard/google/rambi/onboard.h
@@ -22,6 +22,9 @@
#include "irqroute.h"
+/* PCH wake signal from EC. */
+#define BOARD_PCH_WAKE_GPIO ACPI_ENABLE_WAKE_SUS_GPIO(0)
+
#define BOARD_TRACKPAD_NAME "trackpad"
#define BOARD_TRACKPAD_IRQ GPIO_S0_DED_IRQ(TPAD_IRQ_OFFSET)
#define BOARD_TRACKPAD_WAKE_GPIO ACPI_ENABLE_WAKE_SUS_GPIO(1)
Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7941
-gerrit
commit 75843b4b3783407b6ec4201bd0259290d4f41164
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Wed May 14 15:59:37 2014 -0700
samus: Move SPD handling to separate file
The code to find the SPD data for the mainboard based on GPIOs
is moved from romstage.c into spd.c.
It relies on the updated pei_data structure from broadwell instead
of the haswell interface.
BUG=chrome-os-partner:28234
TEST=Build and boot on samus
CQ-DEPEND=CL:199921
CQ-DEPEND=CL:199922
CQ-DEPEND=CL:199923
CQ-DEPEND=CL:199943
CQ-DEPEND=CL:*163751
Original-Change-Id: I5bd56f81884dae117b35a1ffa5fb6e804fd3cb9c
Original-Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/199920
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
(cherry picked from commit 0bd2de4ba5eb8ba5e9d43f8e82ce9ff7587eab62)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: Ifccffa84d356f277cd6c730c41edf835a781af26
---
src/mainboard/google/samus/Makefile.inc | 1 +
src/mainboard/google/samus/romstage.c | 32 +--------------
src/mainboard/google/samus/spd.c | 69 +++++++++++++++++++++++++++++++++
src/mainboard/google/samus/spd.h | 33 ++++++++++++++++
4 files changed, 105 insertions(+), 30 deletions(-)
diff --git a/src/mainboard/google/samus/Makefile.inc b/src/mainboard/google/samus/Makefile.inc
index 343bdf4..8d649c8 100644
--- a/src/mainboard/google/samus/Makefile.inc
+++ b/src/mainboard/google/samus/Makefile.inc
@@ -25,6 +25,7 @@ ramstage-y += chromeos.c
smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c
## DIMM SPD for on-board memory
+romstage-y += spd.c
SPD_BIN = $(obj)/spd.bin
# Order of names in SPD_SOURCES is important!
diff --git a/src/mainboard/google/samus/romstage.c b/src/mainboard/google/samus/romstage.c
index bdf0e70..ffcdf92 100644
--- a/src/mainboard/google/samus/romstage.c
+++ b/src/mainboard/google/samus/romstage.c
@@ -70,35 +70,6 @@ const struct rcba_config_instruction rcba_config[] = {
RCBA_END_CONFIG,
};
-/* Copy SPD data for on-board memory */
-static void copy_spd(struct pei_data *peid)
-{
- const int gpio_vector[] = {67, 68, 69, -1};
- int spd_index = get_gpios(gpio_vector);
- char *spd_file;
- size_t spd_file_len;
-
- printk(BIOS_DEBUG, "SPD index %d\n", spd_index);
- spd_file = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, "spd.bin", 0xab,
- &spd_file_len);
- if (!spd_file)
- die("SPD data not found.");
-
- if (spd_file_len <
- ((spd_index + 1) * sizeof(peid->spd_data[0]))) {
- printk(BIOS_ERR, "SPD index override to 0 - old hardware?\n");
- spd_index = 0;
- }
-
- if (spd_file_len < sizeof(peid->spd_data[0]))
- die("Missing SPD data.");
-
- memcpy(peid->spd_data[0],
- spd_file +
- spd_index * sizeof(peid->spd_data[0]),
- sizeof(peid->spd_data[0]));
-}
-
void mainboard_romstage_entry(unsigned long bist)
{
struct pei_data pei_data = {
@@ -160,9 +131,10 @@ void mainboard_romstage_entry(unsigned long bist)
.gpio_map = &mainboard_gpio_map,
.rcba_config = &rcba_config[0],
.bist = bist,
- .copy_spd = copy_spd,
};
+ mainboard_fill_spd_data(&pei_data);
+
/* Call into the real romstage main with this board's attributes. */
romstage_common(&romstage_params);
}
diff --git a/src/mainboard/google/samus/spd.c b/src/mainboard/google/samus/spd.c
new file mode 100644
index 0000000..61363f3
--- /dev/null
+++ b/src/mainboard/google/samus/spd.c
@@ -0,0 +1,69 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/byteorder.h>
+#include <cbfs.h>
+#include <console/console.h>
+#include <string.h>
+#include <broadwell/gpio.h>
+#include <broadwell/pei_data.h>
+#include <broadwell/romstage.h>
+#include "gpio.h"
+#include "spd.h"
+
+/* Copy SPD data for on-board memory */
+void mainboard_fill_spd_data(struct pei_data *pei_data)
+{
+ int spd_gpio[3];
+ int spd_index;
+ int spd_file_len;
+ struct cbfs_file *spd_file;
+
+ spd_gpio[0] = get_gpio(SPD_GPIO_BIT0);
+ spd_gpio[1] = get_gpio(SPD_GPIO_BIT1);
+ spd_gpio[2] = get_gpio(SPD_GPIO_BIT2);
+
+ spd_index = spd_gpio[2] << 2 | spd_gpio[1] << 1 | spd_gpio[0];
+
+ printk(BIOS_DEBUG, "SPD: index %d (GPIO%d=%d GPIO%d=%d GPIO%d=%d)\n",
+ spd_index,
+ SPD_GPIO_BIT2, spd_gpio[2],
+ SPD_GPIO_BIT1, spd_gpio[1],
+ SPD_GPIO_BIT0, spd_gpio[0]);
+
+ spd_file = cbfs_get_file(CBFS_DEFAULT_MEDIA, "spd.bin");
+ if (!spd_file)
+ die("SPD data not found.");
+ spd_file_len = ntohl(spd_file->len);
+
+ if (spd_file_len < ((spd_index + 1) * SPD_LEN)) {
+ printk(BIOS_ERR, "SPD index override to 0 - old hardware?\n");
+ spd_index = 0;
+ }
+
+ if (spd_file_len < SPD_LEN)
+ die("Missing SPD data.");
+
+ /* Assume same memory in both channels */
+ spd_index *= SPD_LEN;
+ memcpy(pei_data->spd_data[0][0],
+ ((char*)CBFS_SUBHEADER(spd_file)) + spd_index, SPD_LEN);
+ memcpy(pei_data->spd_data[1][0],
+ ((char*)CBFS_SUBHEADER(spd_file)) + spd_index, SPD_LEN);
+}
diff --git a/src/mainboard/google/samus/spd.h b/src/mainboard/google/samus/spd.h
new file mode 100644
index 0000000..0597ac3
--- /dev/null
+++ b/src/mainboard/google/samus/spd.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef MAINBOARD_SPD_H
+#define MAINBOARD_SPD_H
+
+#define SPD_LEN 256
+
+/* Samus board memory configuration GPIOs */
+#define SPD_GPIO_BIT0 67
+#define SPD_GPIO_BIT1 68
+#define SPD_GPIO_BIT2 69
+
+struct pei_data;
+void mainboard_fill_spd_data(struct pei_data *pei_data);
+
+#endif
Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7940
-gerrit
commit 4b6c1a4a2f682d101a742bf9b6ec50286c10dff7
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Wed May 14 14:13:42 2014 -0700
broadwell: Hook into the build system
Hook the soc/intel/broadwell directory into the configuration
and build system so it can be used by mainboards.
BUG=chrome-os-partner:28234
TEST=build and boot on wtm2
Original-Change-Id: Ia48ac644a8cefb2cf9c64efaa1bd9737ddfb8b1f
Original-Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/199893
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
(cherry picked from commit ee290d7f6e541999e077bcf871cd6c7b6504f3d6)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: Iea5f37a839b516ac98227cc1737ce0d03f7e7e3b
---
src/soc/intel/Kconfig | 1 +
src/soc/intel/Makefile.inc | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/soc/intel/Kconfig b/src/soc/intel/Kconfig
index d8a5011..808f6b8 100644
--- a/src/soc/intel/Kconfig
+++ b/src/soc/intel/Kconfig
@@ -1,3 +1,4 @@
source src/soc/intel/baytrail/Kconfig
+source src/soc/intel/broadwell/Kconfig
source src/soc/intel/fsp_baytrail/Kconfig
source src/soc/intel/common/Kconfig
diff --git a/src/soc/intel/Makefile.inc b/src/soc/intel/Makefile.inc
index b2f3cde..f86d6ca 100644
--- a/src/soc/intel/Makefile.inc
+++ b/src/soc/intel/Makefile.inc
@@ -1,2 +1,3 @@
subdirs-$(CONFIG_SOC_INTEL_BAYTRAIL) += baytrail
+subdirs-$(CONFIG_SOC_INTEL_BROADWELL) += broadwell
subdirs-$(CONFIG_SOC_INTEL_FSP_BAYTRAIL) += fsp_baytrail
the following patch was just integrated into master:
commit 72a9beb3f4389d45de63158fcb3f841c522549e5
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Fri Dec 26 12:08:11 2014 +1100
samsung/exynos*/Makefile.inc: Simplify unnecessary ifeq
It's not needed, as we can use a simpler macro instead.
Change-Id: Ib96f5cfa434d0383ee3bfe49995a8f8830987f20
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7925
Reviewed-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Tested-by: build bot (Jenkins)
See http://review.coreboot.org/7925 for details.
-gerrit