board_bcm.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2012 Broadcom Corporation
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation version 2.
  7. *
  8. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  9. * kind, whether express or implied; without even the implied warranty
  10. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #include <linux/of_irq.h>
  14. #include <linux/of_platform.h>
  15. #include <linux/init.h>
  16. #include <linux/device.h>
  17. #include <linux/platform_device.h>
  18. #include <asm/mach/arch.h>
  19. #include <asm/hardware/gic.h>
  20. #include <asm/mach/time.h>
  21. static const struct of_device_id irq_match[] = {
  22. {.compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
  23. {}
  24. };
  25. static void timer_init(void)
  26. {
  27. }
  28. static struct sys_timer timer = {
  29. .init = timer_init,
  30. };
  31. static void __init init_irq(void)
  32. {
  33. of_irq_init(irq_match);
  34. }
  35. static void __init board_init(void)
  36. {
  37. of_platform_populate(NULL, of_default_bus_match_table, NULL,
  38. &platform_bus);
  39. }
  40. static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, };
  41. DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor")
  42. .init_irq = init_irq,
  43. .timer = &timer,
  44. .init_machine = board_init,
  45. .dt_compat = bcm11351_dt_compat,
  46. .handle_irq = gic_handle_irq,
  47. MACHINE_END