From patchwork Wed Oct 10 12:38:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12107 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DADCE24188 for ; Wed, 10 Oct 2012 12:38:36 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 83A70A19090 for ; Wed, 10 Oct 2012 12:38:36 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so720652iej.11 for ; Wed, 10 Oct 2012 05:38:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=gVdwjjiiveCFc9wT9DMkTfhkzPL+H24hzpFcHeV5ysQ=; b=T5qiWzNmxiK7YLyOla6K4Hwq+2AOhLwgnxiVRcKKqFImFXjLB89tl2AstfAnXb2fHl JFzc+9fj2R5Z8408AR1DfQZ3NuJ3DK4EoctwQrja6peA8eUGwQWq8kxaIjUU4DvmIj2I 0o3tq/yUiIpi/lzybeTSLfST7OAL/0JhcNthfqGI2Dp66iW0R7b0rtugKp8S2J51mnEN IkcdAcuPb53pKGqTl26rePJLQeG9bwf0s6jMvCuqgi8AyiKHeYxGxJaDf0e5SBLtHu1V c2eSL93pj2rqQQ5dGMwUnnZ0+1voJ/lSYj/rKC3X9sMSQABBbfXeDRT35Ro1B00BT8J/ 8Ucw== Received: by 10.50.46.226 with SMTP id y2mr4938763igm.62.1349872716330; Wed, 10 Oct 2012 05:38:36 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp216684igt; Wed, 10 Oct 2012 05:38:35 -0700 (PDT) Received: by 10.14.184.134 with SMTP id s6mr32285319eem.46.1349872714761; Wed, 10 Oct 2012 05:38:34 -0700 (PDT) Received: from eu1sys200aog110.obsmtp.com (eu1sys200aog110.obsmtp.com [207.126.144.129]) by mx.google.com with SMTP id a8si747968eep.29.2012.10.10.05.38.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 05:38:34 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.129; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKUHVsP3mfcZ+mQhKHu7NlAbF/fgSlRze7@postini.com; Wed, 10 Oct 2012 12:38:34 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id C5FB292; Wed, 10 Oct 2012 12:37:41 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 04EAB45; Wed, 10 Oct 2012 08:17:02 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id E8D3024C080; Wed, 10 Oct 2012 14:38:05 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 10 Oct 2012 14:38:12 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Patrice Chotard , Linus Walleij Subject: [PATCH 2/5] ARM: plat-nomadik: move NMK_GPIO_PER_CHIP into gpio-nomadik.h Date: Wed, 10 Oct 2012 14:38:09 +0200 Message-ID: <1349872689-31210-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQl68qRbHxNbgJ6E+dd9HFCuFyHy6urmlbn8ncn/U66PPLZMloOXL1AIGtieu0A3t2lJcY8y From: Patrice Chotard Move NMK_GPIO_PER_CHIP to gpio-nomadik.h and define it with a shift operator. Signed-off-by: Patrice Chotard Signed-off-by: Linus Walleij --- arch/arm/plat-nomadik/include/plat/gpio-nomadik.h | 3 +++ drivers/pinctrl/pinctrl-nomadik.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h index cf81111..a749994 100644 --- a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h +++ b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h @@ -18,6 +18,9 @@ * the "gpio" namespace for generic and cross-machine functions */ +#define GPIO_BLOCK_SHIFT 5 +#define NMK_GPIO_PER_CHIP (1 << GPIO_BLOCK_SHIFT) + /* Register in the logic block */ #define NMK_GPIO_DAT 0x00 #define NMK_GPIO_DATS 0x04 diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index fec9c30..334cd2f 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -47,8 +47,6 @@ * Symbols in this file are called "nmk_gpio" for "nomadik gpio" */ -#define NMK_GPIO_PER_CHIP 32 - struct nmk_gpio_chip { struct gpio_chip chip; struct irq_domain *domain;