a1521f212946c22e0e36967369d801f47f4ccd5f
[openwrt.git] / target / linux / kirkwood / patches-3.10 / 0014-arm-kirkwood-convert-ZyXEL-NSA310-to-use-DT-for-the-.patch
1 From f56884bb322085c735b027b64fff4d7294a464ee Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 15 May 2013 15:36:59 +0200
4 Subject: [PATCH 14/29] arm: kirkwood: convert ZyXEL NSA310 to use DT for the
5  PCIe interface
6
7 Now that the PCIe mvebu driver is usable on Kirkwood, use it instead
8 of the legacy PCIe code, since it allows to describe the PCIe
9 interfaces in the Device Tree.
10
11 Since it was the only device left that prevented this platform to use
12 the Device Tree only, we remove the board-nsa310.c file and the
13 related Kconfig/Makefile bits.
14
15 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 Signed-off-by: Jason Cooper <jason@lakedaemon.net>
17 ---
18  arch/arm/boot/dts/kirkwood-nsa310.dts |  8 ++++++++
19  arch/arm/mach-kirkwood/Kconfig        |  8 --------
20  arch/arm/mach-kirkwood/Makefile       |  1 -
21  arch/arm/mach-kirkwood/board-nsa310.c | 25 -------------------------
22  4 files changed, 8 insertions(+), 34 deletions(-)
23  delete mode 100644 arch/arm/mach-kirkwood/board-nsa310.c
24
25 --- a/arch/arm/boot/dts/kirkwood-nsa310.dts
26 +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
27 @@ -176,6 +176,14 @@
28                                 reg = <0x5040000 0x2fc0000>;
29                         };
30                 };
31 +
32 +               pcie-controller {
33 +                       status = "okay";
34 +
35 +                       pcie@1,0 {
36 +                               status = "okay";
37 +                       };
38 +               };
39         };
40  
41         gpio_keys {
42 --- a/arch/arm/mach-kirkwood/Kconfig
43 +++ b/arch/arm/mach-kirkwood/Kconfig
44 @@ -272,14 +272,6 @@ config MACH_NETSPACE_V2_DT
45           Say 'Y' here if you want your kernel to support the LaCie
46           Network Space v2 NAS, using Flattened Device Tree.
47  
48 -config MACH_NSA310_DT
49 -       bool "ZyXEL NSA-310 (Flattened Device Tree)"
50 -       select ARCH_KIRKWOOD_DT
51 -       select ARM_ATAG_DTB_COMPAT
52 -       help
53 -         Say 'Y' here if you want your kernel to support the
54 -         ZyXEL NSA-310 board (Flattened Device Tree).
55 -
56  config MACH_OPENBLOCKS_A6_DT
57         bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)"
58         select ARCH_KIRKWOOD_DT
59 --- a/arch/arm/mach-kirkwood/Makefile
60 +++ b/arch/arm/mach-kirkwood/Makefile
61 @@ -37,7 +37,6 @@ obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT)        +
62  obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT)  += board-ns2.o
63  obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
64  obj-$(CONFIG_MACH_NETSPACE_V2_DT)      += board-ns2.o
65 -obj-$(CONFIG_MACH_NSA310_DT)           += board-nsa310.o
66  obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT)    += board-openblocks_a6.o
67  obj-$(CONFIG_MACH_READYNAS_DT)         += board-readynas.o
68  obj-$(CONFIG_MACH_TOPKICK_DT)          += board-usi_topkick.o
69 --- a/arch/arm/mach-kirkwood/board-nsa310.c
70 +++ /dev/null
71 @@ -1,25 +0,0 @@
72 -/*
73 - * arch/arm/mach-kirkwood/nsa-310-setup.c
74 - *
75 - * ZyXEL NSA-310 Setup
76 - *
77 - * This file is licensed under the terms of the GNU General Public
78 - * License version 2.  This program is licensed "as is" without any
79 - * warranty of any kind, whether express or implied.
80 - */
81 -
82 -#include <linux/kernel.h>
83 -#include <linux/init.h>
84 -#include <mach/kirkwood.h>
85 -#include <linux/of.h>
86 -#include "common.h"
87 -
88 -static int __init nsa310_pci_init(void)
89 -{
90 -       if (of_machine_is_compatible("zyxel,nsa310"))
91 -               kirkwood_pcie_init(KW_PCIE0);
92 -
93 -       return 0;
94 -}
95 -
96 -subsys_initcall(nsa310_pci_init);