All of lore.kernel.org
 help / color / mirror / Atom feed
From: jason@lakedaemon.net (Jason Cooper)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 5/6] ARM: kirkwood: consolidate DT init of pcie
Date: Wed, 23 Jan 2013 23:34:23 +0000	[thread overview]
Message-ID: <f8ade42cb164420c6042fe3a6d659cf494074a9e.1358983578.git.jason@lakedaemon.net> (raw)
In-Reply-To: <cover.1358983578.git.jason@lakedaemon.net>

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
---
 arch/arm/mach-kirkwood/Makefile         |  1 -
 arch/arm/mach-kirkwood/board-dt.c       | 23 +++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-iconnect.c |  9 ---------
 arch/arm/mach-kirkwood/board-mplcec4.c  |  1 -
 arch/arm/mach-kirkwood/board-nsa310.c   | 25 -------------------------
 arch/arm/mach-kirkwood/board-ts219.c    | 13 -------------
 6 files changed, 23 insertions(+), 49 deletions(-)
 delete mode 100644 arch/arm/mach-kirkwood/board-nsa310.c

diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index d665309..ee3aa77 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -36,6 +36,5 @@ obj-$(CONFIG_MACH_NETSPACE_V2_DT)	+= board-ns2.o
 obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT)	+= board-ns2.o
 obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT)	+= board-ns2.o
 obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT)	+= board-ns2.o
-obj-$(CONFIG_MACH_NSA310_DT)		+= board-nsa310.o
 obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT)	+= board-openblocks_a6.o
 obj-$(CONFIG_MACH_TOPKICK_DT)		+= board-usi_topkick.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 8b35157..73b76e4 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -70,6 +70,29 @@ static void __init kirkwood_of_clk_init(void)
 	kirkwood_legacy_clk_init();
 }
 
+static const char * const kirkwood_dt_pcie0_compat[] = {
+	"iom,iconnect",
+	"mpl,cec4",
+	"qnap,ts219",
+	"zyxel,nsa310",
+	NULL
+};
+
+static int __init kirkwood_pcie_dt_init(void)
+{
+	int i;
+
+	for (i = 0; kirkwood_dt_pcie0_compat[i] != NULL; i++) {
+		if (of_machine_is_compatible(kirkwood_dt_pcie0_compat[i])) {
+			kirkwood_pcie_init(KW_PCIE0);
+			break;
+		}
+	}
+
+	return 0;
+}
+subsys_initcall(kirkwood_pcie_dt_init);
+
 static void __init kirkwood_dt_init(void)
 {
 	pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c
index c8ebde4..ff042dc 100644
--- a/arch/arm/mach-kirkwood/board-iconnect.c
+++ b/arch/arm/mach-kirkwood/board-iconnect.c
@@ -10,7 +10,6 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/of.h>
 #include <linux/mv643xx_eth.h>
 #include "common.h"
 
@@ -22,11 +21,3 @@ void __init iconnect_init(void)
 {
 	kirkwood_ge00_init(&iconnect_ge00_data);
 }
-
-static int __init iconnect_pci_init(void)
-{
-	if (of_machine_is_compatible("iom,iconnect"))
-		kirkwood_pcie_init(KW_PCIE0);
-	return 0;
-}
-subsys_initcall(iconnect_pci_init);
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c
index 7d6dc66..938712e 100644
--- a/arch/arm/mach-kirkwood/board-mplcec4.c
+++ b/arch/arm/mach-kirkwood/board-mplcec4.c
@@ -29,7 +29,6 @@ void __init mplcec4_init(void)
 	 */
 	kirkwood_ge00_init(&mplcec4_ge00_data);
 	kirkwood_ge01_init(&mplcec4_ge01_data);
-	kirkwood_pcie_init(KW_PCIE0);
 }
 
 
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c
deleted file mode 100644
index 55ade93..0000000
--- a/arch/arm/mach-kirkwood/board-nsa310.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/nsa-310-setup.c
- *
- * ZyXEL NSA-310 Setup
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <mach/kirkwood.h>
-#include <linux/of.h>
-#include "common.h"
-
-static int __init nsa310_pci_init(void)
-{
-	if (of_machine_is_compatible("zyxel,nsa310"))
-		kirkwood_pcie_init(KW_PCIE0);
-
-	return 0;
-}
-
-subsys_initcall(nsa310_pci_init);
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c
index 10fb397..f00c0a9 100644
--- a/arch/arm/mach-kirkwood/board-ts219.c
+++ b/arch/arm/mach-kirkwood/board-ts219.c
@@ -17,10 +17,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/platform_device.h>
 #include <linux/mv643xx_eth.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
 #include <mach/kirkwood.h>
 #include "common.h"
 
@@ -38,13 +35,3 @@ void __init qnap_dt_ts219_init(void)
 
 	kirkwood_ge00_init(&qnap_ts219_ge00_data);
 }
