scb.c 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. /*
  2. * arch/blackfin/mach-common/scb-init.c - reprogram system cross bar priority
  3. *
  4. * Copyright 2012 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2 or later.
  7. */
  8. #include <asm/blackfin.h>
  9. #include <asm/scb.h>
  10. struct scb_mi_prio scb_data[] = {
  11. #ifdef CONFIG_SCB0_MI0
  12. { REG_SCB0_ARBR0, REG_SCB0_ARBW0, 32, {
  13. CONFIG_SCB0_MI0_SLOT0,
  14. CONFIG_SCB0_MI0_SLOT1,
  15. CONFIG_SCB0_MI0_SLOT2,
  16. CONFIG_SCB0_MI0_SLOT3,
  17. CONFIG_SCB0_MI0_SLOT4,
  18. CONFIG_SCB0_MI0_SLOT5,
  19. CONFIG_SCB0_MI0_SLOT6,
  20. CONFIG_SCB0_MI0_SLOT7,
  21. CONFIG_SCB0_MI0_SLOT8,
  22. CONFIG_SCB0_MI0_SLOT9,
  23. CONFIG_SCB0_MI0_SLOT10,
  24. CONFIG_SCB0_MI0_SLOT11,
  25. CONFIG_SCB0_MI0_SLOT12,
  26. CONFIG_SCB0_MI0_SLOT13,
  27. CONFIG_SCB0_MI0_SLOT14,
  28. CONFIG_SCB0_MI0_SLOT15,
  29. CONFIG_SCB0_MI0_SLOT16,
  30. CONFIG_SCB0_MI0_SLOT17,
  31. CONFIG_SCB0_MI0_SLOT18,
  32. CONFIG_SCB0_MI0_SLOT19,
  33. CONFIG_SCB0_MI0_SLOT20,
  34. CONFIG_SCB0_MI0_SLOT21,
  35. CONFIG_SCB0_MI0_SLOT22,
  36. CONFIG_SCB0_MI0_SLOT23,
  37. CONFIG_SCB0_MI0_SLOT24,
  38. CONFIG_SCB0_MI0_SLOT25,
  39. CONFIG_SCB0_MI0_SLOT26,
  40. CONFIG_SCB0_MI0_SLOT27,
  41. CONFIG_SCB0_MI0_SLOT28,
  42. CONFIG_SCB0_MI0_SLOT29,
  43. CONFIG_SCB0_MI0_SLOT30,
  44. CONFIG_SCB0_MI0_SLOT31
  45. },
  46. },
  47. #endif
  48. #ifdef CONFIG_SCB0_MI1
  49. { REG_SCB0_ARBR1, REG_SCB0_ARBW1, 32, {
  50. CONFIG_SCB0_MI1_SLOT0,
  51. CONFIG_SCB0_MI1_SLOT1,
  52. CONFIG_SCB0_MI1_SLOT2,
  53. CONFIG_SCB0_MI1_SLOT3,
  54. CONFIG_SCB0_MI1_SLOT4,
  55. CONFIG_SCB0_MI1_SLOT5,
  56. CONFIG_SCB0_MI1_SLOT6,
  57. CONFIG_SCB0_MI1_SLOT7,
  58. CONFIG_SCB0_MI1_SLOT8,
  59. CONFIG_SCB0_MI1_SLOT9,
  60. CONFIG_SCB0_MI1_SLOT10,
  61. CONFIG_SCB0_MI1_SLOT11,
  62. CONFIG_SCB0_MI1_SLOT12,
  63. CONFIG_SCB0_MI1_SLOT13,
  64. CONFIG_SCB0_MI1_SLOT14,
  65. CONFIG_SCB0_MI1_SLOT15,
  66. CONFIG_SCB0_MI1_SLOT16,
  67. CONFIG_SCB0_MI1_SLOT17,
  68. CONFIG_SCB0_MI1_SLOT18,
  69. CONFIG_SCB0_MI1_SLOT19,
  70. CONFIG_SCB0_MI1_SLOT20,
  71. CONFIG_SCB0_MI1_SLOT21,
  72. CONFIG_SCB0_MI1_SLOT22,
  73. CONFIG_SCB0_MI1_SLOT23,
  74. CONFIG_SCB0_MI1_SLOT24,
  75. CONFIG_SCB0_MI1_SLOT25,
  76. CONFIG_SCB0_MI1_SLOT26,
  77. CONFIG_SCB0_MI1_SLOT27,
  78. CONFIG_SCB0_MI1_SLOT28,
  79. CONFIG_SCB0_MI1_SLOT29,
  80. CONFIG_SCB0_MI1_SLOT30,
  81. CONFIG_SCB0_MI1_SLOT31
  82. },
  83. },
  84. #endif
  85. #ifdef CONFIG_SCB0_MI2
  86. { REG_SCB0_ARBR2, REG_SCB0_ARBW2, 32, {
  87. CONFIG_SCB0_MI2_SLOT0,
  88. CONFIG_SCB0_MI2_SLOT1,
  89. CONFIG_SCB0_MI2_SLOT2,
  90. CONFIG_SCB0_MI2_SLOT3,
  91. CONFIG_SCB0_MI2_SLOT4,
  92. CONFIG_SCB0_MI2_SLOT5,
  93. CONFIG_SCB0_MI2_SLOT6,
  94. CONFIG_SCB0_MI2_SLOT7,
  95. CONFIG_SCB0_MI2_SLOT8,
  96. CONFIG_SCB0_MI2_SLOT9,
  97. CONFIG_SCB0_MI2_SLOT10,
  98. CONFIG_SCB0_MI2_SLOT11,
  99. CONFIG_SCB0_MI2_SLOT12,
  100. CONFIG_SCB0_MI2_SLOT13,
  101. CONFIG_SCB0_MI2_SLOT14,
  102. CONFIG_SCB0_MI2_SLOT15,
  103. CONFIG_SCB0_MI2_SLOT16,
  104. CONFIG_SCB0_MI2_SLOT17,
  105. CONFIG_SCB0_MI2_SLOT18,
  106. CONFIG_SCB0_MI2_SLOT19,
  107. CONFIG_SCB0_MI2_SLOT20,
  108. CONFIG_SCB0_MI2_SLOT21,
  109. CONFIG_SCB0_MI2_SLOT22,
  110. CONFIG_SCB0_MI2_SLOT23,
  111. CONFIG_SCB0_MI2_SLOT24,
  112. CONFIG_SCB0_MI2_SLOT25,
  113. CONFIG_SCB0_MI2_SLOT26,
  114. CONFIG_SCB0_MI2_SLOT27,
  115. CONFIG_SCB0_MI2_SLOT28,
  116. CONFIG_SCB0_MI2_SLOT29,
  117. CONFIG_SCB0_MI2_SLOT30,
  118. CONFIG_SCB0_MI2_SLOT31
  119. },
  120. },
  121. #endif
  122. #ifdef CONFIG_SCB0_MI3
  123. { REG_SCB0_ARBR3, REG_SCB0_ARBW3, 32, {
  124. CONFIG_SCB0_MI3_SLOT0,
  125. CONFIG_SCB0_MI3_SLOT1,
  126. CONFIG_SCB0_MI3_SLOT2,
  127. CONFIG_SCB0_MI3_SLOT3,
  128. CONFIG_SCB0_MI3_SLOT4,
  129. CONFIG_SCB0_MI3_SLOT5,
  130. CONFIG_SCB0_MI3_SLOT6,
  131. CONFIG_SCB0_MI3_SLOT7,
  132. CONFIG_SCB0_MI3_SLOT8,
  133. CONFIG_SCB0_MI3_SLOT9,
  134. CONFIG_SCB0_MI3_SLOT10,
  135. CONFIG_SCB0_MI3_SLOT11,
  136. CONFIG_SCB0_MI3_SLOT12,
  137. CONFIG_SCB0_MI3_SLOT13,
  138. CONFIG_SCB0_MI3_SLOT14,
  139. CONFIG_SCB0_MI3_SLOT15,
  140. CONFIG_SCB0_MI3_SLOT16,
  141. CONFIG_SCB0_MI3_SLOT17,
  142. CONFIG_SCB0_MI3_SLOT18,
  143. CONFIG_SCB0_MI3_SLOT19,
  144. CONFIG_SCB0_MI3_SLOT20,
  145. CONFIG_SCB0_MI3_SLOT21,
  146. CONFIG_SCB0_MI3_SLOT22,
  147. CONFIG_SCB0_MI3_SLOT23,
  148. CONFIG_SCB0_MI3_SLOT24,
  149. CONFIG_SCB0_MI3_SLOT25,
  150. CONFIG_SCB0_MI3_SLOT26,
  151. CONFIG_SCB0_MI3_SLOT27,
  152. CONFIG_SCB0_MI3_SLOT28,
  153. CONFIG_SCB0_MI3_SLOT29,
  154. CONFIG_SCB0_MI3_SLOT30,
  155. CONFIG_SCB0_MI3_SLOT31
  156. },
  157. },
  158. #endif
  159. #ifdef CONFIG_SCB0_MI4
  160. { REG_SCB0_ARBR4, REG_SCB4_ARBW0, 32, {
  161. CONFIG_SCB0_MI4_SLOT0,
  162. CONFIG_SCB0_MI4_SLOT1,
  163. CONFIG_SCB0_MI4_SLOT2,
  164. CONFIG_SCB0_MI4_SLOT3,
  165. CONFIG_SCB0_MI4_SLOT4,
  166. CONFIG_SCB0_MI4_SLOT5,
  167. CONFIG_SCB0_MI4_SLOT6,
  168. CONFIG_SCB0_MI4_SLOT7,
  169. CONFIG_SCB0_MI4_SLOT8,
  170. CONFIG_SCB0_MI4_SLOT9,
  171. CONFIG_SCB0_MI4_SLOT10,
  172. CONFIG_SCB0_MI4_SLOT11,
  173. CONFIG_SCB0_MI4_SLOT12,
  174. CONFIG_SCB0_MI4_SLOT13,
  175. CONFIG_SCB0_MI4_SLOT14,
  176. CONFIG_SCB0_MI4_SLOT15,
  177. CONFIG_SCB0_MI4_SLOT16,
  178. CONFIG_SCB0_MI4_SLOT17,
  179. CONFIG_SCB0_MI4_SLOT18,
  180. CONFIG_SCB0_MI4_SLOT19,
  181. CONFIG_SCB0_MI4_SLOT20,
  182. CONFIG_SCB0_MI4_SLOT21,
  183. CONFIG_SCB0_MI4_SLOT22,
  184. CONFIG_SCB0_MI4_SLOT23,
  185. CONFIG_SCB0_MI4_SLOT24,
  186. CONFIG_SCB0_MI4_SLOT25,
  187. CONFIG_SCB0_MI4_SLOT26,
  188. CONFIG_SCB0_MI4_SLOT27,
  189. CONFIG_SCB0_MI4_SLOT28,
  190. CONFIG_SCB0_MI4_SLOT29,
  191. CONFIG_SCB0_MI4_SLOT30,
  192. CONFIG_SCB0_MI4_SLOT31
  193. },
  194. },
  195. #endif
  196. #ifdef CONFIG_SCB0_MI5
  197. { REG_SCB0_ARBR5, REG_SCB0_ARBW5, 16, {
  198. CONFIG_SCB0_MI5_SLOT0,
  199. CONFIG_SCB0_MI5_SLOT1,
  200. CONFIG_SCB0_MI5_SLOT2,
  201. CONFIG_SCB0_MI5_SLOT3,
  202. CONFIG_SCB0_MI5_SLOT4,
  203. CONFIG_SCB0_MI5_SLOT5,
  204. CONFIG_SCB0_MI5_SLOT6,
  205. CONFIG_SCB0_MI5_SLOT7,
  206. CONFIG_SCB0_MI5_SLOT8,
  207. CONFIG_SCB0_MI5_SLOT9,
  208. CONFIG_SCB0_MI5_SLOT10,
  209. CONFIG_SCB0_MI5_SLOT11,
  210. CONFIG_SCB0_MI5_SLOT12,
  211. CONFIG_SCB0_MI5_SLOT13,
  212. CONFIG_SCB0_MI5_SLOT14,
  213. CONFIG_SCB0_MI5_SLOT15
  214. },
  215. },
  216. #endif
  217. #ifdef CONFIG_SCB1_MI0
  218. { REG_SCB1_ARBR0, REG_SCB1_ARBW0, 20, {
  219. CONFIG_SCB1_MI0_SLOT0,
  220. CONFIG_SCB1_MI0_SLOT1,
  221. CONFIG_SCB1_MI0_SLOT2,
  222. CONFIG_SCB1_MI0_SLOT3,
  223. CONFIG_SCB1_MI0_SLOT4,
  224. CONFIG_SCB1_MI0_SLOT5,
  225. CONFIG_SCB1_MI0_SLOT6,
  226. CONFIG_SCB1_MI0_SLOT7,
  227. CONFIG_SCB1_MI0_SLOT8,
  228. CONFIG_SCB1_MI0_SLOT9,
  229. CONFIG_SCB1_MI0_SLOT10,
  230. CONFIG_SCB1_MI0_SLOT11,
  231. CONFIG_SCB1_MI0_SLOT12,
  232. CONFIG_SCB1_MI0_SLOT13,
  233. CONFIG_SCB1_MI0_SLOT14,
  234. CONFIG_SCB1_MI0_SLOT15,
  235. CONFIG_SCB1_MI0_SLOT16,
  236. CONFIG_SCB1_MI0_SLOT17,
  237. CONFIG_SCB1_MI0_SLOT18,
  238. CONFIG_SCB1_MI0_SLOT19
  239. },
  240. },
  241. #endif
  242. #ifdef CONFIG_SCB2_MI0
  243. { REG_SCB2_ARBR0, REG_SCB2_ARBW0, 10, {
  244. CONFIG_SCB2_MI0_SLOT0,
  245. CONFIG_SCB2_MI0_SLOT1,
  246. CONFIG_SCB2_MI0_SLOT2,
  247. CONFIG_SCB2_MI0_SLOT3,
  248. CONFIG_SCB2_MI0_SLOT4,
  249. CONFIG_SCB2_MI0_SLOT5,
  250. CONFIG_SCB2_MI0_SLOT6,
  251. CONFIG_SCB2_MI0_SLOT7,
  252. CONFIG_SCB2_MI0_SLOT8,
  253. CONFIG_SCB2_MI0_SLOT9
  254. },
  255. },
  256. #endif
  257. #ifdef CONFIG_SCB3_MI0
  258. { REG_SCB3_ARBR0, REG_SCB3_ARBW0, 16, {
  259. CONFIG_SCB3_MI0_SLOT0,
  260. CONFIG_SCB3_MI0_SLOT1,
  261. CONFIG_SCB3_MI0_SLOT2,
  262. CONFIG_SCB3_MI0_SLOT3,
  263. CONFIG_SCB3_MI0_SLOT4,
  264. CONFIG_SCB3_MI0_SLOT5,
  265. CONFIG_SCB3_MI0_SLOT6,
  266. CONFIG_SCB3_MI0_SLOT7,
  267. CONFIG_SCB3_MI0_SLOT8,
  268. CONFIG_SCB3_MI0_SLOT9,
  269. CONFIG_SCB3_MI0_SLOT10,
  270. CONFIG_SCB3_MI0_SLOT11,
  271. CONFIG_SCB3_MI0_SLOT12,
  272. CONFIG_SCB3_MI0_SLOT13,
  273. CONFIG_SCB3_MI0_SLOT14,
  274. CONFIG_SCB3_MI0_SLOT15
  275. },
  276. },
  277. #endif
  278. #ifdef CONFIG_SCB4_MI0
  279. { REG_SCB4_ARBR0, REG_SCB4_ARBW0, 16, {
  280. CONFIG_SCB4_MI0_SLOT0,
  281. CONFIG_SCB4_MI0_SLOT1,
  282. CONFIG_SCB4_MI0_SLOT2,
  283. CONFIG_SCB4_MI0_SLOT3,
  284. CONFIG_SCB4_MI0_SLOT4,
  285. CONFIG_SCB4_MI0_SLOT5,
  286. CONFIG_SCB4_MI0_SLOT6,
  287. CONFIG_SCB4_MI0_SLOT7,
  288. CONFIG_SCB4_MI0_SLOT8,
  289. CONFIG_SCB4_MI0_SLOT9,
  290. CONFIG_SCB4_MI0_SLOT10,
  291. CONFIG_SCB4_MI0_SLOT11,
  292. CONFIG_SCB4_MI0_SLOT12,
  293. CONFIG_SCB4_MI0_SLOT13,
  294. CONFIG_SCB4_MI0_SLOT14,
  295. CONFIG_SCB4_MI0_SLOT15
  296. },
  297. },
  298. #endif
  299. #ifdef CONFIG_SCB5_MI0
  300. { REG_SCB5_ARBR0, REG_SCB5_ARBW0, 8, {
  301. CONFIG_SCB5_MI0_SLOT0,
  302. CONFIG_SCB5_MI0_SLOT1,
  303. CONFIG_SCB5_MI0_SLOT2,
  304. CONFIG_SCB5_MI0_SLOT3,
  305. CONFIG_SCB5_MI0_SLOT4,
  306. CONFIG_SCB5_MI0_SLOT5,
  307. CONFIG_SCB5_MI0_SLOT6,
  308. CONFIG_SCB5_MI0_SLOT7
  309. },
  310. },
  311. #endif
  312. #ifdef CONFIG_SCB6_MI0
  313. { REG_SCB6_ARBR0, REG_SCB6_ARBW0, 4, {
  314. CONFIG_SCB6_MI0_SLOT0,
  315. CONFIG_SCB6_MI0_SLOT1,
  316. CONFIG_SCB6_MI0_SLOT2,
  317. CONFIG_SCB6_MI0_SLOT3
  318. },
  319. },
  320. #endif
  321. #ifdef CONFIG_SCB7_MI0
  322. { REG_SCB7_ARBR0, REG_SCB7_ARBW0, 6, {
  323. CONFIG_SCB7_MI0_SLOT0,
  324. CONFIG_SCB7_MI0_SLOT1,
  325. CONFIG_SCB7_MI0_SLOT2,
  326. CONFIG_SCB7_MI0_SLOT3,
  327. CONFIG_SCB7_MI0_SLOT4,
  328. CONFIG_SCB7_MI0_SLOT5
  329. },
  330. },
  331. #endif
  332. #ifdef CONFIG_SCB8_MI0
  333. { REG_SCB8_ARBR0, REG_SCB8_ARBW0, 8, {
  334. CONFIG_SCB8_MI0_SLOT0,
  335. CONFIG_SCB8_MI0_SLOT1,
  336. CONFIG_SCB8_MI0_SLOT2,
  337. CONFIG_SCB8_MI0_SLOT3,
  338. CONFIG_SCB8_MI0_SLOT4,
  339. CONFIG_SCB8_MI0_SLOT5,
  340. CONFIG_SCB8_MI0_SLOT6,
  341. CONFIG_SCB8_MI0_SLOT7
  342. },
  343. },
  344. #endif
  345. #ifdef CONFIG_SCB9_MI0
  346. { REG_SCB9_ARBR0, REG_SCB9_ARBW0, 10, {
  347. CONFIG_SCB9_MI0_SLOT0,
  348. CONFIG_SCB9_MI0_SLOT1,
  349. CONFIG_SCB9_MI0_SLOT2,
  350. CONFIG_SCB9_MI0_SLOT3,
  351. CONFIG_SCB9_MI0_SLOT4,
  352. CONFIG_SCB9_MI0_SLOT5,
  353. CONFIG_SCB9_MI0_SLOT6,
  354. CONFIG_SCB9_MI0_SLOT7,
  355. CONFIG_SCB9_MI0_SLOT8,
  356. CONFIG_SCB9_MI0_SLOT9
  357. },
  358. },
  359. #endif
  360. { 0, }
  361. };