[U-Boot] [PATCH] spl: consolidate arch/arm/include/asm/arch-*/spl.h
Tim Harvey
tharvey at gateworks.com
Wed Apr 23 10:10:19 CEST 2014
On Tue, Apr 15, 2014 at 11:44 PM, Masahiro Yamada
<yamada.m at jp.panasonic.com> wrote:
> arch/arm/include/asm/spl.h requires all SoCs to have
> arch/arm/include/asm/arch-*/spl.h.
>
> But many of them just define BOOT_DEVICE_* macros.
>
> Those macros are used in the "switch (boot_device) { ... }"
> statement in common/spl/spl.c.
>
> So they should not be archtecture specific, but described as
> a simpile enumeration.
>
> This commit merge most of arch/arm/include/asm/arch-*/spl.h
> into arch/arm/include/asm/spl.h.
>
> With a little more effort, arch-zynq/spl.h and arch-socfpga/spl.h
> will be merged, while I am not sure about OMAP and Exynos.
>
<snip>
> --- a/arch/arm/include/asm/spl.h
> +++ b/arch/arm/include/asm/spl.h
> @@ -7,9 +7,27 @@
> #ifndef _ASM_SPL_H_
> #define _ASM_SPL_H_
>
> +#if defined(CONFIG_OMAP) || defined(CONFIG_SOCFPGA) || defined(CONFIG_ZYNQ) \
> + || defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5)
> /* Platform-specific defines */
> #include <asm/arch/spl.h>
>
> +#else
> +enum {
> + BOOT_DEVICE_RAM,
> + BOOT_DEVICE_MMC1,
> + BOOT_DEVICE_MMC2,
> + BOOT_DEVICE_MMC2_2,
> + BOOT_DEVICE_NAND,
> + BOOT_DEVICE_ONENAND,
> + BOOT_DEVICE_NOR,
> + BOOT_DEVICE_UART,
> + BOOT_DEVICE_SPI,
> + BOOT_DEVICE_I2C,
> + BOOT_DEVICE_NONE
> +};
> +#endif
> +
Masahiro,
This is great! If you can add BOOT_DEVICE_SATA I can use this for imx,
then you can add my:
Acked-by: Tim Harvey <tharvey at gateworks.com>
Thanks,
Tim
More information about the U-Boot
mailing list