summaryrefslogtreecommitdiff
path: root/common/spl/spl_ymodem.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-09-24 18:20:05 -0600
committerTom Rini <trini@konsulko.com>2016-10-06 15:06:59 -0400
commitdd6bf9025c2fd8ef0860e6e3ff4c12bc202fc64a (patch)
treea2bd8701f92f3107469250fff8b1b93d2d922768 /common/spl/spl_ymodem.c
parent548b3ee73ca6fc042b85e0b171be36d942eeffb5 (diff)
spl: Convert spl_ymodem_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl/spl_ymodem.c')
-rw-r--r--common/spl/spl_ymodem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index d82b138568..168b9511d9 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -68,7 +68,7 @@ static ulong ymodem_read_fit(struct spl_load_info *load, ulong offset,
return size;
}
-int spl_ymodem_load_image(struct spl_boot_device *bootdev)
+static int spl_ymodem_load_image(struct spl_boot_device *bootdev)
{
int size = 0;
int err;
@@ -132,3 +132,4 @@ end_stream:
printf("Loaded %d bytes\n", size);
return 0;
}
+SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_UART, spl_ymodem_load_image);