]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: Allow booting from SPI
authorSimon Glass <sjg@chromium.org>
Mon, 21 Jan 2019 21:53:28 +0000 (14:53 -0700)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Fri, 1 Feb 2019 15:59:13 +0000 (16:59 +0100)
The u-boot,spl-boot-device property only allows MMC at present. Add SPI as
well for boards that boot from SPI flash.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
arch/arm/mach-rockchip/spl-boot-order.c

index 81a72cc263f9ea0044a03ab39e65ae1214571c39..0e485deda2f9d34e603cc262de5acac89e599538 100644 (file)
@@ -61,6 +61,9 @@ static int spl_node_to_boot_device(int node)
                default:
                        return -ENOSYS;
                }
+       } else if (!uclass_get_device_by_of_offset(UCLASS_SPI_FLASH, node,
+               &parent)) {
+               return BOOT_DEVICE_SPI;
        }
 
        /*