diff options
author | Purna Chandra Mandal <purna.mandal@microchip.com> | 2016-01-28 15:30:15 +0530 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2016-02-01 22:14:01 +0100 |
commit | 9ffa7a35ef940b27813c11f68eb28a6b82696915 (patch) | |
tree | 03fc3202d548ccedf138e33f61efb478db7eaf80 /arch/mips/mach-pic32/include | |
parent | 9e160ee823b44e0a63bc469d42d7d9fcab54b60b (diff) | |
download | u-boot-imx-9ffa7a35ef940b27813c11f68eb28a6b82696915.zip u-boot-imx-9ffa7a35ef940b27813c11f68eb28a6b82696915.tar.gz u-boot-imx-9ffa7a35ef940b27813c11f68eb28a6b82696915.tar.bz2 |
drivers: ddr: Add DDR2 SDRAM controller driver for Microchip PIC32.
This driver initializes PIC32 DDR2 SDRAM controller and internal DDR2 Phy module.
DDR2 controller operates in half-rate mode (upto 533MHZ frequency).
Signed-off-by: Paul Thacker <paul.thacker@microchip.com>
Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/mips/mach-pic32/include')
-rw-r--r-- | arch/mips/mach-pic32/include/mach/ddr.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/mips/mach-pic32/include/mach/ddr.h b/arch/mips/mach-pic32/include/mach/ddr.h new file mode 100644 index 0000000..00abfa3 --- /dev/null +++ b/arch/mips/mach-pic32/include/mach/ddr.h @@ -0,0 +1,32 @@ +/* + * (c) 2015 Purna Chandra Mandal <purna.mandal@microchip.com> + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + +#ifndef __MICROCHIP_PIC32_DDR_H +#define __MICROCHIP_PIC32_DDR_H + +/* called by initdram() function */ +void ddr2_phy_init(void); +void ddr2_ctrl_init(void); +phys_size_t ddr2_calculate_size(void); + +/* Maximum number of agents */ +#define NUM_AGENTS 5 + +/* Board can provide agent specific parameters for arbitration by + * filling struct ddr2_arbiter_params for all the agents and + * implementing board_get_ddr_arbiter_params() to return the filled + * structure. + */ +struct ddr2_arbiter_params { + u32 min_limit; /* min bursts to execute per arbitration */ + u32 req_period; /* request period threshold for accepted cmds */ + u32 min_cmd_acpt; /* min number of accepted cmds */ +}; + +const struct ddr2_arbiter_params *board_get_ddr_arbiter_params(void); + +#endif /* __MICROCHIP_PIC32_DDR_H */ |