All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabien Lahoudere <fabien.lahoudere@collabora.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 1/6] board: ge: Remove EEPROM bus param from read_vpd()
Date: Wed, 17 Oct 2018 10:33:26 +0200	[thread overview]
Message-ID: <b59caedbbea80400452b9e2386e8804f218d195f.1539764688.git.fabien.lahoudere@collabora.com> (raw)
In-Reply-To: <cover.1539764688.git.fabien.lahoudere@collabora.com>

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(-)

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)
-- 
1.8.3.1

  reply	other threads:[~2018-10-17  8:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17  8:33 [U-Boot] [PATCH V3 0/6] board: ge: Move bootcount to EEPROM Fabien Lahoudere
2018-10-17  8:33 ` Fabien Lahoudere [this message]
2018-12-08 17:27   ` [U-Boot] [PATCH V3 1/6] board: ge: Remove EEPROM bus param from read_vpd() Stefano Babic
2018-10-17  8:33 ` [U-Boot] [PATCH V3 2/6] board: ge: Move VPD EEPROM configuration to the defconfig Fabien Lahoudere
2018-12-08 17:28   ` Stefano Babic
2018-10-17  8:33 ` [U-Boot] [PATCH V3 3/6] bootcount: i2c: Add bus switching to the I2C bootcount driver Fabien Lahoudere
2018-12-08 17:28   ` Stefano Babic
2018-10-17  8:33 ` [U-Boot] [PATCH V3 4/6] bootcount: Configure length limit for I2C bootcount Fabien Lahoudere
2018-12-08 17:28   ` Stefano Babic
2018-10-17  8:33 ` [U-Boot] [PATCH V3 5/6] board: ge: Move VPD reading to the vpd_reader Fabien Lahoudere
2018-12-08 17:30   ` Stefano Babic
2018-10-17  8:33 ` [U-Boot] [PATCH V3 6/6] board: ge: Store bootcount in EEPROM on PPD and Bx50v3 Fabien Lahoudere
2018-12-08 17:30   ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b59caedbbea80400452b9e2386e8804f218d195f.1539764688.git.fabien.lahoudere@collabora.com \
    --to=fabien.lahoudere@collabora.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.