From patchwork Thu Aug 16 00:53:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 177884 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 9DBA62C0096 for ; Thu, 16 Aug 2012 10:54:15 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5BB7C28161; Thu, 16 Aug 2012 02:54:12 +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 DRpwcle3OErd; Thu, 16 Aug 2012 02:54:12 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 15B1F2816C; Thu, 16 Aug 2012 02:54:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2025A2816C for ; Thu, 16 Aug 2012 02:54:08 +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 h+Y1sK50pC3O for ; Thu, 16 Aug 2012 02:54:06 +0200 (CEST) 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 ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com [216.32.181.184]) by theia.denx.de (Postfix) with ESMTPS id C43C528161 for ; Thu, 16 Aug 2012 02:54:03 +0200 (CEST) Received: from mail20-ch1-R.bigfish.com (10.43.68.250) by CH1EHSOBE004.bigfish.com (10.43.70.54) with Microsoft SMTP Server id 14.1.225.23; Thu, 16 Aug 2012 00:54:00 +0000 Received: from mail20-ch1 (localhost [127.0.0.1]) by mail20-ch1-R.bigfish.com (Postfix) with ESMTP id 1A3A720037E; Thu, 16 Aug 2012 00:54:00 +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(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bhf0ah107ah) Received: from mail20-ch1 (localhost.localdomain [127.0.0.1]) by mail20-ch1 (MessageSwitch) id 1345078438717569_20196; Thu, 16 Aug 2012 00:53:58 +0000 (UTC) Received: from CH1EHSMHS010.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.249]) by mail20-ch1.bigfish.com (Postfix) with ESMTP id AD3D34E0056; Thu, 16 Aug 2012 00:53:58 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS010.bigfish.com (10.43.70.10) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 16 Aug 2012 00:53:58 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.2.298.5; Wed, 15 Aug 2012 19:53:57 -0500 Received: from localhost.localdomain ([10.214.82.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q7G0rugO022223; Wed, 15 Aug 2012 17:53:56 -0700 From: York Sun To: Date: Wed, 15 Aug 2012 17:53:56 -0700 Message-ID: <1345078436-25476-1-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: afleming@gmail.com, York Sun Subject: [U-Boot] [PATCH] hwconfig: Move HWCONFIG_BUFFER_SIZE into hwconfig.h 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 Before proper environment is setup, we extract hwconfig and put it into a buffer with size HWCONFIG_BUFFER_SIZE. We need to enlarge the buffer to accommodate longer string. Since this macro is used in multiple files, we move it into hwconfig.h. Signed-off-by: York Sun --- arch/powerpc/cpu/mpc85xx/cpu_init.c | 2 -- arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 2 -- arch/powerpc/cpu/mpc8xxx/ddr/options.c | 1 - include/hwconfig.h | 2 ++ 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index c13c45f..2397547 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -56,8 +56,6 @@ #include "../../../../drivers/block/fsl_sata.h" -#define HWCONFIG_BUFFER_SIZE 128 - DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_SECURE_BOOT diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c index 9300e7f..69399aa 100644 --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c @@ -46,8 +46,6 @@ static u32 serdes_prtcl_map; -#define HWCONFIG_BUFFER_SIZE 128 - #ifdef DEBUG static const char *serdes_prtcl_str[] = { [NONE] = "NA", diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/options.c b/arch/powerpc/cpu/mpc8xxx/ddr/options.c index 00ec57b..24c8a51 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/options.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/options.c @@ -19,7 +19,6 @@ * This is pretty fragile on both the use of stack and if the buffer is big * enough. However we will get a warning from getenv_f for the later. */ -#define HWCONFIG_BUFFER_SIZE 128 /* Board-specific functions defined in each board's ddr.c */ extern void fsl_ddr_board_options(memctl_options_t *popts, diff --git a/include/hwconfig.h b/include/hwconfig.h index a037ed8..64861c4 100644 --- a/include/hwconfig.h +++ b/include/hwconfig.h @@ -18,6 +18,8 @@ #include #include +#define HWCONFIG_BUFFER_SIZE 256 + #ifdef CONFIG_HWCONFIG extern int hwconfig_f(const char *opt, char *buf);