From patchwork Sat Apr 25 12:59:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 238472 List-Id: U-Boot discussion From: aford173 at gmail.com (Adam Ford) Date: Sat, 25 Apr 2020 07:59:48 -0500 Subject: [PATCH] omap3logic: Return omap3logic boards to OF_PLATDATA in SPL Message-ID: <20200425125948.1319719-1-aford173@gmail.com> 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 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