On 28/11/2017 13:31, Peng Fan wrote: > Implement spl_boot_device for i.MX8M. > > Signed-off-by: Peng Fan <peng....@nxp.com> > --- > arch/arm/mach-imx/spl.c | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c > index d0d1b73aa6..2dc23e6d34 100644 > --- a/arch/arm/mach-imx/spl.c > +++ b/arch/arm/mach-imx/spl.c > @@ -116,7 +116,28 @@ u32 spl_boot_device(void) > return BOOT_DEVICE_NONE; > } > } > -#endif /* CONFIG_MX6 || CONFIG_MX7 */ > + > +#elif defined(CONFIG_MX8M) > +u32 spl_boot_device(void) > +{ > + switch (get_boot_device()) { > + case SD1_BOOT: > + case MMC1_BOOT: > + return BOOT_DEVICE_MMC1; > + case SD2_BOOT: > + case MMC2_BOOT: > + return BOOT_DEVICE_MMC2; > + case NAND_BOOT: > + return BOOT_DEVICE_NAND; > + case USB_BOOT: > + return BOOT_DEVICE_USB; > + case SPI_NOR_BOOT: > + return BOOT_DEVICE_SPI; > + default: > + return BOOT_DEVICE_NONE; > + }
Can this be merged with spl_boot_device() for i.MX7 ? Best regards, Stefano Babic > +} > +#endif /* CONFIG_MX6 || CONFIG_MX7 || CONFIG_MX8M */ > > #ifdef CONFIG_SPL_USB_GADGET_SUPPORT > int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) > -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de ===================================================================== _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot