From patchwork Wed Mar 19 19:29:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 3861201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EFFCFBF540 for ; Wed, 19 Mar 2014 20:58:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 11DE8201FA for ; Wed, 19 Mar 2014 20:58:00 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2678201F4 for ; Wed, 19 Mar 2014 20:57:58 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMKn-0004GR-8h; Wed, 19 Mar 2014 19:39:29 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMJy-0006E0-HU; Wed, 19 Mar 2014 19:38:38 +0000 Received: from bombadil.infradead.org ([2001:1868:205::9]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMCq-0005cM-6k for linux-arm-kernel@merlin.infradead.org; Wed, 19 Mar 2014 19:31:16 +0000 Received: from moutng.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQMCm-0004fR-Nm for linux-arm-kernel@lists.infradead.org; Wed, 19 Mar 2014 19:31:14 +0000 Received: from wuerfel.lan (HSI-KBW-134-3-135-108.hsi14.kabel-badenwuerttemberg.de [134.3.135.108]) by mrelayeu.kundenserver.de (node=mreue105) with ESMTP (Nemesis) id 0M8hNb-1XLbmJ137T-00wAo1; Wed, 19 Mar 2014 20:30:36 +0100 From: Arnd Bergmann To: arm@kernel.org Subject: [PATCH 17/62] ARM: ixp4xx: fix gpio rework Date: Wed, 19 Mar 2014 20:29:14 +0100 Message-Id: <1395257399-359545-18-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395257399-359545-1-git-send-email-arnd@arndb.de> References: <1395257399-359545-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:lbVtFKsqvFh/BMxlIlMQS79nVB/9tHLY4M1jBpoLMAu eFMdWS+G5uzJIG4uvCE0QMyL6rr3o60kZkB4s32AZpLmflPVHn t/TRnQJfk3C53YeyaumFgPSaXScy74WndyQajQFoAZ/WTS2WaB TKYdQ0iBsbsvt9GlVfz9pmRbYeae9LUsfHj/nbAmbUkWNqzkuB QWjCSYjEVdrvkCVTdkwNEoEIWrCF1+lteIyYJ0FU55Nnqu4Hqo zXNHToVLxrcwuc55IqhfyKgj6UcIPiN61DFpIusPkbfqzFO5LR xSrZxG2v1fwHUECho7WxWWblGWHdWevYH0MBj9C8btWQxUJYc8 eKSZmqdSd1XT909S/wcHiaBbeLkA7k2nDWm3cuuQW X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140319_123113_138352_0E64A676 X-CRM114-Status: GOOD ( 11.60 ) X-Spam-Score: -0.0 (/) Cc: Linus Walleij , Imre Kaloz , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Krzysztof Halasa X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 098e30f6558f8 "ARM: ixp4xx: stop broadcasting the custom GPIO API" changed the internal gpio code of ixp4xx to be accessible only from common.c, but unfortunately that broke the Goramo MultiLink code, which uses this API. This tries to restore the previous state without exposing the API globally again. A better solution might be needed. Signed-off-by: Arnd Bergmann Cc: Linus Walleij Cc: Krzysztof Halasa Cc: Imre Kaloz --- arch/arm/mach-ixp4xx/common.c | 6 +++--- arch/arm/mach-ixp4xx/goramo_mlr.c | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index bffbce4..d628b3d 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -110,7 +110,7 @@ void __init ixp4xx_map_io(void) #define IXP4XX_GPIO_CLK_0 14 #define IXP4XX_GPIO_CLK_1 15 -static void gpio_line_config(u8 line, u32 direction) +void gpio_line_config(u8 line, u32 direction) { if (direction == IXP4XX_GPIO_IN) *IXP4XX_GPIO_GPOER |= (1 << line); @@ -118,12 +118,12 @@ static void gpio_line_config(u8 line, u32 direction) *IXP4XX_GPIO_GPOER &= ~(1 << line); } -static void gpio_line_get(u8 line, int *value) +void gpio_line_get(u8 line, int *value) { *value = (*IXP4XX_GPIO_GPINR >> line) & 0x1; } -static void gpio_line_set(u8 line, int value) +void gpio_line_set(u8 line, int value) { if (value == IXP4XX_GPIO_HIGH) *IXP4XX_GPIO_GPOUTR |= (1 << line); diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index e54ff491..5a635c6 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c @@ -17,6 +17,13 @@ #include #include +#define IXP4XX_GPIO_OUT 0x1 +#define IXP4XX_GPIO_IN 0x2 + +void gpio_line_config(u8 line, u32 direction); +void gpio_line_get(u8 line, int *value); +void gpio_line_set(u8 line, int value); + #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ #define SLOT_MPCI 0x0D /* IDSEL = AD19 */