From patchwork Wed Apr 20 16:14:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 66222 Delivered-To: patches@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2540642qge; Wed, 20 Apr 2016 09:14:15 -0700 (PDT) X-Received: by 10.28.24.80 with SMTP id 77mr29770336wmy.16.1461168855602; Wed, 20 Apr 2016 09:14:15 -0700 (PDT) Return-Path: Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com. [2a00:1450:400c:c09::235]) by mx.google.com with ESMTPS id g25si10801328wmc.27.2016.04.20.09.14.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Apr 2016 09:14:15 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c09::235 as permitted sender) client-ip=2a00:1450:400c:c09::235; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of peter.griffin@linaro.org designates 2a00:1450:400c:c09::235 as permitted sender) smtp.mailfrom=peter.griffin@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-wm0-x235.google.com with SMTP id u206so89895743wme.1 for ; Wed, 20 Apr 2016 09:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=D5MR9qzDUbgtif0kl6s1vlPsd+HFYsdZ0uxUNvEsY8I=; b=jJYzEn2ckPILFCEyKbl3GO9QdCoWzAy4POk5YEgh02KggPQiL7C3M82IRmE71E8NOg j8n1Bgu6+SQiwl+XgReZZgfwtITd6I+z0Vtq9snoPXHGCVX6IbKuACPgke/nukEPSXxd wSOtNtR/T3QvLP8/MLDiaawxCKHNV1/DYNoq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=D5MR9qzDUbgtif0kl6s1vlPsd+HFYsdZ0uxUNvEsY8I=; b=AKu8if9tYVj23xe1o1hUMvuNkVbaGhf+8R31hKA8f+annAePRqZPhTeCcjqVbm16gg G9f/ri4zu2rZf6maCqSnABTXdsqhGTfwGFNXyIdaeKhX8Iocrir1HO2641PywRiM6i7e ylGWSqfe7JlK+hLJbrx86uuQWgrGYD/8hmeBSMNFGU/2OLkZq2RJAVV9z+0O+u0BYSJw Xyz4TpXlue+0IRCUC5VMMJLCjRrVYMP5AgKJO9lRaDVdAZQDQVUiUiPTgBsh01+POgXC ezjWS58u1McWtNtgx1LIss8AOp+lUQwwrpGaXDtzBjaFRxk5/lkTKAoIn1cmSAjsqQpX sCLA== X-Gm-Message-State: AOPr4FVUfP5Q8PZ6CQ8u/OETAQZ/m5Te6Cn72Iauku51CUUMedBSnS1Lt/R91F4PLKY2gCRgV1E= X-Received: by 10.28.99.214 with SMTP id x205mr10427302wmb.9.1461168855294; Wed, 20 Apr 2016 09:14:15 -0700 (PDT) Return-Path: Received: from localhost.localdomain (cpc84787-aztw28-2-0-cust15.18-1.cable.virginm.net. [82.37.140.16]) by smtp.gmail.com with ESMTPSA id da5sm6353845wjb.25.2016.04.20.09.14.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Apr 2016 09:14:14 -0700 (PDT) From: Peter Griffin To: u-boot@lists.denx.de, albert.u.boot@aribaud.net, sjg@chromium.org, agraf@suse.de, trini@konsulko.com, liming.wang@canonical.com Cc: Peter Griffin Subject: [PATCH 4/7] ARM: hisilicon: hikey: Implement reset_cpu() for hikey. Date: Wed, 20 Apr 2016 17:14:00 +0100 Message-Id: <1461168843-15610-5-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461168843-15610-1-git-send-email-peter.griffin@linaro.org> References: <1461168843-15610-1-git-send-email-peter.griffin@linaro.org> This allows the reset command to reset the board from u-boot. => reset resetting ... INFO: BL1: 0xf9810000 - 0xf9818000 [size = 32768] NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(debug):7fb9b0e NOTICE: BL1: Built : 17:06:41, Apr 19 2016 Signed-off-by: Peter Griffin --- board/hisilicon/hikey/hikey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c index 3f0a0cc..752ee6f 100644 --- a/board/hisilicon/hikey/hikey.c +++ b/board/hisilicon/hikey/hikey.c @@ -414,8 +414,8 @@ void dram_init_banksize(void) gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; } -/* Use the Watchdog to cause reset */ void reset_cpu(ulong addr) { - /* TODO program the watchdog */ + writel(0x48698284, &ao_sc->stat0); + wfi(); }