aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@gmail.com>2012-04-19 05:46:53 -0400
committerHaojian Zhuang <haojian.zhuang@gmail.com>2012-05-05 04:37:57 -0400
commita56f9162dd2b160b7faff610116ddcfe33a59081 (patch)
treed403694c9ef87676595a531a818cc2052a88c28d /arch/arm/mach-mmp
parent7a4d5079baf205f39efa0d9a1b273812c15a93aa (diff)
ARM: mmp: support mmp2 with device tree
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r--arch/arm/mach-mmp/Makefile1
-rw-r--r--arch/arm/mach-mmp/mmp2-dt.c60
2 files changed, 61 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile
index 77f63c12e0ba..b920b9bfbdb6 100644
--- a/arch/arm/mach-mmp/Makefile
+++ b/arch/arm/mach-mmp/Makefile
@@ -19,5 +19,6 @@ obj-$(CONFIG_MACH_BROWNSTONE) += brownstone.o
19obj-$(CONFIG_MACH_FLINT) += flint.o 19obj-$(CONFIG_MACH_FLINT) += flint.o
20obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o 20obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o
21obj-$(CONFIG_MACH_MMP_DT) += mmp-dt.o 21obj-$(CONFIG_MACH_MMP_DT) += mmp-dt.o
22obj-$(CONFIG_MACH_MMP2_DT) += mmp2-dt.o
22obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o 23obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o
23obj-$(CONFIG_MACH_GPLUGD) += gplugd.o 24obj-$(CONFIG_MACH_GPLUGD) += gplugd.o
diff --git a/arch/arm/mach-mmp/mmp2-dt.c b/arch/arm/mach-mmp/mmp2-dt.c
new file mode 100644
index 000000000000..535a5ed5977b
--- /dev/null
+++ b/arch/arm/mach-mmp/mmp2-dt.c
@@ -0,0 +1,60 @@
1/*
2 * linux/arch/arm/mach-mmp/mmp2-dt.c
3 *
4 * Copyright (C) 2012 Marvell Technology Group Ltd.
5 * Author: Haojian Zhuang <haojian.zhuang@marvell.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * publishhed by the Free Software Foundation.
10 */
11
12#include <linux/io.h>
13#include <linux/irq.h>
14#include <linux/irqdomain.h>
15#include <linux/of_irq.h>
16#include <linux/of_platform.h>
17#include <asm/mach/arch.h>
18#include <asm/mach/time.h>
19#include <mach/irqs.h>
20#include <mach/regs-apbc.h>
21
22#include "common.h"
23
24extern void __init mmp_dt_irq_init(void);
25extern void __init mmp_dt_init_timer(void);
26
27static struct sys_timer mmp_dt_timer = {
28 .init = mmp_dt_init_timer,
29};
30
31static const struct of_dev_auxdata mmp2_auxdata_lookup[] __initconst = {
32 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4030000, "pxa2xx-uart.0", NULL),
33 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.1", NULL),
34 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.2", NULL),
35 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4016000, "pxa2xx-uart.3", NULL),
36 OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL),
37 OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4025000, "pxa2xx-i2c.1", NULL),
38 OF_DEV_AUXDATA("mrvl,mmp-gpio", 0xd4019000, "pxa-gpio", NULL),
39 OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL),
40 {}
41};
42
43static void __init mmp2_dt_init(void)
44{
45 of_platform_populate(NULL, of_default_bus_match_table,
46 mmp2_auxdata_lookup, NULL);
47}
48
49static const char *mmp2_dt_board_compat[] __initdata = {
50 "mrvl,mmp2-brownstone",
51 NULL,
52};
53
54DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)")
55 .map_io = mmp_map_io,
56 .init_irq = mmp_dt_irq_init,
57 .timer = &mmp_dt_timer,
58 .init_machine = mmp2_dt_init,
59 .dt_compat = mmp2_dt_board_compat,
60MACHINE_END