From patchwork Thu Aug 8 09:14:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengzhou Liu X-Patchwork-Id: 265686 X-Patchwork-Delegate: yorksun@freescale.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 540D22C00A7 for ; Thu, 8 Aug 2013 20:13:56 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DFBC54A018; Thu, 8 Aug 2013 12:13:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 4tupWbRhR1Ty; Thu, 8 Aug 2013 12:13:51 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2269E4A019; Thu, 8 Aug 2013 12:13:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 578334A019 for ; Thu, 8 Aug 2013 12:13:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 L7yBKtN0C+nk for ; Thu, 8 Aug 2013 12:13:37 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe001.messaging.microsoft.com [216.32.181.181]) by theia.denx.de (Postfix) with ESMTPS id 2CD9F4A018 for ; Thu, 8 Aug 2013 12:13:29 +0200 (CEST) Received: from mail189-ch1-R.bigfish.com (10.43.68.232) by CH1EHSOBE022.bigfish.com (10.43.70.79) with Microsoft SMTP Server id 14.1.225.22; Thu, 8 Aug 2013 10:13:25 +0000 Received: from mail189-ch1 (localhost [127.0.0.1]) by mail189-ch1-R.bigfish.com (Postfix) with ESMTP id C328230008A for ; Thu, 8 Aug 2013 10:13:25 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h8275bh1de097hz2dh2a8h668h839he5bhf0ah1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1155h) Received: from mail189-ch1 (localhost.localdomain [127.0.0.1]) by mail189-ch1 (MessageSwitch) id 1375956804781834_13200; Thu, 8 Aug 2013 10:13:24 +0000 (UTC) Received: from CH1EHSMHS042.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.237]) by mail189-ch1.bigfish.com (Postfix) with ESMTP id B18FC4E004A for ; Thu, 8 Aug 2013 10:13:24 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS042.bigfish.com (10.43.69.251) with Microsoft SMTP Server (TLS) id 14.16.227.3; Thu, 8 Aug 2013 10:13:24 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.3.136.1; Thu, 8 Aug 2013 10:13:23 +0000 Received: from localhost.localdomain (tank.ap.freescale.net [10.193.20.104]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r78ADLds022679; Thu, 8 Aug 2013 03:13:22 -0700 From: Shengzhou Liu To: Date: Thu, 8 Aug 2013 17:14:53 +0800 Message-ID: <1375953293-1060-1-git-send-email-Shengzhou.Liu@freescale.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Subject: [U-Boot] [PATCH] powerpc/eeprom: update MAX_NUM_PORTS to fix program failure X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de On some boards, the size of EEPROM is 128 Bytes instead of 256. so we set default MAX_NUM_PORTS to 9 rather than previous 23 to avoid the programming failure, we can define MAX_NUM_PORTS in board-specific header file to overwrite the default value. Signed-off-by: Shengzhou Liu --- board/freescale/common/sys_eeprom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index d2ed036..6bfc376 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -34,7 +34,9 @@ #endif #ifdef CONFIG_SYS_I2C_EEPROM_NXID -#define MAX_NUM_PORTS 23 +#ifndef MAX_NUM_PORTS +#define MAX_NUM_PORTS 9 +#endif #define NXID_VERSION 1 #endif