diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2016-05-11 15:03:44 +0800 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-05-18 20:20:30 +0200 |
commit | 2832c4125bb74cf09414df23f54e0b87ab8bce7b (patch) | |
tree | 8c85c209dc30818c71737a62a0eb5c6d73be85dc /src | |
parent | 728fffd33c15be30b14373f1d4f2c98006bf27a3 (diff) |
gru: set correct gpio for SD card detect
The only outlier at this time is Kevin rev 0, treat it specially, the
rest of the targets use the same GPIO.
BRANCH=none
BUG=none
TEST=gru still boots off SD card just fine
Change-Id: Ic603093a990d27166b16175db3303f155b4775aa
Signed-off-by: Martin Roth <martinroth@google.com>
Original-Commit-Id: 5788c5add1d1f803e7b22fb53215b6003ac04d03
Original-Change-Id: Ic5183f08dd1119f9588f243bd9e9c080d84687f9
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/344151
Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/14851
Tested-by: build bot (Jenkins)
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/gru/mainboard.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c index e91f289759..b7a197ee8b 100644 --- a/src/mainboard/google/gru/mainboard.c +++ b/src/mainboard/google/gru/mainboard.c @@ -24,19 +24,13 @@ static void configure_sdmmc(void) { gpio_output(GPIO(4, D, 5), 1); /* SDMMC_PWR_EN */ gpio_output(GPIO(2, A, 2), 1); /* SDMMC_SDIO_PWR_EN */ - /* - * SDMMC_DET_L is different on different board revisions. - * Ideally this and other deviations should come from a table - * which could be looked up by board revision. - */ - switch (board_id()) { - case 0: /* This is for Kevin proto 1. */ + + /* SDMMC_DET_L is different on Kevin board revision 0. */ + if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN) && (board_id() == 0)) gpio_input(GPIO(4, D, 2)); - break; - default: + else gpio_input(GPIO(4, D, 0)); - break; - } + gpio_output(GPIO(2, D, 4), 0); /* Keep the max voltage */ write32(&rk3399_grf->iomux_sdmmc, IOMUX_SDMMC); |