Maulik V Vaghela has uploaded this change for review. ( https://review.coreboot.org/25865
Change subject: soc/intel/gspi: change SOC function name to maintain uniformity
......................................................................
soc/intel/gspi: change SOC function name to maintain uniformity
GSPI driver calls soc function to get soc specific configurations for
GSPI. SOC functions name starts with soc_<> but in this case naming
convention was not followed. Thus changing function name from
"gspi_get_soc_cfg" to "soc_get_gspi_cfg". This will maintain uniformity
inside soc folder.
Not modifying other functions name inside soc folder since other
functions are common across soc and we plan to move it to common block.
BUG=none
BRANCH=none
TEST= code compiles with different configurations.
Change-Id: I7efc706af4701df954d85c3b8aca79556c9786b3
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
---
M src/soc/intel/apollolake/gspi.c
M src/soc/intel/cannonlake/gspi.c
M src/soc/intel/common/block/gspi/gspi.c
M src/soc/intel/common/block/include/intelblocks/gspi.h
M src/soc/intel/skylake/gspi.c
5 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/25865/1
diff --git a/src/soc/intel/apollolake/gspi.c b/src/soc/intel/apollolake/gspi.c
index 6d5f8e5..4af7c95 100644
--- a/src/soc/intel/apollolake/gspi.c
+++ b/src/soc/intel/apollolake/gspi.c
@@ -22,7 +22,7 @@
#include <soc/pci_devs.h>
#include "chip.h"
-const struct gspi_cfg *gspi_get_soc_cfg(void)
+const struct gspi_cfg *soc_get_gspi_cfg(void)
{
DEVTREE_CONST struct soc_intel_apollolake_config *config;
int devfn = SA_DEVFN_ROOT;
diff --git a/src/soc/intel/cannonlake/gspi.c b/src/soc/intel/cannonlake/gspi.c
index e4f682d..327cbb8 100644
--- a/src/soc/intel/cannonlake/gspi.c
+++ b/src/soc/intel/cannonlake/gspi.c
@@ -22,7 +22,7 @@
#include <soc/pci_devs.h>
#include "chip.h"
-const struct gspi_cfg *gspi_get_soc_cfg(void)
+const struct gspi_cfg *soc_get_gspi_cfg(void)
{
DEVTREE_CONST struct soc_intel_cannonlake_config *config;
int devfn = SA_DEVFN_ROOT;
diff --git a/src/soc/intel/common/block/gspi/gspi.c b/src/soc/intel/common/block/gspi/gspi.c
index 175fad8..745c57b 100644
--- a/src/soc/intel/common/block/gspi/gspi.c
+++ b/src/soc/intel/common/block/gspi/gspi.c
@@ -130,7 +130,7 @@
{
unsigned int gspi_bus;
const unsigned int gspi_max = CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX;
- const struct gspi_cfg *cfg = gspi_get_soc_cfg();
+ const struct gspi_cfg *cfg = soc_get_gspi_cfg();
int devfn;
uintptr_t gspi_base_addr;
@@ -202,7 +202,7 @@
static uint32_t gspi_get_bus_clk_mhz(unsigned int gspi_bus)
{
- const struct gspi_cfg *cfg = gspi_get_soc_cfg();
+ const struct gspi_cfg *cfg = soc_get_gspi_cfg();
if (!cfg)
return 0;
return cfg[gspi_bus].speed_mhz;
diff --git a/src/soc/intel/common/block/include/intelblocks/gspi.h b/src/soc/intel/common/block/include/intelblocks/gspi.h
index 4e10e25..0e1c475 100644
--- a/src/soc/intel/common/block/include/intelblocks/gspi.h
+++ b/src/soc/intel/common/block/include/intelblocks/gspi.h
@@ -34,7 +34,7 @@
/* SoC-callbacks */
/* Get gspi_config array from SoC. Returns NULL in case of error. */
-const struct gspi_cfg *gspi_get_soc_cfg(void);
+const struct gspi_cfg *soc_get_gspi_cfg(void);
/* Get base address for early init of GSPI controllers. */
uintptr_t gspi_get_soc_early_base(void);
diff --git a/src/soc/intel/skylake/gspi.c b/src/soc/intel/skylake/gspi.c
index 252be777..46c0e61 100644
--- a/src/soc/intel/skylake/gspi.c
+++ b/src/soc/intel/skylake/gspi.c
@@ -21,7 +21,7 @@
#include <soc/iomap.h>
#include "chip.h"
-const struct gspi_cfg *gspi_get_soc_cfg(void)
+const struct gspi_cfg *soc_get_gspi_cfg(void)
{
DEVTREE_CONST struct soc_intel_skylake_config *config;
int devfn = SA_DEVFN_ROOT;
--
To view, visit https://review.coreboot.org/25865
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7efc706af4701df954d85c3b8aca79556c9786b3
Gerrit-Change-Number: 25865
Gerrit-PatchSet: 1
Gerrit-Owner: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
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(a)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);
--
To view, visit https://review.coreboot.org/25864
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7733d8b8d76b86c5cb74339953152d07299d9bb
Gerrit-Change-Number: 25864
Gerrit-PatchSet: 1
Gerrit-Owner: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>