From patchwork Sat Jan 12 21:39:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?xYF1a2FzeiBEYcWCZWs=?= X-Patchwork-Id: 211556 X-Patchwork-Delegate: marek.vasut@gmail.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 B1B3C2C0107 for ; Sun, 13 Jan 2013 08:46:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7B3A94A0F3; Sat, 12 Jan 2013 22:46:27 +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 wE3XzWuxSMdC; Sat, 12 Jan 2013 22:46:27 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 60FDB4A0F6; Sat, 12 Jan 2013 22:46:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DD57F4A0F6 for ; Sat, 12 Jan 2013 22:46: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 llO-fnZZUyid for ; Sat, 12 Jan 2013 22:46:23 +0100 (CET) X-Greylist: delayed 381 seconds by postgrey-1.27 at theia; Sat, 12 Jan 2013 22:46:21 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 mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by theia.denx.de (Postfix) with ESMTPS id 054524A0F3 for ; Sat, 12 Jan 2013 22:46:21 +0100 (CET) Received: by mail-ee0-f42.google.com with SMTP id b47so984796eek.15 for ; Sat, 12 Jan 2013 13:46:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=7Y6hk/rfhdxXjTONYUK/vi7dFa0t7GmguEGHyIzuqZ8=; b=zxxU28UYlPdCBLcnxCqnmiCU/WAOXXJYY5g21bHi6O63poSLonxZBqoPkhj0N6vM0x a6EVuHIu++FkIk1Ea7aS0SRHprttbo726Kiib5s1jC+46qg2gbajyl2FE5MrPmFbS4Q4 86ydism3t7BGbUJAdVWno461ylBVHCzMED0QwgDKZWnmTs22F6PDgDvXUmh1O6o3wf5T zoDjife2R4p+7dVy1gJY/vgDyDTLd/xvfR6MQMLAxF572dSu/vI/0vqOMPmPxE+3o7MG bzEbj7a83n2QuyPkDUdJBkBBG3sS0z4LSpY6ihw4lxtkrk12AgDiATfDpVE+tYImw+kb It3g== X-Received: by 10.14.221.9 with SMTP id q9mr215397521eep.3.1358026798605; Sat, 12 Jan 2013 13:39:58 -0800 (PST) Received: from mover.dalas.net (riviera.nat.student.pw.edu.pl. [194.29.137.1]) by mx.google.com with ESMTPS id b2sm14489530eep.9.2013.01.12.13.39.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Jan 2013 13:39:57 -0800 (PST) From: Lukasz Dalek To: u-boot@lists.denx.de Date: Sat, 12 Jan 2013 22:39:25 +0100 Message-Id: <1358026767-28130-1-git-send-email-luk0104@gmail.com> X-Mailer: git-send-email 1.7.8.6 Cc: marex@denx.de Subject: [U-Boot] [PATCH 1/3] pxa: Add support for board specific reset function 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 Some boards have its own way to reset board. This patch adds support for board_reset() function which is called from reset_cpu() to do board specific actions before/instead main reset_cpu() actions. Signed-off-by: Lukasz Dalek --- arch/arm/cpu/pxa/pxa2xx.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c index 09e8177..5520f4f 100644 --- a/arch/arm/cpu/pxa/pxa2xx.c +++ b/arch/arm/cpu/pxa/pxa2xx.c @@ -284,12 +284,19 @@ void i2c_clk_enable(void) writel(readl(CKEN) | CKEN14_I2C, CKEN); } +void __attribute__((weak)) board_reset(void) +{ + /* do nothing */ +} + void reset_cpu(ulong ignored) __attribute__((noreturn)); void reset_cpu(ulong ignored) { uint32_t tmp; + board_reset(); + setbits_le32(OWER, OWER_WME); tmp = readl(OSCR);