common.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (c) 2011 Picochip Ltd., Jamie Iles
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * All enquiries to support@picochip.com
  9. */
  10. #include <linux/irq.h>
  11. #include <linux/irqdomain.h>
  12. #include <linux/of.h>
  13. #include <linux/of_address.h>
  14. #include <linux/of_irq.h>
  15. #include <linux/of_platform.h>
  16. #include <asm/mach/arch.h>
  17. #include <asm/hardware/vic.h>
  18. #include <mach/map.h>
  19. #include <mach/picoxcell_soc.h>
  20. #include "common.h"
  21. static void __init picoxcell_init_machine(void)
  22. {
  23. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  24. }
  25. static const char *picoxcell_dt_match[] = {
  26. "picochip,pc3x2",
  27. "picochip,pc3x3",
  28. NULL
  29. };
  30. static const struct of_device_id vic_of_match[] __initconst = {
  31. { .compatible = "arm,pl192-vic", .data = vic_of_init, },
  32. { /* Sentinel */ }
  33. };
  34. static void __init picoxcell_init_irq(void)
  35. {
  36. of_irq_init(vic_of_match);
  37. }
  38. DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
  39. .map_io = picoxcell_map_io,
  40. .nr_irqs = ARCH_NR_IRQS,
  41. .init_irq = picoxcell_init_irq,
  42. .handle_irq = vic_handle_irq,
  43. .timer = &picoxcell_timer,
  44. .init_machine = picoxcell_init_machine,
  45. .dt_compat = picoxcell_dt_match,
  46. MACHINE_END