diff options
author | Simon Glass <sjg@chromium.org> | 2016-11-30 15:30:50 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-12-09 08:40:13 -0500 |
commit | ebc4ef61d76fc182773fe225151adc9b913c62eb (patch) | |
tree | 56b8c71c9693fc86b749dc3a772a2711e8cf6a3a /common | |
parent | 0d3b05913140353f8116781dcb82ba9c09ff0bfe (diff) | |
download | u-boot-ebc4ef61d76fc182773fe225151adc9b913c62eb.zip u-boot-ebc4ef61d76fc182773fe225151adc9b913c62eb.tar.gz u-boot-ebc4ef61d76fc182773fe225151adc9b913c62eb.tar.bz2 |
spl: Add a name to the SPL load-image methods
It is useful to name each method so that we can print out this name when
using the method. Currently this happens using a separate function. In
preparation for unifying this, add a name to each method.
The name is only available if we have libcommon support (i.e can use
printf()).
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/spl.c | 4 | ||||
-rw-r--r-- | common/spl/spl_mmc.c | 6 | ||||
-rw-r--r-- | common/spl/spl_nand.c | 2 | ||||
-rw-r--r-- | common/spl/spl_net.c | 5 | ||||
-rw-r--r-- | common/spl/spl_nor.c | 2 | ||||
-rw-r--r-- | common/spl/spl_onenand.c | 3 | ||||
-rw-r--r-- | common/spl/spl_sata.c | 2 | ||||
-rw-r--r-- | common/spl/spl_spi.c | 2 | ||||
-rw-r--r-- | common/spl/spl_ubi.c | 4 | ||||
-rw-r--r-- | common/spl/spl_usb.c | 2 | ||||
-rw-r--r-- | common/spl/spl_ymodem.c | 2 |
11 files changed, 18 insertions, 16 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 9bcbd09..30b4c50 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -221,10 +221,10 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, return 0; } #if defined(CONFIG_SPL_RAM_DEVICE) -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_RAM, spl_ram_load_image); +SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image); #endif #if defined(CONFIG_SPL_DFU_SUPPORT) -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_DFU, spl_ram_load_image); +SPL_LOAD_IMAGE_METHOD("USB DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image); #endif #endif diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 32d7c2a..85e3de8 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -355,6 +355,6 @@ int spl_mmc_load_image(struct spl_image_info *spl_image, return err; } -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_MMC1, spl_mmc_load_image); -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_MMC2, spl_mmc_load_image); -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_MMC2_2, spl_mmc_load_image); +SPL_LOAD_IMAGE_METHOD("MMC1", 0, BOOT_DEVICE_MMC1, spl_mmc_load_image); +SPL_LOAD_IMAGE_METHOD("MMC2", 0, BOOT_DEVICE_MMC2, spl_mmc_load_image); +SPL_LOAD_IMAGE_METHOD("MMC2_2", 0, BOOT_DEVICE_MMC2_2, spl_mmc_load_image); diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index d1abda6..cd39f9b 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -151,4 +151,4 @@ static int spl_nand_load_image(struct spl_image_info *spl_image, } #endif /* Use priorty 1 so that Ubi can override this */ -SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_NAND, spl_nand_load_image); +SPL_LOAD_IMAGE_METHOD("NAND", 1, BOOT_DEVICE_NAND, spl_nand_load_image); diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c index f4b4bc4..0fba017 100644 --- a/common/spl/spl_net.c +++ b/common/spl/spl_net.c @@ -51,7 +51,8 @@ int spl_net_load_image_cpgmac(struct spl_image_info *spl_image, return spl_net_load_image(spl_image, bootdev); } -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_CPGMAC, spl_net_load_image_cpgmac); +SPL_LOAD_IMAGE_METHOD("eth device", 0, BOOT_DEVICE_CPGMAC, + spl_net_load_image_cpgmac); #endif #ifdef CONFIG_SPL_USBETH_SUPPORT @@ -62,5 +63,5 @@ int spl_net_load_image_usb(struct spl_image_info *spl_image, return spl_net_load_image(spl_image, bootdev); } -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_USBETH, spl_net_load_image_usb); +SPL_LOAD_IMAGE_METHOD("USB eth", 0, BOOT_DEVICE_USBETH, spl_net_load_image_usb); #endif diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c index 6bfa399..d07ca84 100644 --- a/common/spl/spl_nor.c +++ b/common/spl/spl_nor.c @@ -71,4 +71,4 @@ static int spl_nor_load_image(struct spl_image_info *spl_image, return 0; } -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_NOR, spl_nor_load_image); +SPL_LOAD_IMAGE_METHOD("NOR", 0, BOOT_DEVICE_NOR, spl_nor_load_image); diff --git a/common/spl/spl_onenand.c b/common/spl/spl_onenand.c index f076e2c..fc98e9c 100644 --- a/common/spl/spl_onenand.c +++ b/common/spl/spl_onenand.c @@ -36,4 +36,5 @@ static int spl_onenand_load_image(struct spl_image_info *spl_image, return 0; } /* Use priorty 1 so that Ubi can override this */ -SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_ONENAND, spl_onenand_load_image); +SPL_LOAD_IMAGE_METHOD("OneNAND", 1, BOOT_DEVICE_ONENAND, + spl_onenand_load_image); diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c index a3c07cd..5476206 100644 --- a/common/spl/spl_sata.c +++ b/common/spl/spl_sata.c @@ -57,4 +57,4 @@ static int spl_sata_load_image(struct spl_image_info *spl_image, return 0; } -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_SATA, spl_sata_load_image); +SPL_LOAD_IMAGE_METHOD("SATA", 0, BOOT_DEVICE_SATA, spl_sata_load_image); diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index 78b8cd1..cd1d6b2 100644 --- a/common/spl/spl_spi.c +++ b/common/spl/spl_spi.c @@ -125,4 +125,4 @@ static int spl_spi_load_image(struct spl_image_info *spl_image, return err; } /* Use priorty 1 so that boards can override this */ -SPL_LOAD_IMAGE_METHOD(1, BOOT_DEVICE_SPI, spl_spi_load_image); +SPL_LOAD_IMAGE_METHOD("SPI", 1, BOOT_DEVICE_SPI, spl_spi_load_image); diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c index c03910b..24633f4 100644 --- a/common/spl/spl_ubi.c +++ b/common/spl/spl_ubi.c @@ -78,5 +78,5 @@ out: 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); +SPL_LOAD_IMAGE_METHOD("NAND", 0, BOOT_DEVICE_NAND, spl_ubi_load_image); +SPL_LOAD_IMAGE_METHOD("OneNAND", 0, BOOT_DEVICE_ONENAND, spl_ubi_load_image); diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c index e37966e..567a450 100644 --- a/common/spl/spl_usb.c +++ b/common/spl/spl_usb.c @@ -65,4 +65,4 @@ static int spl_usb_load_image(struct spl_image_info *spl_image, return 0; } -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_USB, spl_usb_load_image); +SPL_LOAD_IMAGE_METHOD("USB", 0, BOOT_DEVICE_USB, spl_usb_load_image); diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c index 957894d..ff8085b 100644 --- a/common/spl/spl_ymodem.c +++ b/common/spl/spl_ymodem.c @@ -132,4 +132,4 @@ end_stream: printf("Loaded %d bytes\n", size); return 0; } -SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_UART, spl_ymodem_load_image); +SPL_LOAD_IMAGE_METHOD("UART", 0, BOOT_DEVICE_UART, spl_ymodem_load_image); |