ARM: mmp: support mmp2 with device tree
[deliverable/linux.git] / arch / arm / mach-mmp / mmp-dt.c
CommitLineData
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
12#include <linux/irq.h>
13#include <linux/irqdomain.h>
14#include <linux/of_irq.h>
15#include <linux/of_platform.h>
16#include <asm/mach/arch.h>
17#include <mach/irqs.h>
18
19#include "common.h"
20
21extern struct sys_timer pxa168_timer;
22extern void __init icu_init_irq(void);
23
24static const struct of_dev_auxdata mmp_auxdata_lookup[] __initconst = {
25 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL),
26 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL),
27 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4026000, "pxa2xx-uart.2", NULL),
28 OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4011000, "pxa2xx-i2c.0", NULL),
29 OF_DEV_AUXDATA("mrvl,mmp-twsi", 0xd4025000, "pxa2xx-i2c.1", NULL),
30 OF_DEV_AUXDATA("mrvl,mmp-gpio", 0xd4019000, "pxa-gpio", NULL),
31 OF_DEV_AUXDATA("mrvl,mmp-rtc", 0xd4010000, "sa1100-rtc", NULL),
32 {}
33};
34
5d489766
HZ
35static void __init mmp_dt_init(void)
36{
37
5d489766
HZ
38 of_platform_populate(NULL, of_default_bus_match_table,
39 mmp_auxdata_lookup, NULL);
40}
41
42static const char *pxa168_dt_board_compat[] __initdata = {
43 "mrvl,pxa168-aspenite",
44 NULL,
45};
46
47DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)")
48 .map_io = mmp_map_io,
49 .init_irq = icu_init_irq,
50 .timer = &pxa168_timer,
51 .init_machine = mmp_dt_init,
52 .dt_compat = pxa168_dt_board_compat,
53MACHINE_END
This page took 0.042926 seconds and 5 git commands to generate.