From patchwork Fri Aug 16 23:55:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2845866 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9B7D19F271 for ; Fri, 16 Aug 2013 23:56:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BC6D20340 for ; Fri, 16 Aug 2013 23:56:40 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9201020315 for ; Fri, 16 Aug 2013 23:56:39 +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 1VATsa-0002we-Ug; Fri, 16 Aug 2013 23:56: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 1VATsY-00066T-OW; Fri, 16 Aug 2013 23:56:26 +0000 Received: from mail-lb0-f177.google.com ([209.85.217.177]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VATsU-00065I-Uw for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2013 23:56:24 +0000 Received: by mail-lb0-f177.google.com with SMTP id n6so1782097lbi.36 for ; Fri, 16 Aug 2013 16:55:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WCEfUYn6/CBKBKjVIomhtIeJCm0AMFXoqw0jP4YSgnY=; b=Yo0M2+dfhKSl4pxCXi/lc5ExzN7Uxa8if9WpJvXbF5Z/HBAi7o0VHENHQeFDBy2Tml C5+kKAd99UHWQnlC4Gf+uqMoeEBGRhsTNAPvLZaAYDfXz5l5k75xZPnNwjRkb3AR5WGV 77gAnbkuFJTJ8xDgfUH+TpK9IHbogwg194fel8/NpE3++s6I/yX8mb9s0dQKPv7gMytS ebe2nhj2D7TFl014SBNUHXsopbB6wKtZV2VYlqKPM3FibMAV1LwHJmu2BP8H6l4ooFzE Z45Wnmq1F4G5xgC8aXyhQ2TBpM/PtLCKJ6J3VuMkC2dowPDvLKPI3HeQVHX5hTVJVl9x fSxw== X-Gm-Message-State: ALoCoQnkNCvs1vYi9lE5SKndo6mJ43qeWa3cEdraSgZ5/c7BDC1axQ8nJN31FdD1mIEZbGxmIIFP X-Received: by 10.112.57.49 with SMTP id f17mr195425lbq.26.1376697358772; Fri, 16 Aug 2013 16:55:58 -0700 (PDT) Received: from localhost.localdomain (c83-249-208-76.bredband.comhem.se. [83.249.208.76]) by mx.google.com with ESMTPSA id b1sm5845lah.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 Aug 2013 16:55:57 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Subject: [PATCH 3/3] ARM: nomadik: retire ethernet IRQ request mechanism Date: Sat, 17 Aug 2013 01:55:51 +0200 Message-Id: <1376697351-18918-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130816_195623_134837_266B571D X-CRM114-Status: GOOD ( 15.23 ) X-Spam-Score: -2.6 (--) Cc: Linus Walleij , linux-arm-kernel@lists.infradead.org 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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 I was a bit picky and did actually define the ethernet GPIO line as both a plain GPIO line in one place and as an interrupt line in another place - as a GPIO line it would be requested and set to input and then left like that. Now that the GPIO OF core will request and set as input any GPIO line used as interrupt, we can remove this mechanism and delete the corresponding device tree node. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/ste-nomadik-s8815.dts | 4 ---- arch/arm/mach-nomadik/cpu-8815.c | 32 -------------------------------- 2 files changed, 36 deletions(-) diff --git a/arch/arm/boot/dts/ste-nomadik-s8815.dts b/arch/arm/boot/dts/ste-nomadik-s8815.dts index 16c3888..f557feb 100644 --- a/arch/arm/boot/dts/ste-nomadik-s8815.dts +++ b/arch/arm/boot/dts/ste-nomadik-s8815.dts @@ -67,10 +67,6 @@ /* Custom board node with GPIO pins to active etc */ usb-s8815 { - /* The S8815 is using this very GPIO pin for the SMSC91x IRQs */ - ethernet-gpio { - gpios = <&gpio3 8 0x1>; - }; /* This will bias the MMC/SD card detect line */ mmcsd-gpio { gpios = <&gpio3 16 0x1>; diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 13e0df9..b5c7244 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -158,38 +158,6 @@ static struct fsmc_nand_platform_data cpu8815_nand_data = { }; /* - * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects - * to simply request an IRQ passed as a resource. So the GPIO pin needs - * to be requested by this hog and set as input. - */ -static int __init cpu8815_eth_init(void) -{ - struct device_node *eth; - int gpio, irq, err; - - eth = of_find_node_by_path("/usb-s8815/ethernet-gpio"); - if (!eth) { - pr_info("could not find any ethernet GPIO\n"); - return 0; - } - gpio = of_get_gpio(eth, 0); - err = gpio_request(gpio, "eth_irq"); - if (err) { - pr_info("failed to request ethernet GPIO\n"); - return -ENODEV; - } - err = gpio_direction_input(gpio); - if (err) { - pr_info("failed to set ethernet GPIO as input\n"); - return -ENODEV; - } - irq = gpio_to_irq(gpio); - pr_info("enabled USB-S8815 ethernet GPIO %d, IRQ %d\n", gpio, irq); - return 0; -} -device_initcall(cpu8815_eth_init); - -/* * TODO: * cannot be set from device tree, convert to a proper DT * binding.