From: Faiz Abbas Date: Tue, 19 Mar 2019 17:01:42 +0530 Subject: [U-Boot] [PATCH] ti: am335x_evm: Enable CONFIG_SPL_OF_CONTROL In-Reply-To: <1552994361-32058-1-git-send-email-trini@konsulko.com> References: <1552994361-32058-1-git-send-email-trini@konsulko.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tom, On 19/03/19 4:49 PM, Tom Rini wrote: > Enable support for SPL_OF_CONTROL on this platform. That means doing a > few things: > - Add u-boot,dm-pre-reloc to a number of nodes > - Drop static platdata in the board file. > - A lot of tweaks to the defconfig. We remove some things such as > SPL_USE_ARCH_MEMCPY/SET for space. Increase our malloc len. > - Drop, for now at least, USB SPL support as it's causing a hang. > > Cc: Faiz Abbas > Cc: Lokesh Vutla > Signed-off-by: Tom Rini > --- > arch/arm/dts/am335x-evm-u-boot.dtsi | 45 +++++++++++++++++++++++++++++++++++-- > board/ti/am335x/board.c | 30 ------------------------- > configs/am335x_evm_defconfig | 14 ++++++++---- > 3 files changed, 53 insertions(+), 36 deletions(-) > > diff --git a/arch/arm/dts/am335x-evm-u-boot.dtsi b/arch/arm/dts/am335x-evm-u-boot.dtsi > index b6b97ed16d91..16a9f855ad1f 100644 > --- a/arch/arm/dts/am335x-evm-u-boot.dtsi > +++ b/arch/arm/dts/am335x-evm-u-boot.dtsi > @@ -3,11 +3,52 @@ > * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ > */ > > +#include "am33xx-u-boot.dtsi" > > -&mmc3 { > - status = "disabled"; > +&l4_wkup { > + u-boot,dm-pre-reloc; > +}; > + > +&scm { > + u-boot,dm-pre-reloc; > +}; > + > +&am33xx_pinmux { > + u-boot,dm-pre-reloc; > +}; > + > +&uart0_pins { > + u-boot,dm-pre-reloc; > +}; > + > +&uart0 { > + u-boot,dm-pre-reloc; > +}; > + > +&gpio0 { > + u-boot,dm-pre-reloc; > +}; > + > +&i2c0 { > + u-boot,dm-pre-reloc; > +}; > + > +&i2c0_pins { > + u-boot,dm-pre-reloc; > }; > > &usb0 { > dr_mode = "peripheral"; > }; > + > +&mmc1 { > + u-boot,dm-pre-reloc; > +}; > + > +&mmc1_pins { > + u-boot,dm-pre-reloc; > +}; > + > +&mmc3 { > + status = "disabled"; > +}; > diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c > index d67f94ad47ba..bfad1a75a456 100644 > --- a/board/ti/am335x/board.c > +++ b/board/ti/am335x/board.c > @@ -1054,33 +1054,3 @@ void board_fit_image_post_process(void **p_image, size_t *p_size) > secure_boot_verify_image(p_image, p_size); > } > #endif > - > -#if !CONFIG_IS_ENABLED(OF_CONTROL) > -static const struct omap_hsmmc_plat am335x_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 = &am335x_mmc0_platdata, > -}; > - > -static const struct omap_hsmmc_plat am335x_mmc1_platdata = { > - .base_addr = (struct hsmmc *)OMAP_HSMMC2_BASE, > - .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_8BIT, > - .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_mmc1) = { > - .name = "omap_hsmmc", > - .platdata = &am335x_mmc1_platdata, > -}; > -#endif We also need to look at arch/arm/mach-omap2/board.c. Bunch of GPIO and I2C platdata there. In general, if we are not able to fit all bootmodes with SPL_OF_CONTROL enabled, should we remove it and add back platdata or do something else? Thanks, Faiz