From b94a27506ebd027214124985301b553c710292af Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 24 Jan 2018 16:58:18 -0700 Subject: drivers/i2c/designware: reduce API complication for bus config Right now dw_i2c_get_soc_cfg() is expecting the SoC to implement that callback for obtaining the bus config. However, we're currently forcing another parameter of struct device so one can do the lookup. This works for Intel-based systems since the struct device was needed to program the BAR, etc. However, from an API standpoint, it just complicates matters by needing to obtain the struct device. The SoC already has knowlege of its own devices so it can get the config itself by bus number. Therefore, remove that contraint from the API. BUG=b:70232394 Change-Id: Id8558f5deedda0963a46a532a7bf984e168fb270 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/23420 Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/soc/intel/common/block/i2c/i2c_early.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/block/i2c/i2c_early.c b/src/soc/intel/common/block/i2c/i2c_early.c index 728e7880b5..c4af55967a 100644 --- a/src/soc/intel/common/block/i2c/i2c_early.c +++ b/src/soc/intel/common/block/i2c/i2c_early.c @@ -47,7 +47,7 @@ static int lpss_i2c_early_init_bus(unsigned int bus) } /* Skip if not enabled for early init */ - config = dw_i2c_get_soc_cfg(bus, tree_dev); + config = dw_i2c_get_soc_cfg(bus); if (!config || !config->early_init) { printk(BIOS_DEBUG, "I2C%u not enabled for early init\n", bus); return -1; -- cgit v1.2.3