From patchwork Thu Jan 23 06:33:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PranavkumarSawargaonkar X-Patchwork-Id: 23566 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E468D218C5 for ; Thu, 23 Jan 2014 06:33:21 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id y10sf3150709pdj.11 for ; Wed, 22 Jan 2014 22:33:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=LHmSZf3FlmcLJOLUYIl4QsiOrN3RLKaa/99FQTAbrNw=; b=JS3KvRSwstqHI+3sVJudJ5UzkTaN3ND3Mr5Y4qUn0t3uuFbXJIee1ubjuYGkm6v6WS ztrFz4xZRAcDAkd/3kmar76DyiwqDc/IrHCC3V2a8Ods9+umAKsiVCYBFtbbhaqbhY6v m0QXUsrW77LK+Vlndck8KqIfTQ5e1rlsbj93j44dB/n/Ow4dncwW4Z3nxyfHkhf3pVYp Mp+TzphsiirWpzSFoy/vFpcqIndb0d0qRKjl03fTQGz1h+dPzXxQi3hgpSYFTuLAe3mD 3h6YtH24u8LmyAUYk1H9wWbG2C/uL/p4T6gBBg9TvHgE6vfcFQ28aqmKtK7CUVmWyD6o f5ug== X-Gm-Message-State: ALoCoQm+S+iwQ5fGyKLjZkTWnt/hYOwk7IBPG9P6IjWkcAmbmPgA3pQw4x1T5RiiceaKfpRxPwM8 X-Received: by 10.66.228.67 with SMTP id sg3mr2305598pac.25.1390458801174; Wed, 22 Jan 2014 22:33:21 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.138 with SMTP id k10ls235060qge.66.gmail; Wed, 22 Jan 2014 22:33:21 -0800 (PST) X-Received: by 10.221.66.132 with SMTP id xq4mr11747vcb.57.1390458800981; Wed, 22 Jan 2014 22:33:20 -0800 (PST) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id ks3si6123168vec.13.2014.01.22.22.33.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 22:33:20 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.42; Received: by mail-vb0-f42.google.com with SMTP id i3so802654vbh.15 for ; Wed, 22 Jan 2014 22:33:20 -0800 (PST) X-Received: by 10.221.2.138 with SMTP id nu10mr63345vcb.52.1390458800897; Wed, 22 Jan 2014 22:33:20 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp3868vcz; Wed, 22 Jan 2014 22:33:20 -0800 (PST) X-Received: by 10.68.176.65 with SMTP id cg1mr6245519pbc.145.1390458799829; Wed, 22 Jan 2014 22:33:19 -0800 (PST) Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by mx.google.com with ESMTPS id m8si12741968pbq.269.2014.01.22.22.33.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 22:33:19 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.43 is neither permitted nor denied by best guess record for domain of pranavkumar@linaro.org) client-ip=209.85.160.43; Received: by mail-pb0-f43.google.com with SMTP id md12so1444138pbc.2 for ; Wed, 22 Jan 2014 22:33:19 -0800 (PST) X-Received: by 10.68.192.131 with SMTP id hg3mr6250621pbc.136.1390458799255; Wed, 22 Jan 2014 22:33:19 -0800 (PST) Received: from pnqlab006.amcc.com ([182.73.239.130]) by mx.google.com with ESMTPSA id xn12sm57708981pac.12.2014.01.22.22.33.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 22:33:18 -0800 (PST) From: Pranavkumar Sawargaonkar To: xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, stefano.stabellini@citrix.com, patches@apm.com, patches@linaro.org, Pranavkumar Sawargaonkar , Anup Patel Subject: [PATCH] xen: arm: platforms: Adding reset support for xgene arm64 platform. Date: Thu, 23 Jan 2014 12:03:04 +0530 Message-Id: <1390458785-21862-1-git-send-email-pranavkumar@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pranavkumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch adds a reset support for xgene arm64 platform. Signed-off-by: Pranavkumar Sawargaonkar Signed-off-by: Anup Patel --- xen/arch/arm/platforms/xgene-storm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/xen/arch/arm/platforms/xgene-storm.c b/xen/arch/arm/platforms/xgene-storm.c index 5b0bd5f..bd6223d 100644 --- a/xen/arch/arm/platforms/xgene-storm.c +++ b/xen/arch/arm/platforms/xgene-storm.c @@ -19,7 +19,9 @@ */ #include +#include #include +#include #include static uint32_t xgene_storm_quirks(void) @@ -107,6 +109,25 @@ err: return ret; } +/* + * TODO: Get base address and mask from the device tree + */ +static void xgene_storm_reset(void) +{ + void __iomem *addr; + + addr = ioremap_nocache(0x17000014UL, 0x100); + + if ( !addr ) + { + dprintk(XENLOG_ERR, "Unable to map xgene reset address\n"); + return; + } + + /* Write mask 0x1 to base address */ + writel(0x1, addr); + mdelay(1000); +} static const char * const xgene_storm_dt_compat[] __initconst = { @@ -116,6 +137,7 @@ static const char * const xgene_storm_dt_compat[] __initconst = PLATFORM_START(xgene_storm, "APM X-GENE STORM") .compatible = xgene_storm_dt_compat, + .reset = xgene_storm_reset, .quirks = xgene_storm_quirks, .specific_mapping = xgene_storm_specific_mapping,