diff mbox series

[U-Boot,V3,1/6] board: ge: Remove EEPROM bus param from read_vpd()

Message ID b59caedbbea80400452b9e2386e8804f218d195f.1539764688.git.fabien.lahoudere@collabora.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show
Series board: ge: Move bootcount to EEPROM | expand

Commit Message

Fabien Lahoudere Oct. 17, 2018, 8:33 a.m. UTC
From: Denis Zalevskiy <denis.zalevskiy@ge.com>

The bus is statically defined, so remove redundant parameters
from read_vpd() for PPD and Bx50v3.

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@ge.com>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
---
 board/ge/bx50v3/bx50v3.c   | 6 +++---
 board/ge/mx53ppd/mx53ppd.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Stefano Babic Dec. 8, 2018, 5:27 p.m. UTC | #1
Hi Fabien,

On 17/10/18 10:33, Fabien Lahoudere wrote:
> From: Denis Zalevskiy <denis.zalevskiy@ge.com>
> 
> The bus is statically defined, so remove redundant parameters
> from read_vpd() for PPD and Bx50v3.
> 
> Signed-off-by: Denis Zalevskiy <denis.zalevskiy@ge.com>
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
> ---
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index b2d065c..c3c6ded 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -623,14 +623,14 @@  static void process_vpd(struct vpd_cache *vpd)
 		eth_env_set_enetaddr_by_index("eth", i210_index, vpd->mac2);
 }
 
-static int read_vpd(uint eeprom_bus)
+static int read_vpd(void)
 {
 	int res;
 	int size = 1024;
 	uint8_t *data;
 	unsigned int current_i2c_bus = i2c_get_bus_num();
 
-	res = i2c_set_bus_num(eeprom_bus);
+	res = i2c_set_bus_num(CONFIG_SYS_I2C_EEPROM_BUS);
 	if (res < 0)
 		return res;
 
@@ -714,7 +714,7 @@  int board_init(void)
 	setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
 	setup_i2c(3, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3);
 
-	read_vpd(CONFIG_SYS_I2C_EEPROM_BUS);
+	read_vpd();
 
 	set_confidx(&vpd);
 
diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c
index cf278e8..62137f6 100644
--- a/board/ge/mx53ppd/mx53ppd.c
+++ b/board/ge/mx53ppd/mx53ppd.c
@@ -328,7 +328,7 @@  static void process_vpd(struct vpd_cache *vpd)
 		eth_env_set_enetaddr("ethaddr", vpd->mac1);
 }
 
-static int read_vpd(uint eeprom_bus)
+static int read_vpd(void)
 {
 	struct vpd_cache vpd;
 	int res;
@@ -336,7 +336,7 @@  static int read_vpd(uint eeprom_bus)
 	u8 *data;
 	unsigned int current_i2c_bus = i2c_get_bus_num();
 
-	res = i2c_set_bus_num(eeprom_bus);
+	res = i2c_set_bus_num(VPD_EEPROM_BUS);
 	if (res < 0)
 		return res;
 
@@ -390,7 +390,7 @@  int board_late_init(void)
 {
 	int res;
 
-	read_vpd(VPD_EEPROM_BUS);
+	read_vpd();
 
 	res = clock_1GHz();
 	if (res != 0)