mmp2-dt.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #include <linux/io.h>
  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 <asm/mach/time.h>
  18. #include <mach/irqs.h>
  19. #include <mach/regs-apbc.h>
  20. #include "common.h"
  21. extern void __init mmp_dt_irq_init(void);
  22. extern void __init mmp_dt_init_timer(void);
  23. static const struct of_dev_auxdata mmp2_auxdata_lookup[] __initconst = {
  24. OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4030000, "pxa2xx-uart.0", NULL),
  25. OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.1", NULL),
  26. OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.2", NULL),
  27. OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4016000, "pxa2xx-uart.3", 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. static void __init mmp2_dt_init(void)
  35. {
  36. of_platform_populate(NULL, of_default_bus_match_table,
  37. mmp2_auxdata_lookup, NULL);
  38. }
  39. static const char *mmp2_dt_board_compat[] __initdata = {
  40. "mrvl,mmp2-brownstone",
  41. NULL,
  42. };
  43. DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)")
  44. .map_io = mmp_map_io,
  45. .init_irq = mmp_dt_irq_init,
  46. .init_time = mmp_dt_init_timer,
  47. .init_machine = mmp2_dt_init,
  48. .dt_compat = mmp2_dt_board_compat,
  49. MACHINE_END