Skip to content

Commit 2326f04

Browse files
shesselbaJason Cooper
authored andcommitted
ARM: kirkwood: convert to DT irqchip and clocksource
With recent support for true irqchip and clocksource drivers for Orion SoCs, now make use of it on DT enabled Kirkwood boards. This also introduces a new Kconfig option for legacy (non-DT) Kirkwood where old code is moved out to and polishes DT board file a little bit. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
1 parent f07d73e commit 2326f04

File tree

3 files changed

+40
-9
lines changed

3 files changed

+40
-9
lines changed

arch/arm/mach-kirkwood/Kconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,67 +2,81 @@ if ARCH_KIRKWOOD
22

33
menu "Marvell Kirkwood Implementations"
44

5+
config KIRKWOOD_LEGACY
6+
bool
7+
58
config MACH_D2NET_V2
69
bool "LaCie d2 Network v2 NAS Board"
10+
select KIRKWOOD_LEGACY
711
help
812
Say 'Y' here if you want your kernel to support the
913
LaCie d2 Network v2 NAS.
1014

1115
config MACH_DOCKSTAR
1216
bool "Seagate FreeAgent DockStar"
17+
select KIRKWOOD_LEGACY
1318
help
1419
Say 'Y' here if you want your kernel to support the
1520
Seagate FreeAgent DockStar.
1621

1722
config MACH_ESATA_SHEEVAPLUG
1823
bool "Marvell eSATA SheevaPlug Reference Board"
24+
select KIRKWOOD_LEGACY
1925
help
2026
Say 'Y' here if you want your kernel to support the
2127
Marvell eSATA SheevaPlug Reference Board.
2228

2329
config MACH_GURUPLUG
2430
bool "Marvell GuruPlug Reference Board"
31+
select KIRKWOOD_LEGACY
2532
help
2633
Say 'Y' here if you want your kernel to support the
2734
Marvell GuruPlug Reference Board.
2835

2936
config MACH_INETSPACE_V2
3037
bool "LaCie Internet Space v2 NAS Board"
38+
select KIRKWOOD_LEGACY
3139
help
3240
Say 'Y' here if you want your kernel to support the
3341
LaCie Internet Space v2 NAS.
3442

3543
config MACH_MV88F6281GTW_GE
3644
bool "Marvell 88F6281 GTW GE Board"
45+
select KIRKWOOD_LEGACY
3746
help
3847
Say 'Y' here if you want your kernel to support the
3948
Marvell 88F6281 GTW GE Board.
4049

4150
config MACH_NET2BIG_V2
4251
bool "LaCie 2Big Network v2 NAS Board"
52+
select KIRKWOOD_LEGACY
4353
help
4454
Say 'Y' here if you want your kernel to support the
4555
LaCie 2Big Network v2 NAS.
4656

4757
config MACH_NET5BIG_V2
4858
bool "LaCie 5Big Network v2 NAS Board"
59+
select KIRKWOOD_LEGACY
4960
help
5061
Say 'Y' here if you want your kernel to support the
5162
LaCie 5Big Network v2 NAS.
5263

5364
config MACH_NETSPACE_MAX_V2
5465
bool "LaCie Network Space Max v2 NAS Board"
66+
select KIRKWOOD_LEGACY
5567
help
5668
Say 'Y' here if you want your kernel to support the
5769
LaCie Network Space Max v2 NAS.
5870

5971
config MACH_NETSPACE_V2
6072
bool "LaCie Network Space v2 NAS Board"
73+
select KIRKWOOD_LEGACY
6174
help
6275
Say 'Y' here if you want your kernel to support the
6376
LaCie Network Space v2 NAS.
6477

6578
config MACH_OPENRD
79+
select KIRKWOOD_LEGACY
6680
bool
6781

6882
config MACH_OPENRD_BASE
@@ -88,37 +102,43 @@ config MACH_OPENRD_ULTIMATE
88102

89103
config MACH_RD88F6192_NAS
90104
bool "Marvell RD-88F6192-NAS Reference Board"
105+
select KIRKWOOD_LEGACY
91106
help
92107
Say 'Y' here if you want your kernel to support the
93108
Marvell RD-88F6192-NAS Reference Board.
94109

