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