diff options
author | Richard Campbell <Richard.Campbell@OARcorp.com> | 2005-09-16 19:28:46 +0000 |
---|---|---|
committer | Richard Campbell <Richard.Campbell@OARcorp.com> | 2005-09-16 19:28:46 +0000 |
commit | 4820d952e94b27d978ffb9821fffc80988579be6 (patch) | |
tree | 3bdc16b951c4f2d9a5c192d099b2bd4c51206eb1 /c/src/lib/libbsp/powerpc | |
parent | Cosmetics (diff) | |
download | rtems-4820d952e94b27d978ffb9821fffc80988579be6.tar.bz2 |
2005-09-16 richard.campbell@OARCorp.com
* startup/bspstart.c: Rewrote get_eumbbar() in C. Function was written
in inline assembly and containined a register direction error.
Diffstat (limited to 'c/src/lib/libbsp/powerpc')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/startup/bspstart.c | 20 |
2 files changed, 9 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/ChangeLog b/c/src/lib/libbsp/powerpc/shared/ChangeLog index b38c8024c2..52fab35824 100644 --- a/c/src/lib/libbsp/powerpc/shared/ChangeLog +++ b/c/src/lib/libbsp/powerpc/shared/ChangeLog @@ -1,3 +1,8 @@ +2005-09-16 richard.campbell@OARCorp.com + + * startup/bspstart.c: Rewrote get_eumbbar() in C. Function was written + in inline assembly and containined a register direction error. + 2005-07-28 Eric Norum <norume@aps.anl.gov> * shared/clock/p_clock.c: Changes provided by Phillip Sorensen diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c index 6d3d0a776a..e0b87d6825 100644 --- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c @@ -218,21 +218,8 @@ unsigned int EUMBBAR; * Processor Address Map B (CHRP). */ unsigned int get_eumbbar() { - register int a, e; - - asm volatile( "lis %0,0xfec0; ori %0,%0,0x0000": "=r" (a) ); - asm volatile("sync"); - - asm volatile("lis %0,0x8000; ori %0,%0,0x0078": "=r"(e) ); - asm volatile("stwbrx %0,0x0,%1": "=r"(e): "r"(a)); - asm volatile("sync"); - - asm volatile("lis %0,0xfee0; ori %0,%0,0x0000": "=r" (a) ); - asm volatile("sync"); - - asm volatile("lwbrx %0,0x0,%1": "=r" (e): "r" (a)); - asm volatile("isync"); - return e; + out_le32( (volatile unsigned32*)0xfec00000, 0x80000078 ); + return in_le32( (volatile unsigned32*)0xfee00000 ); } #endif @@ -399,8 +386,8 @@ void bsp_start( void ) #ifdef SHOW_MORE_INIT_SETTINGS printk("Going to start PCI buses scanning and initialization\n"); #endif - pci_initialize(); + pci_initialize(); { const struct _int_map *bspmap = motorolaIntMap(currentBoard); if( bspmap ) { @@ -518,6 +505,7 @@ void bsp_start( void ) #ifdef SHOW_MORE_INIT_SETTINGS printk("Going to initialize VME bridge\n"); #endif + /* * VME initialization is in a separate file so apps which don't use VME or * want a different configuration may link against a customized routine. |