sunxi: remove unneeded i2c_init_board() call for U-Boot proper

The driver used for the Allwinner I2C IP is using proper DT and DM
enablement for a while: we enable the clock gate and de-assert the reset
line in the driver's probe() routine, and the pinmux setup is taken care
of by the DM framework.

This means the explicit call to the i2c_init_board() routine is not
needed for U-Boot proper. As the board_init() function in board.c is
only called for U-Boot proper, we can remove the call, something that
the comment there hinted at already.

Fix the comment for the board_init() function on the way: we were not
really doing board specific setup there. The fact that this function
is called from U-Boot proper only is probably more helpful for reasoning
about this code.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
Andre Przywara 2024-01-02 15:02:51 +00:00
parent 02780a1c26
commit 1a6828d0c5

View File

@ -186,7 +186,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
return ENVL_UNKNOWN;
}
/* add board specific code here */
/* called only from U-Boot proper */
int board_init(void)
{
__maybe_unused int id_pfr1, ret;
@ -226,13 +226,6 @@ int board_init(void)
if (ret)
return ret;
#if CONFIG_IS_ENABLED(DM_I2C)
/*
* Temporary workaround for enabling I2C clocks until proper sunxi DM
* clk, reset and pinctrl drivers land.
*/
i2c_init_board();
#endif
eth_init_board();
return 0;