[coreboot-gerrit] Patch set updated for coreboot: bee4ae1 purin: add purin under mainboard
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Apr 16 15:18:28 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9751
-gerrit
commit bee4ae1a9137047bbf7786f3cab397fb98edf50b
Author: Daisuke Nojiri <dnojiri at chromium.org>
Date: Fri Jan 23 10:05:52 2015 -0800
purin: add purin under mainboard
this change covers bootblock and romstage.
BUG=none
BRANCH=tot
TEST=ran emerge-purin coreboot
Change-Id: Ifffb2e93189e8e85338de469432f3296e3e71791
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Commit-Id: cd479583404958f72461e9c1639f0288a00f228e
Original-Change-Id: Iaee4a8c457e42386a4100a8121144b8cf5f21e8c
Original-Signed-off-by: Daisuke Nojiri <dnojiri at chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/242853
Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
src/mainboard/google/Kconfig | 3 ++
src/mainboard/google/purin/Kconfig | 58 ++++++++++++++++++++++++++++++++
src/mainboard/google/purin/Makefile.inc | 39 +++++++++++++++++++++
src/mainboard/google/purin/boardid.c | 25 ++++++++++++++
src/mainboard/google/purin/bootblock.c | 24 +++++++++++++
src/mainboard/google/purin/chromeos.c | 41 ++++++++++++++++++++++
src/mainboard/google/purin/devicetree.cb | 23 +++++++++++++
src/mainboard/google/purin/mainboard.c | 38 +++++++++++++++++++++
src/mainboard/google/purin/memlayout.ld | 1 +
src/mainboard/google/purin/reset.c | 26 ++++++++++++++
10 files changed, 278 insertions(+)
diff --git a/src/mainboard/google/Kconfig b/src/mainboard/google/Kconfig
index 478f63a..6e5eb73 100644
--- a/src/mainboard/google/Kconfig
+++ b/src/mainboard/google/Kconfig
@@ -47,6 +47,8 @@ config BOARD_GOOGLE_PEACH_PIT
bool "Peach Pit"
config BOARD_GOOGLE_PEPPY
bool "Peppy"
+config BOARD_GOOGLE_PURIN
+ bool "Purin"
config BOARD_GOOGLE_RAMBI
bool "Rambi"
config BOARD_GOOGLE_RUSH
@@ -92,6 +94,7 @@ source "src/mainboard/google/panther/Kconfig"
source "src/mainboard/google/parrot/Kconfig"
source "src/mainboard/google/peach_pit/Kconfig"
source "src/mainboard/google/peppy/Kconfig"
+source "src/mainboard/google/purin/Kconfig"
source "src/mainboard/google/rambi/Kconfig"
source "src/mainboard/google/rush/Kconfig"
source "src/mainboard/google/rush_ryu/Kconfig"
diff --git a/src/mainboard/google/purin/Kconfig b/src/mainboard/google/purin/Kconfig
new file mode 100644
index 0000000..5d72513
--- /dev/null
+++ b/src/mainboard/google/purin/Kconfig
@@ -0,0 +1,58 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright 2015 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
+##
+
+if BOARD_GOOGLE_PURIN
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+ def_bool y
+ select BOARD_ID_SUPPORT
+ select BOARD_ROMSIZE_KB_2048
+ select CHROMEOS_VBNV_FLASH
+ select COMMON_CBFS_SPI_WRAPPER
+ select HAVE_HARD_RESET
+ select MAINBOARD_HAS_BOOTBLOCK_INIT
+ select SOC_BROADCOM_CYGNUS
+ select SPI_FLASH
+ select SPI_FLASH_SPANSION
+
+config MAINBOARD_DIR
+ string
+ default google/purin
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "Purin"
+
+config MAINBOARD_VENDOR
+ string
+ default "Google"
+
+config VBOOT_RAMSTAGE_INDEX
+ hex
+ default 0x3
+
+config BOOT_MEDIA_SPI_BUS
+ int
+ default 2
+
+config DRAM_SIZE_MB
+ int
+ default 1024
+
+endif # BOARD_GOOGLE_PURIN
diff --git a/src/mainboard/google/purin/Makefile.inc b/src/mainboard/google/purin/Makefile.inc
new file mode 100644
index 0000000..ee6ee62
--- /dev/null
+++ b/src/mainboard/google/purin/Makefile.inc
@@ -0,0 +1,39 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright 2015 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
+##
+bootblock-y += bootblock.c
+bootblock-y += boardid.c
+bootblock-y += chromeos.c
+bootblock-y += reset.c
+
+verstage-y += boardid.c
+verstage-y += chromeos.c
+verstage-y += reset.c
+
+romstage-y += boardid.c
+romstage-y += reset.c
+
+ramstage-y += boardid.c
+ramstage-y += chromeos.c
+ramstage-y += mainboard.c
+ramstage-y += reset.c
+
+bootblock-y += memlayout.ld
+verstage-y += memlayout.ld
+romstage-y += memlayout.ld
+ramstage-y += memlayout.ld
diff --git a/src/mainboard/google/purin/boardid.c b/src/mainboard/google/purin/boardid.c
new file mode 100644
index 0000000..847271e
--- /dev/null
+++ b/src/mainboard/google/purin/boardid.c
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 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 <boardid.h>
+
+uint8_t board_id(void)
+{
+ return -1;
+}
diff --git a/src/mainboard/google/purin/bootblock.c b/src/mainboard/google/purin/bootblock.c
new file mode 100644
index 0000000..33fd655
--- /dev/null
+++ b/src/mainboard/google/purin/bootblock.c
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 20145Google 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 <bootblock_common.h>
+
+void bootblock_mainboard_init(void)
+{
+}
diff --git a/src/mainboard/google/purin/chromeos.c b/src/mainboard/google/purin/chromeos.c
new file mode 100644
index 0000000..3ebf516
--- /dev/null
+++ b/src/mainboard/google/purin/chromeos.c
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 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 <boot/coreboot_tables.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+
+void fill_lb_gpios(struct lb_gpios *gpios)
+{
+}
+
+int get_developer_mode_switch(void)
+{
+ return 0;
+}
+
+int get_recovery_mode_switch(void)
+{
+ return 0;
+}
+
+int get_write_protect_state(void)
+{
+ return 0;
+}
+
diff --git a/src/mainboard/google/purin/devicetree.cb b/src/mainboard/google/purin/devicetree.cb
new file mode 100644
index 0000000..053235d
--- /dev/null
+++ b/src/mainboard/google/purin/devicetree.cb
@@ -0,0 +1,23 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright 2015 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
+##
+
+# TODO fill with Versatile Express board data in QEMU.
+chip soc/broadcom/cygnus
+ device cpu_cluster 0 on end
+end
diff --git a/src/mainboard/google/purin/mainboard.c b/src/mainboard/google/purin/mainboard.c
new file mode 100644
index 0000000..319cb29
--- /dev/null
+++ b/src/mainboard/google/purin/mainboard.c
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 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 <device/device.h>
+#include <boot/coreboot_tables.h>
+
+static void mainboard_init(device_t dev)
+{
+}
+
+static void mainboard_enable(device_t dev)
+{
+ dev->ops->init = &mainboard_init;
+}
+
+struct chip_operations mainboard_ops = {
+ .enable_dev = mainboard_enable,
+};
+
+void lb_board(struct lb_header *header)
+{
+}
diff --git a/src/mainboard/google/purin/memlayout.ld b/src/mainboard/google/purin/memlayout.ld
new file mode 100644
index 0000000..ead7f47
--- /dev/null
+++ b/src/mainboard/google/purin/memlayout.ld
@@ -0,0 +1 @@
+#include <soc/memlayout.ld>
diff --git a/src/mainboard/google/purin/reset.c b/src/mainboard/google/purin/reset.c
new file mode 100644
index 0000000..567ac18
--- /dev/null
+++ b/src/mainboard/google/purin/reset.c
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 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 <reset.h>
+
+void hard_reset(void)
+{
+ while (1)
+ ;
+}
More information about the coreboot-gerrit
mailing list