summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2014-11-13 22:38:21 +0530
committerMinkyu Kang <mk7.kang@samsung.com>2014-11-17 19:03:38 +0900
commit4f29862487ab94e791d17de2df5528d417e88c1c (patch)
tree2040d981ecd87228138b23a0f8fb1b9dd54b7004 /arch/arm
parent0e03e824652745d652c6b557307fa784ec1669aa (diff)
downloadu-boot-imx-4f29862487ab94e791d17de2df5528d417e88c1c.zip
u-boot-imx-4f29862487ab94e791d17de2df5528d417e88c1c.tar.gz
u-boot-imx-4f29862487ab94e791d17de2df5528d417e88c1c.tar.bz2
Peach-Pi: Use the enhanced usb_copy() prototype
Exynos5800 IROM has a different, from 5250 and 5420, prototype of the usb_copy() function. Luckily the earlier version did not expect any arguments, which means the same code could be used with old and new SoCs, the old ones just ignoring the arguments. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/armv7/exynos/spl_boot.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/exynos/spl_boot.c b/arch/arm/cpu/armv7/exynos/spl_boot.c
index 658e4cb..dbd312c 100644
--- a/arch/arm/cpu/armv7/exynos/spl_boot.c
+++ b/arch/arm/cpu/armv7/exynos/spl_boot.c
@@ -195,10 +195,16 @@ void copy_uboot_to_ram(void)
void (*end_bootop_from_emmc)(void);
#endif
#ifdef CONFIG_USB_BOOTING
- u32 (*usb_copy)(void);
int is_cr_z_set;
unsigned int sec_boot_check;
+ /*
+ * Note that older hardware (before Exynos5800) does not expect any
+ * arguments, but it does not hurt to pass them, so a common function
+ * prototype is used.
+ */
+ u32 (*usb_copy)(u32 num_of_block, u32 *dst);
+
/* Read iRAM location to check for secondary USB boot mode */
sec_boot_check = readl(EXYNOS_IRAM_SECONDARY_BASE);
if (sec_boot_check == EXYNOS_USB_SECONDARY_BOOT)
@@ -240,7 +246,7 @@ void copy_uboot_to_ram(void)
*/
is_cr_z_set = config_branch_prediction(0);
usb_copy = get_irom_func(USB_INDEX);
- usb_copy();
+ usb_copy(0, (u32 *)CONFIG_SYS_TEXT_BASE);
config_branch_prediction(is_cr_z_set);
break;
#endif