arm: at91: pmc: replace the constant with a define in at91_pmc.h
[oweals/u-boot.git] / board / atmel / sama5d4_xplained / sama5d4_xplained.c
index bc2aa38b924c87fef536d79d7206c3ffb44dccd3..db4533148049a6ffce22cff1a92e82dc5cab3d19 100644 (file)
@@ -24,6 +24,7 @@
 #include <netdev.h>
 #include <nand.h>
 #include <spi.h>
+#include <version.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -179,6 +180,7 @@ void lcd_show_board_info(void)
        int i;
        char temp[32];
 
+       lcd_printf("%s\n", U_BOOT_VERSION);
        lcd_printf("2014 ATMEL Corp\n");
        lcd_printf("%s CPU at %s MHz\n", get_cpu_name(),
                   strmhz(temp, get_cpu_clk_rate()));
@@ -228,6 +230,9 @@ void sama5d4_xplained_mci1_hw_init(void)
 
 int board_mmc_init(bd_t *bis)
 {
+       /* Enable the power supply */
+       at91_set_pio_output(AT91_PIO_PORTE, 4, 0);
+
        return atmel_mci_init((void *)ATMEL_BASE_MCI1);
 }
 #endif /* CONFIG_GENERIC_ATMEL_MCI */
@@ -385,10 +390,10 @@ void mem_init(void)
 
        /* enable MPDDR clock */
        at91_periph_clk_enable(ATMEL_ID_MPDDRC);
-       writel(0x4, &pmc->scer);
+       writel(AT91_PMC_DDR, &pmc->scer);
 
        /* DDRAM2 Controller initialize */
-       ddr2_init(ATMEL_BASE_DDRCS, &ddr2);
+       ddr2_init(ATMEL_BASE_MPDDRC, ATMEL_BASE_DDRCS, &ddr2);
 }
 
 void at91_pmc_init(void)