cache.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2004 Microtronix Datacom Ltd.
  3. *
  4. * All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  14. * NON INFRINGEMENT. See the GNU General Public License for more
  15. * details.
  16. */
  17. #ifndef _ASM_NIOS2_CACHE_H
  18. #define _ASM_NIOS2_CACHE_H
  19. #define NIOS2_DCACHE_SIZE CONFIG_NIOS2_DCACHE_SIZE
  20. #define NIOS2_ICACHE_SIZE CONFIG_NIOS2_ICACHE_SIZE
  21. #define NIOS2_DCACHE_LINE_SIZE CONFIG_NIOS2_DCACHE_LINE_SIZE
  22. #define NIOS2_ICACHE_LINE_SHIFT 5
  23. #define NIOS2_ICACHE_LINE_SIZE (1 << NIOS2_ICACHE_LINE_SHIFT)
  24. /* bytes per L1 cache line */
  25. #define L1_CACHE_SHIFT NIOS2_ICACHE_LINE_SHIFT
  26. #define L1_CACHE_BYTES NIOS2_ICACHE_LINE_SIZE
  27. #define ARCH_DMA_MINALIGN L1_CACHE_BYTES
  28. #define __cacheline_aligned
  29. #define ____cacheline_aligned
  30. #endif