From patchwork Tue Sep 6 14:06:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101845 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp567870qgf; Tue, 6 Sep 2016 07:07:03 -0700 (PDT) X-Received: by 10.66.7.8 with SMTP id f8mr24558426paa.91.1473170823162; Tue, 06 Sep 2016 07:07:03 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f187si10273123pfc.288.2016.09.06.07.07.02; Tue, 06 Sep 2016 07:07:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756579AbcIFOGq (ORCPT + 27 others); Tue, 6 Sep 2016 10:06:46 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:61194 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756501AbcIFOGj (ORCPT ); Tue, 6 Sep 2016 10:06:39 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0M7sUy-1aughc0qvo-00vMO4; Tue, 06 Sep 2016 16:06:00 +0200 From: Arnd Bergmann To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Cc: linux-arm-kernel@lists.infradead.org, Russell King , linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 1/4] ARM: mv78xx0: simplify ethernet device creation Date: Tue, 6 Sep 2016 16:06:20 +0200 Message-Id: <20160906140623.2853066-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:Yzn73zK/S2Go0oy05is7dKs9uDjcREttWeQAPIEO3Zt8vMQ5dIq huVKgiU0dmm9CZYhcoQzvZnJ8f5ZgiGnwUJThx5QGl2FPm/iiRHVvEqY9+RiOEc/SV1zd9r 6pKa8tnnWr5oJMC948WfcOivcNGQoPwkfD0Xe5OSxSKFkx4/EzlaO43TZs5EsgDDkWBULZg vlj3qOz6UYkhcTZyIZhow== X-UI-Out-Filterresults: notjunk:1; V01:K0:PDRhCL5S22I=:xzhZP6lqaxRFLcDOweE91B NnRRgiazAberMfcpxN4jp1C5K27hixh0TrWuiZTlL78wL+P5AirC/n/hxB6sGqSPLu2irSyS9 SJnep/tnSZdHo1CNx6yTx+RJksRSzkIXc7img0CS/0VBQgSNnbJp7+RrUC+bar22j7QrpSUXT Jqb4slCR+iAwdFbB0lapVTz3kzSHuyCc/BmVULyxF2oRcj3Jq0AZD1cSVKrbrk6K9kkHWi4ye op26A7hEcn5hyz3B2WMSRMNQgttW1XGQgxFZ/xP6U7wd+eXYjU92E2fdx0uq2bg9UOXdASH/c zckZusV7xYgJn8cSrYmp3d8WtsLZF3OknwTSaOn6c/NFl6LOvM/TTfye6e095Gdf4vnUEJjCO 6prWeaw4/FK7mq4UTbwdB7skNtO+4kNy09VHChO4DS0e94uKV7e1CBpb+l34vvvxmzB2VQXFT MsCY/1GdTHej9RSYvFyJbH16xstNjCSYpTxz943WgoWOyoJmUZWUluIkg8ItuPPNyZZtplwmm 09kqdjqWAN11HnoQVBwva7W2qH5mkWj+C86+J7g0RLc3gzquvomADJghuhvtsRvHzcm3I3rDF xQ+ZCyh6048BKt+8nNinJvSbNQJCMCCUewGFq+N62RKgiQyJYuLhvbJYB2yJOEnZuWQlCstNR gZbYuCmlXh9m/h3y36uvcVY5QkXp32JP4HuLI7T8OsUheyLQL/54w6FGfChvtmDd7mAM= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Out of the four ethernet devices on mv78xx0, only the first one has an error interrupt line, for the other ones we pass NO_IRQ and then ignore the argument. In order to get closer to complete remove of NO_IRQ, this simply drops the unused function arguments. Signed-off-by: Arnd Bergmann --- arch/arm/mach-mv78xx0/common.c | 9 ++------- arch/arm/plat-orion/common.c | 7 ++----- arch/arm/plat-orion/include/plat/common.h | 7 ++----- 3 files changed, 6 insertions(+), 17 deletions(-) -- 2.9.0 diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 6af5430d0d97..f72e1e9f5fc5 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c @@ -219,7 +219,6 @@ void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data) { orion_ge01_init(eth_data, GE01_PHYS_BASE, IRQ_MV78XX0_GE01_SUM, - NO_IRQ, MV643XX_TX_CSUM_DEFAULT_LIMIT); } @@ -242,9 +241,7 @@ void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data) eth_data->duplex = DUPLEX_FULL; } - orion_ge10_init(eth_data, - GE10_PHYS_BASE, IRQ_MV78XX0_GE10_SUM, - NO_IRQ); + orion_ge10_init(eth_data, GE10_PHYS_BASE, IRQ_MV78XX0_GE10_SUM); } @@ -266,9 +263,7 @@ void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data) eth_data->duplex = DUPLEX_FULL; } - orion_ge11_init(eth_data, - GE11_PHYS_BASE, IRQ_MV78XX0_GE11_SUM, - NO_IRQ); + orion_ge11_init(eth_data, GE11_PHYS_BASE, IRQ_MV78XX0_GE11_SUM); } /***************************************************************************** diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 78c8bf4043c0..7757f71fe709 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -354,7 +354,6 @@ static struct platform_device orion_ge01 = { void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, unsigned long mapbase, unsigned long irq, - unsigned long irq_err, unsigned int tx_csum_limit) { fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, @@ -404,8 +403,7 @@ static struct platform_device orion_ge10 = { void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, unsigned long mapbase, - unsigned long irq, - unsigned long irq_err) + unsigned long irq) { fill_resources(&orion_ge10_shared, orion_ge10_shared_resources, mapbase + 0x2000, SZ_16K - 1, NO_IRQ); @@ -453,8 +451,7 @@ static struct platform_device orion_ge11 = { void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, unsigned long mapbase, - unsigned long irq, - unsigned long irq_err) + unsigned long irq) { fill_resources(&orion_ge11_shared, orion_ge11_shared_resources, mapbase + 0x2000, SZ_16K - 1, NO_IRQ); diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index 9e6d76ad48a9..8519727faa5e 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h @@ -47,18 +47,15 @@ void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, unsigned long mapbase, unsigned long irq, - unsigned long irq_err, unsigned int tx_csum_limit); void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, unsigned long mapbase, - unsigned long irq, - unsigned long irq_err); + unsigned long irq); void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, unsigned long mapbase, - unsigned long irq, - unsigned long irq_err); + unsigned long irq); void __init orion_ge00_switch_init(struct dsa_platform_data *d, int irq); From patchwork Tue Sep 6 14:06:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101843 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp567913qgf; Tue, 6 Sep 2016 07:07:07 -0700 (PDT) X-Received: by 10.98.108.4 with SMTP id h4mr73438490pfc.128.1473170824587; Tue, 06 Sep 2016 07:07:04 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f187si10273123pfc.288.2016.09.06.07.07.04; Tue, 06 Sep 2016 07:07:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756623AbcIFOGz (ORCPT + 27 others); Tue, 6 Sep 2016 10:06:55 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:58282 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756504AbcIFOGj (ORCPT ); Tue, 6 Sep 2016 10:06:39 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0M5fZo-1asTmC29eK-00xYFQ; Tue, 06 Sep 2016 16:06:00 +0200 From: Arnd Bergmann To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Cc: linux-arm-kernel@lists.infradead.org, Russell King , linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 2/4] ARM: mvebu/orion: remove NO_IRQ check from device init Date: Tue, 6 Sep 2016 16:06:21 +0200 Message-Id: <20160906140623.2853066-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160906140623.2853066-1-arnd@arndb.de> References: <20160906140623.2853066-1-arnd@arndb.de> X-Provags-ID: V03:K0:/wnxtQcnTKkOUO/B5YdnQZoSoFM7bRkO9kV1l+Kxx9NSXy4vh9l dIoAu0NKF9cZaPgZpxiYnhrDwcgWdhOQBE1vBReEUDIbDnO8rDHtWvrL1CIkdZN6nWkhEPH zqm2lkKj1ocCqmqQ6u6zDRm0+0UVZkWkb+8l77hJ45Q+HVQFbqlaAw6UCMVfmWNScQMrrTV SDMhi0MCHYe+zyXF9AlWg== X-UI-Out-Filterresults: notjunk:1; V01:K0:a0KZNjQ3UaU=:oOXPkv7+itc5Uc51K/Y7sB 8uGd6eDTUkOIfDRSo7lrhmCyG2FCfstI3k87PtSrXpd6+f2KBvP0wPvrgc6MA8WXh4MR5ObMe wJqDg78wm6vajCcwdPNb7+S8y8Sb3VCNrV0iCqTVo2v/9g+uPs2AA8PEUphyHU5BRrS9wY41I bcnLURwZ16si1ZGSoRyhN81Ejt9oYrW0WRQtYXlmt8pQRzpxt3QUJk4lgHV8ukOTeNLRDF/1b lwrBRe9QLze7umwRFfdWNx82i8RE73oaXRA8oKi0VdnD3n7Mm+WuUmyNM1hwCUhNia9H0rNJQ JAg+ESeGRbq0r6iiiI7zU2uIo4noiiWSMeMOACiCvspVk8/IF1pTRanmYHqqn4i7DjGv65qfL JEoCtlW0qayQ+NZtE8TvxYnmCRiDaptshWABlzuUYxHDIy0m5qacjZr7YiRGmugUbsRPN5q2/ LgJVIpH/HWgsDJQSC/Rhn2DN2T5UPw4iRAfp/GuOiU4ElQ5lvKH/jyw2PNUVbZkuJoQgk2yAi bfHIsmr/GMshI029zXOTUvzCwqekJUd0TYhp/qrNpdbXcRM1641qaTyspniP9EDhc8mOeUvsP Sf7j6ZpnJgyHehcCkunci9GllPIS43fKxd4bS9g7qofIhrtZlrCtlOenrWIfYVFCaYjFsvaT6 ziI8IiBY4rgbUVyP/fDy4IXpCJjRIXoCLJ+/G8uAZU2+DN270l/EMOZ+U3cQr8in71hQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For most devices, we know in advance whether they have an interrupt line or not, so we can avoid passing NO_IRQ and instead split fill_resources() into two interfaces, with only the new fill_resources_irq() function taking an irq argument, which it then can use unconditionally. Signed-off-by: Arnd Bergmann --- arch/arm/plat-orion/common.c | 52 ++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 23 deletions(-) -- 2.9.0 diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 7757f71fe709..7b9b70785a54 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -52,21 +52,27 @@ void __init orion_clkdev_init(struct clk *tclk) static void fill_resources(struct platform_device *device, struct resource *resources, resource_size_t mapbase, - resource_size_t size, - unsigned int irq) + resource_size_t size) { device->resource = resources; device->num_resources = 1; resources[0].flags = IORESOURCE_MEM; resources[0].start = mapbase; resources[0].end = mapbase + size; +} - if (irq != NO_IRQ) { - device->num_resources++; - resources[1].flags = IORESOURCE_IRQ; - resources[1].start = irq; - resources[1].end = irq; - } +static void fill_resources_irq(struct platform_device *device, + struct resource *resources, + resource_size_t mapbase, + resource_size_t size, + unsigned int irq) +{ + fill_resources(device, resources, mapbase, size); + + device->num_resources++; + resources[1].flags = IORESOURCE_IRQ; + resources[1].start = irq; + resources[1].end = irq; } /***************************************************************************** @@ -93,7 +99,7 @@ static void __init uart_complete( data->uartclk = uart_get_clk_rate(clk); orion_uart->dev.platform_data = data; - fill_resources(orion_uart, resources, mapbase, 0xff, irq); + fill_resources_irq(orion_uart, resources, mapbase, 0xff, irq); platform_device_register(orion_uart); } @@ -305,8 +311,8 @@ void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, unsigned int tx_csum_limit) { fill_resources(&orion_ge00_shared, orion_ge00_shared_resources, - mapbase + 0x2000, SZ_16K - 1, NO_IRQ); - fill_resources(&orion_ge_mvmdio, orion_ge_mvmdio_resources, + mapbase + 0x2000, SZ_16K - 1); + fill_resources_irq(&orion_ge_mvmdio, orion_ge_mvmdio_resources, mapbase + 0x2004, 0x84 - 1, irq_err); orion_ge00_shared_data.tx_csum_limit = tx_csum_limit; ge_complete(&orion_ge00_shared_data, @@ -357,7 +363,7 @@ void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, unsigned int tx_csum_limit) { fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, - mapbase + 0x2000, SZ_16K - 1, NO_IRQ); + mapbase + 0x2000, SZ_16K - 1); orion_ge01_shared_data.tx_csum_limit = tx_csum_limit; ge_complete(&orion_ge01_shared_data, orion_ge01_resources, irq, &orion_ge01_shared, @@ -406,7 +412,7 @@ void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, unsigned long irq) { fill_resources(&orion_ge10_shared, orion_ge10_shared_resources, - mapbase + 0x2000, SZ_16K - 1, NO_IRQ); + mapbase + 0x2000, SZ_16K - 1); ge_complete(&orion_ge10_shared_data, orion_ge10_resources, irq, &orion_ge10_shared, NULL, @@ -454,7 +460,7 @@ void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, unsigned long irq) { fill_resources(&orion_ge11_shared, orion_ge11_shared_resources, - mapbase + 0x2000, SZ_16K - 1, NO_IRQ); + mapbase + 0x2000, SZ_16K - 1); ge_complete(&orion_ge11_shared_data, orion_ge11_resources, irq, &orion_ge11_shared, NULL, @@ -535,7 +541,7 @@ void __init orion_i2c_init(unsigned long mapbase, unsigned long freq_m) { orion_i2c_pdata.freq_m = freq_m; - fill_resources(&orion_i2c, orion_i2c_resources, mapbase, + fill_resources_irq(&orion_i2c, orion_i2c_resources, mapbase, SZ_32 - 1, irq); platform_device_register(&orion_i2c); } @@ -545,7 +551,7 @@ void __init orion_i2c_1_init(unsigned long mapbase, unsigned long freq_m) { orion_i2c_1_pdata.freq_m = freq_m; - fill_resources(&orion_i2c_1, orion_i2c_1_resources, mapbase, + fill_resources_irq(&orion_i2c_1, orion_i2c_1_resources, mapbase, SZ_32 - 1, irq); platform_device_register(&orion_i2c_1); } @@ -573,14 +579,14 @@ static struct platform_device orion_spi_1 = { void __init orion_spi_init(unsigned long mapbase) { fill_resources(&orion_spi, &orion_spi_resources, - mapbase, SZ_512 - 1, NO_IRQ); + mapbase, SZ_512 - 1); platform_device_register(&orion_spi); } void __init orion_spi_1_init(unsigned long mapbase) { fill_resources(&orion_spi_1, &orion_spi_1_resources, - mapbase, SZ_512 - 1, NO_IRQ); + mapbase, SZ_512 - 1); platform_device_register(&orion_spi_1); } @@ -738,7 +744,7 @@ void __init orion_ehci_init(unsigned long mapbase, enum orion_ehci_phy_ver phy_version) { orion_ehci_data.phy_version = phy_version; - fill_resources(&orion_ehci, orion_ehci_resources, mapbase, SZ_4K - 1, + fill_resources_irq(&orion_ehci, orion_ehci_resources, mapbase, SZ_4K - 1, irq); platform_device_register(&orion_ehci); @@ -762,7 +768,7 @@ static struct platform_device orion_ehci_1 = { void __init orion_ehci_1_init(unsigned long mapbase, unsigned long irq) { - fill_resources(&orion_ehci_1, orion_ehci_1_resources, + fill_resources_irq(&orion_ehci_1, orion_ehci_1_resources, mapbase, SZ_4K - 1, irq); platform_device_register(&orion_ehci_1); @@ -786,7 +792,7 @@ static struct platform_device orion_ehci_2 = { void __init orion_ehci_2_init(unsigned long mapbase, unsigned long irq) { - fill_resources(&orion_ehci_2, orion_ehci_2_resources, + fill_resources_irq(&orion_ehci_2, orion_ehci_2_resources, mapbase, SZ_4K - 1, irq); platform_device_register(&orion_ehci_2); @@ -816,7 +822,7 @@ void __init orion_sata_init(struct mv_sata_platform_data *sata_data, unsigned long irq) { orion_sata.dev.platform_data = sata_data; - fill_resources(&orion_sata, orion_sata_resources, + fill_resources_irq(&orion_sata, orion_sata_resources, mapbase, 0x5000 - 1, irq); platform_device_register(&orion_sata); @@ -846,7 +852,7 @@ void __init orion_crypto_init(unsigned long mapbase, unsigned long sram_size, unsigned long irq) { - fill_resources(&orion_crypto, orion_crypto_resources, + fill_resources_irq(&orion_crypto, orion_crypto_resources, mapbase, 0xffff, irq); orion_crypto.num_resources = 3; orion_crypto_resources[2].start = srambase; From patchwork Tue Sep 6 14:06:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101842 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp568157qgf; Tue, 6 Sep 2016 07:07:33 -0700 (PDT) X-Received: by 10.98.206.129 with SMTP id y123mr73043758pfg.7.1473170853256; Tue, 06 Sep 2016 07:07:33 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si35550663pas.289.2016.09.06.07.07.32; Tue, 06 Sep 2016 07:07:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756641AbcIFOH2 (ORCPT + 27 others); Tue, 6 Sep 2016 10:07:28 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:59767 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756507AbcIFOGl (ORCPT ); Tue, 6 Sep 2016 10:06:41 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0Mb8mZ-1bN7h53TrP-00Kcrn; Tue, 06 Sep 2016 16:06:00 +0200 From: Arnd Bergmann To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Cc: linux-arm-kernel@lists.infradead.org, Russell King , linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 3/4] ARM: orion5x: avoid NO_IRQ in orion_ge00_switch_init Date: Tue, 6 Sep 2016 16:06:22 +0200 Message-Id: <20160906140623.2853066-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160906140623.2853066-1-arnd@arndb.de> References: <20160906140623.2853066-1-arnd@arndb.de> X-Provags-ID: V03:K0:lXzx3Cb1zzk200BlefjjRw/0aRVLSzaLsxAxrrW8Bq48whi0/T+ LCx431zoAW1dg1bUSaZo0M8Lwh8sgIEJwSTduyHoleyPXXIVf7x3ueo0P8jFnp82o3Qvw1B ZG3zrv3rFfaG/bl6pO3Nvnmpwsv7K2GuzBbN2vUh2nT2WiJIpAMuHohqRE2BIFo4V7DVZBP lnRg1rxgvoCjrQhcOVHaA== X-UI-Out-Filterresults: notjunk:1; V01:K0:DKyyxZa5vFo=:DyUcCgTtJDhbhgL7fyAOI3 n14E2Y4PqNoVkJ7SHJkPaQOZJyindfx151mPHvOl5dNGwCAbsga0DjUPl4cs4uqs6YHAaJDYK 4EGzqYySss2VmBkrdvjNWz0vQptzwnOvGacGXbHqg84YgDM3/4Okecg5a9Hf0cwgbsSY0mzUD 9dR/yZKtyvaN3R/0spN4x9jg0C/lbK1HLN8w3pSsMyqFkGNjk+StHdOwlEYc8tQcDchR4nNI5 VpHaM4pIkRh26hohdWCAfAOAi5DiopWhLWR5rFeGzkBJn7BUvqyxlxr6v3XQDFr++7h5jzrV/ GMPGTNNjVjvosquOoni3z9zXjly0rvTy5/KSPKnEy0pNyB31kO9p1yKhjGzz7d96NoQuF2W2j R5XzkR6sRobY6rQC1s1dRqBe+UXOWPwys8NDmLvbWQZxxSzPXxNJLBM+34tckki+Ko3vxcmiN rnbmLRj16niyN4eQqxe75wFH2O2IcT5EIfOWmgxGmFQf/vIUwuHxkQMzRCxDsMyChw3VEjIH5 TlSaRKSIMoFB5EX/ybowXvV5L3pG9PgvSSe/03H7+wyQSyZJ0qAOKlaMgVc6kOWmsRguk9V+E 2G8oxeH1RYSHy8d80RwmGcvCaxDUbmnPyJAhPrRUYtP1pOIDlf2AtBfX/VpgBFPw38FVCn+6/ cLQ/B4ya9FIaMCu6MDNnPmcVnzZoIDoG8s4lsaKzBN0TPmocmSErUvqupu3DfkDRfYo0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As of commit 5be9fc23cdb4 ("ARM: orion5x: fix legacy orion5x IRQ numbers"), IRQ zero is no longer a valid interrupt on Orion5x, so we can use the normal convention of using '0' to indicate an invalid interrupt, rather than the deprecated NO_IRQ constant My first approach was to pass a pointer to the resource into orion_ge00_switch_init(), but it seemed to just add complexity for no good. Signed-off-by: Arnd Bergmann --- arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 2 +- arch/arm/mach-orion5x/wnr854t-setup.c | 2 +- arch/arm/mach-orion5x/wrt350n-v2-setup.c | 2 +- arch/arm/plat-orion/common.c | 7 +++---- 4 files changed, 6 insertions(+), 7 deletions(-) -- 2.9.0 diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index c742e7b40b0d..8df5cb8263a2 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c @@ -120,7 +120,7 @@ static void __init rd88f5181l_fxo_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&rd88f5181l_fxo_eth_data); - orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, NO_IRQ); + orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, 0); orion5x_uart0_init(); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 4e1e5c8f6111..5e929d5e5a23 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c @@ -124,7 +124,7 @@ static void __init wnr854t_init(void) * Configure peripherals. */ orion5x_eth_init(&wnr854t_eth_data); - orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); + orion5x_eth_switch_init(&wnr854t_switch_plat_data, 0); orion5x_uart0_init(); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 61e9027ef224..826ca94ef248 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c @@ -210,7 +210,7 @@ static void __init wrt350n_v2_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&wrt350n_v2_eth_data); - orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, NO_IRQ); + orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, 0); orion5x_uart0_init(); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 7b9b70785a54..30328e92ca58 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -489,11 +489,10 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d, int irq) { int i; - if (irq != NO_IRQ) { - orion_switch_resources[0].start = irq; - orion_switch_resources[0].end = irq; + orion_switch_resources[0].start = irq; + orion_switch_resources[0].end = irq; + if (irq) orion_switch_device.num_resources = 1; - } d->netdev = &orion_ge00.dev; for (i = 0; i < d->nr_chips; i++) From patchwork Tue Sep 6 14:06:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101844 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp567883qgf; Tue, 6 Sep 2016 07:07:04 -0700 (PDT) X-Received: by 10.66.54.132 with SMTP id j4mr73036466pap.110.1473170824164; Tue, 06 Sep 2016 07:07:04 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f187si10273123pfc.288.2016.09.06.07.07.03; Tue, 06 Sep 2016 07:07:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756600AbcIFOGw (ORCPT + 27 others); Tue, 6 Sep 2016 10:06:52 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:49328 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756503AbcIFOGj (ORCPT ); Tue, 6 Sep 2016 10:06:39 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0M2551-1anmwU0eD5-00txcN; Tue, 06 Sep 2016 16:06:01 +0200 From: Arnd Bergmann To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Cc: linux-arm-kernel@lists.infradead.org, Russell King , linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4/4] ARM: orion5x: remove extraneous NO_IRQ Date: Tue, 6 Sep 2016 16:06:23 +0200 Message-Id: <20160906140623.2853066-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160906140623.2853066-1-arnd@arndb.de> References: <20160906140623.2853066-1-arnd@arndb.de> X-Provags-ID: V03:K0:z+rLkvMbB0q7D+4ahfmMzwjyaC1x38RIirVdMEUObsQfAJ1du2G r9YeZP0cKCCrLL9eZ1/ri+fXiVakmGYXtVVC+qKXtFIvSQObO6x/WY18OhoMYTE/Mqo2IXw kfrEqyOMeAKn3T7YuEifJSlPoQvUp9WhJTZSz0AU3pzM/KMOGlqOjBlrxQOSg6qR1DnJ0CY +9WcEiN3YiKzTHp/nZ9xA== X-UI-Out-Filterresults: notjunk:1; V01:K0:zhNwb7V4ScE=:fJFw13u+ayzr+8zKUFdCvi 0H+5vc++3zB2/QAeNNmA6d9OJxsrJJEhAf6JH27u8l9ps1hSZ/QomgDaL8tGNGdogVRGiPWBP VF6mpnfkyb1mZ2NZCtMWr7igE7r6Z1tIn2sOq7tOrcIizKZuHIlxCHc+tw/E3+meg9NRNnLZ2 ZeMEysmLv8opFTXcUkES/bdYmcvOkp02X/97smQAhJrT9YbtGTshvmb8iTeWUpIZHjBHsgHx7 Km/8FvFMDRlGylthMOJFaF8kZwmgaQwZIhCHTqYWI2ptB8vm2GEJJZ/kDRtjAtZ8PV4wtaots 25PCesLtX+GNeJPnXGHGHoFf0B9v8FdiKMLCwG+JwmVKwOfHmGmOKOgmlQ9m+PKDXyX5/OLep VtfRFKH3RxDs5CD/+72MK/4kNSm8Eb+NpLXV8V5pj4adurfLIzbQa699grkQPJMCjZYl7qflj 0Fnjw9+efSRG66QpvuIpf5XwhOnJSk442Rp0tXYbgVnTJnPaVq3zXRmqU+X3hbQBmEALJSg16 r5BGEikaooXdbQKtzfvHae0Cxd42A0L9/dZl50zM70DAtPBhqTVf7tOGoiPww18aiupUvt107 NQyY7yGBWVjh0DSPWrSR/R9joUBjKkobwXn3gUvSTJkxDpnYtAfB8gq3ra+xg/Q14izOSnxL7 jaAeOSKSL2DU72IUlDZBVrfIQn7HgIDP6z+22h51IFMrbjmqVqrrWF1Q7IRZVMeXS9RY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rd88f6183ap-ge passes NO_IRQ as the interrupt line for its m25p80 NOR flash. However, this device never uses an interrupt and the driver doesn't care, so we can simply remove the deprecated constant here. Signed-off-by: Arnd Bergmann --- arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 1 - 1 file changed, 1 deletion(-) -- 2.9.0 diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index 4bf80dd5478c..8ffaead76771 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c @@ -71,7 +71,6 @@ static struct spi_board_info __initdata rd88f6183ap_ge_spi_slave_info[] = { { .modalias = "m25p80", .platform_data = &rd88f6183ap_ge_spi_slave_data, - .irq = NO_IRQ, .max_speed_hz = 20000000, .bus_num = 0, .chip_select = 0,