diff mbox

[U-Boot,5/5] KM/IVM: remove ivm_read_eeprom(void)

Message ID 1419340137-16855-6-git-send-email-valentin.longchamp@keymile.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Valentin Longchamp Dec. 23, 2014, 1:08 p.m. UTC
This is not used anymore since the procedure was split into a simple
read function and a later alaysis.

The ivm_read_eeprom name is now used for the previous
ivm_simple_read_eeprom function.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>

---

 board/keymile/common/common.h   |  3 +--
 board/keymile/common/ivm.c      | 21 +--------------------
 board/keymile/km82xx/km82xx.c   |  2 +-
 board/keymile/km83xx/km83xx.c   |  2 +-
 board/keymile/km_arm/km_arm.c   |  2 +-
 board/keymile/kmp204x/kmp204x.c |  2 +-
 6 files changed, 6 insertions(+), 26 deletions(-)

Comments

Tom Rini Jan. 5, 2015, 6:47 p.m. UTC | #1
On Tue, Dec 23, 2014 at 02:08:57PM +0100, Valentin Longchamp wrote:

> This is not used anymore since the procedure was split into a simple
> read function and a later alaysis.
> 
> The ivm_read_eeprom name is now used for the previous
> ivm_simple_read_eeprom function.
> 
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>

This doesn't apply (but 1-4 does) because there's no
ivm_simple_read_eeprom today.  Or have I gone crazy?  Thanks!
Holger Brunck Jan. 6, 2015, 8:19 a.m. UTC | #2
On 01/05/2015 07:47 PM, Tom Rini wrote:
> On Tue, Dec 23, 2014 at 02:08:57PM +0100, Valentin Longchamp wrote:
> 
>> This is not used anymore since the procedure was split into a simple
>> read function and a later alaysis.
>>
>> The ivm_read_eeprom name is now used for the previous
>> ivm_simple_read_eeprom function.
>>
>> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> 
> This doesn't apply (but 1-4 does) because there's no
> ivm_simple_read_eeprom today.  Or have I gone crazy?  Thanks!
> 

you are right this is missing. I assume that there is a patch missing in his
serie. Unfortunately Valentin is not in until the end of january, so I propose
to skip this patch series for this merge window.

Regards
Holger
Valentin Longchamp Feb. 2, 2015, 3:55 p.m. UTC | #3
Hello Tom and Holger,

On 01/06/2015 09:19 AM, Brunck, Holger wrote:
> On 01/05/2015 07:47 PM, Tom Rini wrote:
>> On Tue, Dec 23, 2014 at 02:08:57PM +0100, Valentin Longchamp wrote:
>>
>>> This is not used anymore since the procedure was split into a simple
>>> read function and a later alaysis.
>>>
>>> The ivm_read_eeprom name is now used for the previous
>>> ivm_simple_read_eeprom function.
>>>
>>> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
>>
>> This doesn't apply (but 1-4 does) because there's no
>> ivm_simple_read_eeprom today.  Or have I gone crazy?  Thanks!
>>
> 
> you are right this is missing. I assume that there is a patch missing in his
> serie. Unfortunately Valentin is not in until the end of january, so I propose
> to skip this patch series for this merge window.
> 

Yes the first patch was missing. I have unfortunately not included it in my
first submission just before leaving for holiday. I am sending a V2 that fixes
this right now.

Sorry for the noise

Valentin
diff mbox

Patch

diff --git a/board/keymile/common/common.h b/board/keymile/common/common.h
index 7e16d25..dcfefc4 100644
--- a/board/keymile/common/common.h
+++ b/board/keymile/common/common.h
@@ -126,8 +126,7 @@  struct bfticu_iomap {
 #endif
 
 int ethernet_present(void);
-int ivm_read_eeprom(void);
-int ivm_simple_read_eeprom(unsigned char *buf, int len);
+int ivm_read_eeprom(unsigned char *buf, int len);
 int ivm_analyze_eeprom(unsigned char *buf, int len);
 
 int trigger_fpga_config(void);
diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index 932459a..0a3a2bf 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -315,7 +315,7 @@  static int ivm_populate_env(unsigned char *buf, int len)
 	return 0;
 }
 
-int ivm_simple_read_eeprom(unsigned char *buf, int len)
+int ivm_read_eeprom(unsigned char *buf, int len)
 {
 	int ret;
 
@@ -331,22 +331,3 @@  int ivm_simple_read_eeprom(unsigned char *buf, int len)
 
 	return ivm_populate_env(buf, len);
 }
-
-int ivm_read_eeprom(void);
-{
-	uchar i2c_buffer[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
-	int ret;
-
-	i2c_set_bus_num(CONFIG_KM_IVM_BUS);
-	/* add deblocking here */
-	i2c_make_abort();
-
-	ret = i2c_read(CONFIG_SYS_IVM_EEPROM_ADR, 0, 1, i2c_bufer,
-		CONFIG_SYS_IVM_EEPROM_MAX_LEN);
-	if (ret != 0) {
-		printf("Error reading EEprom\n");
-		return -2;
-	}
-
-	return ivm_analyze_eeprom(i2c_buffer, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
-}
diff --git a/board/keymile/km82xx/km82xx.c b/board/keymile/km82xx/km82xx.c
index c3a1131..c599b40 100644
--- a/board/keymile/km82xx/km82xx.c
+++ b/board/keymile/km82xx/km82xx.c
@@ -397,7 +397,7 @@  int board_early_init_r(void)
 
 int misc_init_r(void)
 {
-	ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
+	ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
 	return 0;
 }
 
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index fc68a2f..89e9e1e 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -192,7 +192,7 @@  int board_early_init_r(void)
 
 int misc_init_r(void)
 {
-	ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
+	ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
 	return 0;
 }
 
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 6eb6712..2938861 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -212,7 +212,7 @@  int misc_init_r(void)
 	}
 #endif
 
-	ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
+	ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
 
 	initialize_unit_leds();
 	set_km_env();
diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
index 0f544fb..eebb47f 100644
--- a/board/keymile/kmp204x/kmp204x.c
+++ b/board/keymile/kmp204x/kmp204x.c
@@ -197,7 +197,7 @@  int misc_init_r(void)
 		}
 	}
 
-	ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
+	ivm_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
 	return 0;
 }