ARM: at91: remove ksz8081 phy fixup registration for sama5d4ek board
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-at91 / sama5.c
1 /*
2  *  Setup code for SAMA5
3  *
4  *  Copyright (C) 2013 Atmel,
5  *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
6  *
7  * Licensed under GPLv2 or later.
8  */
9
10 #include <linux/types.h>
11 #include <linux/init.h>
12 #include <linux/module.h>
13 #include <linux/gpio.h>
14 #include <linux/of.h>
15 #include <linux/of_irq.h>
16 #include <linux/of_platform.h>
17 #include <linux/clk-provider.h>
18
19 #include <mach/hardware.h>
20
21 #include <asm/setup.h>
22 #include <asm/irq.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/map.h>
25 #include <asm/mach/irq.h>
26
27 #include "generic.h"
28
29 static void __init sama5_dt_device_init(void)
30 {
31         of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
32         at91sam9x5_pm_init();
33 }
34
35 static const char *sama5_dt_board_compat[] __initconst = {
36         "atmel,sama5",
37         NULL
38 };
39
40 DT_MACHINE_START(sama5_dt, "Atmel SAMA5")
41         /* Maintainer: Atmel */
42         .map_io         = at91_map_io,
43         .init_machine   = sama5_dt_device_init,
44         .dt_compat      = sama5_dt_board_compat,
45 MACHINE_END
46
47 static struct map_desc at91_io_desc[] __initdata = {
48         {
49         .virtual        = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_MPDDRC),
50         .pfn            = __phys_to_pfn(SAMA5D4_BASE_MPDDRC),
51         .length         = SZ_512,
52         .type           = MT_DEVICE,
53         },
54         {
55         .virtual        = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_PMC),
56         .pfn            = __phys_to_pfn(SAMA5D4_BASE_PMC),
57         .length         = SZ_512,
58         .type           = MT_DEVICE,
59         },
60         { /* On sama5d4, we use USART3 as serial console */
61         .virtual        = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_USART3),
62         .pfn            = __phys_to_pfn(SAMA5D4_BASE_USART3),
63         .length         = SZ_256,
64         .type           = MT_DEVICE,
65         },
66         { /* A bunch of peripheral with fine grained IO space */
67         .virtual        = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_SYS2),
68         .pfn            = __phys_to_pfn(SAMA5D4_BASE_SYS2),
69         .length         = SZ_2K,
70         .type           = MT_DEVICE,
71         },
72 };
73
74 static void __init sama5_alt_map_io(void)
75 {
76         at91_alt_map_io();
77         iotable_init(at91_io_desc, ARRAY_SIZE(at91_io_desc));
78 }
79
80 static const char *sama5_alt_dt_board_compat[] __initconst = {
81         "atmel,sama5d4",
82         NULL
83 };
84
85 DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5")
86         /* Maintainer: Atmel */
87         .map_io         = sama5_alt_map_io,
88         .init_machine   = sama5_dt_device_init,
89         .dt_compat      = sama5_alt_dt_board_compat,
90         .l2c_aux_mask   = ~0UL,
91 MACHINE_END