Maulik V Vaghela has uploaded this change for review. ( https://review.coreboot.org/25864
Change subject: src/drivers/i2c: Change soc function name to maintain uniformity ......................................................................
src/drivers/i2c: Change soc function name to maintain uniformity
I2C driver calls soc function to get configuration data related to soc. Ideally all soc function names start with convention soc_<>. So changing function name from "dw_i2c_get_soc_cfg" to "soc_get_dw_i2c_cfg" so that function name convention inside soc is maintained.
Only changing one function name as of now since we plan to move other functions to common block instead of keeping them inside soc folder.
BUG=none BRANCH=none TEST= Code compiles with different configurations.
Change-Id: Id7733d8b8d76b86c5cb74339953152d07299d9bb Signed-off-by: Maulik V Vaghela maulik.v.vaghela@intel.com --- M src/drivers/i2c/designware/dw_i2c.c M src/drivers/i2c/designware/dw_i2c.h M src/soc/amd/stoneyridge/i2c.c M src/soc/intel/apollolake/i2c.c M src/soc/intel/cannonlake/i2c.c M src/soc/intel/common/block/i2c/i2c_early.c M src/soc/intel/skylake/i2c.c 7 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/25864/1
diff --git a/src/drivers/i2c/designware/dw_i2c.c b/src/drivers/i2c/designware/dw_i2c.c index 12284b6..fa99bda 100644 --- a/src/drivers/i2c/designware/dw_i2c.c +++ b/src/drivers/i2c/designware/dw_i2c.c @@ -793,7 +793,7 @@ if (bus < 0) return;
- config = dw_i2c_get_soc_cfg(bus); + config = soc_get_dw_i2c_cfg(bus);
if (!config) return; @@ -827,7 +827,7 @@ if (bus < 0) return;
- bcfg = dw_i2c_get_soc_cfg(bus); + bcfg = soc_get_dw_i2c_cfg(bus);
if (!bcfg) return; diff --git a/src/drivers/i2c/designware/dw_i2c.h b/src/drivers/i2c/designware/dw_i2c.h index ccdb3d2..547bb93 100644 --- a/src/drivers/i2c/designware/dw_i2c.h +++ b/src/drivers/i2c/designware/dw_i2c.h @@ -102,7 +102,7 @@ * * Returns NULL if i2c config is not found */ -const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus); +const struct dw_i2c_bus_config *soc_get_dw_i2c_cfg(unsigned int bus);
/* Get I2C controller base address */ uintptr_t dw_i2c_base_address(unsigned int bus); diff --git a/src/soc/amd/stoneyridge/i2c.c b/src/soc/amd/stoneyridge/i2c.c index b90e5d7..a79752b 100644 --- a/src/soc/amd/stoneyridge/i2c.c +++ b/src/soc/amd/stoneyridge/i2c.c @@ -56,7 +56,7 @@ return dev->chip_info; }
-const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus) +const struct dw_i2c_bus_config *soc_get_dw_i2c_cfg(unsigned int bus) { const struct soc_amd_stoneyridge_config *config;
diff --git a/src/soc/intel/apollolake/i2c.c b/src/soc/intel/apollolake/i2c.c index 3df333c..04a235d 100644 --- a/src/soc/intel/apollolake/i2c.c +++ b/src/soc/intel/apollolake/i2c.c @@ -21,7 +21,7 @@ #include <soc/pci_devs.h> #include "chip.h"
-const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus) +const struct dw_i2c_bus_config *soc_get_dw_i2c_cfg(unsigned int bus) { const struct soc_intel_apollolake_config *config; const struct device *dev = dev_find_slot(0, SA_DEVFN_ROOT); diff --git a/src/soc/intel/cannonlake/i2c.c b/src/soc/intel/cannonlake/i2c.c index ef30345..07713ae 100644 --- a/src/soc/intel/cannonlake/i2c.c +++ b/src/soc/intel/cannonlake/i2c.c @@ -22,7 +22,7 @@ #include <soc/pci_devs.h> #include "chip.h"
-const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus) +const struct dw_i2c_bus_config *soc_get_dw_i2c_cfg(unsigned int bus) { const struct soc_intel_cannonlake_config *config; const struct device *dev = dev_find_slot(0, SA_DEVFN_ROOT); diff --git a/src/soc/intel/common/block/i2c/i2c_early.c b/src/soc/intel/common/block/i2c/i2c_early.c index c4af559..6e6a753 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 @@ }
/* Skip if not enabled for early init */ - config = dw_i2c_get_soc_cfg(bus); + config = soc_get_dw_i2c_cfg(bus); if (!config || !config->early_init) { printk(BIOS_DEBUG, "I2C%u not enabled for early init\n", bus); return -1; diff --git a/src/soc/intel/skylake/i2c.c b/src/soc/intel/skylake/i2c.c index baf6335..ed8a774 100644 --- a/src/soc/intel/skylake/i2c.c +++ b/src/soc/intel/skylake/i2c.c @@ -20,7 +20,7 @@ #include <soc/pci_devs.h> #include "chip.h"
-const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus) +const struct dw_i2c_bus_config *soc_get_dw_i2c_cfg(unsigned int bus) { const struct soc_intel_skylake_config *config; const struct device *dev = dev_find_slot(0, SA_DEVFN_ROOT);