95110
config MACH_RD88F6281
96111
bool "Marvell RD-88F6281 Reference Board"
112+
select KIRKWOOD_LEGACY
97113
help
98114
Say 'Y' here if you want your kernel to support the
99115
Marvell RD-88F6281 Reference Board.
100116

101117
config MACH_SHEEVAPLUG
102118
bool "Marvell SheevaPlug Reference Board"
119+
select KIRKWOOD_LEGACY
103120
help
104121
Say 'Y' here if you want your kernel to support the
105122
Marvell SheevaPlug Reference Board.
106123

107124
config MACH_T5325
108125
bool "HP t5325 Thin Client"
126+
select KIRKWOOD_LEGACY
109127
help
110128
Say 'Y' here if you want your kernel to support the
111129
HP t5325 Thin Client.
112130

113131
config MACH_TS219
114132
bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
133+
select KIRKWOOD_LEGACY
115134
help
116135
Say 'Y' here if you want your kernel to support the
117136
QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and
118137
TS-219P+ Turbo NAS devices.
119138

120139
config MACH_TS41X
121140
bool "QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo NAS"
141+
select KIRKWOOD_LEGACY
122142
help
123143
Say 'Y' here if you want your kernel to support the
124144
QNAP TS-410, TS-410U, TS-419P, TS-419P+ and TS-419U Turbo
@@ -129,6 +149,8 @@ comment "Device tree entries"
129149
config ARCH_KIRKWOOD_DT
130150
bool "Marvell Kirkwood Flattened Device Tree"
131151
select KIRKWOOD_CLK
152+
select ORION_IRQCHIP
153+
select ORION_TIMER
132154
select POWER_SUPPLY
133155
select POWER_RESET
134156
select POWER_RESET_GPIO

arch/arm/mach-kirkwood/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
obj-y += common.o irq.o pcie.o mpp.o
2-
1+
obj-y += common.o pcie.o
2+
obj-$(CONFIG_KIRKWOOD_LEGACY) += irq.o mpp.o
33
obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o
44
obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
55
obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o

arch/arm/mach-kirkwood/board-dt.c

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#include <linux/of.h>
1616
#include <linux/of_platform.h>
1717
#include <linux/clk-provider.h>
18+
#include <linux/clocksource.h>
19+
#include <linux/dma-mapping.h>
20+
#include <linux/irqchip.h>
1821
#include <linux/kexec.h>
1922
#include <asm/mach/arch.h>
2023
#include <asm/mach/map.h>
@@ -67,10 +70,17 @@ static void __init kirkwood_legacy_clk_init(void)
6770
clk_prepare_enable(clk);
6871
}
6972

70-
static void __init kirkwood_of_clk_init(void)
73+
static void __init kirkwood_dt_time_init(void)
7174
{
7275
of_clk_init(NULL);
73-
kirkwood_legacy_clk_init();
76+
clocksource_of_init();
77+
}
78+
79+
static void __init kirkwood_dt_init_early(void)
80+
{
81+
mvebu_mbus_init("marvell,kirkwood-mbus",
82+
BRIDGE_WINS_BASE, BRIDGE_WINS_SZ,
83+
DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ);
7484
}
7585

7686
static void __init kirkwood_dt_init(void)
@@ -91,8 +101,8 @@ static void __init kirkwood_dt_init(void)
91101

92102
kirkwood_cpufreq_init();
93103

94-
/* Setup root of clk tree */
95-
kirkwood_of_clk_init();
104+
/* Setup clocks for legacy devices */
105+
kirkwood_legacy_clk_init();
96106

97107
kirkwood_cpuidle_init();
98108

@@ -114,9 +124,8 @@ static const char * const kirkwood_dt_board_compat[] = {
114124
DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
115125
/* Maintainer: Jason Cooper <jason@lakedaemon.net> */
116126
.map_io = kirkwood_map_io,
117-
.init_early = kirkwood_init_early,
118-
.init_irq = orion_dt_init_irq,
119-
.init_time = kirkwood_timer_init,
127+
.init_early = kirkwood_dt_init_early,
128+
.init_time = kirkwood_dt_time_init,
120129
.init_machine = kirkwood_dt_init,
121130
.restart = kirkwood_restart,
122131
.dt_compat = kirkwood_dt_board_compat,

0 commit comments

Comments
 (0)