From patchwork Wed Feb 4 14:02:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parth Dixit X-Patchwork-Id: 44349 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8C58F2029F for ; Wed, 4 Feb 2015 14:06:04 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id n3sf2487497wiv.0 for ; Wed, 04 Feb 2015 06:06:03 -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:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=36U6i+3IeVFtHd4zQcKYkZ6WWtyrbedL8ivgt/i+xYU=; b=kQZ3P/Zj8UeqKoRTX5N+4wT5wkqfuE4iX9oBN5T1J3kV/J+v4kWfg9fp4r19oXQApt 8D2GNEZ+phrZvYtcDk/DRhZLi3/Vzi7sjq1C+Ssw8mPPgULjJ3wtw8+nJjQL6jOCRelT r6D+HTQRy49UXrIMGBgewLD1UallF7D5EvfK2BhcXJOiQQnwzJ8FEO7pK7as/KXUiopC iCG9VFvLKA9eYl1+QKGhTi0fVJjm9oVqLePVr3Vyd0iFUq9GfDG2hxTtJgMf23gGkrz6 nIHQOXAO64iiVcfKhTx5Fc3JMsFOFIU+SjKcgMI5BWdL40eYbUIzqjnBcfEVOXWPkrBh LFjg== X-Gm-Message-State: ALoCoQmKAC1LMlBz7HnOT1I0Hn0AWPEjxit1AbVCJ5Hw+Q6700C0dqYvlDN5kASSokhMNmHXRsyh X-Received: by 10.180.105.228 with SMTP id gp4mr2741647wib.6.1423058763735; Wed, 04 Feb 2015 06:06:03 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.73 with SMTP id c9ls35623lae.74.gmail; Wed, 04 Feb 2015 06:06:03 -0800 (PST) X-Received: by 10.152.20.169 with SMTP id o9mr30936744lae.50.1423058763573; Wed, 04 Feb 2015 06:06:03 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id my5si1402155lbb.93.2015.02.04.06.06.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 06:06:03 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hz20so1701004lab.6 for ; Wed, 04 Feb 2015 06:06:03 -0800 (PST) X-Received: by 10.152.116.43 with SMTP id jt11mr30936972lab.69.1423058763484; Wed, 04 Feb 2015 06:06:03 -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.35.133 with SMTP id h5csp507407lbj; Wed, 4 Feb 2015 06:06:02 -0800 (PST) X-Received: by 10.220.244.194 with SMTP id lr2mr19468393vcb.70.1423058761897; Wed, 04 Feb 2015 06:06:01 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id ed6si723878vcb.61.2015.02.04.06.06.01 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 06:06:01 -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 1YJ0Zf-0007fB-Ms; Wed, 04 Feb 2015 14:04:59 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YJ0Zf-0007e4-2L for xen-devel@lists.xen.org; Wed, 04 Feb 2015 14:04:59 +0000 Received: from [193.109.254.147] by server-12.bemta-14.messagelabs.com id CB/69-02755-A0722D45; Wed, 04 Feb 2015 14:04:58 +0000 X-Env-Sender: parth.dixit@linaro.org X-Msg-Ref: server-6.tower-27.messagelabs.com!1423058695!12767413!1 X-Originating-IP: [209.85.192.170] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20848 invoked from network); 4 Feb 2015 14:04:56 -0000 Received: from mail-pd0-f170.google.com (HELO mail-pd0-f170.google.com) (209.85.192.170) by server-6.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 4 Feb 2015 14:04:56 -0000 Received: by pdjg10 with SMTP id g10so874842pdj.12 for ; Wed, 04 Feb 2015 06:04:55 -0800 (PST) X-Received: by 10.70.134.9 with SMTP id pg9mr11485568pdb.28.1423058695315; Wed, 04 Feb 2015 06:04:55 -0800 (PST) Received: from parthd-ubunutu.qualcomm.com ([202.46.23.62]) by mx.google.com with ESMTPSA id kg12sm2161881pbb.44.2015.02.04.06.04.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 06:04:54 -0800 (PST) From: parth.dixit@linaro.org To: xen-devel@lists.xen.org Date: Wed, 4 Feb 2015 19:32:02 +0530 Message-Id: <1423058539-26403-19-git-send-email-parth.dixit@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> References: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> Cc: ian.campbell@citrix.com, julien.grall@linaro.org, tim@xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, Parth Dixit , christoffer.dall@linaro.org Subject: [Xen-devel] [PATCH RFC 18/35] arm : add helper function for setting interrupt type 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: , MIME-Version: 1.0 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: parth.dixit@linaro.org 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.47 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: From: Parth Dixit set edge/level type information for an interrupt Signed-off-by: Parth Dixit --- xen/arch/arm/irq.c | 19 +++++++++++++++++++ xen/include/asm-arm/irq.h | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index 25ecf1d..ae4e99a 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -545,6 +545,25 @@ int platform_get_irq(const struct dt_device_node *device, int index) return irq; } +#if defined(CONFIG_ARM_64) && defined(CONFIG_ACPI) +int acpi_set_irq(int irq,int type) +{ + int res; + + /* Setup the IRQ type */ + if ( irq < NR_LOCAL_IRQS ) + res = irq_local_set_type(irq, type); + else + res = irq_set_spi_type(irq, type); + + if ( res ) + return -1; + + return 0; + +} +#endif + /* * Local variables: * mode: C diff --git a/xen/include/asm-arm/irq.h b/xen/include/asm-arm/irq.h index 435dfcd..7b09557 100644 --- a/xen/include/asm-arm/irq.h +++ b/xen/include/asm-arm/irq.h @@ -47,6 +47,10 @@ void arch_move_irqs(struct vcpu *v); /* Set IRQ type for an SPI */ int irq_set_spi_type(unsigned int spi, unsigned int type); +#if defined(CONFIG_ARM_64) && defined(CONFIG_ACPI) +int acpi_set_irq(int irq,int type); +#endif + int platform_get_irq(const struct dt_device_node *device, int index); void irq_set_affinity(struct irq_desc *desc, const cpumask_t *cpu_mask);