From patchwork Thu Mar 1 14:38:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SRICHARAN R X-Patchwork-Id: 144049 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 F0FB8B6EEA for ; Fri, 2 Mar 2012 01:41:42 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B1C60280D7; Thu, 1 Mar 2012 15:40:23 +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 vQsBjoIa3E+I; Thu, 1 Mar 2012 15:40:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 23F06280D8; Thu, 1 Mar 2012 15:39:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 15ED628097 for ; Thu, 1 Mar 2012 15:38:56 +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 GFZqUyhpWsMR for ; Thu, 1 Mar 2012 15:38:54 +0100 (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 bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by theia.denx.de (Postfix) with ESMTPS id 5F79E2808B for ; Thu, 1 Mar 2012 15:38:51 +0100 (CET) Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q21Ecmdf011300 for ; Thu, 1 Mar 2012 08:38:49 -0600 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q21EclTC018144 for ; Thu, 1 Mar 2012 20:08:47 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Thu, 1 Mar 2012 20:08:47 +0530 Received: from ula0393807.apr.dhcp.ti.com (ula0393807-172024136255.apr.dhcp.ti.com [172.24.136.255]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id q21EchP4019701; Thu, 1 Mar 2012 20:08:47 +0530 (IST) From: R Sricharan To: Date: Thu, 1 Mar 2012 20:08:43 +0530 Message-ID: <1330612723-11328-19-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1330612723-11328-1-git-send-email-r.sricharan@ti.com> References: <1330612723-11328-1-git-send-email-r.sricharan@ti.com> MIME-Version: 1.0 Cc: trini@ti.com Subject: [U-Boot] [PATCH V2 18/18] OMAP5: reset: Use cold reset in case of 5430ES1.0 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 Warm reset is not functional in case of omap5430ES1.0. So use cold reset instead. Signed-off-by: R Sricharan --- arch/arm/cpu/armv7/omap-common/reset.S | 2 ++ arch/arm/cpu/armv7/omap5/hwinit.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/reset.S b/arch/arm/cpu/armv7/omap-common/reset.S index 838b122..3dce2a5 100644 --- a/arch/arm/cpu/armv7/omap-common/reset.S +++ b/arch/arm/cpu/armv7/omap-common/reset.S @@ -23,6 +23,7 @@ #include +#ifndef CONFIG_OMAP54XX .global reset_cpu reset_cpu: ldr r1, rstctl @ get addr for global reset @@ -36,3 +37,4 @@ rstctl: .word PRM_RSTCTRL rstbit: .word PRM_RSTCTRL_RESET +#endif diff --git a/arch/arm/cpu/armv7/omap5/hwinit.c b/arch/arm/cpu/armv7/omap5/hwinit.c index 7da7075..a7c1996 100644 --- a/arch/arm/cpu/armv7/omap5/hwinit.c +++ b/arch/arm/cpu/armv7/omap5/hwinit.c @@ -160,3 +160,19 @@ void init_omap_revision(void) *omap_si_rev = OMAP5430_SILICON_ID_INVALID; } } + +static void reset_cpu_omap5(ulong addr) +{ + u32 omap_rev = omap_revision(); + + /* + * WARM reset is not functional in case of OMAP5430 ES1.0 soc. + * So use cold reset in case instead. + */ + if (omap_rev == OMAP5430_ES1_0) + writel(PRM_RSTCTRL_RESET << 0x1, PRM_RSTCTRL); + else + writel(PRM_RSTCTRL_RESET, PRM_RSTCTRL); +} +void reset_cpu(ulong addr) + __attribute__((weak, alias("reset_cpu_omap5")));