diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-27 08:32:52 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-28 09:06:19 +0100 |
commit | 80186ca8f418f5c461a7f9fd689bb7bcdc2e8d5e (patch) | |
tree | 3f8a8a4121c06aeee7d16d46388306fc20a0b483 /c/src/lib/libbsp/sparc/leon3/startup/bspstart.c | |
parent | rtems: Add cache size functions (diff) | |
download | rtems-80186ca8f418f5c461a7f9fd689bb7bcdc2e8d5e.tar.bz2 |
bsp/leon3: Add and use cache register functions
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/startup/bspstart.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c index 64ab4d81c9..5ecea6c881 100644 --- a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c +++ b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c @@ -32,7 +32,7 @@ uint32_t LEON3_Cpu_Index = 0; /* * set_snooping * - * Read the data cache configuration register to determine if + * Read the cache control register to determine if * bus snooping is available and enabled. This is needed for some * drivers so that they can select the most efficient copy routines. * @@ -40,12 +40,7 @@ uint32_t LEON3_Cpu_Index = 0; static inline int set_snooping(void) { - int tmp; - __asm__ (" lda [%%g0] 2, %0 " - : "=r"(tmp) - : - ); - return (tmp >> 23) & 1; + return (leon3_get_cache_control_register() >> 23) & 1; } /* |