PageRenderTime 55ms CodeModel.GetById 30ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/powerpc/sysdev/micropatch.c

https://bitbucket.org/abioy/linux
C | 743 lines | 681 code | 42 blank | 20 comment | 14 complexity | 2e68da47186354f4a6754c00f2e80644 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, GPL-2.0, LGPL-2.0, AGPL-1.0
  1. /* Microcode patches for the CPM as supplied by Motorola.
  2. * This is the one for IIC/SPI. There is a newer one that
  3. * also relocates SMC2, but this would require additional changes
  4. * to uart.c, so I am holding off on that for a moment.
  5. */
  6. #include <linux/errno.h>
  7. #include <linux/sched.h>
  8. #include <linux/kernel.h>
  9. #include <linux/param.h>
  10. #include <linux/string.h>
  11. #include <linux/mm.h>
  12. #include <linux/interrupt.h>
  13. #include <asm/irq.h>
  14. #include <asm/mpc8xx.h>
  15. #include <asm/page.h>
  16. #include <asm/pgtable.h>
  17. #include <asm/8xx_immap.h>
  18. #include <asm/cpm1.h>
  19. /*
  20. * I2C/SPI relocation patch arrays.
  21. */
  22. #ifdef CONFIG_I2C_SPI_UCODE_PATCH
  23. uint patch_2000[] = {
  24. 0x7FFFEFD9,
  25. 0x3FFD0000,
  26. 0x7FFB49F7,
  27. 0x7FF90000,
  28. 0x5FEFADF7,
  29. 0x5F89ADF7,
  30. 0x5FEFAFF7,
  31. 0x5F89AFF7,
  32. 0x3A9CFBC8,
  33. 0xE7C0EDF0,
  34. 0x77C1E1BB,
  35. 0xF4DC7F1D,
  36. 0xABAD932F,
  37. 0x4E08FDCF,
  38. 0x6E0FAFF8,
  39. 0x7CCF76CF,
  40. 0xFD1FF9CF,
  41. 0xABF88DC6,
  42. 0xAB5679F7,
  43. 0xB0937383,
  44. 0xDFCE79F7,
  45. 0xB091E6BB,
  46. 0xE5BBE74F,
  47. 0xB3FA6F0F,
  48. 0x6FFB76CE,
  49. 0xEE0DF9CF,
  50. 0x2BFBEFEF,
  51. 0xCFEEF9CF,
  52. 0x76CEAD24,
  53. 0x90B2DF9A,
  54. 0x7FDDD0BF,
  55. 0x4BF847FD,
  56. 0x7CCF76CE,
  57. 0xCFEF7E1F,
  58. 0x7F1D7DFD,
  59. 0xF0B6EF71,
  60. 0x7FC177C1,
  61. 0xFBC86079,
  62. 0xE722FBC8,
  63. 0x5FFFDFFF,
  64. 0x5FB2FFFB,
  65. 0xFBC8F3C8,
  66. 0x94A67F01,
  67. 0x7F1D5F39,
  68. 0xAFE85F5E,
  69. 0xFFDFDF96,
  70. 0xCB9FAF7D,
  71. 0x5FC1AFED,
  72. 0x8C1C5FC1,
  73. 0xAFDD5FC3,
  74. 0xDF9A7EFD,
  75. 0xB0B25FB2,
  76. 0xFFFEABAD,
  77. 0x5FB2FFFE,
  78. 0x5FCE600B,
  79. 0xE6BB600B,
  80. 0x5FCEDFC6,
  81. 0x27FBEFDF,
  82. 0x5FC8CFDE,
  83. 0x3A9CE7C0,
  84. 0xEDF0F3C8,
  85. 0x7F0154CD,
  86. 0x7F1D2D3D,
  87. 0x363A7570,
  88. 0x7E0AF1CE,
  89. 0x37EF2E68,
  90. 0x7FEE10EC,
  91. 0xADF8EFDE,
  92. 0xCFEAE52F,
  93. 0x7D0FE12B,
  94. 0xF1CE5F65,
  95. 0x7E0A4DF8,
  96. 0xCFEA5F72,
  97. 0x7D0BEFEE,
  98. 0xCFEA5F74,
  99. 0xE522EFDE,
  100. 0x5F74CFDA,
  101. 0x0B627385,
  102. 0xDF627E0A,
  103. 0x30D8145B,
  104. 0xBFFFF3C8,
  105. 0x5FFFDFFF,
  106. 0xA7F85F5E,
  107. 0xBFFE7F7D,
  108. 0x10D31450,
  109. 0x5F36BFFF,
  110. 0xAF785F5E,
  111. 0xBFFDA7F8,
  112. 0x5F36BFFE,
  113. 0x77FD30C0,
  114. 0x4E08FDCF,
  115. 0xE5FF6E0F,
  116. 0xAFF87E1F,
  117. 0x7E0FFD1F,
  118. 0xF1CF5F1B,
  119. 0xABF80D5E,
  120. 0x5F5EFFEF,
  121. 0x79F730A2,
  122. 0xAFDD5F34,
  123. 0x47F85F34,
  124. 0xAFED7FDD,
  125. 0x50B24978,
  126. 0x47FD7F1D,
  127. 0x7DFD70AD,
  128. 0xEF717EC1,
  129. 0x6BA47F01,
  130. 0x2D267EFD,
  131. 0x30DE5F5E,
  132. 0xFFFD5F5E,
  133. 0xFFEF5F5E,
  134. 0xFFDF0CA0,
  135. 0xAFED0A9E,
  136. 0xAFDD0C3A,
  137. 0x5F3AAFBD,
  138. 0x7FBDB082,
  139. 0x5F8247F8
  140. };
  141. uint patch_2f00[] = {
  142. 0x3E303430,
  143. 0x34343737,
  144. 0xABF7BF9B,
  145. 0x994B4FBD,
  146. 0xBD599493,
  147. 0x349FFF37,
  148. 0xFB9B177D,
  149. 0xD9936956,
  150. 0xBBFDD697,
  151. 0xBDD2FD11,
  152. 0x31DB9BB3,
  153. 0x63139637,
  154. 0x93733693,
  155. 0x193137F7,
  156. 0x331737AF,
  157. 0x7BB9B999,
  158. 0xBB197957,
  159. 0x7FDFD3D5,
  160. 0x73B773F7,
  161. 0x37933B99,
  162. 0x1D115316,
  163. 0x99315315,
  164. 0x31694BF4,
  165. 0xFBDBD359,
  166. 0x31497353,
  167. 0x76956D69,
  168. 0x7B9D9693,
  169. 0x13131979,
  170. 0x79376935
  171. };
  172. #endif
  173. /*
  174. * I2C/SPI/SMC1 relocation patch arrays.
  175. */
  176. #ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH
  177. uint patch_2000[] = {
  178. 0x3fff0000,
  179. 0x3ffd0000,
  180. 0x3ffb0000,
  181. 0x3ff90000,
  182. 0x5f13eff8,
  183. 0x5eb5eff8,
  184. 0x5f88adf7,
  185. 0x5fefadf7,
  186. 0x3a9cfbc8,
  187. 0x77cae1bb,
  188. 0xf4de7fad,
  189. 0xabae9330,
  190. 0x4e08fdcf,
  191. 0x6e0faff8,
  192. 0x7ccf76cf,
  193. 0xfdaff9cf,
  194. 0xabf88dc8,
  195. 0xab5879f7,
  196. 0xb0925d8d,
  197. 0xdfd079f7,
  198. 0xb090e6bb,
  199. 0xe5bbe74f,
  200. 0x9e046f0f,
  201. 0x6ffb76ce,
  202. 0xee0cf9cf,
  203. 0x2bfbefef,
  204. 0xcfeef9cf,
  205. 0x76cead23,
  206. 0x90b3df99,
  207. 0x7fddd0c1,
  208. 0x4bf847fd,
  209. 0x7ccf76ce,
  210. 0xcfef77ca,
  211. 0x7eaf7fad,
  212. 0x7dfdf0b7,
  213. 0xef7a7fca,
  214. 0x77cafbc8,
  215. 0x6079e722,
  216. 0xfbc85fff,
  217. 0xdfff5fb3,
  218. 0xfffbfbc8,
  219. 0xf3c894a5,
  220. 0xe7c9edf9,
  221. 0x7f9a7fad,
  222. 0x5f36afe8,
  223. 0x5f5bffdf,
  224. 0xdf95cb9e,
  225. 0xaf7d5fc3,
  226. 0xafed8c1b,
  227. 0x5fc3afdd,
  228. 0x5fc5df99,
  229. 0x7efdb0b3,
  230. 0x5fb3fffe,
  231. 0xabae5fb3,
  232. 0xfffe5fd0,
  233. 0x600be6bb,
  234. 0x600b5fd0,
  235. 0xdfc827fb,
  236. 0xefdf5fca,
  237. 0xcfde3a9c,
  238. 0xe7c9edf9,
  239. 0xf3c87f9e,
  240. 0x54ca7fed,
  241. 0x2d3a3637,
  242. 0x756f7e9a,
  243. 0xf1ce37ef,
  244. 0x2e677fee,
  245. 0x10ebadf8,
  246. 0xefdecfea,
  247. 0xe52f7d9f,
  248. 0xe12bf1ce,
  249. 0x5f647e9a,
  250. 0x4df8cfea,
  251. 0x5f717d9b,
  252. 0xefeecfea,
  253. 0x5f73e522,
  254. 0xefde5f73,
  255. 0xcfda0b61,
  256. 0x5d8fdf61,
  257. 0xe7c9edf9,
  258. 0x7e9a30d5,
  259. 0x1458bfff,
  260. 0xf3c85fff,
  261. 0xdfffa7f8,
  262. 0x5f5bbffe,
  263. 0x7f7d10d0,
  264. 0x144d5f33,
  265. 0xbfffaf78,
  266. 0x5f5bbffd,
  267. 0xa7f85f33,
  268. 0xbffe77fd,
  269. 0x30bd4e08,
  270. 0xfdcfe5ff,
  271. 0x6e0faff8,
  272. 0x7eef7e9f,
  273. 0xfdeff1cf,
  274. 0x5f17abf8,
  275. 0x0d5b5f5b,
  276. 0xffef79f7,
  277. 0x309eafdd,
  278. 0x5f3147f8,
  279. 0x5f31afed,
  280. 0x7fdd50af,
  281. 0x497847fd,
  282. 0x7f9e7fed,
  283. 0x7dfd70a9,
  284. 0xef7e7ece,
  285. 0x6ba07f9e,
  286. 0x2d227efd,
  287. 0x30db5f5b,
  288. 0xfffd5f5b,
  289. 0xffef5f5b,
  290. 0xffdf0c9c,
  291. 0xafed0a9a,
  292. 0xafdd0c37,
  293. 0x5f37afbd,
  294. 0x7fbdb081,
  295. 0x5f8147f8,
  296. 0x3a11e710,
  297. 0xedf0ccdd,
  298. 0xf3186d0a,
  299. 0x7f0e5f06,
  300. 0x7fedbb38,
  301. 0x3afe7468,
  302. 0x7fedf4fc,
  303. 0x8ffbb951,
  304. 0xb85f77fd,
  305. 0xb0df5ddd,
  306. 0xdefe7fed,
  307. 0x90e1e74d,
  308. 0x6f0dcbf7,
  309. 0xe7decfed,
  310. 0xcb74cfed,
  311. 0xcfeddf6d,
  312. 0x91714f74,
  313. 0x5dd2deef,
  314. 0x9e04e7df,
  315. 0xefbb6ffb,
  316. 0xe7ef7f0e,
  317. 0x9e097fed,
  318. 0xebdbeffa,
  319. 0xeb54affb,
  320. 0x7fea90d7,
  321. 0x7e0cf0c3,
  322. 0xbffff318,
  323. 0x5fffdfff,
  324. 0xac59efea,
  325. 0x7fce1ee5,
  326. 0xe2ff5ee1,
  327. 0xaffbe2ff,
  328. 0x5ee3affb,
  329. 0xf9cc7d0f,
  330. 0xaef8770f,
  331. 0x7d0fb0c6,
  332. 0xeffbbfff,
  333. 0xcfef5ede,
  334. 0x7d0fbfff,
  335. 0x5ede4cf8,
  336. 0x7fddd0bf,
  337. 0x49f847fd,
  338. 0x7efdf0bb,
  339. 0x7fedfffd,
  340. 0x7dfdf0b7,
  341. 0xef7e7e1e,
  342. 0x5ede7f0e,
  343. 0x3a11e710,
  344. 0xedf0ccab,
  345. 0xfb18ad2e,
  346. 0x1ea9bbb8,
  347. 0x74283b7e,
  348. 0x73c2e4bb,
  349. 0x2ada4fb8,
  350. 0xdc21e4bb,
  351. 0xb2a1ffbf,
  352. 0x5e2c43f8,
  353. 0xfc87e1bb,
  354. 0xe74ffd91,
  355. 0x6f0f4fe8,
  356. 0xc7ba32e2,
  357. 0xf396efeb,
  358. 0x600b4f78,
  359. 0xe5bb760b,
  360. 0x53acaef8,
  361. 0x4ef88b0e,
  362. 0xcfef9e09,
  363. 0xabf8751f,
  364. 0xefef5bac,
  365. 0x741f4fe8,
  366. 0x751e760d,
  367. 0x7fdbf081,
  368. 0x741cafce,
  369. 0xefcc7fce,
  370. 0x751e70ac,
  371. 0x741ce7bb,
  372. 0x3372cfed,
  373. 0xafdbefeb,
  374. 0xe5bb760b,
  375. 0x53f2aef8,
  376. 0xafe8e7eb,
  377. 0x4bf8771e,
  378. 0x7e247fed,
  379. 0x4fcbe2cc,
  380. 0x7fbc30a9,
  381. 0x7b0f7a0f,
  382. 0x34d577fd,
  383. 0x308b5db7,
  384. 0xde553e5f,
  385. 0xaf78741f,
  386. 0x741f30f0,
  387. 0xcfef5e2c,
  388. 0x741f3eac,
  389. 0xafb8771e,
  390. 0x5e677fed,
  391. 0x0bd3e2cc,
  392. 0x741ccfec,
  393. 0xe5ca53cd,
  394. 0x6fcb4f74,
  395. 0x5dadde4b,
  396. 0x2ab63d38,
  397. 0x4bb3de30,
  398. 0x751f741c,
  399. 0x6c42effa,
  400. 0xefea7fce,
  401. 0x6ffc30be,
  402. 0xefec3fca,
  403. 0x30b3de2e,
  404. 0xadf85d9e,
  405. 0xaf7daefd,
  406. 0x5d9ede2e,
  407. 0x5d9eafdd,
  408. 0x761f10ac,
  409. 0x1da07efd,
  410. 0x30adfffe,
  411. 0x4908fb18,
  412. 0x5fffdfff,
  413. 0xafbb709b,
  414. 0x4ef85e67,
  415. 0xadf814ad,
  416. 0x7a0f70ad,
  417. 0xcfef50ad,
  418. 0x7a0fde30,
  419. 0x5da0afed,
  420. 0x3c12780f,
  421. 0xefef780f,
  422. 0xefef790f,
  423. 0xa7f85e0f,
  424. 0xffef790f,
  425. 0xefef790f,
  426. 0x14adde2e,
  427. 0x5d9eadfd,
  428. 0x5e2dfffb,
  429. 0xe79addfd,
  430. 0xeff96079,
  431. 0x607ae79a,
  432. 0xddfceff9,
  433. 0x60795dff,
  434. 0x607acfef,
  435. 0xefefefdf,
  436. 0xefbfef7f,
  437. 0xeeffedff,
  438. 0xebffe7ff,
  439. 0xafefafdf,
  440. 0xafbfaf7f,
  441. 0xaeffadff,
  442. 0xabffa7ff,
  443. 0x6fef6fdf,
  444. 0x6fbf6f7f,
  445. 0x6eff6dff,
  446. 0x6bff67ff,
  447. 0x2fef2fdf,
  448. 0x2fbf2f7f,
  449. 0x2eff2dff,
  450. 0x2bff27ff,
  451. 0x4e08fd1f,
  452. 0xe5ff6e0f,
  453. 0xaff87eef,
  454. 0x7e0ffdef,
  455. 0xf11f6079,
  456. 0xabf8f542,
  457. 0x7e0af11c,
  458. 0x37cfae3a,
  459. 0x7fec90be,
  460. 0xadf8efdc,
  461. 0xcfeae52f,
  462. 0x7d0fe12b,
  463. 0xf11c6079,
  464. 0x7e0a4df8,
  465. 0xcfea5dc4,
  466. 0x7d0befec,
  467. 0xcfea5dc6,
  468. 0xe522efdc,
  469. 0x5dc6cfda,
  470. 0x4e08fd1f,
  471. 0x6e0faff8,
  472. 0x7c1f761f,
  473. 0xfdeff91f,
  474. 0x6079abf8,
  475. 0x761cee24,
  476. 0xf91f2bfb,
  477. 0xefefcfec,
  478. 0xf91f6079,
  479. 0x761c27fb,
  480. 0xefdf5da7,
  481. 0xcfdc7fdd,
  482. 0xd09c4bf8,
  483. 0x47fd7c1f,
  484. 0x761ccfcf,
  485. 0x7eef7fed,
  486. 0x7dfdf093,
  487. 0xef7e7f1e,
  488. 0x771efb18,
  489. 0x6079e722,
  490. 0xe6bbe5bb,
  491. 0xae0ae5bb,
  492. 0x600bae85,
  493. 0xe2bbe2bb,
  494. 0xe2bbe2bb,
  495. 0xaf02e2bb,
  496. 0xe2bb2ff9,
  497. 0x6079e2bb
  498. };
  499. uint patch_2f00[] = {
  500. 0x30303030,
  501. 0x3e3e3434,
  502. 0xabbf9b99,
  503. 0x4b4fbdbd,
  504. 0x59949334,
  505. 0x9fff37fb,
  506. 0x9b177dd9,
  507. 0x936956bb,
  508. 0xfbdd697b,
  509. 0xdd2fd113,
  510. 0x1db9f7bb,
  511. 0x36313963,
  512. 0x79373369,
  513. 0x3193137f,
  514. 0x7331737a,
  515. 0xf7bb9b99,
  516. 0x9bb19795,
  517. 0x77fdfd3d,
  518. 0x573b773f,
  519. 0x737933f7,
  520. 0xb991d115,
  521. 0x31699315,
  522. 0x31531694,
  523. 0xbf4fbdbd,
  524. 0x35931497,
  525. 0x35376956,
  526. 0xbd697b9d,
  527. 0x96931313,
  528. 0x19797937,
  529. 0x6935af78,
  530. 0xb9b3baa3,
  531. 0xb8788683,
  532. 0x368f78f7,
  533. 0x87778733,
  534. 0x3ffffb3b,
  535. 0x8e8f78b8,
  536. 0x1d118e13,
  537. 0xf3ff3f8b,
  538. 0x6bd8e173,
  539. 0xd1366856,
  540. 0x68d1687b,
  541. 0x3daf78b8,
  542. 0x3a3a3f87,
  543. 0x8f81378f,
  544. 0xf876f887,
  545. 0x77fd8778,
  546. 0x737de8d6,
  547. 0xbbf8bfff,
  548. 0xd8df87f7,
  549. 0xfd876f7b,
  550. 0x8bfff8bd,
  551. 0x8683387d,
  552. 0xb873d87b,
  553. 0x3b8fd7f8,
  554. 0xf7338883,
  555. 0xbb8ee1f8,
  556. 0xef837377,
  557. 0x3337b836,
  558. 0x817d11f8,
  559. 0x7378b878,
  560. 0xd3368b7d,
  561. 0xed731b7d,
  562. 0x833731f3,
  563. 0xf22f3f23
  564. };
  565. uint patch_2e00[] = {
  566. 0x27eeeeee,
  567. 0xeeeeeeee,
  568. 0xeeeeeeee,
  569. 0xeeeeeeee,
  570. 0xee4bf4fb,
  571. 0xdbd259bb,
  572. 0x1979577f,
  573. 0xdfd2d573,
  574. 0xb773f737,
  575. 0x4b4fbdbd,
  576. 0x25b9b177,
  577. 0xd2d17376,
  578. 0x956bbfdd,
  579. 0x697bdd2f,
  580. 0xff9f79ff,
  581. 0xff9ff22f
  582. };
  583. #endif
  584. /*
  585. * USB SOF patch arrays.
  586. */
  587. #ifdef CONFIG_USB_SOF_UCODE_PATCH
  588. uint patch_2000[] = {
  589. 0x7fff0000,
  590. 0x7ffd0000,
  591. 0x7ffb0000,
  592. 0x49f7ba5b,
  593. 0xba383ffb,
  594. 0xf9b8b46d,
  595. 0xe5ab4e07,
  596. 0xaf77bffe,
  597. 0x3f7bbf79,
  598. 0xba5bba38,
  599. 0xe7676076,
  600. 0x60750000
  601. };
  602. uint patch_2f00[] = {
  603. 0x3030304c,
  604. 0xcab9e441,
  605. 0xa1aaf220
  606. };
  607. #endif
  608. void
  609. cpm_load_patch(cpm8xx_t *cp)
  610. {
  611. volatile uint *dp; /* Dual-ported RAM. */
  612. volatile cpm8xx_t *commproc;
  613. volatile iic_t *iip;
  614. volatile spi_t *spp;
  615. volatile smc_uart_t *smp;
  616. int i;
  617. commproc = cp;
  618. #ifdef CONFIG_USB_SOF_UCODE_PATCH
  619. commproc->cp_rccr = 0;
  620. dp = (uint *)(commproc->cp_dpmem);
  621. for (i=0; i<(sizeof(patch_2000)/4); i++)
  622. *dp++ = patch_2000[i];
  623. dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
  624. for (i=0; i<(sizeof(patch_2f00)/4); i++)
  625. *dp++ = patch_2f00[i];
  626. commproc->cp_rccr = 0x0009;
  627. printk("USB SOF microcode patch installed\n");
  628. #endif /* CONFIG_USB_SOF_UCODE_PATCH */
  629. #if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \
  630. defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
  631. commproc->cp_rccr = 0;
  632. dp = (uint *)(commproc->cp_dpmem);
  633. for (i=0; i<(sizeof(patch_2000)/4); i++)
  634. *dp++ = patch_2000[i];
  635. dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
  636. for (i=0; i<(sizeof(patch_2f00)/4); i++)
  637. *dp++ = patch_2f00[i];
  638. iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
  639. # define RPBASE 0x0500
  640. iip->iic_rpbase = RPBASE;
  641. /* Put SPI above the IIC, also 32-byte aligned.
  642. */
  643. i = (RPBASE + sizeof(iic_t) + 31) & ~31;
  644. spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI];
  645. spp->spi_rpbase = i;
  646. # if defined(CONFIG_I2C_SPI_UCODE_PATCH)
  647. commproc->cp_cpmcr1 = 0x802a;
  648. commproc->cp_cpmcr2 = 0x8028;
  649. commproc->cp_cpmcr3 = 0x802e;
  650. commproc->cp_cpmcr4 = 0x802c;
  651. commproc->cp_rccr = 1;
  652. printk("I2C/SPI microcode patch installed.\n");
  653. # endif /* CONFIG_I2C_SPI_UCODE_PATCH */
  654. # if defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
  655. dp = (uint *)&(commproc->cp_dpmem[0x0e00]);
  656. for (i=0; i<(sizeof(patch_2e00)/4); i++)
  657. *dp++ = patch_2e00[i];
  658. commproc->cp_cpmcr1 = 0x8080;
  659. commproc->cp_cpmcr2 = 0x808a;
  660. commproc->cp_cpmcr3 = 0x8028;
  661. commproc->cp_cpmcr4 = 0x802a;
  662. commproc->cp_rccr = 3;
  663. smp = (smc_uart_t *)&commproc->cp_dparam[PROFF_SMC1];
  664. smp->smc_rpbase = 0x1FC0;
  665. printk("I2C/SPI/SMC1 microcode patch installed.\n");
  666. # endif /* CONFIG_I2C_SPI_SMC1_UCODE_PATCH) */
  667. #endif /* some variation of the I2C/SPI patch was selected */
  668. }
  669. /*
  670. * Take this entire routine out, since no one calls it and its
  671. * logic is suspect.
  672. */
  673. #if 0
  674. void
  675. verify_patch(volatile immap_t *immr)
  676. {
  677. volatile uint *dp;
  678. volatile cpm8xx_t *commproc;
  679. int i;
  680. commproc = (cpm8xx_t *)&immr->im_cpm;
  681. printk("cp_rccr %x\n", commproc->cp_rccr);
  682. commproc->cp_rccr = 0;
  683. dp = (uint *)(commproc->cp_dpmem);
  684. for (i=0; i<(sizeof(patch_2000)/4); i++)
  685. if (*dp++ != patch_2000[i]) {
  686. printk("patch_2000 bad at %d\n", i);
  687. dp--;
  688. printk("found 0x%X, wanted 0x%X\n", *dp, patch_2000[i]);
  689. break;
  690. }
  691. dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
  692. for (i=0; i<(sizeof(patch_2f00)/4); i++)
  693. if (*dp++ != patch_2f00[i]) {
  694. printk("patch_2f00 bad at %d\n", i);
  695. dp--;
  696. printk("found 0x%X, wanted 0x%X\n", *dp, patch_2f00[i]);
  697. break;
  698. }
  699. commproc->cp_rccr = 0x0009;
  700. }
  701. #endif