pxa-dt.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * linux/arch/arm/mach-pxa/pxa-dt.c
  3. *
  4. * Copyright (C) 2012 Daniel Mack
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * publishhed by the Free Software Foundation.
  9. */
  10. #include <linux/irq.h>
  11. #include <linux/irqdomain.h>
  12. #include <linux/of_irq.h>
  13. #include <linux/of_platform.h>
  14. #include <asm/mach/arch.h>
  15. #include <asm/mach/time.h>
  16. #include <mach/irqs.h>
  17. #include "generic.h"
  18. #ifdef CONFIG_PXA3xx
  19. static const struct of_dev_auxdata const pxa3xx_auxdata_lookup[] __initconst = {
  20. OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40100000, "pxa2xx-uart.0", NULL),
  21. OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40200000, "pxa2xx-uart.1", NULL),
  22. OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40700000, "pxa2xx-uart.2", NULL),
  23. OF_DEV_AUXDATA("mrvl,pxa-uart", 0x41600000, "pxa2xx-uart.3", NULL),
  24. OF_DEV_AUXDATA("marvell,pxa-mmc", 0x41100000, "pxa2xx-mci.0", NULL),
  25. OF_DEV_AUXDATA("intel,pxa3xx-gpio", 0x40e00000, "pxa3xx-gpio", NULL),
  26. OF_DEV_AUXDATA("marvell,pxa-ohci", 0x4c000000, "pxa27x-ohci", NULL),
  27. OF_DEV_AUXDATA("mrvl,pxa-i2c", 0x40301680, "pxa2xx-i2c.0", NULL),
  28. OF_DEV_AUXDATA("mrvl,pwri2c", 0x40f500c0, "pxa3xx-i2c.1", NULL),
  29. OF_DEV_AUXDATA("marvell,pxa3xx-nand", 0x43100000, "pxa3xx-nand", NULL),
  30. {}
  31. };
  32. static void __init pxa3xx_dt_init(void)
  33. {
  34. of_platform_populate(NULL, of_default_bus_match_table,
  35. pxa3xx_auxdata_lookup, NULL);
  36. }
  37. static const char *const pxa3xx_dt_board_compat[] __initconst = {
  38. "marvell,pxa300",
  39. "marvell,pxa310",
  40. "marvell,pxa320",
  41. NULL,
  42. };
  43. #endif
  44. #ifdef CONFIG_PXA3xx
  45. DT_MACHINE_START(PXA_DT, "Marvell PXA3xx (Device Tree Support)")
  46. .map_io = pxa3xx_map_io,
  47. .init_irq = pxa3xx_dt_init_irq,
  48. .handle_irq = pxa3xx_handle_irq,
  49. .init_time = pxa_timer_init,
  50. .restart = pxa_restart,
  51. .init_machine = pxa3xx_dt_init,
  52. .dt_compat = pxa3xx_dt_board_compat,
  53. MACHINE_END
  54. #endif
  55. #ifdef CONFIG_PXA27x
  56. static const char * const pxa27x_dt_board_compat[] __initconst = {
  57. "marvell,pxa270",
  58. NULL,
  59. };
  60. DT_MACHINE_START(PXA27X_DT, "Marvell PXA2xx (Device Tree Support)")
  61. .map_io = pxa27x_map_io,
  62. .init_irq = pxa27x_dt_init_irq,
  63. .handle_irq = pxa27x_handle_irq,
  64. .restart = pxa_restart,
  65. .dt_compat = pxa27x_dt_board_compat,
  66. MACHINE_END
  67. #endif