aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c24xx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 17:23:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 17:23:01 -0400
commitee1a8d402e7e204d57fb108aa40003b6d1633036 (patch)
tree3abf4be63d11bbbd04c89bd668a17533f942b911 /arch/arm/mach-s3c24xx
parent40e71e7015ab85c8606f50736525220948a3b24b (diff)
parent9686bb66a4c50e43ffee903a9fc62237ee2de1e6 (diff)
Merge tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC device tree changes from Arnd Bergmann: "These changes from 30 individual branches for the most part update device tree files, but there are also a few source code changes that have crept in this time, usually in order to atomically move over a driver from using hardcoded data to DT probing. A number of platforms change their DT files to use the C preprocessor, which is causing a bit of churn, but that is hopefully only this once" * tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (372 commits) ARM: at91: dt: rm9200ek: add spi support ARM: at91: dt: rm9200: add spi support ARM: at91/DT: at91sam9n12: add SPI DMA client infos ARM: at91/DT: sama5d3: add SPI DMA client infos ARM: at91/DT: fix SPI compatibility string ARM: Kirkwood: Fix the internal register ranges translation ARM: dts: bcm281xx: change comment to C89 style ARM: mmc: bcm281xx SDHCI driver (dt mods) ARM: nomadik: add the new clocks to the device tree clk: nomadik: implement the Nomadik clocks properly ARM: dts: omap5-uevm: Provide USB Host PHY clock frequency ARM: dts: omap4-panda: Fix DVI EDID reads ARM: dts: omap4-panda: Add USB Host support arm: mvebu: enable mini-PCIe connectors on Armada 370 RD ARM: shmobile: irqpin: add a DT property to enable masking on parent ARM: dts: AM43x EPOS EVM support ARM: dts: OMAP5: Add bandgap DT entry ARM: dts: AM33XX: Add pinmux configuration for CPSW to am335x EVM ARM: dts: AM33XX: Add pinmux configuration for CPSW to EVMsk ARM: dts: AM33XX: Add pinmux configuration for CPSW to beaglebone ...
Diffstat (limited to 'arch/arm/mach-s3c24xx')
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig12
-rw-r--r--arch/arm/mach-s3c24xx/Makefile1
-rw-r--r--arch/arm/mach-s3c24xx/mach-s3c2416-dt.c91
3 files changed, 104 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index f8d1912f103e..0adb2b85f830 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -492,6 +492,18 @@ config MACH_SMDK2416
492 help 492 help
493 Say Y here if you are using an SMDK2416 493 Say Y here if you are using an SMDK2416
494 494
495config MACH_S3C2416_DT
496 bool "Samsung S3C2416 machine using devicetree"
497 select CLKSRC_OF
498 select USE_OF
499 select PINCTRL
500 select PINCTRL_S3C24XX
501 help
502 Machine support for Samsung S3C2416 machines with device tree enabled.
503 Select this if a fdt blob is available for the S3C2416 SoC based board.
504 Note: This is under development and not all peripherals can be supported
505 with this machine file.
506
495endif # CPU_S3C2416 507endif # CPU_S3C2416
496 508
497if CPU_S3C2440 509if CPU_S3C2440
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 6f46ecfc8396..6de730bada4d 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -85,6 +85,7 @@ obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o
85obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o 85obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o
86 86
87obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o 87obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o
88obj-$(CONFIG_MACH_S3C2416_DT) += mach-s3c2416-dt.o
88 89
89obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o 90obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o
90obj-$(CONFIG_MACH_AT2440EVB) += mach-at2440evb.o 91obj-$(CONFIG_MACH_AT2440EVB) += mach-at2440evb.o
diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
new file mode 100644
index 000000000000..f50454a34f72
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
@@ -0,0 +1,91 @@
1/*
2 * Samsung's S3C2416 flattened device tree enabled machine
3 *
4 * Copyright (c) 2012 Heiko Stuebner <heiko@sntech.de>
5 *
6 * based on mach-exynos/mach-exynos4-dt.c
7 *
8 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
9 * http://www.samsung.com
10 * Copyright (c) 2010-2011 Linaro Ltd.
11 * www.linaro.org
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16*/
17
18#include <linux/clocksource.h>
19#include <linux/irqchip.h>
20#include <linux/of_platform.h>
21#include <linux/serial_core.h>
22
23#include <asm/mach/arch.h>
24#include <mach/map.h>
25
26#include <plat/cpu.h>
27#include <plat/pm.h>
28#include <plat/regs-serial.h>
29
30#include "common.h"
31
32/*
33 * The following lookup table is used to override device names when devices
34 * are registered from device tree. This is temporarily added to enable
35 * device tree support addition for the S3C2416 architecture.
36 *
37 * For drivers that require platform data to be provided from the machine
38 * file, a platform data pointer can also be supplied along with the
39 * devices names. Usually, the platform data elements that cannot be parsed
40 * from the device tree by the drivers (example: function pointers) are
41 * supplied. But it should be noted that this is a temporary mechanism and
42 * at some point, the drivers should be capable of parsing all the platform
43 * data from the device tree.
44 */
45static const struct of_dev_auxdata s3c2416_auxdata_lookup[] __initconst = {
46 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART,
47 "s3c2440-uart.0", NULL),
48 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART + 0x4000,
49 "s3c2440-uart.1", NULL),
50 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART + 0x8000,
51 "s3c2440-uart.2", NULL),
52 OF_DEV_AUXDATA("samsung,s3c2440-uart", S3C24XX_PA_UART + 0xC000,
53 "s3c2440-uart.3", NULL),
54 OF_DEV_AUXDATA("samsung,s3c6410-sdhci", S3C_PA_HSMMC0,
55 "s3c-sdhci.0", NULL),
56 OF_DEV_AUXDATA("samsung,s3c6410-sdhci", S3C_PA_HSMMC1,
57 "s3c-sdhci.1", NULL),
58 OF_DEV_AUXDATA("samsung,s3c2440-i2c", S3C_PA_IIC,
59 "s3c2440-i2c.0", NULL),
60 {},
61};
62
63static void __init s3c2416_dt_map_io(void)
64{
65 s3c24xx_init_io(NULL, 0);
66 s3c24xx_init_clocks(12000000);
67}
68
69static void __init s3c2416_dt_machine_init(void)
70{
71 of_platform_populate(NULL, of_default_bus_match_table,
72 s3c2416_auxdata_lookup, NULL);
73
74 s3c_pm_init();
75}
76
77static char const *s3c2416_dt_compat[] __initdata = {
78 "samsung,s3c2416",
79 "samsung,s3c2450",
80 NULL
81};
82
83DT_MACHINE_START(S3C2416_DT, "Samsung S3C2416 (Flattened Device Tree)")
84 /* Maintainer: Heiko Stuebner <heiko@sntech.de> */
85 .dt_compat = s3c2416_dt_compat,
86 .map_io = s3c2416_dt_map_io,
87 .init_irq = irqchip_init,
88 .init_machine = s3c2416_dt_machine_init,
89 .init_time = clocksource_of_init,
90 .restart = s3c2416_restart,
91MACHINE_END