common.c (624d0b52758d312ce1339bc88d23e6ef7ba980ee) common.c (81d2ef7c40eceb7189872ecea5964f2041118d4a)
1/*
2 * arch/arm/mach-dove/common.c
3 *
4 * Core functions for Marvell Dove 88AP510 System On Chip
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/kernel.h>
12#include <linux/delay.h>
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/pci.h>
16#include <linux/clk-provider.h>
17#include <linux/ata_platform.h>
18#include <linux/gpio.h>
1/*
2 * arch/arm/mach-dove/common.c
3 *
4 * Core functions for Marvell Dove 88AP510 System On Chip
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/kernel.h>
12#include <linux/delay.h>
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/pci.h>
16#include <linux/clk-provider.h>
17#include <linux/ata_platform.h>
18#include <linux/gpio.h>
19#include <linux/of.h>
20#include <linux/of_platform.h>
19#include <asm/page.h>
20#include <asm/setup.h>
21#include <asm/timex.h>
22#include <asm/hardware/cache-tauros2.h>
23#include <asm/mach/map.h>
24#include <asm/mach/time.h>
25#include <asm/mach/pci.h>
26#include <mach/dove.h>
27#include <mach/pm.h>
28#include <mach/bridge-regs.h>
29#include <asm/mach/arch.h>
30#include <linux/irq.h>
31#include <plat/time.h>
21#include <asm/page.h>
22#include <asm/setup.h>
23#include <asm/timex.h>
24#include <asm/hardware/cache-tauros2.h>
25#include <asm/mach/map.h>
26#include <asm/mach/time.h>
27#include <asm/mach/pci.h>
28#include <mach/dove.h>
29#include <mach/pm.h>
30#include <mach/bridge-regs.h>
31#include <asm/mach/arch.h>
32#include <linux/irq.h>
33#include <plat/time.h>
34#include <plat/irq.h>
32#include <plat/ehci-orion.h>
33#include <plat/common.h>
34#include <plat/addr-map.h>
35#include "common.h"
36
37/*****************************************************************************
38 * I/O Address Mapping
39 ****************************************************************************/

--- 335 unchanged lines hidden (view full) ---

375 /*
376 * Assert soft reset.
377 */
378 writel(SOFT_RESET, SYSTEM_SOFT_RESET);
379
380 while (1)
381 ;
382}
35#include <plat/ehci-orion.h>
36#include <plat/common.h>
37#include <plat/addr-map.h>
38#include "common.h"
39
40/*****************************************************************************
41 * I/O Address Mapping
42 ****************************************************************************/

--- 335 unchanged lines hidden (view full) ---

378 /*
379 * Assert soft reset.
380 */
381 writel(SOFT_RESET, SYSTEM_SOFT_RESET);
382
383 while (1)
384 ;
385}
386
387#if defined(CONFIG_MACH_DOVE_DT)
388/*
389 * Auxdata required until real OF clock provider
390 */
391struct 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
403static struct mv643xx_eth_platform_data dove_dt_ge00_data = {
404 .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT,
405};
406
407static 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
435static const char * const dove_dt_board_compat[] = {
436 "marvell,dove",
437 NULL
438};
439
440DT_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,
448MACHINE_END
449#endif