board_bcm2835.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (C) 2010 Broadcom
  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 as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #include <linux/init.h>
  15. #include <linux/irqchip.h>
  16. #include <linux/of_address.h>
  17. #include <linux/of_platform.h>
  18. #include <linux/clk/bcm2835.h>
  19. #include <asm/mach/arch.h>
  20. #include <asm/mach/map.h>
  21. static void __init bcm2835_init(void)
  22. {
  23. int ret;
  24. bcm2835_init_clocks();
  25. ret = of_platform_populate(NULL, of_default_bus_match_table, NULL,
  26. NULL);
  27. if (ret) {
  28. pr_err("of_platform_populate failed: %d\n", ret);
  29. BUG();
  30. }
  31. }
  32. static const char * const bcm2835_compat[] = {
  33. "brcm,bcm2835",
  34. NULL
  35. };
  36. DT_MACHINE_START(BCM2835, "BCM2835")
  37. .init_machine = bcm2835_init,
  38. .dt_compat = bcm2835_compat
  39. MACHINE_END