board: laird: wb50n: use configure_ddrcfg_input_buffers
authorEugen Hristev <eugen.hristev@microchip.com>
Thu, 8 Aug 2019 07:48:31 +0000 (07:48 +0000)
committerEugen Hristev <eugen.hristev@microchip.com>
Tue, 8 Oct 2019 06:16:11 +0000 (09:16 +0300)
Replace code with new function configure_ddrcfg_input_buffers from SFR
mach driver.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
arch/arm/mach-at91/Kconfig
board/laird/wb50n/wb50n.c

index ad09731e4d46389606f9289425fa3a4bd1bec1ad..ce0b1b4b33f96f5662b5374628bc3841cb38096c 100644 (file)
@@ -292,6 +292,7 @@ config TARGET_WB50N
        select BOARD_LATE_INIT
        select CPU_V7A
        select SUPPORT_SPL
+       select ATMEL_SFR
 
 endchoice
 
index a2f8eaf0ba34f05fc3e462f608b1c979d3aad862..ab1dbcd879aeee19ffd834b88381501c94a47d4d 100644 (file)
@@ -173,13 +173,11 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 
 void mem_init(void)
 {
-       struct atmel_sfr *sfr = (struct atmel_sfr *)ATMEL_BASE_SFR;
        struct atmel_mpddrc_config ddr2;
 
        ddr2_conf(&ddr2);
 
-       writel(ATMEL_SFR_DDRCFG_FDQIEN | ATMEL_SFR_DDRCFG_FDQSIEN,
-              &sfr->ddrcfg);
+       configure_ddrcfg_input_buffers(true);
 
        /* enable MPDDR clock */
        at91_periph_clk_enable(ATMEL_ID_MPDDRC);