ddr.h 895 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (c) 2015 Purna Chandra Mandal <purna.mandal@microchip.com>
  4. *
  5. */
  6. #ifndef __MICROCHIP_PIC32_DDR_H
  7. #define __MICROCHIP_PIC32_DDR_H
  8. /* called by dram_init() function */
  9. void ddr2_phy_init(void);
  10. void ddr2_ctrl_init(void);
  11. phys_size_t ddr2_calculate_size(void);
  12. /* Maximum number of agents */
  13. #define NUM_AGENTS 5
  14. /* Board can provide agent specific parameters for arbitration by
  15. * filling struct ddr2_arbiter_params for all the agents and
  16. * implementing board_get_ddr_arbiter_params() to return the filled
  17. * structure.
  18. */
  19. struct ddr2_arbiter_params {
  20. u32 min_limit; /* min bursts to execute per arbitration */
  21. u32 req_period; /* request period threshold for accepted cmds */
  22. u32 min_cmd_acpt; /* min number of accepted cmds */
  23. };
  24. const struct ddr2_arbiter_params *board_get_ddr_arbiter_params(void);
  25. #endif /* __MICROCHIP_PIC32_DDR_H */