board-dt-8960.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #include <linux/init.h>
  13. #include <linux/of_irq.h>
  14. #include <linux/of_platform.h>
  15. #include <asm/hardware/gic.h>
  16. #include <asm/mach/arch.h>
  17. #include "common.h"
  18. static const struct of_device_id msm_dt_gic_match[] __initconst = {
  19. { .compatible = "qcom,msm-qgic2", .data = gic_of_init },
  20. { }
  21. };
  22. static void __init msm_dt_init_irq(void)
  23. {
  24. of_irq_init(msm_dt_gic_match);
  25. }
  26. static void __init msm_dt_init(void)
  27. {
  28. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  29. }
  30. static const char * const msm8960_dt_match[] __initconst = {
  31. "qcom,msm8960-cdp",
  32. NULL
  33. };
  34. DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
  35. .smp = smp_ops(msm_smp_ops),
  36. .map_io = msm_map_msm8960_io,
  37. .init_irq = msm_dt_init_irq,
  38. .timer = &msm_dt_timer,
  39. .init_machine = msm_dt_init,
  40. .dt_compat = msm8960_dt_match,
  41. .handle_irq = gic_handle_irq,
  42. MACHINE_END