]>
Commit | Line | Data |
---|---|---|
5d489766 HZ |
1 | /* |
2 | * linux/arch/arm/mach-mmp/mmp-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 | ||
0f374561 | 12 | #include <linux/irqchip.h> |
5d489766 HZ |
13 | #include <linux/of_platform.h> |
14 | #include <asm/mach/arch.h> | |
641f4d56 | 15 | #include <asm/mach/time.h> |
5d489766 HZ |
16 | |
17 | #include "common.h" | |
18 | ||
641f4d56 | 19 | extern void __init mmp_dt_init_timer(void); |
5d489766 | 20 | |
641f4d56 | 21 | static const struct of_dev_auxdata pxa168_auxdata_lookup[] __initconst = { |
5d489766 HZ |
22 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), |
23 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), | |
24 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4026000, "pxa2xx-uart.2", NULL), | |
25 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL), | |
26 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4025000, "pxa2xx-i2c.1", NULL), | |
f8731174 | 27 | OF_DEV_AUXDATA("marvell,mmp-gpio", 0xd4019000, "mmp-gpio", NULL), |
5d489766 HZ |
28 | OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL), |
29 | {} | |
30 | }; | |
31 | ||
641f4d56 HZ |
32 | static const struct of_dev_auxdata pxa910_auxdata_lookup[] __initconst = { |
33 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), | |
34 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), | |
35 | OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4036000, "pxa2xx-uart.2", NULL), | |
36 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL), | |
37 | OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4037000, "pxa2xx-i2c.1", NULL), | |
f8731174 | 38 | OF_DEV_AUXDATA("marvell,mmp-gpio", 0xd4019000, "mmp-gpio", NULL), |
641f4d56 HZ |
39 | OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL), |
40 | {} | |
41 | }; | |
42 | ||
43 | static void __init pxa168_dt_init(void) | |
5d489766 | 44 | { |
641f4d56 HZ |
45 | of_platform_populate(NULL, of_default_bus_match_table, |
46 | pxa168_auxdata_lookup, NULL); | |
47 | } | |
5d489766 | 48 | |
641f4d56 HZ |
49 | static void __init pxa910_dt_init(void) |
50 | { | |
5d489766 | 51 | of_platform_populate(NULL, of_default_bus_match_table, |
641f4d56 | 52 | pxa910_auxdata_lookup, NULL); |
5d489766 HZ |
53 | } |
54 | ||
641f4d56 | 55 | static const char *mmp_dt_board_compat[] __initdata = { |
5d489766 | 56 | "mrvl,pxa168-aspenite", |
641f4d56 | 57 | "mrvl,pxa910-dkb", |
5d489766 HZ |
58 | NULL, |
59 | }; | |
60 | ||
61 | DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)") | |
62 | .map_io = mmp_map_io, | |
6bb27d73 | 63 | .init_time = mmp_dt_init_timer, |
641f4d56 HZ |
64 | .init_machine = pxa168_dt_init, |
65 | .dt_compat = mmp_dt_board_compat, | |
66 | MACHINE_END | |
67 | ||
68 | DT_MACHINE_START(PXA910_DT, "Marvell PXA910 (Device Tree Support)") | |
69 | .map_io = mmp_map_io, | |
6bb27d73 | 70 | .init_time = mmp_dt_init_timer, |
641f4d56 HZ |
71 | .init_machine = pxa910_dt_init, |
72 | .dt_compat = mmp_dt_board_compat, | |
5d489766 | 73 | MACHINE_END |