-
-/* FIXME: Will not work with DT. Maybe use MPP40_GPIO? */
-static int __init ts219_pci_init(void)
-{
-	if (machine_is_ts219())
-		kirkwood_pcie_init(KW_PCIE0);
-
-	return 0;
-}
-subsys_initcall(ts219_pci_init);
-- 
1.8.1.1

  parent reply	other threads:[~2013-01-23 23:34 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 23:34 [RFC PATCH 0/6] ARM: kirkwood: cleanup DT conversion Jason Cooper
2013-01-23 23:34 ` [RFC PATCH 1/6] ARM: kirkwood: topkick: init mvsdio via DT Jason Cooper
2013-01-23 23:34 ` [RFC PATCH 2/6] ARM: kirkwood: topkick: convert to pinctrl Jason Cooper
2013-01-23 23:34 ` [RFC PATCH 3/6] ARM: kirkwood: nsa310: cleanup includes and unneeded code Jason Cooper
2013-01-24  5:50   ` Andrew Lunn
2013-01-24 13:43     ` Florian Fainelli
2013-01-24 14:39       ` Jason Cooper
2013-01-24 15:41     ` Jason Cooper
2013-01-23 23:34 ` [RFC PATCH 4/6] ARM: kirkwood: nsa310: convert to pinctrl Jason Cooper
2013-01-23 23:34 ` Jason Cooper [this message]
2013-01-23 23:34 ` [RFC PATCH 6/6] ARM: kirkwood: consolidate mv643xx_eth init for DT Jason Cooper
2013-01-24  1:39   ` Jason Cooper
2013-01-24  6:23     ` Andrew Lunn
2013-01-24 12:07       ` Jason Cooper
2013-01-24 13:37   ` Florian Fainelli
2013-01-24 14:37     ` Jason Cooper
2013-01-24 15:54       ` Arnd Bergmann
2013-01-24 16:13         ` Jason Cooper
2013-01-24 17:51           ` Florian Fainelli
2013-01-24 18:16             ` Jason Cooper
2013-01-24 20:27               ` Florian Fainelli
2013-01-24 20:38                 ` Jason Cooper
2013-01-24 20:52                   ` Florian Fainelli
2013-01-24  1:33 ` [RFC PATCH 0/6] ARM: kirkwood: cleanup DT conversion Jason Cooper
2013-01-25  5:32 ` [RFC V2 PATCH 0/8] " Jason Cooper
2013-01-25  5:32   ` [RFC V2 PATCH 1/8] ARM: kirkwood: topkick: init mvsdio via DT Jason Cooper
2013-01-25  5:32   ` [RFC V2 PATCH 2/8] ARM: kirkwood: topkick: convert to pinctrl Jason Cooper
2013-01-25  5:32   ` [RFC V2 PATCH 3/8] ARM: kirkwood: nsa310: cleanup includes and unneeded code Jason Cooper
2013-01-26 20:08     ` Sergei Shtylyov
2013-01-26 20:22       ` Jason Cooper
2013-01-27 15:04         ` Sergei Shtylyov
2013-01-27 15:26           ` Jason Cooper
2013-01-25  5:32   ` [RFC V2 PATCH 4/8] ARM: kirkwood: nsa310: convert to pinctrl Jason Cooper
2013-01-25  5:32   ` [RFC V2 PATCH 5/8] ARM: kirkwood: consolidate DT init of pcie Jason Cooper
2013-01-25  5:32   ` [RFC V2 PATCH 6/8] ARM: mvebu: correct gated clock documentation Jason Cooper
2013-01-25  5:32   ` [RFC V2 PATCH 7/8] mv643xx.c: Add basic device tree support Jason Cooper
2013-01-25  5:32   ` [RFC V2 PATCH 8/8] ARM: kirkwood: mv643xx_eth dt conversion Jason Cooper
2013-01-25 11:15   ` [RFC V2 PATCH 0/8] ARM: kirkwood: cleanup DT conversion Arnd Bergmann
2013-01-25 12:52     ` Jason Cooper
2013-01-25 15:03       ` Sebastian Hesselbarth
2013-01-25 18:34         ` Jason Gunthorpe
2013-01-25 20:03           ` Arnd Bergmann
2013-01-28 10:40           ` Ezequiel Garcia
2013-01-28 18:07             ` Jason Gunthorpe
2013-01-28 18:24               ` Thomas Petazzoni
2013-01-28 18:41                 ` Ezequiel Garcia
2013-01-28 19:03                   ` Thomas Petazzoni
2013-01-28 19:19                     ` Jason Gunthorpe
2013-01-28 19:19                     ` Ezequiel Garcia
2013-01-28 18:43                 ` Jason Gunthorpe
2013-01-25 20:53 ` [PATCH V3 " Jason Cooper
2013-01-25 20:53   ` [PATCH V3 1/8] ARM: kirkwood: topkick: init mvsdio via DT Jason Cooper
2013-01-26 16:21     ` Andrew Lunn
2013-01-25 20:53   ` [PATCH V3 2/8] ARM: kirkwood: topkick: convert to pinctrl Jason Cooper
2013-01-26 16:55     ` [PATCH 1/2] ARM: Kirkwood: topkick: Fix SoC type and add missing pins Andrew Lunn
2013-01-26 16:55       ` [PATCH 2/2] ARM: Kirkwood: topkick: Enable i2c bus Andrew Lunn
2013-01-26 17:38         ` Sebastian Hesselbarth
2013-01-26 18:24           ` Andrew Lunn
2013-01-26 18:51             ` Sebastian Hesselbarth
2013-01-26 20:40         ` Jason Cooper
2013-01-26 20:39       ` [PATCH 1/2] ARM: Kirkwood: topkick: Fix SoC type and add missing pins Jason Cooper
2013-01-25 20:53   ` [PATCH V3 3/8] ARM: kirkwood: nsa310: cleanup includes and unneeded code Jason Cooper
2013-01-25 20:53   ` [PATCH V3 4/8] ARM: kirkwood: nsa310: convert to pinctrl Jason Cooper
2013-01-25 20:53   ` [PATCH V3 5/8] ARM: kirkwood: consolidate DT init of pcie Jason Cooper
2013-01-25 20:53   ` [PATCH V3 6/8] ARM: mvebu: correct gated clock documentation Jason Cooper
2013-01-25 20:53   ` [PATCH V3 7/8] mv643xx.c: Add basic device tree support Jason Cooper
2013-01-28 10:12     ` Mark Rutland
2013-01-28 19:38       ` Jason Cooper
2013-01-29 10:26         ` Ian Molton
2013-01-25 20:54   ` [PATCH V3 8/8] ARM: kirkwood: mv643xx_eth dt conversion Jason Cooper
2013-01-26 12:38     ` Andrew Lunn
2013-01-26 12:50       ` Sebastian Hesselbarth
2013-01-26 13:40         ` Andrew Lunn
2013-01-26 13:46           ` Sebastian Hesselbarth
2013-01-26 15:42           ` Jason Cooper
2013-01-27 12:21           ` Russell King - ARM Linux
2013-01-27 13:10             ` Sebastian Hesselbarth
2013-01-27 18:38               ` Russell King - ARM Linux
2013-01-26 15:06       ` Jason Cooper
2013-01-26 15:12         ` Andrew Lunn
2013-01-26 15:33     ` Andrew Lunn
2013-01-26 15:44       ` Jason Cooper
2013-01-26 20:50 ` [PATCH V4 0/8] ARM: kirkwood: cleanup DT conversion Jason Cooper
2013-01-26 20:50   ` [PATCH V4 01/11] ARM: kirkwood: topkick: init mvsdio via DT Jason Cooper
2013-02-16 16:25     ` Jason Cooper
2013-01-26 20:50   ` [PATCH V4 02/11] ARM: kirkwood: topkick: convert to pinctrl Jason Cooper
2013-02-16 16:11     ` Jason Cooper
2013-01-26 20:50   ` [PATCH V4 03/11] ARM: Kirkwood: topkick: Enable i2c bus Jason Cooper
2013-02-16 16:15     ` Jason Cooper
2013-01-26 20:50   ` [PATCH V4 04/11] ARM: kirkwood: nsa310: cleanup includes and unneeded code Jason Cooper
2013-01-26 20:50   ` [PATCH V4 05/11] ARM: kirkwood: nsa310: convert to pinctrl Jason Cooper
2013-02-16 16:17     ` Jason Cooper
2013-01-26 20:50   ` [PATCH V4 06/11] ARM: kirkwood: consolidate DT init of pcie Jason Cooper
2013-01-26 20:50   ` [PATCH V4 07/11] ARM: mvebu: correct gated clock documentation Jason Cooper
2013-02-15 20:37     ` Jason Cooper
2013-01-26 20:50   ` [PATCH V4 08/11] mv643xx.c: Add basic device tree support Jason Cooper
2013-01-26 20:50   ` [PATCH V4 09/11] NET: mv643xx: Get clk from device tree Jason Cooper
2013-01-27 14:27     ` [PATCH] NET: mv643xx: get smi clock " Sebastian Hesselbarth
2013-01-26 20:50   ` [PATCH V4 10/11] ARM: kirkwood: mv643xx_eth dt conversion Jason Cooper
2013-01-27 13:41     ` Sebastian Hesselbarth
2013-01-27 15:35       ` Jason Cooper
2013-01-26 20:50   ` [PATCH V4 11/11] ARM: Kirkwood: Convert QNAP TS219 Ethernet to DT Jason Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8ade42cb164420c6042fe3a6d659cf494074a9e.1358983578.git.jason@lakedaemon.net \
    --to=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.