mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-17 23:37:01 +00:00
sunxi: dram: Improve DQS gate data training error handling
The stale error status should be cleared for all sun4i/sun5i/sun7i hardware and not just for sun7i. Also there are two types of DQS gate training errors ("found no result" and "found more than one possible result"). Both are handled now. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Ian Campbell <ijc@hellion.org.uk> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
013f2d7469
commit
b8f7cb6ae3
2 changed files with 3 additions and 3 deletions
|
@ -357,9 +357,7 @@ static int dramc_scan_readpipe(void)
|
|||
u32 reg_val;
|
||||
|
||||
/* data training trigger */
|
||||
#ifdef CONFIG_SUN7I
|
||||
clrbits_le32(&dram->csr, DRAM_CSR_FAILED);
|
||||
#endif
|
||||
setbits_le32(&dram->ccr, DRAM_CCR_DATA_TRAINING);
|
||||
|
||||
/* check whether data training process has completed */
|
||||
|
|
|
@ -133,7 +133,9 @@ struct dram_para {
|
|||
#define DRAM_DCR_MODE_SEQ 0x0
|
||||
#define DRAM_DCR_MODE_INTERLEAVE 0x1
|
||||
|
||||
#define DRAM_CSR_FAILED (0x1 << 20)
|
||||
#define DRAM_CSR_DTERR (0x1 << 20)
|
||||
#define DRAM_CSR_DTIERR (0x1 << 21)
|
||||
#define DRAM_CSR_FAILED (DRAM_CSR_DTERR | DRAM_CSR_DTIERR)
|
||||
|
||||
#define DRAM_DRR_TRFC(n) ((n) & 0xff)
|
||||
#define DRAM_DRR_TREFI(n) (((n) & 0xffff) << 8)
|
||||
|
|
Loading…
Add table
Reference in a new issue