From patchwork Fri Aug 17 18:22:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 178309 X-Patchwork-Delegate: afleming@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 4D2C42C00A1 for ; Sat, 18 Aug 2012 04:23:46 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2521828488; Fri, 17 Aug 2012 20:23:39 +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 eKp0gm2otzdF; Fri, 17 Aug 2012 20:23:38 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CDEC128455; Fri, 17 Aug 2012 20:23:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9F4D028459 for ; Fri, 17 Aug 2012 20:23:11 +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 hQuMd3pLsqJ3 for ; Fri, 17 Aug 2012 20:23:09 +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 va3outboundpool.messaging.microsoft.com (va3ehsobe006.messaging.microsoft.com [216.32.180.16]) by theia.denx.de (Postfix) with ESMTPS id ADDFE2839C for ; Fri, 17 Aug 2012 20:22:53 +0200 (CEST) Received: from mail97-va3-R.bigfish.com (10.7.14.243) by VA3EHSOBE001.bigfish.com (10.7.40.21) with Microsoft SMTP Server id 14.1.225.23; Fri, 17 Aug 2012 18:22:52 +0000 Received: from mail97-va3 (localhost [127.0.0.1]) by mail97-va3-R.bigfish.com (Postfix) with ESMTP id E19824C0166; Fri, 17 Aug 2012 18:22:52 +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 mail97-va3 (localhost.localdomain [127.0.0.1]) by mail97-va3 (MessageSwitch) id 1345227770177314_31809; Fri, 17 Aug 2012 18:22:50 +0000 (UTC) Received: from VA3EHSMHS028.bigfish.com (unknown [10.7.14.254]) by mail97-va3.bigfish.com (Postfix) with ESMTP id 283E04A0257; Fri, 17 Aug 2012 18:22:50 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS028.bigfish.com (10.7.99.38) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 17 Aug 2012 18:22:49 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.2.298.5; Fri, 17 Aug 2012 13:22:48 -0500 Received: from localhost.localdomain ([10.214.83.151]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q7HIMhpq009091; Fri, 17 Aug 2012 11:22:48 -0700 From: York Sun To: Date: Fri, 17 Aug 2012 11:22:43 -0700 Message-ID: <1345227763-29584-8-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1345227763-29584-1-git-send-email-yorksun@freescale.com> References: <1345227763-29584-1-git-send-email-yorksun@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: afleming@gmail.com, York Sun Subject: [U-Boot] [PATCH 8/8] powerpc/mpc8xxx DDR: Fix interactive DDR debugging 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 Add one more argument to call function readline_into_buffer(). Fix print SPD format for negative values. Signed-off-by: York Sun --- arch/powerpc/cpu/mpc8xxx/ddr/interactive.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/interactive.c b/arch/powerpc/cpu/mpc8xxx/ddr/interactive.c index 738c808..f59d105 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/interactive.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/interactive.c @@ -1047,7 +1047,7 @@ void ddr3_spd_dump(const ddr3_spd_eeprom_t *spd) /* General Section: Bytes 0-59 */ -#define PRINT_NXS(x, y, z...) printf("%-3d : %02x " z "\n", x, y); +#define PRINT_NXS(x, y, z...) printf("%-3d : %02x " z "\n", x, (u8)y); #define PRINT_NNXXS(n0, n1, x0, x1, s) \ printf("%-3d-%3d: %02x %02x " s "\n", n0, n1, x0, x1); @@ -1398,7 +1398,7 @@ unsigned long long fsl_ddr_interactive(fsl_ddr_info_t *pinfo) * No need to worry for buffer overflow here in * this function; readline() maxes out at CFG_CBSIZE */ - readline_into_buffer(prompt, buffer); + readline_into_buffer(prompt, buffer, 0); argc = parse_line(buffer, argv); if (argc == 0) continue;