From patchwork Fri Dec 9 21:00:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asen Dimov X-Patchwork-Id: 130470 X-Patchwork-Delegate: agust@denx.de 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 3A1D81007D7 for ; Sat, 10 Dec 2011 08:15:38 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 755BF281EC; Fri, 9 Dec 2011 22:15:36 +0100 (CET) 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 d-AAvB7AZpy7; Fri, 9 Dec 2011 22:15:35 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D607B281ED; Fri, 9 Dec 2011 22:15:33 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3DAAC281ED for ; Fri, 9 Dec 2011 22:15:31 +0100 (CET) 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 a0XhYWK0-rCZ for ; Fri, 9 Dec 2011 22:15:30 +0100 (CET) X-Greylist: delayed 402 seconds by postgrey-1.27 at theia; Fri, 09 Dec 2011 22:15:28 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 smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.29.24]) by theia.denx.de (Postfix) with ESMTP id 0D16E281EC for ; Fri, 9 Dec 2011 22:15:28 +0100 (CET) Received: from [193.68.122.30] (helo=asenbox.ronetix.at) by smtprelay02.ispgateway.de with esmtpa (Exim 4.68) (envelope-from ) id 1RZ7Y1-0006g8-2m; Fri, 09 Dec 2011 22:00:01 +0100 From: Asen Chavdarov Dimov To: u-boot@lists.denx.de Date: Fri, 9 Dec 2011 23:00:07 +0200 Message-Id: <1323464407-15935-1-git-send-email-dimov@ronetix.at> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <20111206230638.03e441ae@wker> References: <20111206230638.03e441ae@wker> X-Df-Sender: NjA4NDU0 Cc: Asen Chavdarov Dimov Subject: [U-Boot] [PATCH v2] pm9g45: init serial console before relocation 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The early messages can be seen on the debug console. Signed-off-by: Asen Chavdarov Dimov --- Change since v1 - rebased over master board/ronetix/pm9g45/pm9g45.c | 16 +++++++++++----- include/configs/pm9g45.h | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c index d29d076..b5a11f2 100644 --- a/board/ronetix/pm9g45/pm9g45.c +++ b/board/ronetix/pm9g45/pm9g45.c @@ -127,22 +127,28 @@ static void pm9g45_macb_hw_init(void) } #endif -int board_init(void) +int board_early_init_f(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; - /* Enable Ctrlc */ - console_init_f(); - + /* Enable clocks for all PIOs */ writel((1 << ATMEL_ID_PIOA) | (1 << ATMEL_ID_PIOB) | (1 << ATMEL_ID_PIOC) | (1 << ATMEL_ID_PIODE), &pmc->pcer); + at91_seriald_hw_init(); + + return 0; +} + +int board_init(void) +{ + /* arch number of AT91SAM9M10G45EK-Board */ + gd->bd->bi_arch_number = MACH_TYPE_PM9G45; /* adress of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; - at91_seriald_hw_init(); #ifdef CONFIG_CMD_NAND pm9g45_nand_hw_init(); #endif diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h index 5b08d91..eec9153 100644 --- a/include/configs/pm9g45.h +++ b/include/configs/pm9g45.h @@ -57,6 +57,7 @@ #define CONFIG_INITRD_TAG 1 #define CONFIG_SKIP_LOWLEVEL_INIT +#define CONFIG_BOARD_EARLY_INIT_F /* * Hardware drivers