[PATCH 11/16] board: stm32pm1: add stm32mp13 board support
Patrick DELAUNAY
patrick.delaunay at foss.st.com
Fri May 20 17:33:15 CEST 2022
Hi Patrice
On 5/20/22 09:02, Patrice CHOTARD wrote:
> Hi Patrick
>
> One typo and one remark below
>
> On 5/6/22 16:06, Patrick Delaunay wrote:
>> Add stm32mp15x prefix to all STM32MP15x board specific function,
>> this patch is a preliminary step for STM32MP13x support.
>>
>> This patch also add the RCC probe to avoid circular access with
> s/add/adds
OK
>
>> usbphyc probe as clk provider.
>>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
>> ---
>>
>> board/st/stm32mp1/stm32mp1.c | 27 ++++++++++++++++++---------
>> 1 file changed, 18 insertions(+), 9 deletions(-)
>>
>> diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
>> index fff1880e5b..4ba7201ffb 100644
>> --- a/board/st/stm32mp1/stm32mp1.c
>> +++ b/board/st/stm32mp1/stm32mp1.c
>> @@ -547,8 +547,7 @@ static void sysconf_init(void)
>> clrbits_le32(syscfg + SYSCFG_CMPCR, SYSCFG_CMPCR_SW_CTRL);
>> }
>>
>> [...]
>>
>> -static void board_ev1_init(void)
>> +static void board_stm32mp15x_ev1_init(void)
>> {
>> struct udevice *dev;
>>
>> @@ -648,13 +648,22 @@ static void board_ev1_init(void)
>> /* board dependent setup after realloc */
>> int board_init(void)
>> {
>> + struct udevice *dev;
>> + int ret;
>> +
>> + /* probe RCC to avoid circular access with usbphyc probe as clk provider */
>> + if (IS_ENABLED(CONFIG_CLK_STM32MP13)) {
>> + ret = uclass_get_device_by_driver(UCLASS_CLK, DM_DRIVER_GET(stm32mp1_clock), &dev);
>> + log_debug("Clock init failed: %d\n", ret);
> I am wondering if usage of DM_FLAG_PROBE_AFTER_BIND in flag would avoid this above piece of code ?
Yes, I think you are right
=> need to be tested when RCC clock driver and USBPHY clock will be
upstreamed
and then we will remove these lines
>> + }
>> +
>> board_key_check();
>>
>> - if (board_is_ev1())
>> - board_ev1_init();
>> + if (board_is_stm32mp15x_ev1())
>> + board_stm32mp15x_ev1_init();
>>
>> - if (board_is_dk2())
>> - dk2_i2c1_fix();
>> + if (board_is_stm32mp15x_dk2())
>> + board_stm32mp15x_dk2_init();
>>
>> if (IS_ENABLED(CONFIG_DM_REGULATOR))
>> regulators_enable_boot_on(_DEBUG);
Regards
Patrick
More information about the U-Boot
mailing list