diff options
author | Richard Spiegel <richard.spiegel@silverbackltd.com> | 2017-11-24 07:56:33 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-12-07 17:19:29 +0000 |
commit | 9d0aa99c5ef1ffb4458f6a3070444cf8bf572ccd (patch) | |
tree | 0a2874e3313239f86aa2c92029fda5c71e9c48e0 /src/mainboard/google/kahlee/ec.c | |
parent | b5f96459276f2f13cdc62353a2cffd959dd97672 (diff) |
kahlee/ec.c: Use new wide IO function
In preparation to deleting early_setup,c, change early_ec_init() to use new
southbridge.c function sb_set_wideio_range and remove <#ifdef __PRE_RAM__>.
BUG=b:64033893
TEST=Build, boot and check serial output, search for "Covered by wideIO xx",
which should match earlier message "Range assigned to wide IO xx" generated
within modified early_ec_init().
Change-Id: Iaea17f4f636aab6bd8b05b1b3bed53a677164e74
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22591
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/mainboard/google/kahlee/ec.c')
-rw-r--r-- | src/mainboard/google/kahlee/ec.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mainboard/google/kahlee/ec.c b/src/mainboard/google/kahlee/ec.c index 3f309eb20d..d2933a6b30 100644 --- a/src/mainboard/google/kahlee/ec.c +++ b/src/mainboard/google/kahlee/ec.c @@ -36,9 +36,9 @@ static void ramstage_ec_init(void) static void early_ec_init(void) { -#ifdef __PRE_RAM__ uint16_t ec_ioport_base; size_t ec_ioport_size; + int status; /* * Set up LPC decoding for the ChromeEC I/O port ranges: @@ -50,8 +50,11 @@ static void early_ec_init(void) printk(BIOS_DEBUG, "LPC Setup google_chromeec_ioport_range: %04x, %08zx\n", ec_ioport_base, ec_ioport_size); - lpc_wideio_512_window(ec_ioport_base); -#endif //_PRE_RAM_ + status = sb_set_wideio_range(ec_ioport_base, ec_ioport_size); + if (status == WIDEIO_RANGE_ERROR) + printk(BIOS_WARNING, "ERROR: Failed to assign a range\n"); + else + printk(BIOS_DEBUG, "Range assigned to wide IO %d\n", status); } void mainboard_ec_init(void) |