The first argment of mtdbatu or mtibatu is part of the encoding.

It needs to be constant, so eliminate the loop and "hand-unroll".
This commit is contained in:
Marcel Moolenaar 2008-04-28 03:04:41 +00:00
parent 12640815f8
commit 01d8aa0d31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178629

View File

@ -623,16 +623,17 @@ pmap_cpu_bootstrap(volatile uint32_t *trcp, int ap)
trcp[0] = 0x1001;
for (i = 1; i < 4; i++) {
__asm __volatile("mtdbatu %0,%1" :: "n"(i), "r"(0));
__asm __volatile("mtibatu %0,%1" :: "n"(i), "r"(0));
isync();
}
__asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
__asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
isync();
trcp[0] = 0x1002;
__asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
__asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
__asm __volatile("mtibatu 1,%0" :: "r"(0));
__asm __volatile("mtdbatu 2,%0" :: "r"(0));
__asm __volatile("mtibatu 2,%0" :: "r"(0));
__asm __volatile("mtdbatu 3,%0" :: "r"(0));
__asm __volatile("mtibatu 3,%0" :: "r"(0));
isync();
trcp[0] = 0x1003;