From patchwork Mon Oct 12 00:17:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyungmin Park X-Patchwork-Id: 71677 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id C35963F6E3 for ; Mon, 12 Oct 2009 02:19:50 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id A2612C9601BF for ; Mon, 12 Oct 2009 02:19:50 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.8) for (single-drop); Mon, 12 Oct 2009 02:19:50 +0200 (CEST) Received: from murder (svr19.m-online.net [192.168.3.147]) by backend2 (Cyrus v2.2.12) with LMTPA; Mon, 12 Oct 2009 02:18:58 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend3.pop.m-online.net (Cyrus v2.2.13) with LMTPA; Mon, 12 Oct 2009 02:18:57 +0200 Received: from scanner-2.m-online.net (unknown [192.168.8.166]) by mail.m-online.net (Postfix) with ESMTP id AF124200091; Mon, 12 Oct 2009 02:18:57 +0200 (CEST) Received: from mxin-1.m-online.net ([192.168.1.21]) by scanner-2.m-online.net (scanner-2.m-online.net [192.168.8.166]) (amavisd-new, port 10026) with ESMTP id 22978-01; Mon, 12 Oct 2009 02:18:56 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-2.m-online.net (Postfix) with ESMTP id 90A3D46C0A7; Mon, 12 Oct 2009 02:18:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 29F7A2808C; Mon, 12 Oct 2009 02:18:50 +0200 (CEST) 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 64PtILQmU6mi; Mon, 12 Oct 2009 02:18:49 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6F1CD28085; Mon, 12 Oct 2009 02:18:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 11E4328088 for ; Mon, 12 Oct 2009 02:18:43 +0200 (CEST) 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 qm0M2AXu-oHk for ; Mon, 12 Oct 2009 02:18:42 +0200 (CEST) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by theia.denx.de (Postfix) with ESMTP id 05AD228085 for ; Mon, 12 Oct 2009 02:18:39 +0200 (CEST) Received: from epmmp2 (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0KRD00MCGKV065@mailout1.samsung.com> for u-boot@lists.denx.de; Mon, 12 Oct 2009 09:18:37 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0KRD00398KTSEP@mmp2.samsung.com> for u-boot@lists.denx.de; Mon, 12 Oct 2009 09:17:52 +0900 (KST) Received: from july ([10.89.7.111]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.3959); Mon, 12 Oct 2009 09:17:51 +0900 Received: by july (sSMTP sendmail emulation); Mon, 12 Oct 2009 09:17:49 +0900 Date: Mon, 12 Oct 2009 09:17:49 +0900 From: Kyungmin Park To: u-boot@lists.denx.de Message-id: <20091012001749.GA23445@july> MIME-version: 1.0 Content-disposition: inline User-Agent: Mutt/1.5.14 (2007-02-12) X-OriginalArrivalTime: 12 Oct 2009 00:17:51.0834 (UTC) FILETIME=[6FD523A0:01CA4AD1] Subject: [U-Boot] [PATCH] Reduce apollon OneNAND IPL code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: by amavisd-new at m-online.net After OneNAND IPL updated, apollon boot code exceeds 1KiB size, This patch reduces the apollon boot code Signed-off-by: Kyungmin Park diff --git a/onenand_ipl/board/apollon/apollon.c b/onenand_ipl/board/apollon/apollon.c index 4936e00..4d4564c 100644 --- a/onenand_ipl/board/apollon/apollon.c +++ b/onenand_ipl/board/apollon/apollon.c @@ -54,7 +54,6 @@ static void muxSetupUART1(void) /* UART1_RX pin configuration, PIN = T21 */ write_config_reg(CONTROL_PADCONF_UART1_RX, 0); } -#endif /********************************************************** * Routine: s_init @@ -63,8 +62,7 @@ static void muxSetupUART1(void) **********************************************************/ int s_init(int skip) { -#ifdef CONFIG_SYS_PRINTF muxSetupUART1(); -#endif return 0; } +#endif diff --git a/onenand_ipl/board/apollon/low_levelinit.S b/onenand_ipl/board/apollon/low_levelinit.S index 205170f..1eb116e 100644 --- a/onenand_ipl/board/apollon/low_levelinit.S +++ b/onenand_ipl/board/apollon/low_levelinit.S @@ -64,6 +64,10 @@ #error "Please configure PRCM schecm" #endif +/* + * r5 has zero always + */ + _TEXT_BASE: .word TEXT_BASE /* sdram load addr from config.mk */ @@ -87,15 +91,11 @@ lowlevel_init: #endif /* Pin muxing for SDRC */ - mov r1, #0x00 - ldr r0, =0x480000A1 /* ball C12, mode 0 */ - strb r1, [r0] - - ldr r0, =0x48000032 /* ball D11, mode 0 */ - strb r1, [r0] - - ldr r0, =0x480000A3 /* ball B13, mode 0 */ - strb r1, [r0] + mov r5, #0x00 + ldr r0, =0x48000000 + strb r5, [r0, #0xA1] /* ball C12, mode 0 */ + strb r5, [r0, #0x32] /* ball D11, mode 0 */ + strb r5, [r0, #0xA3] /* ball B13, mode 0 */ /* SDRC setting */ ldr r0, =OMAP2420_SDRC_BASE @@ -129,8 +129,7 @@ lowlevel_init: ldr r1, =0x00000007 str r1, [r0, #0xA8] - ldr r1, =0x00000000 - str r1, [r0, #0xA8] + str r5, [r0, #0xA8] ldr r1, =0x00000001 str r1, [r0, #0xA8] @@ -150,9 +149,8 @@ lowlevel_init: /* Note: You MUST set EMR values */ /* EMR1 & EMR2 */ - ldr r1, =0x00000000 - str r1, [r0, #0x88] - str r1, [r0, #0x8C] + str r5, [r0, #0x88] + str r5, [r0, #0x8C] #ifdef OLD_SDRC_DLLA_CTRL /* SDRC_DLLA_CTRL */ @@ -185,6 +183,7 @@ lowlevel_init: subs r2, r2, #0x1 bne 1b +#ifdef CONFIG_PRINTF ldr sp, SRAM_STACK str ip, [sp] /* stash old link register */ mov ip, lr /* save link reg across call */ @@ -194,6 +193,7 @@ lowlevel_init: ldr ip, [sp] /* restore save ip */ mov lr, ip /* restore link reg */ +#endif /* back to arch calling code */ mov pc, lr