[coreboot-gerrit] Change in coreboot[master]: google/kukui: Add SPI NOR support

Tristan Hsieh (Code Review) gerrit at coreboot.org
Mon Jul 16 17:40:36 CEST 2018


Tristan Hsieh has uploaded this change for review. ( https://review.coreboot.org/27499


Change subject: google/kukui: Add SPI NOR support
......................................................................

google/kukui: Add SPI NOR support

This patch set SPI flash related configs and init SPI bus 1 to support
SPI NOR flash.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui

Change-Id: I1a18a456f41a7c7daec954e961c9fbee3650493d
Signed-off-by: Tristan Shieh <tristan.shieh at mediatek.com>
---
M src/mainboard/google/kukui/Kconfig
M src/mainboard/google/kukui/Makefile.inc
A src/mainboard/google/kukui/bootblock.c
3 files changed, 28 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/27499/1

diff --git a/src/mainboard/google/kukui/Kconfig b/src/mainboard/google/kukui/Kconfig
index fa8099e..57266f2 100644
--- a/src/mainboard/google/kukui/Kconfig
+++ b/src/mainboard/google/kukui/Kconfig
@@ -11,6 +11,7 @@
 	select COMMON_CBFS_SPI_WRAPPER
 	select SPI_FLASH
 	select FATAL_ASSERTS
+	select SPI_FLASH_INCLUDE_ALL_DRIVERS
 
 config MAINBOARD_DIR
 	string
@@ -20,4 +21,8 @@
 	string
 	default "Kukui"
 
+config BOOT_DEVICE_SPI_FLASH_BUS
+	int
+	default 1
+
 endif
diff --git a/src/mainboard/google/kukui/Makefile.inc b/src/mainboard/google/kukui/Makefile.inc
index 2a68de0..e1fc54d 100644
--- a/src/mainboard/google/kukui/Makefile.inc
+++ b/src/mainboard/google/kukui/Makefile.inc
@@ -1,3 +1,4 @@
+bootblock-y += bootblock.c
 bootblock-y += memlayout.ld
 
 verstage-y += chromeos.c
diff --git a/src/mainboard/google/kukui/bootblock.c b/src/mainboard/google/kukui/bootblock.c
new file mode 100644
index 0000000..ebe72c2
--- /dev/null
+++ b/src/mainboard/google/kukui/bootblock.c
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 MediaTek 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.
+ */
+
+#include <bootblock_common.h>
+#include <soc/spi.h>
+
+void bootblock_mainboard_init(void)
+{
+	mtk_spi_init(CONFIG_BOOT_DEVICE_SPI_FLASH_BUS, SPI_PAD0_MASK, 6*MHz);
+}

-- 
To view, visit https://review.coreboot.org/27499
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a18a456f41a7c7daec954e961c9fbee3650493d
Gerrit-Change-Number: 27499
Gerrit-PatchSet: 1
Gerrit-Owner: Tristan Hsieh <tristan.shieh at mediatek.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180716/3fd8fe96/attachment.html>


More information about the coreboot-gerrit mailing list