diff options
author | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-04-19 06:36:31 -0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-05-05 04:38:45 -0400 |
commit | 641f4d562cf69e1839c84c9415169644025ec247 (patch) | |
tree | bf42effd20c11e51cba8ddee1657d2b756fe8fb6 | |
parent | a56f9162dd2b160b7faff610116ddcfe33a59081 (diff) |
ARM: mmp: support pxa910 with device tree
Suppot gpio/irq/timer in mmp-dt driver. Support PXA910 also in mmp-dt
driver.
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | arch/arm/mach-mmp/mmp-dt.c | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/arch/arm/mach-mmp/mmp-dt.c b/arch/arm/mach-mmp/mmp-dt.c index ca22e3c04e90..033cc31b3c72 100644 --- a/arch/arm/mach-mmp/mmp-dt.c +++ b/arch/arm/mach-mmp/mmp-dt.c | |||
@@ -14,14 +14,19 @@ | |||
14 | #include <linux/of_irq.h> | 14 | #include <linux/of_irq.h> |
15 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
16 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
17 | #include <asm/mach/time.h> | ||
17 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
18 | 19 | ||
19 | #include "common.h" | 20 | #include "common.h" |
20 | 21 | ||
21 | extern struct sys_timer pxa168_timer; | 22 | extern void __init mmp_dt_irq_init(void); |
22 | extern void __init icu_init_irq(void); | 23 | extern void __init mmp_dt_init_timer(void); |
23 | 24 | ||
24 | static const struct of_dev_auxdata mmp_auxdata_lookup[] __initconst = { | 25 | static struct sys_timer mmp_dt_timer = { |
26 | .init = mmp_dt_init_timer, | ||
27 | }; | ||
28 | |||
29 | static const struct of_dev_auxdata pxa168_auxdata_lookup[] __initconst = { | ||
25 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), | 30 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), |
26 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), | 31 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), |
27 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4026000, "pxa2xx-uart.2", NULL), | 32 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4026000, "pxa2xx-uart.2", NULL), |
@@ -32,22 +37,47 @@ static const struct of_dev_auxdata mmp_auxdata_lookup[] __initconst = { | |||
32 | {} | 37 | {} |
33 | }; | 38 | }; |
34 | 39 | ||
35 | static void __init mmp_dt_init(void) | 40 | static const struct of_dev_auxdata pxa910_auxdata_lookup[] __initconst = { |
41 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), | ||
42 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), | ||
43 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4036000, "pxa2xx-uart.2", NULL), | ||
44 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL), | ||
45 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4037000, "pxa2xx-i2c.1", NULL), | ||
46 | OF_DEV_AUXDATA("mrvl,mmp-gpio", 0xd4019000, "pxa-gpio", NULL), | ||
47 | OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL), | ||
48 | {} | ||
49 | }; | ||
50 | |||
51 | static void __init pxa168_dt_init(void) | ||
36 | { | 52 | { |
53 | of_platform_populate(NULL, of_default_bus_match_table, | ||
54 | pxa168_auxdata_lookup, NULL); | ||
55 | } | ||
37 | 56 | ||
57 | static void __init pxa910_dt_init(void) | ||
58 | { | ||
38 | of_platform_populate(NULL, of_default_bus_match_table, | 59 | of_platform_populate(NULL, of_default_bus_match_table, |
39 | mmp_auxdata_lookup, NULL); | 60 | pxa910_auxdata_lookup, NULL); |
40 | } | 61 | } |
41 | 62 | ||
42 | static const char *pxa168_dt_board_compat[] __initdata = { | 63 | static const char *mmp_dt_board_compat[] __initdata = { |
43 | "mrvl,pxa168-aspenite", | 64 | "mrvl,pxa168-aspenite", |
65 | "mrvl,pxa910-dkb", | ||
44 | NULL, | 66 | NULL, |
45 | }; | 67 | }; |
46 | 68 | ||
47 | DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)") | 69 | DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)") |
48 | .map_io = mmp_map_io, | 70 | .map_io = mmp_map_io, |
49 | .init_irq = icu_init_irq, | 71 | .init_irq = mmp_dt_irq_init, |
50 | .timer = &pxa168_timer, | 72 | .timer = &mmp_dt_timer, |
51 | .init_machine = mmp_dt_init, | 73 | .init_machine = pxa168_dt_init, |
52 | .dt_compat = pxa168_dt_board_compat, | 74 | .dt_compat = mmp_dt_board_compat, |
75 | MACHINE_END | ||
76 | |||
77 | DT_MACHINE_START(PXA910_DT, "Marvell PXA910 (Device Tree Support)") | ||
78 | .map_io = mmp_map_io, | ||
79 | .init_irq = mmp_dt_irq_init, | ||
80 | .timer = &mmp_dt_timer, | ||
81 | .init_machine = pxa910_dt_init, | ||
82 | .dt_compat = mmp_dt_board_compat, | ||
53 | MACHINE_END | 83 | MACHINE_END |