From patchwork Mon Nov 3 10:11:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 40006 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5E7E820560 for ; Mon, 3 Nov 2014 10:19:31 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf2639752eek.1 for ; Mon, 03 Nov 2014 02:19:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=3Wpi7h2Lk+cK0bxWafVNjRVf1/oVoWq0ew+gOZU8nHY=; b=MnNx4oTpChs5Xa92o/+UK+7zootFem1xL8PKnkmpoogciESeRrIrW3yVlYsQc147xe 6BFKwOKdQBIr7Sb9bBeBEqekuzwz151XPE0Se9kVownLvFpv/pcQO8j1Bimw83nU0GUh z/zlH/Lsx/5WDMYMdvsWru11+iSPqseFr0IH8zPJsPqGHkdqWQtTmQ5DHuLNE4MDRWq5 Ve1x4Quq5kaXxQRfREzHsFXVOHU8icsXSvyqNysY5cVzl62OsM7zj7Ng0LlyTMMGESSO TJ6VuwO6q1bbm/ITxZai/dhYC+8+KaVeBdSIuBf8ZyfW3UcZQqLKqt5w7DwmnYxOwSkQ 4jPw== X-Gm-Message-State: ALoCoQmT4m4ebVNJgz27Vwp6Z3yp6CMypLeeICb3plEDORWW0jw/wTOqgnZgg1j0xNX2l2SfUqN9 X-Received: by 10.152.7.73 with SMTP id h9mr273100laa.6.1415009970471; Mon, 03 Nov 2014 02:19:30 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.72 with SMTP id q8ls569941laq.98.gmail; Mon, 03 Nov 2014 02:19:29 -0800 (PST) X-Received: by 10.152.170.194 with SMTP id ao2mr50071993lac.60.1415009969863; Mon, 03 Nov 2014 02:19:29 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id l8si31868838lah.23.2014.11.03.02.19.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Nov 2014 02:19:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id mc6so9329112lab.12 for ; Mon, 03 Nov 2014 02:19:29 -0800 (PST) X-Received: by 10.112.189.10 with SMTP id ge10mr49311195lbc.23.1415009969222; Mon, 03 Nov 2014 02:19:29 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp212925lbz; Mon, 3 Nov 2014 02:19:28 -0800 (PST) X-Received: by 10.221.67.137 with SMTP id xu9mr34818715vcb.11.1415009968081; Mon, 03 Nov 2014 02:19:28 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id ir4si9467166vcb.19.2014.11.03.02.19.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 03 Nov 2014 02:19:28 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XlEhq-0008Ix-Sp; Mon, 03 Nov 2014 10:17:50 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XlEdN-00086q-76 for xen-devel@lists.xen.org; Mon, 03 Nov 2014 10:13:13 +0000 Received: from [85.158.139.211] by server-7.bemta-5.messagelabs.com id 8B/50-31453-83557545; Mon, 03 Nov 2014 10:13:12 +0000 X-Env-Sender: frediano.ziglio@huawei.com X-Msg-Ref: server-7.tower-206.messagelabs.com!1415009587!10874792!1 X-Originating-IP: [119.145.14.64] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NCA9PiA4MDE5MQ==\n X-StarScan-Received: X-StarScan-Version: 6.12.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13448 invoked from network); 3 Nov 2014 10:13:11 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (119.145.14.64) by server-7.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 3 Nov 2014 10:13:11 -0000 Received: from 172.24.2.119 (EHLO szxeml403-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CDW38039; Mon, 03 Nov 2014 18:13:05 +0800 (CST) Received: from localhost.localdomain (10.47.73.48) by szxeml403-hub.china.huawei.com (10.82.67.35) with Microsoft SMTP Server id 14.3.158.1; Mon, 3 Nov 2014 18:12:56 +0800 From: Frediano Ziglio To: Ian Campbell , Stefano Stabellini , Tim Deegan , Julien Grall , Date: Mon, 3 Nov 2014 10:11:54 +0000 Message-ID: <1415009522-6344-3-git-send-email-frediano.ziglio@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415009522-6344-1-git-send-email-frediano.ziglio@huawei.com> References: <1415009522-6344-1-git-send-email-frediano.ziglio@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.47.73.48] X-CFilter-Loop: Reflected X-Mailman-Approved-At: Mon, 03 Nov 2014 10:17:48 +0000 Cc: zoltan.kiss@huawei.com, xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH 02/10] xen/arm: Implement hip04-d01 board reboot X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: frediano.ziglio@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Signed-off-by: Frediano Ziglio --- xen/arch/arm/platforms/hip04.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/platforms/hip04.c b/xen/arch/arm/platforms/hip04.c index bf38c23..62d2034 100644 --- a/xen/arch/arm/platforms/hip04.c +++ b/xen/arch/arm/platforms/hip04.c @@ -27,6 +27,7 @@ #include #include #include +#include #define CORE_RESET_BIT(x) (1 << x) #define NEON_RESET_BIT(x) (1 << (x + 4)) @@ -53,13 +54,21 @@ struct hip04_secondary_cpu_data { u32 relocation_size; }; -static void __iomem *relocation, *sysctrl, *fabric; +static void __iomem *relocation, *sysctrl, *fabric, *gb2; static int hip04_cpu_table[HIP04_MAX_CLUSTERS][HIP04_MAX_CPUS_PER_CLUSTER]; static struct hip04_secondary_cpu_data hip04_boot; static void hip04_reset(void) { - /* TODO */ + unsigned long data; + + if ( !gb2 ) + return; + + data = readl_relaxed(gb2); + writel_relaxed(data & ~0x4000000u, gb2); + + mdelay(10); } static void hip04_set_snoop_filter(unsigned int cluster, unsigned int on) @@ -186,6 +195,11 @@ static int __init hip04_smp_init(void) if ( !fabric ) goto err; + msg = "Error mapping GB2\n"; + gb2 = ioremap_nocache(0xe4002000, 0x1000); + if ( !gb2 ) + goto err; + msg = "Error initializing SMP table\n"; if ( !hip04_cpu_table_init() ) goto err;