platform.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * ARC FPGA Platform support code
  3. *
  4. * Copyright (C) 2012 Synopsys, Inc. (www.synopsys.com)
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/types.h>
  11. #include <linux/init.h>
  12. #include <linux/device.h>
  13. #include <linux/platform_device.h>
  14. #include <linux/io.h>
  15. #include <linux/console.h>
  16. #include <asm/setup.h>
  17. #include <asm/clk.h>
  18. #include <asm/mach_desc.h>
  19. #include <plat/memmap.h>
  20. #include <plat/smp.h>
  21. #include <plat/irq.h>
  22. static void __init plat_fpga_early_init(void)
  23. {
  24. pr_info("[plat-arcfpga]: registering early dev resources\n");
  25. #ifdef CONFIG_ISS_SMP_EXTN
  26. iss_model_init_early_smp();
  27. #endif
  28. }
  29. /*----------------------- Machine Descriptions ------------------------------
  30. *
  31. * Machine description is simply a set of platform/board specific callbacks
  32. * This is not directly related to DeviceTree based dynamic device creation,
  33. * however as part of early device tree scan, we also select the right
  34. * callback set, by matching the DT compatible name.
  35. */
  36. static const char *legacy_fpga_compat[] __initconst = {
  37. "snps,arc-angel4",
  38. "snps,arc-ml509",
  39. NULL,
  40. };
  41. MACHINE_START(LEGACY_FPGA, "legacy_fpga")
  42. .dt_compat = legacy_fpga_compat,
  43. .init_early = plat_fpga_early_init,
  44. #ifdef CONFIG_ISS_SMP_EXTN
  45. .init_smp = iss_model_init_smp,
  46. #endif
  47. MACHINE_END
  48. static const char *simulation_compat[] __initconst = {
  49. "snps,nsim",
  50. "snps,nsimosci",
  51. NULL,
  52. };
  53. MACHINE_START(SIMULATION, "simulation")
  54. .dt_compat = simulation_compat,
  55. MACHINE_END