From 9d0aa99c5ef1ffb4458f6a3070444cf8bf572ccd Mon Sep 17 00:00:00 2001 From: Richard Spiegel Date: Fri, 24 Nov 2017 07:56:33 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/22591 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/google/kahlee/ec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/mainboard/google/kahlee') 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) -- cgit v1.2.3