From patchwork Thu Jan 23 07:08:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PranavkumarSawargaonkar X-Patchwork-Id: 23568 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9E68B218BD for ; Thu, 23 Jan 2014 07:08:25 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id x10sf3231273pdj.8 for ; Wed, 22 Jan 2014 23:08:24 -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=UDQfH0pu4BweOytCaCnYi0P6J94Ba0derm/RLJkJ9c8=; b=lUXlz6ip/+uaBcBVgw+thubFOA8TErI7DAm+sY1qs5V+2V67F9kkioidVqmUNd6UZf ZPgYjJn9WlVLVjhx+f4F2XrU0h4Luvk7RDEMJTtOuvwWOtA/nyR86iLuhWq/zSkliRFx 2DfG3ZYmE6K4ohSkaGR/sE78e+Q7UfQVsZeeY8mADIrBfupqaNjuusqxkResxUpRmcCv EtYHM5cnXhOaww2EeRuTQ2QB4pfT1ck45mfYXzyyFUoFfaqcEpFXmvcuv4oqgHsPXTYM 7Idu/kicL6nC4WZV64ZCp6Bg/bp1oaeEbAaIADkSKOxkO2uCDo76WaeyyPzFMNOHR2UZ ZOdg== X-Gm-Message-State: ALoCoQmGuBDyrehjKU0uiUJz/HaH4Cz6/qVnlJzs8iPdux9rlHT0c86B8qRBIpScJ1YPCg5znikW X-Received: by 10.66.220.4 with SMTP id ps4mr2380630pac.18.1390460904628; Wed, 22 Jan 2014 23:08:24 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.49 with SMTP id f17ls263107qey.54.gmail; Wed, 22 Jan 2014 23:08:24 -0800 (PST) X-Received: by 10.58.94.195 with SMTP id de3mr702499veb.39.1390460904435; Wed, 22 Jan 2014 23:08:24 -0800 (PST) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id df13si6156112vec.148.2014.01.22.23.08.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 23:08:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id la4so826347vcb.35 for ; Wed, 22 Jan 2014 23:08:24 -0800 (PST) X-Received: by 10.220.139.136 with SMTP id e8mr714434vcu.34.1390460904330; Wed, 22 Jan 2014 23:08:24 -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 u4csp5647vcz; Wed, 22 Jan 2014 23:08:23 -0800 (PST) X-Received: by 10.67.3.97 with SMTP id bv1mr6530760pad.54.1390460903490; Wed, 22 Jan 2014 23:08:23 -0800 (PST) Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by mx.google.com with ESMTPS id p3si12874278pbj.188.2014.01.22.23.08.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 23:08:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.49 is neither permitted nor denied by best guess record for domain of pranavkumar@linaro.org) client-ip=209.85.160.49; Received: by mail-pb0-f49.google.com with SMTP id up15so1457430pbc.8 for ; Wed, 22 Jan 2014 23:08:23 -0800 (PST) X-Received: by 10.68.233.166 with SMTP id tx6mr6306461pbc.165.1390460902898; Wed, 22 Jan 2014 23:08:22 -0800 (PST) Received: from pnqlab006.amcc.com ([182.73.239.130]) by mx.google.com with ESMTPSA id xs1sm58092543pac.7.2014.01.22.23.08.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 23:08:22 -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 V2] xen: arm: platforms: Adding reset support for xgene arm64 platform. Date: Thu, 23 Jan 2014 12:38:10 +0530 Message-Id: <1390460890-27971-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.220.176 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. V2: - Removed unnecssary mdelay in code. - Adding iounmap of the base address. V1: -Initial patch. Signed-off-by: Pranavkumar Sawargaonkar Signed-off-by: Anup Patel --- xen/arch/arm/platforms/xgene-storm.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/xen/arch/arm/platforms/xgene-storm.c b/xen/arch/arm/platforms/xgene-storm.c index 5b0bd5f..9901bf0 100644 --- a/xen/arch/arm/platforms/xgene-storm.c +++ b/xen/arch/arm/platforms/xgene-storm.c @@ -20,6 +20,9 @@ #include #include +#include +#include +#include #include static uint32_t xgene_storm_quirks(void) @@ -107,6 +110,26 @@ 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); + + iounmap(addr); +} static const char * const xgene_storm_dt_compat[] __initconst = { @@ -116,6 +139,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,