board-mcs8140-dt.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Setup code for Moschip MCS8140-based board using Device Tree
  3. *
  4. * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org>
  5. *
  6. * Licensed under GPLv2.
  7. */
  8. #include <linux/types.h>
  9. #include <linux/init.h>
  10. #include <linux/module.h>
  11. #include <linux/gpio.h>
  12. #include <linux/irqdomain.h>
  13. #include <linux/of_platform.h>
  14. #include "common.h"
  15. #include <asm/setup.h>
  16. #include <asm/irq.h>
  17. #include <asm/mach/arch.h>
  18. #include <asm/mach/map.h>
  19. #include <asm/mach/irq.h>
  20. static void __init mcs814x_dt_device_init(void)
  21. {
  22. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  23. mcs814x_init_machine();
  24. }
  25. static const char *mcs8140_dt_board_compat[] __initdata = {
  26. "moschip,mcs8140",
  27. NULL, /* sentinel */
  28. };
  29. DT_MACHINE_START(mcs8140_dt, "Moschip MCS8140 board")
  30. /* Maintainer: Florian Fainelli <florian@openwrt.org> */
  31. .map_io = mcs814x_map_io,
  32. .init_early = mcs814x_clk_init,
  33. .init_irq = mcs814x_of_irq_init,
  34. .init_time = mcs814x_timer_init,
  35. .init_machine = mcs814x_dt_device_init,
  36. .restart = mcs814x_restart,
  37. .dt_compat = mcs8140_dt_board_compat,
  38. .handle_irq = mcs814x_handle_irq,
  39. MACHINE_END