smdkv310: use macro for mmc data read function address
authorChander Kashyap <chander.kashyap@linaro.org>
Tue, 20 Sep 2011 21:25:04 +0000 (21:25 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 3 Nov 2011 21:56:20 +0000 (22:56 +0100)
board/samsung/smdkv310/mmc_boot.c:
Removed the typedef for "mmc data read API (copy_sd_mmc_to_mem)"
as it is used only once and replaced hard-coded API address value
by macro.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/smdkv310/mmc_boot.c
include/configs/smdkv310.h

index 2f3e463bcec6f1800c94ad5ff9250882737ea7a3..d3fc18d19f174ae851a83ddc885e86c6dd3f7d0a 100644 (file)
 #include<common.h>
 #include<config.h>
 
-typedef u32(*copy_sd_mmc_to_mem) \
-       (u32 start_block, u32 block_count, u32 *dest_addr);
-
-
+/*
+* Copy U-boot from mmc to RAM:
+* COPY_BL2_FNPTR_ADDR: Address in iRAM, which Contains
+* API (Data transfer from mmc to ram)
+*/
 void copy_uboot_to_ram(void)
 {
-       copy_sd_mmc_to_mem copy_bl2 = (copy_sd_mmc_to_mem)(0x00002488);
-       copy_bl2(BL2_START_OFFSET,\
-               BL2_SIZE_BLOC_COUNT, (u32 *)CONFIG_SYS_TEXT_BASE);
+       u32 (*copy_bl2)(u32, u32, u32) = (void *)COPY_BL2_FNPTR_ADDR;
+
+       copy_bl2(BL2_START_OFFSET, BL2_SIZE_BLOC_COUNT, CONFIG_SYS_TEXT_BASE);
 }
 
 void board_init_f(unsigned long bootflag)
index fb0f04f706319d98920817d9f3846d409132ed4a..fc8bb06d596c725eb1bd550f5686409d4f53123c 100644 (file)
@@ -93,6 +93,7 @@
 
 /* MMC SPL */
 #define CONFIG_SPL
+#define COPY_BL2_FNPTR_ADDR    0x00002488
 
 #define CONFIG_BOOTCOMMAND     "fatload mmc 0 40007000 uImage; bootm 40007000"