board-dt-8660.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* Copyright (c) 2010-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.h>
  14. #include <linux/of_irq.h>
  15. #include <linux/of_platform.h>
  16. #include <asm/mach/arch.h>
  17. #include <asm/hardware/gic.h>
  18. #include <mach/board.h>
  19. #include "common.h"
  20. static const struct of_device_id msm_dt_gic_match[] __initconst = {
  21. { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init },
  22. {}
  23. };
  24. static void __init msm8x60_init_irq(void)
  25. {
  26. of_irq_init(msm_dt_gic_match);
  27. }
  28. static void __init msm8x60_init_late(void)
  29. {
  30. smd_debugfs_init();
  31. }
  32. static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = {
  33. {}
  34. };
  35. static void __init msm8x60_dt_init(void)
  36. {
  37. of_platform_populate(NULL, of_default_bus_match_table,
  38. msm_auxdata_lookup, NULL);
  39. }
  40. static const char *msm8x60_fluid_match[] __initdata = {
  41. "qcom,msm8660-fluid",
  42. "qcom,msm8660-surf",
  43. NULL
  44. };
  45. DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
  46. .smp = smp_ops(msm_smp_ops),
  47. .map_io = msm_map_msm8x60_io,
  48. .init_irq = msm8x60_init_irq,
  49. .handle_irq = gic_handle_irq,
  50. .init_machine = msm8x60_dt_init,
  51. .init_late = msm8x60_init_late,
  52. .timer = &msm_dt_timer,
  53. .dt_compat = msm8x60_fluid_match,
  54. MACHINE_END