| Haojian Zhuang | a56f916 | 2012-04-19 17:46:53 +0800 | [diff] [blame] | 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 |  | 
 | 24 | extern void __init mmp_dt_irq_init(void); | 
 | 25 | extern void __init mmp_dt_init_timer(void); | 
 | 26 |  | 
| Haojian Zhuang | a56f916 | 2012-04-19 17:46:53 +0800 | [diff] [blame] | 27 | static const struct of_dev_auxdata mmp2_auxdata_lookup[] __initconst = { | 
 | 28 | 	OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4030000, "pxa2xx-uart.0", NULL), | 
 | 29 | 	OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.1", NULL), | 
 | 30 | 	OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.2", NULL), | 
 | 31 | 	OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4016000, "pxa2xx-uart.3", NULL), | 
 | 32 | 	OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL), | 
 | 33 | 	OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4025000, "pxa2xx-i2c.1", NULL), | 
| Haojian Zhuang | f873117 | 2013-04-09 22:27:50 +0800 | [diff] [blame] | 34 | 	OF_DEV_AUXDATA("marvell,mmp-gpio", 0xd4019000, "mmp2-gpio", NULL), | 
| Haojian Zhuang | a56f916 | 2012-04-19 17:46:53 +0800 | [diff] [blame] | 35 | 	OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL), | 
 | 36 | 	{} | 
 | 37 | }; | 
 | 38 |  | 
 | 39 | static void __init mmp2_dt_init(void) | 
 | 40 | { | 
 | 41 | 	of_platform_populate(NULL, of_default_bus_match_table, | 
 | 42 | 			     mmp2_auxdata_lookup, NULL); | 
 | 43 | } | 
 | 44 |  | 
 | 45 | static const char *mmp2_dt_board_compat[] __initdata = { | 
 | 46 | 	"mrvl,mmp2-brownstone", | 
 | 47 | 	NULL, | 
 | 48 | }; | 
 | 49 |  | 
 | 50 | DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)") | 
 | 51 | 	.map_io		= mmp_map_io, | 
 | 52 | 	.init_irq	= mmp_dt_irq_init, | 
| Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 53 | 	.init_time	= mmp_dt_init_timer, | 
| Haojian Zhuang | a56f916 | 2012-04-19 17:46:53 +0800 | [diff] [blame] | 54 | 	.init_machine	= mmp2_dt_init, | 
 | 55 | 	.dt_compat	= mmp2_dt_board_compat, | 
 | 56 | MACHINE_END |