[coreboot-gerrit] New patch to review for coreboot: Kconfig: lay groundwork for not assuming SPI flash boot device
Aaron Durbin (adurbin@chromium.org)
gerrit at coreboot.org
Fri Aug 12 20:19:40 CEST 2016
Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16191
-gerrit
commit 9e956553d34f24e5d6dbd81b353d13d26c907beb
Author: Aaron Durbin <adurbin at chromium.org>
Date: Thu Aug 11 11:02:26 2016 -0500
Kconfig: lay groundwork for not assuming SPI flash boot device
Almost all boards and chipsets within the codebase assume or
use SPI flash as the boot device. Therefore, provide an option
for the boards/chipsets which don't currently support SPI flash
as the boot device. The default is to assume SPI flash is the
boot device unless otherwise instructed. This falls in line
with the current assumptions, but it also allows one to
differentiate a platform desiring SPI flash support while it not
being the actual boot device.
BUG=chrome-os-partner:56151
Change-Id: Id4e0b4ec5e440e41421fbb6d0ca2be4185b62a6e
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
src/Kconfig | 12 ++++++++++++
src/cpu/allwinner/a10/Kconfig | 1 +
src/cpu/ti/am335x/Kconfig | 1 +
src/drivers/spi/Kconfig | 1 +
src/mainboard/emulation/qemu-armv7/Kconfig | 1 +
src/mainboard/emulation/qemu-power8/Kconfig | 1 +
src/mainboard/emulation/qemu-riscv/Kconfig | 1 +
src/mainboard/emulation/spike-riscv/Kconfig | 1 +
8 files changed, 19 insertions(+)
diff --git a/src/Kconfig b/src/Kconfig
index 3af2769..04b8d24 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -471,6 +471,18 @@ endmenu
source "src/acpi/Kconfig"
+# This option is for the current boards/chipsets where SPI flash
+# is not the boot device. Currently nearly all boards/chipsets assume
+# SPI flash is the boot device.
+config BOOT_DEVICE_NOT_SPI_FLASH
+ bool
+ default n
+
+config BOOT_DEVICE_SPI_FLASH
+ bool
+ default y if !BOOT_DEVICE_NOT_SPI_FLASH
+ default n
+
config RTC
bool
default n
diff --git a/src/cpu/allwinner/a10/Kconfig b/src/cpu/allwinner/a10/Kconfig
index 0e5aba9..6451b4a 100644
--- a/src/cpu/allwinner/a10/Kconfig
+++ b/src/cpu/allwinner/a10/Kconfig
@@ -14,5 +14,6 @@ config CPU_SPECIFIC_OPTIONS
select HAVE_UART_SPECIAL
select BOOTBLOCK_CONSOLE
select UART_OVERRIDE_REFCLK
+ select BOOT_DEVICE_NOT_SPI_FLASH
endif # if CPU_ALLWINNER_A10
diff --git a/src/cpu/ti/am335x/Kconfig b/src/cpu/ti/am335x/Kconfig
index f44c69d..939bca7 100644
--- a/src/cpu/ti/am335x/Kconfig
+++ b/src/cpu/ti/am335x/Kconfig
@@ -8,5 +8,6 @@ config CPU_TI_AM335X
select BOOTBLOCK_CONSOLE
select GENERIC_UDELAY
select UART_OVERRIDE_REFCLK
+ select BOOT_DEVICE_NOT_SPI_FLASH
bool
default n
diff --git a/src/drivers/spi/Kconfig b/src/drivers/spi/Kconfig
index 194e61f..35435a6 100644
--- a/src/drivers/spi/Kconfig
+++ b/src/drivers/spi/Kconfig
@@ -15,6 +15,7 @@
config SPI_FLASH
bool
+ default y if BOOT_DEVICE_SPI_FLASH
default n
help
Select this option if your chipset driver needs to store certain
diff --git a/src/mainboard/emulation/qemu-armv7/Kconfig b/src/mainboard/emulation/qemu-armv7/Kconfig
index 2654f0f..e801ae3 100644
--- a/src/mainboard/emulation/qemu-armv7/Kconfig
+++ b/src/mainboard/emulation/qemu-armv7/Kconfig
@@ -31,6 +31,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select ARCH_ROMSTAGE_ARMV7
select ARCH_RAMSTAGE_ARMV7
select BOARD_ROMSIZE_KB_4096
+ select BOOT_DEVICE_NOT_SPI_FLASH
config MAINBOARD_DIR
string
diff --git a/src/mainboard/emulation/qemu-power8/Kconfig b/src/mainboard/emulation/qemu-power8/Kconfig
index 7946c3e..6adcf72 100644
--- a/src/mainboard/emulation/qemu-power8/Kconfig
+++ b/src/mainboard/emulation/qemu-power8/Kconfig
@@ -23,6 +23,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select ARCH_BOOTBLOCK_POWER8
select HAVE_UART_SPECIAL
select ARCH_POWER8
+ select BOOT_DEVICE_NOT_SPI_FLASH
config MAINBOARD_DIR
string
diff --git a/src/mainboard/emulation/qemu-riscv/Kconfig b/src/mainboard/emulation/qemu-riscv/Kconfig
index 37d787a..cd11f95 100644
--- a/src/mainboard/emulation/qemu-riscv/Kconfig
+++ b/src/mainboard/emulation/qemu-riscv/Kconfig
@@ -23,6 +23,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select BOARD_ROMSIZE_KB_4096
select ARCH_BOOTBLOCK_RISCV
select HAVE_UART_SPECIAL
+ select BOOT_DEVICE_NOT_SPI_FLASH
config MAINBOARD_DIR
string
diff --git a/src/mainboard/emulation/spike-riscv/Kconfig b/src/mainboard/emulation/spike-riscv/Kconfig
index a762220..574f23c 100644
--- a/src/mainboard/emulation/spike-riscv/Kconfig
+++ b/src/mainboard/emulation/spike-riscv/Kconfig
@@ -23,6 +23,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select BOARD_ROMSIZE_KB_4096
select ARCH_BOOTBLOCK_RISCV
select DRIVERS_UART_8250MEM
+ select BOOT_DEVICE_NOT_SPI_FLASH
config MAINBOARD_DIR
string
More information about the coreboot-gerrit
mailing list