[coreboot-gerrit] Change in coreboot[master]: kahlee/ec.c: Use new wide IO function
Richard Spiegel (Code Review)
gerrit at coreboot.org
Fri Nov 24 16:00:49 CET 2017
Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/22591
Change subject: kahlee/ec.c: Use new wide IO function
......................................................................
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
Change-Id: Iaea17f4f636aab6bd8b05b1b3bed53a677164e74
Signed-off-by: Richard Spiegel <richard.spiegel at silverbackltd.com>
---
M src/mainboard/google/kahlee/ec.c
1 file changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/22591/1
diff --git a/src/mainboard/google/kahlee/ec.c b/src/mainboard/google/kahlee/ec.c
index 3f309eb..bbe989d 100644
--- a/src/mainboard/google/kahlee/ec.c
+++ b/src/mainboard/google/kahlee/ec.c
@@ -36,9 +36,9 @@
static void early_ec_init(void)
{
-#ifdef __PRE_RAM__
uint16_t ec_ioport_base;
size_t ec_ioport_size;
+ uint8_t status;
/*
* Set up LPC decoding for the ChromeEC I/O port ranges:
@@ -50,8 +50,11 @@
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 == WIDE_IO_RANGE_FAILED)
+ 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)
--
To view, visit https://review.coreboot.org/22591
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaea17f4f636aab6bd8b05b1b3bed53a677164e74
Gerrit-Change-Number: 22591
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel at silverbackltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171124/5425c0b5/attachment-0001.html>
More information about the coreboot-gerrit
mailing list