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: 19275 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f71.google.com (mail-vb0-f71.google.com [209.85.212.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ED8DF246AB for ; Fri, 16 Aug 2013 23:56:01 +0000 (UTC) Received: by mail-vb0-f71.google.com with SMTP id g17sf2899728vbg.10 for ; Fri, 16 Aug 2013 16:56:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=WCEfUYn6/CBKBKjVIomhtIeJCm0AMFXoqw0jP4YSgnY=; b=o1GUO/LQz/lOxoDzqHlZygKy7OrGrzhJEqPt7yA6NKCGXS+65CQWXIsquB1wB0PuRO VD1y21PzFNSpz/obt3s7U6RRZ77X+Uj5ktGBr2LZ/p8M1e+sbahmDAqtHw/0RL6dN3U2 p/w5J1ZnGnIwBUxR5JE4+QXbXYeE064oT8cvQau5cfDJ+ID2wqQnCI640TtyXsEmjO49 iOygGUBq55RxVoC9061ANJbpgJ/jn3Q193mzsS2HDO/yBI8bqeLEXFKWXy4tt6wH/vgC XniExBwzNU6OoSy/GFqV8cLTFwu4AU9Lq2lCdjDA4JFCnmaFa3R+HowrNgOigyO0rwj3 E+3A== X-Received: by 10.224.64.202 with SMTP id f10mr246754qai.2.1376697361317; Fri, 16 Aug 2013 16:56:01 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.101 with SMTP id h5ls975353qey.91.gmail; Fri, 16 Aug 2013 16:56:01 -0700 (PDT) X-Received: by 10.58.171.4 with SMTP id aq4mr200918vec.26.1376697361214; Fri, 16 Aug 2013 16:56:01 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id sy7si9187vdc.14.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 16:56:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.48; Received: by mail-vb0-f48.google.com with SMTP id w16so1997176vbf.21 for ; Fri, 16 Aug 2013 16:56:01 -0700 (PDT) X-Gm-Message-State: ALoCoQk/wuCDeBN41XVjy+Z8SMok0b7D6JhitvR5yQqq5nSHxdD6jbtvLSlnWBMuua3kCs4gEq4h X-Received: by 10.52.120.7 with SMTP id ky7mr163002vdb.12.1376697361118; Fri, 16 Aug 2013 16:56:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp95269vcz; Fri, 16 Aug 2013 16:56:00 -0700 (PDT) X-Received: by 10.112.20.137 with SMTP id n9mr180893lbe.20.1376697359630; Fri, 16 Aug 2013 16:55:59 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx.google.com with ESMTPS id g2si8046laa.17.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 16:55:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.49 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id ev20so1980521lab.22 for ; Fri, 16 Aug 2013 16:55:58 -0700 (PDT) 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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.