From patchwork Tue Dec 23 13:08:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Longchamp X-Patchwork-Id: 423699 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 90AA814009B for ; Wed, 24 Dec 2014 00:09:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98A9D4B6DE; Tue, 23 Dec 2014 14:09:35 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rG3+704gF3Hn; Tue, 23 Dec 2014 14:09:35 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 671C24B700; Tue, 23 Dec 2014 14:09:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 888794B69A for ; Tue, 23 Dec 2014 14:09:06 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sCgaE72FlOxv for ; Tue, 23 Dec 2014 14:09:06 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-de.keymile.com (mail-de.keymile.com [195.8.104.250]) by theia.denx.de (Postfix) with ESMTPS id 0D9C14B6A1 for ; Tue, 23 Dec 2014 14:09:02 +0100 (CET) Received: from frodo.de.keymile.net ([10.9.1.54]:40130 helo=mailrelay.de.keymile.net) by mail-de.keymile.com with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1Y3PCu-00032N-1K for u-boot@lists.denx.de; Tue, 23 Dec 2014 14:09:00 +0100 Received: from ch10650.keymile.net (ch10650.keymile.net [172.31.40.247]) by mailrelay.de.keymile.net (8.12.2/8.12.2) with ESMTP id sBND8voI029339; Tue, 23 Dec 2014 14:08:59 +0100 (MET) From: Valentin Longchamp To: u-boot@lists.denx.de Date: Tue, 23 Dec 2014 14:08:57 +0100 Message-Id: <1419340137-16855-6-git-send-email-valentin.longchamp@keymile.com> X-Mailer: git-send-email 1.8.0.1 In-Reply-To: <1419340137-16855-1-git-send-email-valentin.longchamp@keymile.com> References: <1419340137-16855-1-git-send-email-valentin.longchamp@keymile.com> Cc: Valentin Longchamp , Holger Brunck Subject: [U-Boot] [PATCH 5/5] KM/IVM: remove ivm_read_eeprom(void) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- 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(-) 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; }