Ticket #241: ppc_bat0_fix.diff

File ppc_bat0_fix.diff, 1.2 KB (added by strauman, on Dec 3, 2006 at 1:31:13 PM)

ppc_bat0_fix.diff

Line 
1This patch fixes a tiny bug in an earlier patch (#213) which
2added support for setting BAT0 to setdbat().
3
4Author: Till Straumann <strauman@slac.stanford.edu>, July/5th/2002
5
6Index: bat.c
7===================================================================
8RCS file: /afs/slac/g/spear/cvsrep/rtems/src/c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c,v
9retrieving revision 1.2
10retrieving revision 1.3
11diff -c -r1.2 -r1.3
12*** bat.c       12 Apr 2002 00:23:45 -0000      1.2
13--- bat.c       5 Jul 2002 19:15:26 -0000       1.3
14***************
15*** 55,61 ****
16    bat_addrs[bat_index].limit = virt + ((bl + 1) << 17) - 1;
17    bat_addrs[bat_index].phys = phys;
18    switch (bat_index) {
19!   case 0 : asm_setdbat1(bat.word[0], bat.word[1]); break;
20    case 1 : asm_setdbat1(bat.word[0], bat.word[1]); break;
21    case 2 : asm_setdbat2(bat.word[0], bat.word[1]); break;
22    case 3 : asm_setdbat3(bat.word[0], bat.word[1]); break;
23--- 55,61 ----
24    bat_addrs[bat_index].limit = virt + ((bl + 1) << 17) - 1;
25    bat_addrs[bat_index].phys = phys;
26    switch (bat_index) {
27!   case 0 : asm_setdbat0(bat.word[0], bat.word[1]); break;
28    case 1 : asm_setdbat1(bat.word[0], bat.word[1]); break;
29    case 2 : asm_setdbat2(bat.word[0], bat.word[1]); break;
30    case 3 : asm_setdbat3(bat.word[0], bat.word[1]); break;