mmp-dt.c 2.4 KB

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