aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/Kconfig3
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c12
-rw-r--r--arch/arm/mach-kirkwood/common.c29
-rw-r--r--arch/arm/mach-kirkwood/common.h2
-rw-r--r--arch/arm/mach-kirkwood/include/mach/bridge-regs.h2
-rw-r--r--arch/arm/mach-kirkwood/ts219-setup.c2
6 files changed, 33 insertions, 17 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index b56bd3d7ece3..e610e137aa36 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -128,13 +128,12 @@ comment "Device tree entries"
128 128
129config ARCH_KIRKWOOD_DT 129config ARCH_KIRKWOOD_DT
130 bool "Marvell Kirkwood Flattened Device Tree" 130 bool "Marvell Kirkwood Flattened Device Tree"
131 select KIRKWOOD_CLK
131 select POWER_SUPPLY 132 select POWER_SUPPLY
132 select POWER_RESET 133 select POWER_RESET
133 select POWER_RESET_GPIO 134 select POWER_RESET_GPIO
134 select REGULATOR 135 select REGULATOR
135 select REGULATOR_FIXED_VOLTAGE 136 select REGULATOR_FIXED_VOLTAGE
136 select MVEBU_CLK_CORE
137 select MVEBU_CLK_GATING
138 select USE_OF 137 select USE_OF
139 help 138 help
140 Say 'Y' here if you want your kernel to support the 139 Say 'Y' here if you want your kernel to support the
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index f5aed1f4b080..cee5dc71cb60 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -15,7 +15,6 @@
15#include <linux/of.h> 15#include <linux/of.h>
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17#include <linux/clk-provider.h> 17#include <linux/clk-provider.h>
18#include <linux/clk/mvebu.h>
19#include <linux/kexec.h> 18#include <linux/kexec.h>
20#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 20#include <asm/mach/map.h>
@@ -25,11 +24,6 @@
25#include <plat/common.h> 24#include <plat/common.h>
26#include "common.h" 25#include "common.h"
27 26
28static struct of_device_id kirkwood_dt_match_table[] __initdata = {
29 { .compatible = "simple-bus", },
30 { }
31};
32
33/* 27/*
34 * There are still devices that doesn't know about DT yet. Get clock 28 * There are still devices that doesn't know about DT yet. Get clock
35 * gates here and add a clock lookup alias, so that old platform 29 * gates here and add a clock lookup alias, so that old platform
@@ -77,7 +71,7 @@ static void __init kirkwood_legacy_clk_init(void)
77 71
78static void __init kirkwood_of_clk_init(void) 72static void __init kirkwood_of_clk_init(void)
79{ 73{
80 mvebu_clocks_init(); 74 of_clk_init(NULL);
81 kirkwood_legacy_clk_init(); 75 kirkwood_legacy_clk_init();
82} 76}
83 77
@@ -97,6 +91,8 @@ static void __init kirkwood_dt_init(void)
97 91
98 kirkwood_l2_init(); 92 kirkwood_l2_init();
99 93
94 kirkwood_cpufreq_init();
95
100 /* Setup root of clk tree */ 96 /* Setup root of clk tree */
101 kirkwood_of_clk_init(); 97 kirkwood_of_clk_init();
102 98
@@ -163,7 +159,7 @@ static void __init kirkwood_dt_init(void)
163 if (of_machine_is_compatible("usi,topkick")) 159 if (of_machine_is_compatible("usi,topkick"))
164 usi_topkick_init(); 160 usi_topkick_init();
165 161
166 of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); 162 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
167} 163}
168 164
169static const char * const kirkwood_dt_board_compat[] = { 165static const char * const kirkwood_dt_board_compat[] = {
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 9b0b90171e62..7c72c725b711 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -528,12 +528,6 @@ void __init kirkwood_init_early(void)
528{ 528{
529 orion_time_set_base(TIMER_VIRT_BASE); 529 orion_time_set_base(TIMER_VIRT_BASE);
530 530
531 /*
532 * Some Kirkwood devices allocate their coherent buffers from atomic
533 * context. Increase size of atomic coherent pool to make sure such
534 * the allocations won't fail.
535 */
536 init_dma_coherent_pool_size(SZ_1M);
537 mvebu_mbus_init("marvell,kirkwood-mbus", 531 mvebu_mbus_init("marvell,kirkwood-mbus",
538 BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, 532 BRIDGE_WINS_BASE, BRIDGE_WINS_SZ,
539 DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ); 533 DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ);
@@ -604,6 +598,29 @@ void __init kirkwood_audio_init(void)
604} 598}
605 599
606/***************************************************************************** 600/*****************************************************************************
601 * CPU Frequency
602 ****************************************************************************/
603static struct resource kirkwood_cpufreq_resources[] = {
604 [0] = {
605 .start = CPU_CONTROL_PHYS,
606 .end = CPU_CONTROL_PHYS + 3,
607 .flags = IORESOURCE_MEM,
608 },
609};
610
611static struct platform_device kirkwood_cpufreq_device = {
612 .name = "kirkwood-cpufreq",
613 .id = -1,
614 .num_resources = ARRAY_SIZE(kirkwood_cpufreq_resources),
615 .resource = kirkwood_cpufreq_resources,
616};
617
618void __init kirkwood_cpufreq_init(void)
619{
620 platform_device_register(&kirkwood_cpufreq_device);
621}
622
623/*****************************************************************************
607 * General 624 * General
608 ****************************************************************************/ 625 ****************************************************************************/
609/* 626/*
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index cbbc0b80d4a1..e2e19b302c28 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -51,6 +51,8 @@ void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts,
51 int (*dev_ready)(struct mtd_info *)); 51 int (*dev_ready)(struct mtd_info *));
52void kirkwood_audio_init(void); 52void kirkwood_audio_init(void);
53void kirkwood_cpuidle_init(void); 53void kirkwood_cpuidle_init(void);
54void kirkwood_cpufreq_init(void);
55
54void kirkwood_restart(char, const char *); 56void kirkwood_restart(char, const char *);
55void kirkwood_clk_init(void); 57void kirkwood_clk_init(void);
56 58
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
index 5c82b7dce4e2..d4cbe5e81bb4 100644
--- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
+++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
@@ -17,6 +17,7 @@
17#define CPU_CONFIG_ERROR_PROP 0x00000004 17#define CPU_CONFIG_ERROR_PROP 0x00000004
18 18
19#define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104) 19#define CPU_CONTROL (BRIDGE_VIRT_BASE + 0x0104)
20#define CPU_CONTROL_PHYS (BRIDGE_PHYS_BASE + 0x0104)
20#define CPU_RESET 0x00000002 21#define CPU_RESET 0x00000002
21 22
22#define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108) 23#define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108)
@@ -69,6 +70,7 @@
69#define CGC_RUNIT (1 << 7) 70#define CGC_RUNIT (1 << 7)
70#define CGC_XOR0 (1 << 8) 71#define CGC_XOR0 (1 << 8)
71#define CGC_AUDIO (1 << 9) 72#define CGC_AUDIO (1 << 9)
73#define CGC_POWERSAVE (1 << 11)
72#define CGC_SATA0 (1 << 14) 74#define CGC_SATA0 (1 << 14)
73#define CGC_SATA1 (1 << 15) 75#define CGC_SATA1 (1 << 15)
74#define CGC_XOR1 (1 << 16) 76#define CGC_XOR1 (1 << 16)
diff --git a/arch/arm/mach-kirkwood/ts219-setup.c b/arch/arm/mach-kirkwood/ts219-setup.c
index 283abff90228..e1267d6b468f 100644
--- a/arch/arm/mach-kirkwood/ts219-setup.c
+++ b/arch/arm/mach-kirkwood/ts219-setup.c
@@ -124,7 +124,7 @@ static void __init qnap_ts219_init(void)
124static int __init ts219_pci_init(void) 124static int __init ts219_pci_init(void)
125{ 125{
126 if (machine_is_ts219()) 126 if (machine_is_ts219())
127 kirkwood_pcie_init(KW_PCIE0); 127 kirkwood_pcie_init(KW_PCIE1 | KW_PCIE0);
128 128
129 return 0; 129 return 0;
130} 130}