1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 29ffa7a35SPurna Chandra Mandal /* 39ffa7a35SPurna Chandra Mandal * (c) 2015 Purna Chandra Mandal <purna.mandal@microchip.com> 49ffa7a35SPurna Chandra Mandal * 59ffa7a35SPurna Chandra Mandal */ 69ffa7a35SPurna Chandra Mandal 79ffa7a35SPurna Chandra Mandal #ifndef __MICROCHIP_PIC32_DDR_H 89ffa7a35SPurna Chandra Mandal #define __MICROCHIP_PIC32_DDR_H 99ffa7a35SPurna Chandra Mandal 10f1683aa7SSimon Glass /* called by dram_init() function */ 119ffa7a35SPurna Chandra Mandal void ddr2_phy_init(void); 129ffa7a35SPurna Chandra Mandal void ddr2_ctrl_init(void); 139ffa7a35SPurna Chandra Mandal phys_size_t ddr2_calculate_size(void); 149ffa7a35SPurna Chandra Mandal 159ffa7a35SPurna Chandra Mandal /* Maximum number of agents */ 169ffa7a35SPurna Chandra Mandal #define NUM_AGENTS 5 179ffa7a35SPurna Chandra Mandal 189ffa7a35SPurna Chandra Mandal /* Board can provide agent specific parameters for arbitration by 199ffa7a35SPurna Chandra Mandal * filling struct ddr2_arbiter_params for all the agents and 209ffa7a35SPurna Chandra Mandal * implementing board_get_ddr_arbiter_params() to return the filled 219ffa7a35SPurna Chandra Mandal * structure. 229ffa7a35SPurna Chandra Mandal */ 239ffa7a35SPurna Chandra Mandal struct ddr2_arbiter_params { 249ffa7a35SPurna Chandra Mandal u32 min_limit; /* min bursts to execute per arbitration */ 259ffa7a35SPurna Chandra Mandal u32 req_period; /* request period threshold for accepted cmds */ 269ffa7a35SPurna Chandra Mandal u32 min_cmd_acpt; /* min number of accepted cmds */ 279ffa7a35SPurna Chandra Mandal }; 289ffa7a35SPurna Chandra Mandal 299ffa7a35SPurna Chandra Mandal const struct ddr2_arbiter_params *board_get_ddr_arbiter_params(void); 309ffa7a35SPurna Chandra Mandal 319ffa7a35SPurna Chandra Mandal #endif /* __MICROCHIP_PIC32_DDR_H */ 32