File tree Expand file tree Collapse file tree
platform/baytrail/include/arch/xtensa/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333
3434#include <stdint.h>
3535#include <stddef.h>
36+ #include <xtensa/config/core.h>
3637#include <xtensa/hal.h>
3738
38- #if defined CONFIG_BAYTRAIL || defined CONFIG_CHERRYTRAIL || \
39- defined CONFIG_HASWELL || defined CONFIG_BROADWELL
40-
41- static inline void dcache_writeback_region (void * addr , size_t size ) {}
42- static inline void dcache_invalidate_region (void * addr , size_t size ) {}
43- static inline void icache_invalidate_region (void * addr , size_t size ) {}
44- static inline void dcache_writeback_invalidate_region (void * addr , size_t size ) {}
45- #else
46-
4739static inline void dcache_writeback_region (void * addr , size_t size )
4840{
41+ #if XCHAL_DCACHE_SIZE > 0
4942 xthal_dcache_region_writeback (addr , size );
43+ #endif
5044}
5145
5246static inline void dcache_invalidate_region (void * addr , size_t size )
5347{
48+ #if XCHAL_DCACHE_SIZE > 0
5449 xthal_dcache_region_invalidate (addr , size );
50+ #endif
5551}
5652
5753static inline void icache_invalidate_region (void * addr , size_t size )
5854{
55+ #if XCHAL_ICACHE_SIZE > 0
5956 xthal_icache_region_invalidate (addr , size );
57+ #endif
6058}
6159
6260static inline void dcache_writeback_invalidate_region (void * addr , size_t size )
6361{
62+ #if XCHAL_DCACHE_SIZE > 0
6463 xthal_dcache_region_writeback_inv (addr , size );
64+ #endif
6565}
6666
6767#endif
68- #endif
6968
Original file line number Diff line number Diff line change 213213#define XCHAL_ICACHE_LINEWIDTH 7 /* log2(I line size in bytes) */
214214#define XCHAL_DCACHE_LINEWIDTH 7 /* log2(D line size in bytes) */
215215
216- #define XCHAL_ICACHE_SIZE 49152 /* I-cache size in bytes or 0 */
217- #define XCHAL_DCACHE_SIZE 98304 /* D-cache size in bytes or 0 */
216+ #define XCHAL_ICACHE_SIZE 0 /* I-cache size in bytes or 0 */
217+ #define XCHAL_DCACHE_SIZE 0 /* D-cache size in bytes or 0 */
218218
219- #define XCHAL_DCACHE_IS_WRITEBACK 1 /* writeback feature */
219+ #define XCHAL_DCACHE_IS_WRITEBACK 0 /* writeback feature */
220220#define XCHAL_DCACHE_IS_COHERENT 0 /* MP coherence feature */
221221
222- #define XCHAL_HAVE_PREFETCH 1 /* PREFCTL register */
222+ #define XCHAL_HAVE_PREFETCH 0 /* PREFCTL register */
223223#define XCHAL_HAVE_PREFETCH_L1 0 /* prefetch to L1 dcache */
224- #define XCHAL_PREFETCH_CASTOUT_LINES 1 /* dcache pref. castout bufsz */
225- #define XCHAL_PREFETCH_ENTRIES 8 /* cache prefetch entries */
224+ #define XCHAL_PREFETCH_CASTOUT_LINES 0 /* dcache pref. castout bufsz */
225+ #define XCHAL_PREFETCH_ENTRIES 0 /* cache prefetch entries */
226226#define XCHAL_PREFETCH_BLOCK_ENTRIES 0 /* prefetch block streams */
227227#define XCHAL_HAVE_CACHE_BLOCKOPS 0 /* block prefetch for caches */
228228#define XCHAL_HAVE_ICACHE_TEST 0 /* Icache test instructions */
Original file line number Diff line number Diff line change 213213#define XCHAL_ICACHE_LINEWIDTH 7 /* log2(I line size in bytes) */
214214#define XCHAL_DCACHE_LINEWIDTH 7 /* log2(D line size in bytes) */
215215
216- #define XCHAL_ICACHE_SIZE 49152 /* I-cache size in bytes or 0 */
217- #define XCHAL_DCACHE_SIZE 98304 /* D-cache size in bytes or 0 */
216+ #define XCHAL_ICACHE_SIZE 0 /* I-cache size in bytes or 0 */
217+ #define XCHAL_DCACHE_SIZE 0 /* D-cache size in bytes or 0 */
218218
219- #define XCHAL_DCACHE_IS_WRITEBACK 1 /* writeback feature */
219+ #define XCHAL_DCACHE_IS_WRITEBACK 0 /* writeback feature */
220220#define XCHAL_DCACHE_IS_COHERENT 0 /* MP coherence feature */
221221
222- #define XCHAL_HAVE_PREFETCH 1 /* PREFCTL register */
222+ #define XCHAL_HAVE_PREFETCH 0 /* PREFCTL register */
223223#define XCHAL_HAVE_PREFETCH_L1 0 /* prefetch to L1 dcache */
224- #define XCHAL_PREFETCH_CASTOUT_LINES 1 /* dcache pref. castout bufsz */
225- #define XCHAL_PREFETCH_ENTRIES 8 /* cache prefetch entries */
224+ #define XCHAL_PREFETCH_CASTOUT_LINES 0 /* dcache pref. castout bufsz */
225+ #define XCHAL_PREFETCH_ENTRIES 0 /* cache prefetch entries */
226226#define XCHAL_PREFETCH_BLOCK_ENTRIES 0 /* prefetch block streams */
227227#define XCHAL_HAVE_CACHE_BLOCKOPS 0 /* block prefetch for caches */
228228#define XCHAL_HAVE_ICACHE_TEST 0 /* Icache test instructions */
You can’t perform that action at this time.
0 commit comments