proc-feroceon.S 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. /*
  2. * linux/arch/arm/mm/proc-feroceon.S: MMU functions for Feroceon
  3. *
  4. * Heavily based on proc-arm926.S
  5. * Maintainer: Assaf Hoffman <hoffman@marvell.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. #include <linux/linkage.h>
  22. #include <linux/init.h>
  23. #include <asm/assembler.h>
  24. #include <asm/hwcap.h>
  25. #include <asm/pgtable-hwdef.h>
  26. #include <asm/pgtable.h>
  27. #include <asm/page.h>
  28. #include <asm/ptrace.h>
  29. #include "proc-macros.S"
  30. /*
  31. * This is the maximum size of an area which will be invalidated
  32. * using the single invalidate entry instructions. Anything larger
  33. * than this, and we go for the whole cache.
  34. *
  35. * This value should be chosen such that we choose the cheapest
  36. * alternative.
  37. */
  38. #define CACHE_DLIMIT 16384
  39. /*
  40. * the cache line size of the I and D cache
  41. */
  42. #define CACHE_DLINESIZE 32
  43. .bss
  44. .align 3
  45. __cache_params_loc:
  46. .space 8
  47. .text
  48. __cache_params:
  49. .word __cache_params_loc
  50. /*
  51. * cpu_feroceon_proc_init()
  52. */
  53. ENTRY(cpu_feroceon_proc_init)
  54. mrc p15, 0, r0, c0, c0, 1 @ read cache type register
  55. ldr r1, __cache_params
  56. mov r2, #(16 << 5)
  57. tst r0, #(1 << 16) @ get way
  58. mov r0, r0, lsr #18 @ get cache size order
  59. movne r3, #((4 - 1) << 30) @ 4-way
  60. and r0, r0, #0xf
  61. moveq r3, #0 @ 1-way
  62. mov r2, r2, lsl r0 @ actual cache size
  63. movne r2, r2, lsr #2 @ turned into # of sets
  64. sub r2, r2, #(1 << 5)
  65. stmia r1, {r2, r3}
  66. ret lr
  67. /*
  68. * cpu_feroceon_proc_fin()
  69. */
  70. ENTRY(cpu_feroceon_proc_fin)
  71. #if defined(CONFIG_CACHE_FEROCEON_L2) && \
  72. !defined(CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH)
  73. mov r0, #0
  74. mcr p15, 1, r0, c15, c9, 0 @ clean L2
  75. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  76. #endif
  77. mrc p15, 0, r0, c1, c0, 0 @ ctrl register
  78. bic r0, r0, #0x1000 @ ...i............
  79. bic r0, r0, #0x000e @ ............wca.
  80. mcr p15, 0, r0, c1, c0, 0 @ disable caches
  81. ret lr
  82. /*
  83. * cpu_feroceon_reset(loc)
  84. *
  85. * Perform a soft reset of the system. Put the CPU into the
  86. * same state as it would be if it had been reset, and branch
  87. * to what would be the reset vector.
  88. *
  89. * loc: location to jump to for soft reset
  90. */
  91. .align 5
  92. .pushsection .idmap.text, "ax"
  93. ENTRY(cpu_feroceon_reset)
  94. mov ip, #0
  95. mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
  96. mcr p15, 0, ip, c7, c10, 4 @ drain WB
  97. #ifdef CONFIG_MMU
  98. mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
  99. #endif
  100. mrc p15, 0, ip, c1, c0, 0 @ ctrl register
  101. bic ip, ip, #0x000f @ ............wcam
  102. bic ip, ip, #0x1100 @ ...i...s........
  103. mcr p15, 0, ip, c1, c0, 0 @ ctrl register
  104. ret r0
  105. ENDPROC(cpu_feroceon_reset)
  106. .popsection
  107. /*
  108. * cpu_feroceon_do_idle()
  109. *
  110. * Called with IRQs disabled
  111. */
  112. .align 5
  113. ENTRY(cpu_feroceon_do_idle)
  114. mov r0, #0
  115. mcr p15, 0, r0, c7, c10, 4 @ Drain write buffer
  116. mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt
  117. ret lr
  118. /*
  119. * flush_icache_all()
  120. *
  121. * Unconditionally clean and invalidate the entire icache.
  122. */
  123. ENTRY(feroceon_flush_icache_all)
  124. mov r0, #0
  125. mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
  126. ret lr
  127. ENDPROC(feroceon_flush_icache_all)
  128. /*
  129. * flush_user_cache_all()
  130. *
  131. * Clean and invalidate all cache entries in a particular
  132. * address space.
  133. */
  134. .align 5
  135. ENTRY(feroceon_flush_user_cache_all)
  136. /* FALLTHROUGH */
  137. /*
  138. * flush_kern_cache_all()
  139. *
  140. * Clean and invalidate the entire cache.
  141. */
  142. ENTRY(feroceon_flush_kern_cache_all)
  143. mov r2, #VM_EXEC
  144. __flush_whole_cache:
  145. ldr r1, __cache_params
  146. ldmia r1, {r1, r3}
  147. 1: orr ip, r1, r3
  148. 2: mcr p15, 0, ip, c7, c14, 2 @ clean + invalidate D set/way
  149. subs ip, ip, #(1 << 30) @ next way
  150. bcs 2b
  151. subs r1, r1, #(1 << 5) @ next set
  152. bcs 1b
  153. tst r2, #VM_EXEC
  154. mov ip, #0
  155. mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache
  156. mcrne p15, 0, ip, c7, c10, 4 @ drain WB
  157. ret lr
  158. /*
  159. * flush_user_cache_range(start, end, flags)
  160. *
  161. * Clean and invalidate a range of cache entries in the
  162. * specified address range.
  163. *
  164. * - start - start address (inclusive)
  165. * - end - end address (exclusive)
  166. * - flags - vm_flags describing address space
  167. */
  168. .align 5
  169. ENTRY(feroceon_flush_user_cache_range)
  170. sub r3, r1, r0 @ calculate total size
  171. cmp r3, #CACHE_DLIMIT
  172. bgt __flush_whole_cache
  173. 1: tst r2, #VM_EXEC
  174. mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry
  175. mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
  176. add r0, r0, #CACHE_DLINESIZE
  177. mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry
  178. mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
  179. add r0, r0, #CACHE_DLINESIZE
  180. cmp r0, r1
  181. blo 1b
  182. tst r2, #VM_EXEC
  183. mov ip, #0
  184. mcrne p15, 0, ip, c7, c10, 4 @ drain WB
  185. ret lr
  186. /*
  187. * coherent_kern_range(start, end)
  188. *
  189. * Ensure coherency between the Icache and the Dcache in the
  190. * region described by start, end. If you have non-snooping
  191. * Harvard caches, you need to implement this function.
  192. *
  193. * - start - virtual start address
  194. * - end - virtual end address
  195. */
  196. .align 5
  197. ENTRY(feroceon_coherent_kern_range)
  198. /* FALLTHROUGH */
  199. /*
  200. * coherent_user_range(start, end)
  201. *
  202. * Ensure coherency between the Icache and the Dcache in the
  203. * region described by start, end. If you have non-snooping
  204. * Harvard caches, you need to implement this function.
  205. *
  206. * - start - virtual start address
  207. * - end - virtual end address
  208. */
  209. ENTRY(feroceon_coherent_user_range)
  210. bic r0, r0, #CACHE_DLINESIZE - 1
  211. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  212. mcr p15, 0, r0, c7, c5, 1 @ invalidate I entry
  213. add r0, r0, #CACHE_DLINESIZE
  214. cmp r0, r1
  215. blo 1b
  216. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  217. mov r0, #0
  218. ret lr
  219. /*
  220. * flush_kern_dcache_area(void *addr, size_t size)
  221. *
  222. * Ensure no D cache aliasing occurs, either with itself or
  223. * the I cache
  224. *
  225. * - addr - kernel address
  226. * - size - region size
  227. */
  228. .align 5
  229. ENTRY(feroceon_flush_kern_dcache_area)
  230. add r1, r0, r1
  231. 1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
  232. add r0, r0, #CACHE_DLINESIZE
  233. cmp r0, r1
  234. blo 1b
  235. mov r0, #0
  236. mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
  237. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  238. ret lr
  239. .align 5
  240. ENTRY(feroceon_range_flush_kern_dcache_area)
  241. mrs r2, cpsr
  242. add r1, r0, #PAGE_SZ - CACHE_DLINESIZE @ top addr is inclusive
  243. orr r3, r2, #PSR_I_BIT
  244. msr cpsr_c, r3 @ disable interrupts
  245. mcr p15, 5, r0, c15, c15, 0 @ D clean/inv range start
  246. mcr p15, 5, r1, c15, c15, 1 @ D clean/inv range top
  247. msr cpsr_c, r2 @ restore interrupts
  248. mov r0, #0
  249. mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
  250. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  251. ret lr
  252. /*
  253. * dma_inv_range(start, end)
  254. *
  255. * Invalidate (discard) the specified virtual address range.
  256. * May not write back any entries. If 'start' or 'end'
  257. * are not cache line aligned, those lines must be written
  258. * back.
  259. *
  260. * - start - virtual start address
  261. * - end - virtual end address
  262. *
  263. * (same as v4wb)
  264. */
  265. .align 5
  266. feroceon_dma_inv_range:
  267. tst r0, #CACHE_DLINESIZE - 1
  268. bic r0, r0, #CACHE_DLINESIZE - 1
  269. mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
  270. tst r1, #CACHE_DLINESIZE - 1
  271. mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
  272. 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
  273. add r0, r0, #CACHE_DLINESIZE
  274. cmp r0, r1
  275. blo 1b
  276. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  277. ret lr
  278. .align 5
  279. feroceon_range_dma_inv_range:
  280. mrs r2, cpsr
  281. tst r0, #CACHE_DLINESIZE - 1
  282. mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
  283. tst r1, #CACHE_DLINESIZE - 1
  284. mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
  285. cmp r1, r0
  286. subne r1, r1, #1 @ top address is inclusive
  287. orr r3, r2, #PSR_I_BIT
  288. msr cpsr_c, r3 @ disable interrupts
  289. mcr p15, 5, r0, c15, c14, 0 @ D inv range start
  290. mcr p15, 5, r1, c15, c14, 1 @ D inv range top
  291. msr cpsr_c, r2 @ restore interrupts
  292. ret lr
  293. /*
  294. * dma_clean_range(start, end)
  295. *
  296. * Clean the specified virtual address range.
  297. *
  298. * - start - virtual start address
  299. * - end - virtual end address
  300. *
  301. * (same as v4wb)
  302. */
  303. .align 5
  304. feroceon_dma_clean_range:
  305. bic r0, r0, #CACHE_DLINESIZE - 1
  306. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  307. add r0, r0, #CACHE_DLINESIZE
  308. cmp r0, r1
  309. blo 1b
  310. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  311. ret lr
  312. .align 5
  313. feroceon_range_dma_clean_range:
  314. mrs r2, cpsr
  315. cmp r1, r0
  316. subne r1, r1, #1 @ top address is inclusive
  317. orr r3, r2, #PSR_I_BIT
  318. msr cpsr_c, r3 @ disable interrupts
  319. mcr p15, 5, r0, c15, c13, 0 @ D clean range start
  320. mcr p15, 5, r1, c15, c13, 1 @ D clean range top
  321. msr cpsr_c, r2 @ restore interrupts
  322. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  323. ret lr
  324. /*
  325. * dma_flush_range(start, end)
  326. *
  327. * Clean and invalidate the specified virtual address range.
  328. *
  329. * - start - virtual start address
  330. * - end - virtual end address
  331. */
  332. .align 5
  333. ENTRY(feroceon_dma_flush_range)
  334. bic r0, r0, #CACHE_DLINESIZE - 1
  335. 1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
  336. add r0, r0, #CACHE_DLINESIZE
  337. cmp r0, r1
  338. blo 1b
  339. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  340. ret lr
  341. .align 5
  342. ENTRY(feroceon_range_dma_flush_range)
  343. mrs r2, cpsr
  344. cmp r1, r0
  345. subne r1, r1, #1 @ top address is inclusive
  346. orr r3, r2, #PSR_I_BIT
  347. msr cpsr_c, r3 @ disable interrupts
  348. mcr p15, 5, r0, c15, c15, 0 @ D clean/inv range start
  349. mcr p15, 5, r1, c15, c15, 1 @ D clean/inv range top
  350. msr cpsr_c, r2 @ restore interrupts
  351. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  352. ret lr
  353. /*
  354. * dma_map_area(start, size, dir)
  355. * - start - kernel virtual start address
  356. * - size - size of region
  357. * - dir - DMA direction
  358. */
  359. ENTRY(feroceon_dma_map_area)
  360. add r1, r1, r0
  361. cmp r2, #DMA_TO_DEVICE
  362. beq feroceon_dma_clean_range
  363. bcs feroceon_dma_inv_range
  364. b feroceon_dma_flush_range
  365. ENDPROC(feroceon_dma_map_area)
  366. /*
  367. * dma_map_area(start, size, dir)
  368. * - start - kernel virtual start address
  369. * - size - size of region
  370. * - dir - DMA direction
  371. */
  372. ENTRY(feroceon_range_dma_map_area)
  373. add r1, r1, r0
  374. cmp r2, #DMA_TO_DEVICE
  375. beq feroceon_range_dma_clean_range
  376. bcs feroceon_range_dma_inv_range
  377. b feroceon_range_dma_flush_range
  378. ENDPROC(feroceon_range_dma_map_area)
  379. /*
  380. * dma_unmap_area(start, size, dir)
  381. * - start - kernel virtual start address
  382. * - size - size of region
  383. * - dir - DMA direction
  384. */
  385. ENTRY(feroceon_dma_unmap_area)
  386. ret lr
  387. ENDPROC(feroceon_dma_unmap_area)
  388. .globl feroceon_flush_kern_cache_louis
  389. .equ feroceon_flush_kern_cache_louis, feroceon_flush_kern_cache_all
  390. @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S)
  391. define_cache_functions feroceon
  392. .macro range_alias basename
  393. .globl feroceon_range_\basename
  394. .type feroceon_range_\basename , %function
  395. .equ feroceon_range_\basename , feroceon_\basename
  396. .endm
  397. /*
  398. * Most of the cache functions are unchanged for this case.
  399. * Export suitable alias symbols for the unchanged functions:
  400. */
  401. range_alias flush_icache_all
  402. range_alias flush_user_cache_all
  403. range_alias flush_kern_cache_all
  404. range_alias flush_kern_cache_louis
  405. range_alias flush_user_cache_range
  406. range_alias coherent_kern_range
  407. range_alias coherent_user_range
  408. range_alias dma_unmap_area
  409. define_cache_functions feroceon_range
  410. .align 5
  411. ENTRY(cpu_feroceon_dcache_clean_area)
  412. #if defined(CONFIG_CACHE_FEROCEON_L2) && \
  413. !defined(CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH)
  414. mov r2, r0
  415. mov r3, r1
  416. #endif
  417. 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  418. add r0, r0, #CACHE_DLINESIZE
  419. subs r1, r1, #CACHE_DLINESIZE
  420. bhi 1b
  421. #if defined(CONFIG_CACHE_FEROCEON_L2) && \
  422. !defined(CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH)
  423. 1: mcr p15, 1, r2, c15, c9, 1 @ clean L2 entry
  424. add r2, r2, #CACHE_DLINESIZE
  425. subs r3, r3, #CACHE_DLINESIZE
  426. bhi 1b
  427. #endif
  428. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  429. ret lr
  430. /* =============================== PageTable ============================== */
  431. /*
  432. * cpu_feroceon_switch_mm(pgd)
  433. *
  434. * Set the translation base pointer to be as described by pgd.
  435. *
  436. * pgd: new page tables
  437. */
  438. .align 5
  439. ENTRY(cpu_feroceon_switch_mm)
  440. #ifdef CONFIG_MMU
  441. /*
  442. * Note: we wish to call __flush_whole_cache but we need to preserve
  443. * lr to do so. The only way without touching main memory is to
  444. * use r2 which is normally used to test the VM_EXEC flag, and
  445. * compensate locally for the skipped ops if it is not set.
  446. */
  447. mov r2, lr @ abuse r2 to preserve lr
  448. bl __flush_whole_cache
  449. @ if r2 contains the VM_EXEC bit then the next 2 ops are done already
  450. tst r2, #VM_EXEC
  451. mcreq p15, 0, ip, c7, c5, 0 @ invalidate I cache
  452. mcreq p15, 0, ip, c7, c10, 4 @ drain WB
  453. mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
  454. mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
  455. ret r2
  456. #else
  457. ret lr
  458. #endif
  459. /*
  460. * cpu_feroceon_set_pte_ext(ptep, pte, ext)
  461. *
  462. * Set a PTE and flush it out
  463. */
  464. .align 5
  465. ENTRY(cpu_feroceon_set_pte_ext)
  466. #ifdef CONFIG_MMU
  467. armv3_set_pte_ext wc_disable=0
  468. mov r0, r0
  469. mcr p15, 0, r0, c7, c10, 1 @ clean D entry
  470. #if defined(CONFIG_CACHE_FEROCEON_L2) && \
  471. !defined(CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH)
  472. mcr p15, 1, r0, c15, c9, 1 @ clean L2 entry
  473. #endif
  474. mcr p15, 0, r0, c7, c10, 4 @ drain WB
  475. #endif
  476. ret lr
  477. /* Suspend/resume support: taken from arch/arm/mm/proc-arm926.S */
  478. .globl cpu_feroceon_suspend_size
  479. .equ cpu_feroceon_suspend_size, 4 * 3
  480. #ifdef CONFIG_ARM_CPU_SUSPEND
  481. ENTRY(cpu_feroceon_do_suspend)
  482. stmfd sp!, {r4 - r6, lr}
  483. mrc p15, 0, r4, c13, c0, 0 @ PID
  484. mrc p15, 0, r5, c3, c0, 0 @ Domain ID
  485. mrc p15, 0, r6, c1, c0, 0 @ Control register
  486. stmia r0, {r4 - r6}
  487. ldmfd sp!, {r4 - r6, pc}
  488. ENDPROC(cpu_feroceon_do_suspend)
  489. ENTRY(cpu_feroceon_do_resume)
  490. mov ip, #0
  491. mcr p15, 0, ip, c8, c7, 0 @ invalidate I+D TLBs
  492. mcr p15, 0, ip, c7, c7, 0 @ invalidate I+D caches
  493. ldmia r0, {r4 - r6}
  494. mcr p15, 0, r4, c13, c0, 0 @ PID
  495. mcr p15, 0, r5, c3, c0, 0 @ Domain ID
  496. mcr p15, 0, r1, c2, c0, 0 @ TTB address
  497. mov r0, r6 @ control register
  498. b cpu_resume_mmu
  499. ENDPROC(cpu_feroceon_do_resume)
  500. #endif
  501. .type __feroceon_setup, #function
  502. __feroceon_setup:
  503. mov r0, #0
  504. mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
  505. mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
  506. #ifdef CONFIG_MMU
  507. mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
  508. #endif
  509. adr r5, feroceon_crval
  510. ldmia r5, {r5, r6}
  511. mrc p15, 0, r0, c1, c0 @ get control register v4
  512. bic r0, r0, r5
  513. orr r0, r0, r6
  514. ret lr
  515. .size __feroceon_setup, . - __feroceon_setup
  516. /*
  517. * B
  518. * R P
  519. * .RVI UFRS BLDP WCAM
  520. * .011 .001 ..11 0101
  521. *
  522. */
  523. .type feroceon_crval, #object
  524. feroceon_crval:
  525. crval clear=0x0000773f, mmuset=0x00003135, ucset=0x00001134
  526. __INITDATA
  527. @ define struct processor (see <asm/proc-fns.h> and proc-macros.S)
  528. define_processor_functions feroceon, dabort=v5t_early_abort, pabort=legacy_pabort
  529. .section ".rodata"
  530. string cpu_arch_name, "armv5te"
  531. string cpu_elf_name, "v5"
  532. string cpu_feroceon_name, "Feroceon"
  533. string cpu_88fr531_name, "Feroceon 88FR531-vd"
  534. string cpu_88fr571_name, "Feroceon 88FR571-vd"
  535. string cpu_88fr131_name, "Feroceon 88FR131"
  536. .align
  537. .section ".proc.info.init", #alloc
  538. .macro feroceon_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache:req
  539. .type __\name\()_proc_info,#object
  540. __\name\()_proc_info:
  541. .long \cpu_val
  542. .long \cpu_mask
  543. .long PMD_TYPE_SECT | \
  544. PMD_SECT_BUFFERABLE | \
  545. PMD_SECT_CACHEABLE | \
  546. PMD_BIT4 | \
  547. PMD_SECT_AP_WRITE | \
  548. PMD_SECT_AP_READ
  549. .long PMD_TYPE_SECT | \
  550. PMD_BIT4 | \
  551. PMD_SECT_AP_WRITE | \
  552. PMD_SECT_AP_READ
  553. initfn __feroceon_setup, __\name\()_proc_info
  554. .long cpu_arch_name
  555. .long cpu_elf_name
  556. .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
  557. .long \cpu_name
  558. .long feroceon_processor_functions
  559. .long v4wbi_tlb_fns
  560. .long feroceon_user_fns
  561. .long \cache
  562. .size __\name\()_proc_info, . - __\name\()_proc_info
  563. .endm
  564. #ifdef CONFIG_CPU_FEROCEON_OLD_ID
  565. feroceon_proc_info feroceon_old_id, 0x41009260, 0xff00fff0, \
  566. cpu_name=cpu_feroceon_name, cache=feroceon_cache_fns
  567. #endif
  568. feroceon_proc_info 88fr531, 0x56055310, 0xfffffff0, cpu_88fr531_name, \
  569. cache=feroceon_cache_fns
  570. feroceon_proc_info 88fr571, 0x56155710, 0xfffffff0, cpu_88fr571_name, \
  571. cache=feroceon_range_cache_fns
  572. feroceon_proc_info 88fr131, 0x56251310, 0xfffffff0, cpu_88fr131_name, \
  573. cache=feroceon_range_cache_fns