From patchwork Thu Jun 4 11:12:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 480645 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 11257140081 for ; Thu, 4 Jun 2015 21:16:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E49A04B6BA; Thu, 4 Jun 2015 13:16:07 +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 QfL6XeqXXyiW; Thu, 4 Jun 2015 13:16:07 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8723E4B6BB; Thu, 4 Jun 2015 13:15:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5A49A4B62B for ; Thu, 4 Jun 2015 13:15:39 +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 q6e0oKrVyTau for ; Thu, 4 Jun 2015 13:15:39 +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 arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by theia.denx.de (Postfix) with ESMTPS id 1FA6B4B67B for ; Thu, 4 Jun 2015 13:15:23 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t54BFLDq008202; Thu, 4 Jun 2015 06:15:21 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t54BFKEQ032048; Thu, 4 Jun 2015 06:15:20 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Thu, 4 Jun 2015 06:15:20 -0500 Received: from a0131933.apr.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t54BF5gC009164; Thu, 4 Jun 2015 06:15:19 -0500 From: Lokesh Vutla To: , Date: Thu, 4 Jun 2015 16:42:38 +0530 Message-ID: <1433416362-7708-7-git-send-email-lokeshvutla@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433416362-7708-1-git-send-email-lokeshvutla@ti.com> References: <1433416362-7708-1-git-send-email-lokeshvutla@ti.com> MIME-Version: 1.0 Cc: t-kristo@ti.com, nsekhar@ti.com Subject: [U-Boot] [PATCH 06/10] ARM: DRA7-evm: Enable IO delay recalibration sequence X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Enabling IO delay recalibration sequence for DRA7 EVM. UART and I2C are configured before IO delay recalibration sequence as these are used earlier and safe to use. Signed-off-by: Lokesh Vutla Signed-off-by: Nishanth Menon --- board/ti/dra7xx/evm.c | 14 +++++++++++--- include/configs/dra7xx_evm.h | 4 ++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 1b05150..06adaac 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -110,11 +111,18 @@ int board_late_init(void) void set_muxconf_regs_essential(void) { do_set_mux32((*ctrl)->control_padconf_core_base, - core_padconf_array_essential, - sizeof(core_padconf_array_essential) / - sizeof(struct pad_conf_entry)); + early_padconf, ARRAY_SIZE(early_padconf)); } +#ifdef CONFIG_IODELAY_RECALIBRATION +void recalibrate_iodelay(void) +{ + __recalibrate_iodelay(core_padconf_array_essential, + ARRAY_SIZE(core_padconf_array_essential), + iodelay_cfg_array, ARRAY_SIZE(iodelay_cfg_array)); +} +#endif + #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC) int board_mmc_init(bd_t *bis) { diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 77edc21..afcc36b 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -15,6 +15,10 @@ #define CONFIG_DRA7XX #define CONFIG_BOARD_EARLY_INIT_F +#ifdef CONFIG_SPL_BUILD +#define CONFIG_IODELAY_RECALIBRATION +#endif + #ifndef CONFIG_QSPI_BOOT /* MMC ENV related defines */ #define CONFIG_ENV_IS_IN_MMC