[PATCH] omap3logic: Return omap3logic boards to OF_PLATDATA in SPL

Lokesh Vutla lokeshvutla at ti.com
Mon May 11 06:46:00 CEST 2020



On 25/04/20 6:29 PM, Adam Ford wrote:
> SPL is just simply too tight and we don't really have any
> room to shave off any more functionality, so we need OF_PLATDATA
> in SPL.
> 
> This patch adds the manual enumeration of serial and MMC while
> removing the device tree support in SPL and enabling
> SPL_OF_PLATDATA.
> 
> Signed-off-by: Adam Ford <aford173 at gmail.com>

I see the following build failure with this patch:

➜  u-boot-ti git:(for-rc) v7make omap35_logic_somlv_defconfig
#
# configuration written to .config
#
➜  u-boot-ti git:(for-rc) v7make -j4 -s
arm-none-linux-gnueabihf-ld.bfd: drivers/built-in.o: in function `ofnode_get_name':
/home/lokesh/working/mainline/u-boot-ti/drivers/core/ofnode.c:272: undefined
reference to `fdt_get_name'
arm-none-linux-gnueabihf-ld.bfd: drivers/built-in.o: in function
`ofnode_parse_phandle_with_args':
/home/lokesh/working/mainline/u-boot-ti/drivers/core/ofnode.c:420: undefined
reference to `fdtdec_parse_phandle_with_args'
scripts/Makefile.spl:422: recipe for target 'spl/u-boot-spl' failed
make[1]: *** [spl/u-boot-spl] Error 1
Makefile:1940: recipe for target 'spl/u-boot-spl' failed
make: *** [spl/u-boot-spl] Error 2
➜  u-boot-ti git:(for-rc)

Thanks and regards,
Lokesh

> 
> diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
> index 21d8a21010..5a1fa292fc 100644
> --- a/board/logicpd/omap3som/omap3logic.c
> +++ b/board/logicpd/omap3som/omap3logic.c
> @@ -239,3 +239,33 @@ int board_eth_init(bd_t *bis)
>  	return smc911x_initialize(0, CONFIG_SMC911X_BASE);
>  }
>  #endif
> +
> +/* This is only needed until SPL gets OF support that fits */
> +#ifdef CONFIG_SPL_BUILD
> +static const struct ns16550_platdata omap3logic_serial = {
> +	.base = OMAP34XX_UART1,
> +	.reg_shift = 2,
> +	.clock = V_NS16550_CLK,
> +	.fcr = UART_FCR_DEFVAL,
> +};
> +
> +U_BOOT_DEVICE(omap3logic_uart) = {
> +	"ns16550_serial",
> +	&omap3logic_serial
> +};
> +
> +static const struct omap_hsmmc_plat omap3_logic_mmc0_platdata = {
> +	.base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE,
> +	.cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_4BIT,
> +	.cfg.f_min = 400000,
> +	.cfg.f_max = 52000000,
> +	.cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
> +	.cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
> +};
> +
> +U_BOOT_DEVICE(am335x_mmc0) = {
> +	.name = "omap_hsmmc",
> +	.platdata = &omap3_logic_mmc0_platdata,
> +};
> +
> +#endif
> diff --git a/configs/omap35_logic_defconfig b/configs/omap35_logic_defconfig
> index bcf4efc621..fbf60f9be2 100644
> --- a/configs/omap35_logic_defconfig
> +++ b/configs/omap35_logic_defconfig
> @@ -43,6 +43,7 @@ CONFIG_CMD_UBI=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_SPL_OF_CONTROL=y
>  CONFIG_DEFAULT_DEVICE_TREE="logicpd-torpedo-35xx-devkit"
> +CONFIG_SPL_OF_PLATDATA=y
>  # CONFIG_ENV_IS_IN_FAT is not set
>  CONFIG_ENV_IS_IN_NAND=y
>  CONFIG_SPL_DM=y
> @@ -79,3 +80,5 @@ CONFIG_USB_MUSB_HOST=y
>  CONFIG_USB_MUSB_OMAP2PLUS=y
>  CONFIG_TWL4030_USB=y
>  CONFIG_BCH=y
> +CONFIG_SPL_TINY_MEMSET=y
> +# CONFIG_SPL_OF_LIBFDT is not set
> diff --git a/configs/omap35_logic_somlv_defconfig b/configs/omap35_logic_somlv_defconfig
> index 51c5d449e0..07c6bf9039 100644
> --- a/configs/omap35_logic_somlv_defconfig
> +++ b/configs/omap35_logic_somlv_defconfig
> @@ -42,6 +42,7 @@ CONFIG_CMD_UBI=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_SPL_OF_CONTROL=y
>  CONFIG_DEFAULT_DEVICE_TREE="logicpd-som-lv-35xx-devkit"
> +CONFIG_SPL_OF_PLATDATA=y
>  # CONFIG_ENV_IS_IN_FAT is not set
>  CONFIG_ENV_IS_IN_NAND=y
>  CONFIG_SPL_DM=y
> @@ -82,3 +83,5 @@ CONFIG_USB_MUSB_HOST=y
>  CONFIG_USB_MUSB_OMAP2PLUS=y
>  CONFIG_TWL4030_USB=y
>  CONFIG_BCH=y
> +CONFIG_SPL_TINY_MEMSET=y
> +# CONFIG_SPL_OF_LIBFDT is not set
> diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
> index 15925fb7db..275e7c65ab 100644
> --- a/configs/omap3_logic_defconfig
> +++ b/configs/omap3_logic_defconfig
> @@ -42,6 +42,7 @@ CONFIG_CMD_UBI=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_SPL_OF_CONTROL=y
>  CONFIG_DEFAULT_DEVICE_TREE="logicpd-torpedo-37xx-devkit"
> +CONFIG_SPL_OF_PLATDATA=y
>  # CONFIG_ENV_IS_IN_FAT is not set
>  CONFIG_ENV_IS_IN_NAND=y
>  CONFIG_SPL_DM=y
> @@ -78,3 +79,5 @@ CONFIG_USB_MUSB_HOST=y
>  CONFIG_USB_MUSB_OMAP2PLUS=y
>  CONFIG_TWL4030_USB=y
>  CONFIG_BCH=y
> +CONFIG_SPL_TINY_MEMSET=y
> +# CONFIG_SPL_OF_LIBFDT is not set
> diff --git a/configs/omap3_logic_somlv_defconfig b/configs/omap3_logic_somlv_defconfig
> index ea8fc37f12..ef23831ed4 100644
> --- a/configs/omap3_logic_somlv_defconfig
> +++ b/configs/omap3_logic_somlv_defconfig
> @@ -43,6 +43,7 @@ CONFIG_CMD_UBI=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_SPL_OF_CONTROL=y
>  CONFIG_DEFAULT_DEVICE_TREE="logicpd-som-lv-37xx-devkit"
> +CONFIG_SPL_OF_PLATDATA=y
>  # CONFIG_ENV_IS_IN_FAT is not set
>  CONFIG_ENV_IS_IN_NAND=y
>  CONFIG_SPL_DM=y
> @@ -84,3 +85,5 @@ CONFIG_USB_MUSB_HOST=y
>  CONFIG_USB_MUSB_OMAP2PLUS=y
>  CONFIG_TWL4030_USB=y
>  CONFIG_BCH=y
> +CONFIG_SPL_TINY_MEMSET=y
> +# CONFIG_SPL_OF_LIBFDT is not set
> 


More information about the U-Boot mailing list