diff options
Diffstat (limited to 'arch/arm/mach-exynos/mach-exynos5-dt.c')
-rw-r--r-- | arch/arm/mach-exynos/mach-exynos5-dt.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index db1cd8eacf28..f1326be80b91 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/of_platform.h> | 12 | #include <linux/of_platform.h> |
13 | #include <linux/of_fdt.h> | ||
13 | #include <linux/serial_core.h> | 14 | #include <linux/serial_core.h> |
14 | 15 | ||
15 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
@@ -75,20 +76,35 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { | |||
75 | {}, | 76 | {}, |
76 | }; | 77 | }; |
77 | 78 | ||
78 | static void __init exynos5250_dt_map_io(void) | 79 | static const struct of_dev_auxdata exynos5440_auxdata_lookup[] __initconst = { |
80 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5440_PA_UART0, | ||
81 | "exynos4210-uart.0", NULL), | ||
82 | {}, | ||
83 | }; | ||
84 | |||
85 | static void __init exynos5_dt_map_io(void) | ||
79 | { | 86 | { |
87 | unsigned long root = of_get_flat_dt_root(); | ||
88 | |||
80 | exynos_init_io(NULL, 0); | 89 | exynos_init_io(NULL, 0); |
81 | s3c24xx_init_clocks(24000000); | 90 | |
91 | if (of_flat_dt_is_compatible(root, "samsung,exynos5250")) | ||
92 | s3c24xx_init_clocks(24000000); | ||
82 | } | 93 | } |
83 | 94 | ||
84 | static void __init exynos5250_dt_machine_init(void) | 95 | static void __init exynos5_dt_machine_init(void) |
85 | { | 96 | { |
86 | of_platform_populate(NULL, of_default_bus_match_table, | 97 | if (of_machine_is_compatible("samsung,exynos5250")) |
87 | exynos5250_auxdata_lookup, NULL); | 98 | of_platform_populate(NULL, of_default_bus_match_table, |
99 | exynos5250_auxdata_lookup, NULL); | ||
100 | else if (of_machine_is_compatible("samsung,exynos5440")) | ||
101 | of_platform_populate(NULL, of_default_bus_match_table, | ||
102 | exynos5440_auxdata_lookup, NULL); | ||
88 | } | 103 | } |
89 | 104 | ||
90 | static char const *exynos5250_dt_compat[] __initdata = { | 105 | static char const *exynos5_dt_compat[] __initdata = { |
91 | "samsung,exynos5250", | 106 | "samsung,exynos5250", |
107 | "samsung,exynos5440", | ||
92 | NULL | 108 | NULL |
93 | }; | 109 | }; |
94 | 110 | ||
@@ -96,11 +112,11 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") | |||
96 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | 112 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ |
97 | .init_irq = exynos5_init_irq, | 113 | .init_irq = exynos5_init_irq, |
98 | .smp = smp_ops(exynos_smp_ops), | 114 | .smp = smp_ops(exynos_smp_ops), |
99 | .map_io = exynos5250_dt_map_io, | 115 | .map_io = exynos5_dt_map_io, |
100 | .handle_irq = gic_handle_irq, | 116 | .handle_irq = gic_handle_irq, |
101 | .init_machine = exynos5250_dt_machine_init, | 117 | .init_machine = exynos5_dt_machine_init, |
102 | .init_late = exynos_init_late, | 118 | .init_late = exynos_init_late, |
103 | .timer = &exynos4_timer, | 119 | .timer = &exynos4_timer, |
104 | .dt_compat = exynos5250_dt_compat, | 120 | .dt_compat = exynos5_dt_compat, |
105 | .restart = exynos5_restart, | 121 | .restart = exynos5_restart, |
106 | MACHINE_END | 122 | MACHINE_END |