From patchwork Thu Nov 14 18:53:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 21513 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C0BEB23FDD for ; Thu, 14 Nov 2013 18:53:17 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id m1sf5654331oag.3 for ; Thu, 14 Nov 2013 10:53:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=ITB98toYhQeelik8/gtKP2I6eMeF1Z+0hsMiOPWDZq0=; b=c25VngApgPOqS9iXB0hfQtsLtaD7QfHu4YKSB+vu8yr93yyHAC8Fi4zvhAtY8ZI+Td eKrQSGA+nWlaCJBBNHIs62HrJ26ZJWCpVesxTLDouA6HDmazkDJXDd/XjXN86XnDQAyU fvffBlS4eOnRfyKC/GctDKNXarFfA+0KidkG+JLEbSIprh30SwCHIKRlvO5r9fjUGce0 o30pX4eEn4bpDyKKo5Z6m4vK3VMxsJn+FW00n1EOntN/7bhBnvQsOrGJ36cOrrEvurnw irnRUs6/+/aOKAzMxkJzLNPEi0rJPkki/1TWBJqkuJX2sMfCbBD7Mhpmj/FUDhTrU3eR zwdg== X-Gm-Message-State: ALoCoQnSC+lRMUpf9OC0kSZEStzMM81W1xltA/aiimOL5237pJZ/omnPFUhgnGrkML8R1WvGTnI/ X-Received: by 10.182.95.68 with SMTP id di4mr1239990obb.4.1384455196938; Thu, 14 Nov 2013 10:53:16 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.231 with SMTP id b7ls1078214qec.55.gmail; Thu, 14 Nov 2013 10:53:16 -0800 (PST) X-Received: by 10.52.26.69 with SMTP id j5mr1420238vdg.21.1384455196851; Thu, 14 Nov 2013 10:53:16 -0800 (PST) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id gq10si17651655vdc.43.2013.11.14.10.53.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 10:53:16 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id ie18so1016912vcb.27 for ; Thu, 14 Nov 2013 10:53:16 -0800 (PST) X-Received: by 10.220.102.212 with SMTP id h20mr485619vco.86.1384455196563; Thu, 14 Nov 2013 10:53:16 -0800 (PST) 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 u4csp338937vcz; Thu, 14 Nov 2013 10:53:16 -0800 (PST) X-Received: by 10.152.22.170 with SMTP id e10mr569306laf.78.1384455195378; Thu, 14 Nov 2013 10:53:15 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by mx.google.com with ESMTPS id 9si7745916las.84.2013.11.14.10.53.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 10:53:15 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.46 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id eh20so1956753lab.33 for ; Thu, 14 Nov 2013 10:53:14 -0800 (PST) X-Received: by 10.152.22.131 with SMTP id d3mr1701537laf.35.1384455194665; Thu, 14 Nov 2013 10:53:14 -0800 (PST) Received: from localhost.localdomain (c83-254-159-13.bredband.comhem.se. [83.254.159.13]) by mx.google.com with ESMTPSA id 8sm39271025laq.5.2013.11.14.10.53.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2013 10:53:13 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Cc: Linus Walleij Subject: [PATCH] ARM: nomadik: get rid of explicit ethernet GPIO management Date: Thu, 14 Nov 2013 19:53:05 +0100 Message-Id: <1384455185-21331-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 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.220.182 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: , We used to set up the GPIO used for the SMC ethernet IRQ by requesting the GPIO line explicitly. As we recently established that specifying the GPIO controller as interrupt parent and requesting one of its interrupts by reference should be enough, we do away with this. Incidentally, the Nomadik GPIO chip driver handles this just fine: the IRQ is set up and fired as expected. 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 16c3888b7b15..f557feb997f4 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 cce2c9dfb5d1..4a1065e41e9c 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -110,38 +110,6 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) } /* - * 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); - -/* * This GPIO pin turns on a line that is used to detect card insertion * on this board. */