board: ge: Remove EEPROM bus param from read_vpd()
authorDenis Zalevskiy <denis.zalevskiy@ge.com>
Wed, 17 Oct 2018 08:33:26 +0000 (10:33 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 17 Dec 2018 09:46:04 +0000 (10:46 +0100)
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
board/ge/mx53ppd/mx53ppd.c

index 245852510fa2e5c222abaa05fea10d2f8348b79d..7f32af3c0f2b994ae6bc1ff96f2181a4868915b8 100644 (file)
@@ -631,14 +631,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;
 
@@ -718,7 +718,7 @@ int board_init(void)
        setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
        setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3);
 
-       read_vpd(CONFIG_SYS_I2C_EEPROM_BUS);
+       read_vpd();
 
        set_confidx(&vpd);
 
index cf278e8f47c6fba5705f4598d7c82ac151c07db1..62137f6b28f5047e750bb2cb5b2ac4b30c036051 100644 (file)
@@ -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)