aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/mach-exynos4-dt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-04 15:31:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-04 15:31:18 -0400
commit6fa52ed33bea997374a88dbacbba5bf8c7ac4fef (patch)
treea0904b78d66c9b99d6acf944cf58bcaa0cffc511 /arch/arm/mach-exynos/mach-exynos4-dt.c
parent1db772216f48978d5146b858586f6178433aad38 (diff)
parentbc8fd900c4d460b4e4bf785bb48bfced0ac9941b (diff)
Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver changes from Olof Johansson: "This is a rather large set of patches for device drivers that for one reason or another the subsystem maintainer preferred to get merged through the arm-soc tree. There are both new drivers as well as existing drivers that are getting converted from platform-specific code into standalone drivers using the appropriate subsystem specific interfaces. In particular, we can now have pinctrl, clk, clksource and irqchip drivers in one file per driver, without the need to call into platform specific interface, or to get called from platform specific code, as long as all information about the hardware is provided through a device tree. Most of the drivers we touch this time are for clocksource. Since now most of them are part of drivers/clocksource, I expect that we won't have to touch these again from arm-soc and can let the clocksource maintainers take care of these in the future. Another larger part of this series is specific to the exynos platform, which is seeing some significant effort in upstreaming and modernization of its device drivers this time around, which unfortunately is also the cause for the churn and a lot of the merge conflicts. There is one new subsystem that gets merged as part of this series: the reset controller interface, which is a very simple interface for taking devices on the SoC out of reset or back into reset. Patches to use this interface on i.MX follow later in this merge window, and we are going to have other platforms (at least tegra and sirf) get converted in 3.11. This will let us get rid of platform specific callbacks in a number of platform independent device drivers." * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (256 commits) irqchip: s3c24xx: add missing __init annotations ARM: dts: Disable the RTC by default on exynos5 clk: exynos5250: Fix parent clock for sclk_mmc{0,1,2,3} ARM: exynos: restore mach/regs-clock.h for exynos5 clocksource: exynos_mct: fix build error on non-DT pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register() irqchip: vt8500: Convert arch-vt8500 to new irqchip infrastructure reset: NULL deref on allocation failure reset: Add reset controller API dt: describe base reset signal binding ARM: EXYNOS: Add arm-pmu DT binding for exynos421x ARM: EXYNOS: Add arm-pmu DT binding for exynos5250 ARM: EXYNOS: Enable PMUs for exynos4 irqchip: exynos-combiner: Correct combined IRQs for exynos4 irqchip: exynos-combiner: Add set_irq_affinity function for combiner_irq ARM: EXYNOS: fix compilation error introduced due to common clock migration clk: exynos5250: Fix divider values for sclk_mmc{0,1,2,3} clk: exynos4: export clocks required for fimc-is clk: samsung: Fix compilation error clk: tegra: fix enum tegra114_clk to match binding ...
Diffstat (limited to 'arch/arm/mach-exynos/mach-exynos4-dt.c')
-rw-r--r--arch/arm/mach-exynos/mach-exynos4-dt.c122
1 files changed, 20 insertions, 102 deletions
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c
index 3358088c822a..ac27f3cd121f 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -11,121 +11,26 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12*/ 12*/
13 13
14#include <linux/kernel.h>
14#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16#include <linux/of_fdt.h>
15#include <linux/serial_core.h> 17#include <linux/serial_core.h>
18#include <linux/memblock.h>
19#include <linux/clocksource.h>
16 20
17#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
18#include <mach/map.h> 22#include <plat/mfc.h>
19
20#include <plat/cpu.h>
21#include <plat/regs-serial.h>
22 23
23#include "common.h" 24#include "common.h"
24 25
25/*
26 * The following lookup table is used to override device names when devices
27 * are registered from device tree. This is temporarily added to enable
28 * device tree support addition for the Exynos4 architecture.
29 *
30 * For drivers that require platform data to be provided from the machine
31 * file, a platform data pointer can also be supplied along with the
32 * devices names. Usually, the platform data elements that cannot be parsed
33 * from the device tree by the drivers (example: function pointers) are
34 * supplied. But it should be noted that this is a temporary mechanism and
35 * at some point, the drivers should be capable of parsing all the platform
36 * data from the device tree.
37 */
38static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = {
39 OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART0,
40 "exynos4210-uart.0", NULL),
41 OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART1,
42 "exynos4210-uart.1", NULL),
43 OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART2,
44 "exynos4210-uart.2", NULL),
45 OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART3,
46 "exynos4210-uart.3", NULL),
47 OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(0),
48 "exynos4-sdhci.0", NULL),
49 OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(1),
50 "exynos4-sdhci.1", NULL),
51 OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(2),
52 "exynos4-sdhci.2", NULL),
53 OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(3),
54 "exynos4-sdhci.3", NULL),
55 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(0),
56 "s3c2440-i2c.0", NULL),
57 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(1),
58 "s3c2440-i2c.1", NULL),
59 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(2),
60 "s3c2440-i2c.2", NULL),
61 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(3),
62 "s3c2440-i2c.3", NULL),
63 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(4),
64 "s3c2440-i2c.4", NULL),
65 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(5),
66 "s3c2440-i2c.5", NULL),
67 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(6),
68 "s3c2440-i2c.6", NULL),
69 OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(7),
70 "s3c2440-i2c.7", NULL),
71 OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI0,
72 "exynos4210-spi.0", NULL),
73 OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI1,
74 "exynos4210-spi.1", NULL),
75 OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI2,
76 "exynos4210-spi.2", NULL),
77 OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL),
78 OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL),
79 OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_MDMA1, "dma-pl330.2", NULL),
80 OF_DEV_AUXDATA("samsung,exynos4210-tmu", EXYNOS4_PA_TMU,
81 "exynos-tmu", NULL),
82 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13620000,
83 "exynos-sysmmu.0", NULL), /* MFC_L */
84 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13630000,
85 "exynos-sysmmu.1", NULL), /* MFC_R */
86 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13E20000,
87 "exynos-sysmmu.2", NULL), /* TV */
88 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A60000,
89 "exynos-sysmmu.3", NULL), /* JPEG */
90 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x12A30000,
91 "exynos-sysmmu.4", NULL), /* ROTATOR */
92 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A20000,
93 "exynos-sysmmu.5", NULL), /* FIMC0 */
94 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A30000,
95 "exynos-sysmmu.6", NULL), /* FIMC1 */
96 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A40000,
97 "exynos-sysmmu.7", NULL), /* FIMC2 */
98 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A50000,
99 "exynos-sysmmu.8", NULL), /* FIMC3 */
100 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x12A20000,
101 "exynos-sysmmu.9", NULL), /* G2D(4210) */
102 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x10A40000,
103 "exynos-sysmmu.9", NULL), /* G2D(4x12) */
104 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11E20000,
105 "exynos-sysmmu.10", NULL), /* FIMD0 */
106 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x12220000,
107 "exynos-sysmmu.11", NULL), /* FIMD1(4210) */
108 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x12260000,
109 "exynos-sysmmu.12", NULL), /* IS0(4x12) */
110 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x122B0000,
111 "exynos-sysmmu.13", NULL), /* IS1(4x12) */
112 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x123B0000,
113 "exynos-sysmmu.14", NULL), /* FIMC-LITE0(4x12) */
114 OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x123C0000,
115 "exynos-sysmmu.15", NULL), /* FIMC-LITE1(4x12) */
116 {},
117};
118
119static void __init exynos4_dt_map_io(void) 26static void __init exynos4_dt_map_io(void)
120{ 27{
121 exynos_init_io(NULL, 0); 28 exynos_init_io(NULL, 0);
122 s3c24xx_init_clocks(24000000);
123} 29}
124 30
125static void __init exynos4_dt_machine_init(void) 31static void __init exynos4_dt_machine_init(void)
126{ 32{
127 of_platform_populate(NULL, of_default_bus_match_table, 33 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
128 exynos4_auxdata_lookup, NULL);
129} 34}
130 35
131static char const *exynos4_dt_compat[] __initdata = { 36static char const *exynos4_dt_compat[] __initdata = {
@@ -135,6 +40,18 @@ static char const *exynos4_dt_compat[] __initdata = {
135 NULL 40 NULL
136}; 41};
137 42
43static void __init exynos4_reserve(void)
44{
45#ifdef CONFIG_S5P_DEV_MFC
46 struct s5p_mfc_dt_meminfo mfc_mem;
47
48 /* Reserve memory for MFC only if it's available */
49 mfc_mem.compatible = "samsung,mfc-v5";
50 if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem))
51 s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff,
52 mfc_mem.lsize);
53#endif
54}
138DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") 55DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
139 /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ 56 /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */
140 .smp = smp_ops(exynos_smp_ops), 57 .smp = smp_ops(exynos_smp_ops),
@@ -142,7 +59,8 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
142 .map_io = exynos4_dt_map_io, 59 .map_io = exynos4_dt_map_io,
143 .init_machine = exynos4_dt_machine_init, 60 .init_machine = exynos4_dt_machine_init,
144 .init_late = exynos_init_late, 61 .init_late = exynos_init_late,
145 .init_time = exynos4_timer_init, 62 .init_time = exynos_init_time,
146 .dt_compat = exynos4_dt_compat, 63 .dt_compat = exynos4_dt_compat,
147 .restart = exynos4_restart, 64 .restart = exynos4_restart,
65 .reserve = exynos4_reserve,
148MACHINE_END 66MACHINE_END