blob: e7da807d66630249b8cffe57d9bc9d97a4b6903b [file] [log] [blame]
Purna Chandra Mandale80d11f2016-01-28 15:30:15 +05301/*
2 * (c) 2015 Purna Chandra Mandal <purna.mandal@microchip.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 *
6 */
7
8#ifndef __MICROCHIP_PIC32_DDR_H
9#define __MICROCHIP_PIC32_DDR_H
10
Simon Glassd35f3382017-04-06 12:47:05 -060011/* called by dram_init() function */
Purna Chandra Mandale80d11f2016-01-28 15:30:15 +053012void ddr2_phy_init(void);
13void ddr2_ctrl_init(void);
14phys_size_t ddr2_calculate_size(void);
15
16/* Maximum number of agents */
17#define NUM_AGENTS 5
18
19/* Board can provide agent specific parameters for arbitration by
20 * filling struct ddr2_arbiter_params for all the agents and
21 * implementing board_get_ddr_arbiter_params() to return the filled
22 * structure.
23 */
24struct ddr2_arbiter_params {
25 u32 min_limit; /* min bursts to execute per arbitration */
26 u32 req_period; /* request period threshold for accepted cmds */
27 u32 min_cmd_acpt; /* min number of accepted cmds */
28};
29
30const struct ddr2_arbiter_params *board_get_ddr_arbiter_params(void);
31
32#endif /* __MICROCHIP_PIC32_DDR_H */