mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-04 18:41:03 +00:00
6c343825dd
This patch implements a workaround to fix DDR3 memory issue. The code for workaround detects PGSR0 errors and then preps for and executes a software-controlled hard reset.In board_early_init, where logic has been added to identify whether or not the previous reset was a PORz. PLL initialization is skipped in the case of a software-controlled hard reset. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Keegan Garcia <kgarcia@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
57 lines
1.1 KiB
C
57 lines
1.1 KiB
C
/*
|
|
* DDR3
|
|
*
|
|
* (C) Copyright 2014
|
|
* Texas Instruments Incorporated, <www.ti.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef _DDR3_H_
|
|
#define _DDR3_H_
|
|
|
|
#include <asm/arch/hardware.h>
|
|
|
|
struct ddr3_phy_config {
|
|
unsigned int pllcr;
|
|
unsigned int pgcr1_mask;
|
|
unsigned int pgcr1_val;
|
|
unsigned int ptr0;
|
|
unsigned int ptr1;
|
|
unsigned int ptr2;
|
|
unsigned int ptr3;
|
|
unsigned int ptr4;
|
|
unsigned int dcr_mask;
|
|
unsigned int dcr_val;
|
|
unsigned int dtpr0;
|
|
unsigned int dtpr1;
|
|
unsigned int dtpr2;
|
|
unsigned int mr0;
|
|
unsigned int mr1;
|
|
unsigned int mr2;
|
|
unsigned int dtcr;
|
|
unsigned int pgcr2;
|
|
unsigned int zq0cr1;
|
|
unsigned int zq1cr1;
|
|
unsigned int zq2cr1;
|
|
unsigned int pir_v1;
|
|
unsigned int pir_v2;
|
|
};
|
|
|
|
struct ddr3_emif_config {
|
|
unsigned int sdcfg;
|
|
unsigned int sdtim1;
|
|
unsigned int sdtim2;
|
|
unsigned int sdtim3;
|
|
unsigned int sdtim4;
|
|
unsigned int zqcfg;
|
|
unsigned int sdrfc;
|
|
};
|
|
|
|
void ddr3_init(void);
|
|
void ddr3_reset_ddrphy(void);
|
|
void ddr3_err_reset_workaround(void);
|
|
void ddr3_init_ddrphy(u32 base, struct ddr3_phy_config *phy_cfg);
|
|
void ddr3_init_ddremif(u32 base, struct ddr3_emif_config *emif_cfg);
|
|
|
|
#endif
|