setup.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * arch/sh64/mach-sim/setup.c
  7. *
  8. * ST50 Simulator Platform Support
  9. *
  10. * This file handles the architecture-dependent parts of initialization
  11. *
  12. * Copyright (C) 2000, 2001 Paolo Alberelli
  13. *
  14. * lethal@linux-sh.org: 15th May 2003
  15. * Use the generic procfs cpuinfo interface, just return a valid board name.
  16. */
  17. #include <linux/init.h>
  18. #include <linux/kernel.h>
  19. #include <asm/platform.h>
  20. #include <asm/irq.h>
  21. /*
  22. * Platform Dependent Interrupt Priorities.
  23. */
  24. /* Using defaults defined in irq.h */
  25. #define RES NO_PRIORITY /* Disabled */
  26. #define IR0 IRL0_PRIORITY /* IRLs */
  27. #define IR1 IRL1_PRIORITY
  28. #define IR2 IRL2_PRIORITY
  29. #define IR3 IRL3_PRIORITY
  30. #define PCA INTA_PRIORITY /* PCI Ints */
  31. #define PCB INTB_PRIORITY
  32. #define PCC INTC_PRIORITY
  33. #define PCD INTD_PRIORITY
  34. #define SER TOP_PRIORITY
  35. #define ERR TOP_PRIORITY
  36. #define PW0 TOP_PRIORITY
  37. #define PW1 TOP_PRIORITY
  38. #define PW2 TOP_PRIORITY
  39. #define PW3 TOP_PRIORITY
  40. #define DM0 NO_PRIORITY /* DMA Ints */
  41. #define DM1 NO_PRIORITY
  42. #define DM2 NO_PRIORITY
  43. #define DM3 NO_PRIORITY
  44. #define DAE NO_PRIORITY
  45. #define TU0 TIMER_PRIORITY /* TMU Ints */
  46. #define TU1 NO_PRIORITY
  47. #define TU2 NO_PRIORITY
  48. #define TI2 NO_PRIORITY
  49. #define ATI NO_PRIORITY /* RTC Ints */
  50. #define PRI NO_PRIORITY
  51. #define CUI RTC_PRIORITY
  52. #define ERI SCIF_PRIORITY /* SCIF Ints */
  53. #define RXI SCIF_PRIORITY
  54. #define BRI SCIF_PRIORITY
  55. #define TXI SCIF_PRIORITY
  56. #define ITI TOP_PRIORITY /* WDT Ints */
  57. /*
  58. * Platform dependent structures: maps and parms block.
  59. */
  60. struct resource io_resources[] = {
  61. /* Nothing yet .. */
  62. };
  63. struct resource kram_resources[] = {
  64. /* These must be last in the array */
  65. { .name = "Kernel code", .start = 0, .end = 0 },
  66. /* These must be last in the array */
  67. { .name = "Kernel data", .start = 0, .end = 0 }
  68. };
  69. struct resource xram_resources[] = {
  70. /* Nothing yet .. */
  71. };
  72. struct resource rom_resources[] = {
  73. /* Nothing yet .. */
  74. };
  75. struct sh64_platform platform_parms = {
  76. .readonly_rootfs = 1,
  77. .initial_root_dev = 0x0100,
  78. .loader_type = 1,
  79. .io_res_p = io_resources,
  80. .io_res_count = ARRAY_SIZE(io_resources),
  81. .kram_res_p = kram_resources,
  82. .kram_res_count = ARRAY_SIZE(kram_resources),
  83. .xram_res_p = xram_resources,
  84. .xram_res_count = ARRAY_SIZE(xram_resources),
  85. .rom_res_p = rom_resources,
  86. .rom_res_count = ARRAY_SIZE(rom_resources),
  87. };
  88. int platform_int_priority[NR_IRQS] = {
  89. IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD, /* IRQ 0- 7 */
  90. RES, RES, RES, RES, SER, ERR, PW3, PW2, /* IRQ 8-15 */
  91. PW1, PW0, DM0, DM1, DM2, DM3, DAE, RES, /* IRQ 16-23 */
  92. RES, RES, RES, RES, RES, RES, RES, RES, /* IRQ 24-31 */
  93. TU0, TU1, TU2, TI2, ATI, PRI, CUI, ERI, /* IRQ 32-39 */
  94. RXI, BRI, TXI, RES, RES, RES, RES, RES, /* IRQ 40-47 */
  95. RES, RES, RES, RES, RES, RES, RES, RES, /* IRQ 48-55 */
  96. RES, RES, RES, RES, RES, RES, RES, ITI, /* IRQ 56-63 */
  97. };
  98. void __init platform_setup(void)
  99. {
  100. /* Simulator platform leaves the decision to head.S */
  101. platform_parms.fpu_flags = fpu_in_use;
  102. }
  103. void __init platform_monitor(void)
  104. {
  105. /* Nothing yet .. */
  106. }
  107. void __init platform_reserve(void)
  108. {
  109. /* Nothing yet .. */
  110. }
  111. const char *get_system_type(void)
  112. {
  113. return "SH-5 Simulator";
  114. }