cache-aurora-l2.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * AURORA shared L2 cache controller support
  3. *
  4. * Copyright (C) 2012 Marvell
  5. *
  6. * Yehuda Yitschak <yehuday@marvell.com>
  7. * Gregory CLEMENT <gregory.clement@free-electrons.com>
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without any
  11. * warranty of any kind, whether express or implied.
  12. */
  13. #ifndef __ASM_ARM_HARDWARE_AURORA_L2_H
  14. #define __ASM_ARM_HARDWARE_AURORA_L2_H
  15. #define AURORA_SYNC_REG 0x700
  16. #define AURORA_RANGE_BASE_ADDR_REG 0x720
  17. #define AURORA_FLUSH_PHY_ADDR_REG 0x7f0
  18. #define AURORA_INVAL_RANGE_REG 0x774
  19. #define AURORA_CLEAN_RANGE_REG 0x7b4
  20. #define AURORA_FLUSH_RANGE_REG 0x7f4
  21. #define AURORA_ACR_REPLACEMENT_OFFSET 27
  22. #define AURORA_ACR_REPLACEMENT_MASK \
  23. (0x3 << AURORA_ACR_REPLACEMENT_OFFSET)
  24. #define AURORA_ACR_REPLACEMENT_TYPE_WAYRR \
  25. (0 << AURORA_ACR_REPLACEMENT_OFFSET)
  26. #define AURORA_ACR_REPLACEMENT_TYPE_LFSR \
  27. (1 << AURORA_ACR_REPLACEMENT_OFFSET)
  28. #define AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU \
  29. (3 << AURORA_ACR_REPLACEMENT_OFFSET)
  30. #define AURORA_ACR_FORCE_WRITE_POLICY_OFFSET 0
  31. #define AURORA_ACR_FORCE_WRITE_POLICY_MASK \
  32. (0x3 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
  33. #define AURORA_ACR_FORCE_WRITE_POLICY_DIS \
  34. (0 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
  35. #define AURORA_ACR_FORCE_WRITE_BACK_POLICY \
  36. (1 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
  37. #define AURORA_ACR_FORCE_WRITE_THRO_POLICY \
  38. (2 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
  39. #define MAX_RANGE_SIZE 1024
  40. #define AURORA_WAY_SIZE_SHIFT 2
  41. #define AURORA_CTRL_FW 0x100
  42. /* chose a number outside L2X0_CACHE_ID_PART_MASK to be sure to make
  43. * the distinction between a number coming from hardware and a number
  44. * coming from the device tree */
  45. #define AURORA_CACHE_ID 0x100
  46. #endif /* __ASM_ARM_HARDWARE_AURORA_L2_H */