aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-11-20 01:30:56 -0500
committerOlof Johansson <olof@lixom.net>2012-11-20 01:31:12 -0500
commit1443f8a0b95c07cee9df4420a30eea24123af3f3 (patch)
tree73a10165643ea9951841c58e3db697550c19fe5e /arch/arm/mach-davinci
parent00b2fa57d50fde1f5d7c3ac0893e49d69c315414 (diff)
parent001b35fff5d8b0d99a5ae16d8126d501b73cf8aa (diff)
Merge tag 'davinci-for-v3.8/defconfig' of git://gitorious.org/linux-davinci/linux-davinci into next/boards
From Sekhar Nori: This change enables DT related options in DA8XX defconfig. * tag 'davinci-for-v3.8/defconfig' of git://gitorious.org/linux-davinci/linux-davinci: ARM: davinci: da8xx defconfig: enable DT config options Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/Kconfig8
-rw-r--r--arch/arm/mach-davinci/Makefile1
-rw-r--r--arch/arm/mach-davinci/Makefile.boot2
-rw-r--r--arch/arm/mach-davinci/da8xx-dt.c66
4 files changed, 77 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index f8eecb959413..0153950f6068 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -58,6 +58,14 @@ config ARCH_DAVINCI_TNETV107X
58 58
59comment "DaVinci Board Type" 59comment "DaVinci Board Type"
60 60
61config MACH_DA8XX_DT
62 bool "Support DA8XX platforms using device tree"
63 default y
64 depends on ARCH_DAVINCI_DA8XX
65 help
66 Say y here to include support for TI DaVinci DA850 based using
67 Flattened Device Tree. More information at Documentation/devicetree
68
61config MACH_DAVINCI_EVM 69config MACH_DAVINCI_EVM
62 bool "TI DM644x EVM" 70 bool "TI DM644x EVM"
63 default ARCH_DAVINCI_DM644x 71 default ARCH_DAVINCI_DM644x
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index 2227effcb0e9..fb5c1aa98a63 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -22,6 +22,7 @@ obj-$(CONFIG_AINTC) += irq.o
22obj-$(CONFIG_CP_INTC) += cp_intc.o 22obj-$(CONFIG_CP_INTC) += cp_intc.o
23 23
24# Board specific 24# Board specific
25obj-$(CONFIG_MACH_DA8XX_DT) += da8xx-dt.o
25obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o 26obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o
26obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o 27obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o
27obj-$(CONFIG_MACH_NEUROS_OSD2) += board-neuros-osd2.o 28obj-$(CONFIG_MACH_NEUROS_OSD2) += board-neuros-osd2.o
diff --git a/arch/arm/mach-davinci/Makefile.boot b/arch/arm/mach-davinci/Makefile.boot
index 04a6c4e67b14..5c5a95a9d7d2 100644
--- a/arch/arm/mach-davinci/Makefile.boot
+++ b/arch/arm/mach-davinci/Makefile.boot
@@ -11,3 +11,5 @@ else
11params_phys-y := 0x80000100 11params_phys-y := 0x80000100
12initrd_phys-y := 0x80800000 12initrd_phys-y := 0x80800000
13endif 13endif
14
15dtb-$(CONFIG_MACH_DA8XX_DT) += da850-enbw-cmc.dtb da850-evm.dtb
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
new file mode 100644
index 000000000000..37c27af18fa0
--- /dev/null
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -0,0 +1,66 @@
1/*
2 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
3 *
4 * Modified from mach-omap/omap2/board-generic.c
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/io.h>
11#include <linux/of_irq.h>
12#include <linux/of_platform.h>
13#include <linux/irqdomain.h>
14
15#include <asm/mach/arch.h>
16
17#include <mach/common.h>
18#include <mach/cp_intc.h>
19#include <mach/da8xx.h>
20
21#define DA8XX_NUM_UARTS 3
22
23void __init da8xx_uart_clk_enable(void)
24{
25 int i;
26 for (i = 0; i < DA8XX_NUM_UARTS; i++)
27 davinci_serial_setup_clk(i, NULL);
28}
29
30static struct of_device_id da8xx_irq_match[] __initdata = {
31 { .compatible = "ti,cp-intc", .data = cp_intc_of_init, },
32 { }
33};
34
35static void __init da8xx_init_irq(void)
36{
37 of_irq_init(da8xx_irq_match);
38}
39
40#ifdef CONFIG_ARCH_DAVINCI_DA850
41
42static void __init da850_init_machine(void)
43{
44 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
45
46 da8xx_uart_clk_enable();
47}
48
49static const char *da850_boards_compat[] __initdata = {
50 "enbw,cmc",
51 "ti,da850-evm",
52 "ti,da850",
53 NULL,
54};
55
56DT_MACHINE_START(DA850_DT, "Generic DA850/OMAP-L138/AM18x")
57 .map_io = da850_init,
58 .init_irq = da8xx_init_irq,
59 .timer = &davinci_timer,
60 .init_machine = da850_init_machine,
61 .dt_compat = da850_boards_compat,
62 .init_late = davinci_init_late,
63 .restart = da8xx_restart,
64MACHINE_END
65
66#endif