diff options
Diffstat (limited to 'arch/arm/mach-dove/common.c')
| -rw-r--r-- | arch/arm/mach-dove/common.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index d5de814c52a3..b12d11a5f2d0 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | #include <linux/clk-provider.h> | 16 | #include <linux/clk-provider.h> |
| 17 | #include <linux/ata_platform.h> | 17 | #include <linux/ata_platform.h> |
| 18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
| 19 | #include <linux/of.h> | ||
| 20 | #include <linux/of_platform.h> | ||
| 19 | #include <asm/page.h> | 21 | #include <asm/page.h> |
| 20 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
| 21 | #include <asm/timex.h> | 23 | #include <asm/timex.h> |
| @@ -29,6 +31,7 @@ | |||
| 29 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
| 30 | #include <linux/irq.h> | 32 | #include <linux/irq.h> |
| 31 | #include <plat/time.h> | 33 | #include <plat/time.h> |
| 34 | #include <plat/irq.h> | ||
| 32 | #include <plat/ehci-orion.h> | 35 | #include <plat/ehci-orion.h> |
| 33 | #include <plat/common.h> | 36 | #include <plat/common.h> |
| 34 | #include <plat/addr-map.h> | 37 | #include <plat/addr-map.h> |
| @@ -380,3 +383,67 @@ void dove_restart(char mode, const char *cmd) | |||
| 380 | while (1) | 383 | while (1) |
| 381 | ; | 384 | ; |
| 382 | } | 385 | } |
| 386 | |||
| 387 | #if defined(CONFIG_MACH_DOVE_DT) | ||
| 388 | /* | ||
| 389 | * Auxdata required until real OF clock provider | ||
| 390 | */ | ||
| 391 | struct of_dev_auxdata dove_auxdata_lookup[] __initdata = { | ||
| 392 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL), | ||
| 393 | OF_DEV_AUXDATA("marvell,orion-spi", 0xf1014600, "orion_spi.1", NULL), | ||
| 394 | OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL), | ||
| 395 | OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0", | ||
| 396 | NULL), | ||
| 397 | OF_DEV_AUXDATA("marvell,orion-sata", 0xf10a0000, "sata_mv.0", NULL), | ||
| 398 | OF_DEV_AUXDATA("marvell,dove-sdhci", 0xf1092000, "sdhci-dove.0", NULL), | ||
| 399 | OF_DEV_AUXDATA("marvell,dove-sdhci", 0xf1090000, "sdhci-dove.1", NULL), | ||
| 400 | {}, | ||
| 401 | }; | ||
| 402 | |||
| 403 | static struct mv643xx_eth_platform_data dove_dt_ge00_data = { | ||
| 404 | .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, | ||
| 405 | }; | ||
| 406 | |||
| 407 | static void __init dove_dt_init(void) | ||
| 408 | { | ||
| 409 | pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n", | ||
| 410 | (dove_tclk + 499999) / 1000000); | ||
| 411 | |||
| 412 | #ifdef CONFIG_CACHE_TAUROS2 | ||
| 413 | tauros2_init(); | ||
| 414 | #endif | ||
| 415 | dove_setup_cpu_mbus(); | ||
| 416 | |||
| 417 | /* Setup root of clk tree */ | ||
| 418 | dove_clk_init(); | ||
| 419 | |||
| 420 | /* Internal devices not ported to DT yet */ | ||
| 421 | dove_rtc_init(); | ||
| 422 | dove_xor0_init(); | ||
| 423 | dove_xor1_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 | dove_crypto_init(); | ||
| 430 | |||
| 431 | of_platform_populate(NULL, of_default_bus_match_table, | ||
| 432 | dove_auxdata_lookup, NULL); | ||
| 433 | } | ||
| 434 | |||
| 435 | static const char * const dove_dt_board_compat[] = { | ||
| 436 | "marvell,dove", | ||
| 437 | NULL | ||
| 438 | }; | ||
| 439 | |||
| 440 | DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") | ||
| 441 | .map_io = dove_map_io, | ||
| 442 | .init_early = dove_init_early, | ||
| 443 | .init_irq = orion_dt_init_irq, | ||
| 444 | .timer = &dove_timer, | ||
| 445 | .init_machine = dove_dt_init, | ||
| 446 | .restart = dove_restart, | ||
| 447 | .dt_compat = dove_dt_board_compat, | ||
| 448 | MACHINE_END | ||
| 449 | #endif | ||
