]> git.sur5r.net Git - u-boot/commitdiff
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 8
authorMarek Vasut <marex@denx.de>
Sat, 1 Aug 2015 20:25:29 +0000 (22:25 +0200)
committerMarek Vasut <marex@denx.de>
Sat, 8 Aug 2015 12:14:27 +0000 (14:14 +0200)
Fix the return value so that standard errno return values can be used.

Signed-off-by: Marek Vasut <marex@denx.de>
arch/arm/mach-socfpga/include/mach/sdram.h
drivers/ddr/altera/sdram.c

index d57257df24efbb706c826a191f3fea3ff26abb2b..89240b8c06fc3fce13676a860def306c6d367422 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef __ASSEMBLY__
 
 unsigned long sdram_calculate_size(void);
-unsigned sdram_mmr_init_full(unsigned int sdr_phy_reg);
+int sdram_mmr_init_full(unsigned int sdr_phy_reg);
 int sdram_calibration_full(void);
 
 extern int sdram_calibration(void);
index 295747b3fab322042c24634f12e1527a8c4f3a26..68a9b60e798b11611b84830de3858d0bcdddad6e 100644 (file)
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <errno.h>
 #include <div64.h>
 #include <watchdog.h>
 #include <asm/arch/fpga_manager.h>
@@ -621,7 +622,7 @@ static void sdr_load_regs(struct socfpga_sdram_config *cfg)
  *
  * Initialize the SDRAM MMR.
  */
-unsigned sdram_mmr_init_full(unsigned int sdr_phy_reg)
+int sdram_mmr_init_full(unsigned int sdr_phy_reg)
 {
        unsigned long status = 0;
        struct socfpga_sdram_config *cfg = &sdram_config;