From patchwork Mon May 27 09:59:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 2618791 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AAC503FD4E for ; Mon, 27 May 2013 09:59:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757288Ab3E0J6y (ORCPT ); Mon, 27 May 2013 05:58:54 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:58873 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757286Ab3E0J6x (ORCPT ); Mon, 27 May 2013 05:58:53 -0400 Received: from vergenet.net (ac225145.ppp.asahi-net.or.jp [183.77.225.145]) by kirsty.vergenet.net (Postfix) with ESMTP id 0D727266CF2; Mon, 27 May 2013 19:58:52 +1000 (EST) Received: by vergenet.net (Postfix, from userid 7100) id D68477C1B21; Mon, 27 May 2013 18:59:34 +0900 (JST) From: Simon Horman To: Arnd Bergmann , Olof Johansson Cc: linux-sh@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, Magnus Damm , Kuninori Morimoto , Simon Horman Subject: [PATCH 2/9] ARM: shmobile: add GPIO IRQ macro Date: Mon, 27 May 2013 18:59:26 +0900 Message-Id: <1369648773-7941-3-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1369648773-7941-1-git-send-email-horms+renesas@verge.net.au> References: <1369648773-7941-1-git-send-email-horms+renesas@verge.net.au> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Kuninori Morimoto R-Car series gpio_rcar driver can control GPIO IRQ today. It needs base IRQ number for gpio_rcar_config :: .irq_base This patch adds macro for GPIO IRQ. This patch was tested on Bock-W board Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/include/mach/irqs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h index b2074e2..d241bfd 100644 --- a/arch/arm/mach-shmobile/include/mach/irqs.h +++ b/arch/arm/mach-shmobile/include/mach/irqs.h @@ -16,4 +16,9 @@ #define IRQPIN_BASE 2000 #define irq_pin(nr) ((nr) + IRQPIN_BASE) +/* GPIO IRQ */ +#define _GPIO_IRQ_BASE 2500 +#define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x)) +#define GPIO_IRQ(x, y) (_GPIO_IRQ_BASE + (32 * x) + y) + #endif /* __ASM_MACH_IRQS_H */