diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2013-09-26 16:44:14 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2014-02-03 16:31:05 +0100 |
commit | ebe3b3cfe212a2e985e12f1ab93bdef4487733f5 (patch) | |
tree | 5bdac88a1a9667305e67853f784cbabc704e2ed8 /src/soc/intel/baytrail/ramstage.c | |
parent | c8f54a1109072706e2fa091dc9ab4ad3eb057b42 (diff) | |
download | coreboot-ebe3b3cfe212a2e985e12f1ab93bdef4487733f5.tar.xz |
baytrail: Add GPIO initial configuration infrastructure.
During ramstage, call mainboard_get_gpios to get initial GPIO configuration
from the mainboard code, then initialize GPIOs as requested.
BUG=chrome-os-partner:22863
TEST=Manual. Using bayleybay GPIO table, set UART GPIOs to 'function 1',
and verify UART still works after GPIO configuration. Also, verify
legacy GPIO config is functional by toggling test pin.
Change-Id: Ic58d8ddd15c4dc48a751a83f6d26c7809c1efc42
Reviewed-on: https://chromium-review.googlesource.com/170306
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/4855
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/soc/intel/baytrail/ramstage.c')
-rw-r--r-- | src/soc/intel/baytrail/ramstage.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/baytrail/ramstage.c b/src/soc/intel/baytrail/ramstage.c index e30fc89bc2..10c030fcb3 100644 --- a/src/soc/intel/baytrail/ramstage.c +++ b/src/soc/intel/baytrail/ramstage.c @@ -31,6 +31,7 @@ #include <baytrail/msr.h> #include <baytrail/pci_devs.h> #include <baytrail/ramstage.h> +#include <baytrail/gpio.h> /* Global PATTRS */ DEFINE_PATTRS; @@ -101,7 +102,14 @@ static void fill_in_pattrs(void) fill_in_msr(&attrs->iacore_vids, MSR_IACORE_VIDS); } + void baytrail_init_pre_device(void) { + struct soc_gpio_config *config; + fill_in_pattrs(); + + /* Get GPIO initial states from mainboard */ + config = mainboard_get_gpios(); + setup_soc_gpios(config); } |