aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-dove
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-28 23:09:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-28 23:09:24 -0500
commit1a32c58bb945970e56f27a1cfb61625a3ac0b88e (patch)
treef49ac4bebcb62416494c0e5bade076c7f7f3bc56 /arch/arm/mach-dove
parent7307c00f335a4e986586b12334696098d2fc2bcd (diff)
parent564991205956d869db0e45dfabe23a31b596fa15 (diff)
Merge tag 'late-mvebu-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC mvebu platform changes from Olof Johansson: "This series contains changes for the Marvell EBU platforms (mvebu, orion, kirkwood, dove) that were not part of the first set of pull requests because of dependencies on the MMC tree, and being submitted a little late. Notable changes are: - More devices get moved out of board files into device tree descriptions. The remaining devices listed in there have patches that will get sent for 3.10, after which we can remove a lot of the board files entirely. We are doing the pinctrl and mmc drivers here, ethernet and PCI still remain. - SMP support for mvebu is improved with support for the local interrupt controller. - The Guruplug board file gets replaced with a DT description. Unfortunately, the dependency on the MMC tree turned out to be a much larger problem than expected, when the MMC maintainer rebased the patches in his tree that all of the patches in this branch are based on, which caused merge conflicts between the new and old versions of those patches. To work around the merge conflicts, this branch rebases all patches on top of the respective MMC patches that did get merged into 3.9. The patches are all identical to the versions that were part of linux-next, but have a new commit date." * tag 'late-mvebu-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (90 commits) arm: mvebu: enable the SD card slot on Armada 370 Reference Design board ARM: kirkwood: topkick: init mvsdio via DT ARM: kirkwood: nsa310: convert to pinctrl ARM: Kirkwood: topkick: Enable i2c bus. ARM: kirkwood: topkick: convert to pinctrl ARM: dove: convert serial DT nodes to clocks property arm: mvebu: Add SPI flash on Armada 370 DB board arm: mvebu: Add SPI flash on Armada XP-DB board arm: mvebu: Add SPI flash on Armada XP-GP board arm: mvebu: Add support for SPI controller in Armada 370/XP clocksource: update and move armada-370-xp-timer documentation to timer directory arm: mvebu: update DT to support local timers ARM: Dove: convert usb host controller to DT arm: mvebu: Enable USB controllers on Armada 370/XP boards arm: mvebu: Add support for USB host controllers in Armada 370/XP arm: mvebu: add button for OpenBlocks AX3-4 ARM: Kirkwood: Convert NS2 to gpio-poweroff. ARM: Kirkwood: Convert NSA310 I2C to device tree ARM: Kirkwood: Convert NSA310 to use gpio-poweroff driver ARM: Kirkwood: Convert NSA310 to DT based regulators. ...
Diffstat (limited to 'arch/arm/mach-dove')
-rw-r--r--arch/arm/mach-dove/Kconfig7
-rw-r--r--arch/arm/mach-dove/Makefile4
-rw-r--r--arch/arm/mach-dove/board-dt.c92
-rw-r--r--arch/arm/mach-dove/common.c85
4 files changed, 102 insertions, 86 deletions
diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig
index 603c5fd99e8a..36469d813951 100644
--- a/arch/arm/mach-dove/Kconfig
+++ b/arch/arm/mach-dove/Kconfig
@@ -2,8 +2,12 @@ if ARCH_DOVE
2 2
3menu "Marvell Dove Implementations" 3menu "Marvell Dove Implementations"
4 4
5config DOVE_LEGACY
6 bool
7
5config MACH_DOVE_DB 8config MACH_DOVE_DB
6 bool "Marvell DB-MV88AP510 Development Board" 9 bool "Marvell DB-MV88AP510 Development Board"
10 select DOVE_LEGACY
7 select I2C_BOARDINFO 11 select I2C_BOARDINFO
8 help 12 help
9 Say 'Y' here if you want your kernel to support the 13 Say 'Y' here if you want your kernel to support the
@@ -11,6 +15,7 @@ config MACH_DOVE_DB
11 15
12config MACH_CM_A510 16config MACH_CM_A510
13 bool "CompuLab CM-A510 Board" 17 bool "CompuLab CM-A510 Board"
18 select DOVE_LEGACY
14 help 19 help
15 Say 'Y' here if you want your kernel to support the 20 Say 'Y' here if you want your kernel to support the
16 CompuLab CM-A510 Board. 21 CompuLab CM-A510 Board.
@@ -19,6 +24,8 @@ config MACH_DOVE_DT
19 bool "Marvell Dove Flattened Device Tree" 24 bool "Marvell Dove Flattened Device Tree"
20 select MVEBU_CLK_CORE 25 select MVEBU_CLK_CORE
21 select MVEBU_CLK_GATING 26 select MVEBU_CLK_GATING
27 select REGULATOR
28 select REGULATOR_FIXED_VOLTAGE
22 select USE_OF 29 select USE_OF
23 help 30 help
24 Say 'Y' here if you want your kernel to support the 31 Say 'Y' here if you want your kernel to support the
diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile
index 5e683baf96cf..3f0a858fb597 100644
--- a/arch/arm/mach-dove/Makefile
+++ b/arch/arm/mach-dove/Makefile
@@ -1,4 +1,6 @@
1obj-y += common.o addr-map.o irq.o mpp.o 1obj-y += common.o addr-map.o irq.o
2obj-$(CONFIG_DOVE_LEGACY) += mpp.o
2obj-$(CONFIG_PCI) += pcie.o 3obj-$(CONFIG_PCI) += pcie.o
3obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o 4obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o
5obj-$(CONFIG_MACH_DOVE_DT) += board-dt.o
4obj-$(CONFIG_MACH_CM_A510) += cm-a510.o 6obj-$(CONFIG_MACH_CM_A510) += cm-a510.o
diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c
new file mode 100644
index 000000000000..fbde1dd67113
--- /dev/null
+++ b/arch/arm/mach-dove/board-dt.c
@@ -0,0 +1,92 @@
1/*
2 * arch/arm/mach-dove/board-dt.c
3 *
4 * Marvell Dove 88AP510 System On Chip FDT Board
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/init.h>
12#include <linux/clk-provider.h>
13#include <linux/clk/mvebu.h>
14#include <linux/of.h>
15#include <linux/of_platform.h>
16#include <linux/platform_data/usb-ehci-orion.h>
17#include <asm/hardware/cache-tauros2.h>
18#include <asm/mach/arch.h>
19#include <mach/pm.h>
20#include <plat/common.h>
21#include <plat/irq.h>
22#include "common.h"
23
24/*
25 * There are still devices that doesn't even know about DT,
26 * get clock gates here and add a clock lookup.
27 */
28static void __init dove_legacy_clk_init(void)
29{
30 struct device_node *np = of_find_compatible_node(NULL, NULL,
31 "marvell,dove-gating-clock");
32 struct of_phandle_args clkspec;
33
34 clkspec.np = np;
35 clkspec.args_count = 1;
36
37 clkspec.args[0] = CLOCK_GATING_BIT_GBE;
38 orion_clkdev_add(NULL, "mv643xx_eth_port.0",
39 of_clk_get_from_provider(&clkspec));
40
41 clkspec.args[0] = CLOCK_GATING_BIT_PCIE0;
42 orion_clkdev_add("0", "pcie",
43 of_clk_get_from_provider(&clkspec));
44
45 clkspec.args[0] = CLOCK_GATING_BIT_PCIE1;
46 orion_clkdev_add("1", "pcie",
47 of_clk_get_from_provider(&clkspec));
48}
49
50static void __init dove_of_clk_init(void)
51{
52 mvebu_clocks_init();
53 dove_legacy_clk_init();
54}
55
56static struct mv643xx_eth_platform_data dove_dt_ge00_data = {
57 .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT,
58};
59
60static void __init dove_dt_init(void)
61{
62 pr_info("Dove 88AP510 SoC\n");
63
64#ifdef CONFIG_CACHE_TAUROS2
65 tauros2_init(0);
66#endif
67 dove_setup_cpu_mbus();
68
69 /* Setup root of clk tree */
70 dove_of_clk_init();
71
72 /* Internal devices not ported to DT yet */
73 dove_ge00_init(&dove_dt_ge00_data);
74 dove_pcie_init(1, 1);
75
76 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
77}
78
79static const char * const dove_dt_board_compat[] = {
80 "marvell,dove",
81 NULL
82};
83
84DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)")
85 .map_io = dove_map_io,
86 .init_early = dove_init_early,
87 .init_irq = orion_dt_init_irq,
88 .init_time = dove_timer_init,
89 .init_machine = dove_dt_init,
90 .restart = dove_restart,
91 .dt_compat = dove_dt_board_compat,
92MACHINE_END
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index ea84c535a110..c6b3b2bb50e7 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -360,88 +360,3 @@ void dove_restart(char mode, const char *cmd)
360 while (1) 360 while (1)
361 ; 361 ;
362} 362}
363
364#if defined(CONFIG_MACH_DOVE_DT)
365/*
366 * There are still devices that doesn't even know about DT,
367 * get clock gates here and add a clock lookup.
368 */
369static void __init dove_legacy_clk_init(void)
370{
371 struct device_node *np = of_find_compatible_node(NULL, NULL,
372 "marvell,dove-gating-clock");
373 struct of_phandle_args clkspec;
374
375 clkspec.np = np;
376 clkspec.args_count = 1;
377
378 clkspec.args[0] = CLOCK_GATING_BIT_USB0;
379 orion_clkdev_add(NULL, "orion-ehci.0",
380 of_clk_get_from_provider(&clkspec));
381
382 clkspec.args[0] = CLOCK_GATING_BIT_USB1;
383 orion_clkdev_add(NULL, "orion-ehci.1",
384 of_clk_get_from_provider(&clkspec));
385
386 clkspec.args[0] = CLOCK_GATING_BIT_GBE;
387 orion_clkdev_add(NULL, "mv643xx_eth_port.0",
388 of_clk_get_from_provider(&clkspec));
389
390 clkspec.args[0] = CLOCK_GATING_BIT_PCIE0;
391 orion_clkdev_add("0", "pcie",
392 of_clk_get_from_provider(&clkspec));
393
394 clkspec.args[0] = CLOCK_GATING_BIT_PCIE1;
395 orion_clkdev_add("1", "pcie",
396 of_clk_get_from_provider(&clkspec));
397}
398
399static void __init dove_of_clk_init(void)
400{
401 mvebu_clocks_init();
402 dove_legacy_clk_init();
403}
404
405static struct mv643xx_eth_platform_data dove_dt_ge00_data = {
406 .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT,
407};
408
409static void __init dove_dt_init(void)
410{
411 pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n",
412 (dove_tclk + 499999) / 1000000);
413
414#ifdef CONFIG_CACHE_TAUROS2
415 tauros2_init(0);
416#endif
417 dove_setup_cpu_mbus();
418
419 /* Setup root of clk tree */
420 dove_of_clk_init();
421
422 /* Internal devices not ported to DT yet */
423 dove_rtc_init();
424
425 dove_ge00_init(&dove_dt_ge00_data);
426 dove_ehci0_init();
427 dove_ehci1_init();
428 dove_pcie_init(1, 1);
429
430 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
431}
432
433static const char * const dove_dt_board_compat[] = {
434 "marvell,dove",
435 NULL
436};
437
438DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)")
439 .map_io = dove_map_io,
440 .init_early = dove_init_early,
441 .init_irq = orion_dt_init_irq,
442 .init_time = dove_timer_init,
443 .init_machine = dove_dt_init,
444 .restart = dove_restart,
445 .dt_compat = dove_dt_board_compat,
446MACHINE_END
447#endif