spl: Convert spl_ubi_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>
This commit is contained in:
Simon Glass
2016-09-24 18:20:01 -06:00
committed by Tom Rini
parent 0fed9c7ed6
commit 7d7dd821b0
3 changed files with 3 additions and 9 deletions

View File

@@ -76,3 +76,6 @@ out:
#endif
return ret;
}
/* Use priorty 0 so that Ubi will override NAND and ONENAND methods */
SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_NAND, spl_ubi_load_image);
SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_ONENAND, spl_ubi_load_image);