diff options
author | Tom Rini <trini@konsulko.com> | 2017-05-09 16:11:36 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-05-09 16:11:36 -0400 |
commit | dd9999d5f4d3a0354c959fa3bccc0957a1164bf5 (patch) | |
tree | 7d37b3f93f256bc04e6f5492b20dbc2faeb8edb6 /board/atmel/sama5d4ek/sama5d4ek.c | |
parent | a284212963277114ad60e3442d74f095102a9de5 (diff) | |
parent | 9d0c4decfeaa7e312f50e0debb677f60ad170f61 (diff) |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'board/atmel/sama5d4ek/sama5d4ek.c')
-rw-r--r-- | board/atmel/sama5d4ek/sama5d4ek.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index ffb4a50a72..b2e79795f7 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -230,7 +230,6 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) ATMEL_MPDDRC_CR_NR_ROW_14 | ATMEL_MPDDRC_CR_CAS_DDR_CAS3 | ATMEL_MPDDRC_CR_NB_8BANKS | - ATMEL_MPDDRC_CR_NDQS_DISABLED | ATMEL_MPDDRC_CR_DECOD_INTERLEAVED | ATMEL_MPDDRC_CR_UNAL_SUPPORTED); @@ -260,6 +259,8 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) void mem_init(void) { struct atmel_mpddrc_config ddr2; + const struct atmel_mpddr *mpddr = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; + u32 tmp; ddr2_conf(&ddr2); @@ -267,6 +268,19 @@ void mem_init(void) at91_periph_clk_enable(ATMEL_ID_MPDDRC); at91_system_clk_enable(AT91_PMC_DDR); + tmp = ATMEL_MPDDRC_RD_DATA_PATH_SHIFT_ONE_CYCLE; + writel(tmp, &mpddr->rd_data_path); + + tmp = readl(&mpddr->io_calibr); + tmp = (tmp & ~(ATMEL_MPDDRC_IO_CALIBR_RDIV | + ATMEL_MPDDRC_IO_CALIBR_TZQIO | + ATMEL_MPDDRC_IO_CALIBR_CALCODEP | + ATMEL_MPDDRC_IO_CALIBR_CALCODEN)) | + ATMEL_MPDDRC_IO_CALIBR_DDR2_RZQ_52 | + ATMEL_MPDDRC_IO_CALIBR_TZQIO_(8) | + ATMEL_MPDDRC_IO_CALIBR_EN_CALIB; + writel(tmp, &mpddr->io_calibr); + /* DDRAM2 Controller initialize */ ddr2_init(ATMEL_BASE_MPDDRC, ATMEL_BASE_DDRCS, &ddr2); } |