From patchwork Wed Aug 22 23:19:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 179428 X-Patchwork-Delegate: trini@ti.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 897642C0084 for ; Thu, 23 Aug 2012 09:20:21 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8F8532808D; Thu, 23 Aug 2012 01:20:19 +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 mhC1deV67QR5; Thu, 23 Aug 2012 01:20:19 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0459280AB; Thu, 23 Aug 2012 01:20:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1C6728088 for ; Thu, 23 Aug 2012 01:19:57 +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 fhsYJS0ytjGp for ; Thu, 23 Aug 2012 01:19:57 +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 mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by theia.denx.de (Postfix) with ESMTPS id 0B62B28083 for ; Thu, 23 Aug 2012 01:19:55 +0200 (CEST) Received: by mail-pb0-f44.google.com with SMTP id rr4so192762pbb.3 for ; Wed, 22 Aug 2012 16:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=G5JKFcGQf+j5DGLUHbG0dkPiX6M3TaQjlArkJTHp/fE=; b=LgiVnKHQUojMo/i0ZfxHjAL7EypMjhX1Gf8t50k96JUKkPO8eDhNKYhiWlDwzl6iiS 2BzWd+I9jFgLjcdJNRRxJjOPaU6+VUKGjSRQy2ko6sSisuLc3Ar9lXq3oi6SMt+Vcnx6 2CsNdXXVVU1ujYkRC6O50culGXkGcCKT0Rma+bh6dylhIQhpZluRNMucUYzsSpRe6SiK 5N6g/bVs/9QEjVKdjEO7UDuM9rEwQfS83je1BoZ8l7qTEbz3H0wznsb1bUGf3euWIjBE O1I/AdF/1CFqB7Gwkbhx7mFfTwN/EfklKfacSAJjT2uER8CFfiQV2VCGKucANQ6Fd/q7 CxlA== Received: by 10.68.129.73 with SMTP id nu9mr57193135pbb.59.1345677595213; Wed, 22 Aug 2012 16:19:55 -0700 (PDT) Received: from localhost.localdomain (ip68-230-54-74.ph.ph.cox.net. [68.230.54.74]) by mx.google.com with ESMTPS id oc2sm4594989pbb.69.2012.08.22.16.19.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 16:19:54 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Wed, 22 Aug 2012 16:19:29 -0700 Message-Id: <1345677585-15696-4-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1345677585-15696-1-git-send-email-trini@ti.com> References: <1345677585-15696-1-git-send-email-trini@ti.com> Cc: Sudhakar Rajashekhara , Christian Riesch Subject: [U-Boot] [PATCH v3 03/19] omap-common: SPL: Add CONFIG_SPL_DISPLAY_PRINT / spl_display_print() 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 Only omap4/5 currently have a meaningful set of display text and overo had been adding a function to display nothing. Change how this works to be opt-in and only turned on for omap4/5 now. Signed-off-by: Tom Rini --- README | 4 ++++ arch/arm/cpu/armv7/omap-common/hwinit-common.c | 5 +++++ arch/arm/cpu/armv7/omap-common/spl.c | 9 +++------ arch/arm/include/asm/arch-omap4/sys_proto.h | 1 - arch/arm/include/asm/arch-omap5/sys_proto.h | 1 - arch/arm/include/asm/omap_common.h | 2 +- board/overo/overo.c | 10 ---------- include/configs/omap4_common.h | 1 + include/configs/omap5_evm.h | 1 + 9 files changed, 15 insertions(+), 19 deletions(-) diff --git a/README b/README index fb9d904..f1a12a5 100644 --- a/README +++ b/README @@ -2564,6 +2564,10 @@ FIT uImage format: CONFIG_SYS_SPL_MALLOC_SIZE The size of the malloc pool used in SPL. + CONFIG_SPL_DISPLAY_PRINT + For ARM, enable an optional function to print more information + about the running system. + CONFIG_SPL_LIBCOMMON_SUPPORT Support for common/libcommon.o in SPL binary diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c index 459ebb5..4d7ef5c 100644 --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c @@ -92,6 +92,11 @@ static void init_boot_params(void) { boot_params_ptr = (u32 *) &boot_params; } + +void spl_display_print(void) +{ + omap_rev_string(); +} #endif /* diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c index 4d1ac85..b10832a 100644 --- a/arch/arm/cpu/armv7/omap-common/spl.c +++ b/arch/arm/cpu/armv7/omap-common/spl.c @@ -219,10 +219,7 @@ void preloader_console_init(void) printf("\nU-Boot SPL %s (%s - %s)\n", u_boot_rev, U_BOOT_DATE, U_BOOT_TIME); - omap_rev_string(); -} - -void __weak omap_rev_string() -{ - printf("Texas Instruments Revision detection unimplemented\n"); +#ifdef CONFIG_SPL_DISPLAY_PRINT + spl_display_print(); +#endif } diff --git a/arch/arm/include/asm/arch-omap4/sys_proto.h b/arch/arm/include/asm/arch-omap4/sys_proto.h index d633573..b48f81d 100644 --- a/arch/arm/include/asm/arch-omap4/sys_proto.h +++ b/arch/arm/include/asm/arch-omap4/sys_proto.h @@ -42,7 +42,6 @@ void sr32(void *, u32, u32, u32); u32 wait_on_value(u32, u32, void *, u32); void sdelay(unsigned long); void set_pl310_ctrl_reg(u32 val); -void omap_rev_string(void); void setup_clocks_for_console(void); void prcm_init(void); void bypass_dpll(u32 *const base); diff --git a/arch/arm/include/asm/arch-omap5/sys_proto.h b/arch/arm/include/asm/arch-omap5/sys_proto.h index 74feb90..72e9df7 100644 --- a/arch/arm/include/asm/arch-omap5/sys_proto.h +++ b/arch/arm/include/asm/arch-omap5/sys_proto.h @@ -42,7 +42,6 @@ void set_muxconf_regs_non_essential(void); void sr32(void *, u32, u32, u32); u32 wait_on_value(u32, u32, void *, u32); void sdelay(unsigned long); -void omap_rev_string(void); void setup_clocks_for_console(void); void prcm_init(void); void bypass_dpll(u32 *const base); diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index 4e95eee..19df5ea 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -94,9 +94,9 @@ u32 omap_boot_mode(void); /* SPL common function s*/ void spl_parse_image_header(const struct image_header *header); -void omap_rev_string(void); void spl_board_prepare_for_linux(void); int spl_start_uboot(void); +void spl_display_print(void); /* NAND SPL functions */ void spl_nand_load_image(void); diff --git a/board/overo/overo.c b/board/overo/overo.c index f973870..c6d50a0 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -101,16 +101,6 @@ int board_init(void) } /* - * Routine: omap_rev_string - * Description: For SPL builds output board rev - */ -#ifdef CONFIG_SPL_BUILD -void omap_rev_string(void) -{ -} -#endif - -/* * Routine: get_board_revision * Description: Returns the board revision */ diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index 2192c2b..685fde9 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -249,6 +249,7 @@ #define CONFIG_SPL_TEXT_BASE 0x40304350 #define CONFIG_SPL_MAX_SIZE (38 * 1024) #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK +#define CONFIG_SPL_DISPLAY_PRINT /* * 64 bytes before this address should be set aside for u-boot.img's diff --git a/include/configs/omap5_evm.h b/include/configs/omap5_evm.h index c5874bb..ef4034c 100644 --- a/include/configs/omap5_evm.h +++ b/include/configs/omap5_evm.h @@ -246,6 +246,7 @@ #define CONFIG_SPL_TEXT_BASE 0x40300350 #define CONFIG_SPL_MAX_SIZE 0x19000 /* 100K */ #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK +#define CONFIG_SPL_DISPLAY_PRINT #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */