summaryrefslogtreecommitdiff
path: root/common/spl/spl_mmc.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-09-24 18:19:57 -0600
committerTom Rini <trini@konsulko.com>2016-10-06 14:53:36 -0400
commitecdfd69a4be55363589e8185ff151b02e6c36cfa (patch)
treeb625ae78bfe96236f62320061a1a667f4d8e446d /common/spl/spl_mmc.c
parenta807ab33035fe2e9b63aac2e7475525ca8d90adc (diff)
spl: Convert boot_device into a struct
At present some spl_xxx_load_image() functions take a parameter and some don't. Of those that do, most take an integer but one takes a string. Convert this parameter into a struct so that we can pass all functions the same thing. This will allow us to use a common function signature. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl/spl_mmc.c')
-rw-r--r--common/spl/spl_mmc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 97c11b37f6..899caf4a9b 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -267,14 +267,14 @@ int spl_mmc_do_fs_boot(struct mmc *mmc)
}
#endif
-int spl_mmc_load_image(u32 boot_device)
+int spl_mmc_load_image(struct spl_boot_device *bootdev)
{
struct mmc *mmc = NULL;
u32 boot_mode;
int err = 0;
__maybe_unused int part;
- err = spl_mmc_find_device(&mmc, boot_device);
+ err = spl_mmc_find_device(&mmc, bootdev->boot_device);
if (err)
return err;
@@ -286,7 +286,7 @@ int spl_mmc_load_image(u32 boot_device)
return err;
}
- boot_mode = spl_boot_mode(boot_device);
+ boot_mode = spl_boot_mode(bootdev->boot_device);
err = -EINVAL;
switch (boot_mode) {
case MMCSD_MODE_EMMCBOOT: