ddr3_hws_hw_training.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (C) Marvell International Ltd. and its affiliates
  3. *
  4. * SPDX-License-Identifier: GPL-2.0
  5. */
  6. #ifndef _DDR3_HWS_HW_TRAINING_H
  7. #define _DDR3_HWS_HW_TRAINING_H
  8. /* struct used for DLB configuration array */
  9. struct dlb_config {
  10. u32 reg_addr;
  11. u32 reg_data;
  12. };
  13. /* Topology update structure */
  14. struct topology_update_info {
  15. int update_ecc;
  16. u8 ecc;
  17. int update_width;
  18. u8 width;
  19. int update_ecc_pup3_mode;
  20. u8 ecc_pup_mode_offset;
  21. };
  22. /* Topology update defines */
  23. #define TOPOLOGY_UPDATE_WIDTH_16BIT 1
  24. #define TOPOLOGY_UPDATE_WIDTH_32BIT 0
  25. #define TOPOLOGY_UPDATE_WIDTH_32BIT_MASK 0xf
  26. #define TOPOLOGY_UPDATE_WIDTH_16BIT_MASK 0x3
  27. #define TOPOLOGY_UPDATE_ECC_ON 1
  28. #define TOPOLOGY_UPDATE_ECC_OFF 0
  29. #define TOPOLOGY_UPDATE_ECC_OFFSET_PUP4 4
  30. #define TOPOLOGY_UPDATE_ECC_OFFSET_PUP3 3
  31. /*
  32. * 1. L2 filter should be set at binary header to 0xd000000,
  33. * to avoid conflict with internal register IO.
  34. * 2. U-Boot modifies internal registers base to 0xf100000,
  35. * and than should update L2 filter accordingly to 0xf000000 (3.75 GB)
  36. */
  37. /* temporary limit l2 filter to 3GiB (LSP issue) */
  38. #define L2_FILTER_FOR_MAX_MEMORY_SIZE 0xc0000000
  39. #define ADDRESS_FILTERING_END_REGISTER 0x8c04
  40. #define SUB_VERSION 0
  41. #endif /* _DDR3_HWS_HW_TRAINING_H */