| 1 | /*************************************************************** |
|---|
| 2 | ** |
|---|
| 3 | ** Broadcom Corp. Confidential |
|---|
| 4 | ** Copyright 1998-2006 Broadcom Corp. All Rights Reserved. |
|---|
| 5 | ** |
|---|
| 6 | ** THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED |
|---|
| 7 | ** SOFTWARE LICENSE AGREEMENT BETWEEN THE USER AND BROADCOM. |
|---|
| 8 | ** YOU HAVE NO RIGHT TO USE OR EXPLOIT THIS MATERIAL EXCEPT |
|---|
| 9 | ** SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 10 | ** |
|---|
| 11 | ** File: cache_util.h |
|---|
| 12 | ** Description: cache handling utilities. |
|---|
| 13 | ** |
|---|
| 14 | ** Created: 06/07/04 by Jeff Fisher |
|---|
| 15 | ** |
|---|
| 16 | ** |
|---|
| 17 | ** |
|---|
| 18 | ****************************************************************/ |
|---|
| 19 | |
|---|
| 20 | #ifndef __CACHEUTIL_H__ |
|---|
| 21 | #define __CACHEUTIL_H__ |
|---|
| 22 | |
|---|
| 23 | #include "bstd.h" |
|---|
| 24 | |
|---|
| 25 | #if (BCHP_CHIP!=7550) && (BCHP_CHIP!=7552) |
|---|
| 26 | #define dcache_size g_p_dsp->cache.d_size |
|---|
| 27 | #define dcache_linesize g_p_dsp->cache.d_linesize |
|---|
| 28 | #define icache_size g_p_dsp->cache.i_size |
|---|
| 29 | #define icache_linesize g_p_dsp->cache.i_linesize |
|---|
| 30 | #endif |
|---|
| 31 | /* function prototypes */ |
|---|
| 32 | #ifdef __cplusplus |
|---|
| 33 | extern "C" { |
|---|
| 34 | #endif |
|---|
| 35 | |
|---|
| 36 | void calc_cache_sizes(void); |
|---|
| 37 | void print_cache_sizes(void); |
|---|
| 38 | void invalidate_icache_all(void); |
|---|
| 39 | void flush_dcache(unsigned int start, unsigned int end); |
|---|
| 40 | void flush_dcache_all(void); |
|---|
| 41 | void invalidate_dcache(unsigned int start, unsigned int end); |
|---|
| 42 | void invalidate_dcache_all(void); |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | #ifdef __cplusplus |
|---|
| 46 | } |
|---|
| 47 | #endif |
|---|
| 48 | |
|---|
| 49 | #endif /* __CACHEUTIL_H__ */ |
|---|
| 50 | |
|---|
| 51 | |
|---|