nyan: Create kconfig variables for each SDRAM config.

Instead of choosing between SDRAM configurations for rev0 nyans and everything
else (currently only rev1), we should create a kconfig for each possible config
and put them inside a "choice" block. That way we can have an arbitrarily large
number of choices without them getting to be hard to manage or accidentally not
being mutually exclusive. This also makes the choice of SDRAM config more
explicit instead of it being implied by what rev you're compiled for.

One tradeoff of this approach is that you need to know which config goes with
which rev. Unfortunately we can't decide using the board ID like we can for
most other things because the BCT is consumed by code we don't control before
any of our own code runs.

We default to the slower config for safety's sake, because it will work on
both boards, and because it's the right config for the norrin which we were
going to transition to soon anyway.

Also, we can eliminate the NYAN_IN_A_PIXEL kconfig variable. Alas, we hardly
knew ye.

BUG=None
TEST=Built and booted on both types of nyan.
BRANCH=None

Change-Id: I9a630189e001e95c740c6741057511bf5939fdbb
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/177580
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Ronald Minnich <rminnich@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
Gabe Black 2013-11-21 00:50:53 -08:00 committed by chrome-internal-fetch
commit d7ddcf262a
3 changed files with 15 additions and 9 deletions

View file

@ -1,6 +1,5 @@
CONFIG_VENDOR_GOOGLE=y
CONFIG_BOARD_GOOGLE_NYAN=y
CONFIG_NYAN_IN_A_PIXEL=y
CONFIG_COREBOOT_ROMSIZE_KB_1024=y
# CONFIG_CONSOLE_SERIAL is not set
CONFIG_COLLECT_TIMESTAMPS=y

View file

@ -88,8 +88,18 @@ config EC_GOOGLE_CHROMEEC_SPI_BUS
hex
default 1
config NYAN_IN_A_PIXEL
bool "Nyan in a pixel case"
default n
choice
prompt "BCT sdram configuration"
default BCT_SDRAM_792
help
The SDRAM configuration to put in the BCT.
config BCT_SDRAM_792
bool "792 MHz"
config BCT_SDRAM_924
bool "924 MHz"
endchoice
endif # BOARD_GOOGLE_NYAN

View file

@ -20,8 +20,5 @@
bct-cfg-$(CONFIG_BCT_CFG_EMMC) += emmc.cfg
bct-cfg-$(CONFIG_BCT_CFG_SPI) += spi.cfg
bct-cfg-y += odmdata.cfg
ifeq ($(CONFIG_NYAN_IN_A_PIXEL),y)
bct-cfg-y += sdram-924.cfg
else
bct-cfg-y += sdram-792.cfg
endif
bct-cfg-$(CONFIG_BCT_SDRAM_924) += sdram-924.cfg
bct-cfg-$(CONFIG_BCT_SDRAM_792) += sdram-792.cfg