ARM Sunxi Platform Development
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: Samuel Holland <samuel@sholland.org>,
	linux-sunxi@lists.linux.dev, u-boot@lists.denx.de
Subject: [PATCH 08/19] sunxi: remove unneeded i2c_init_board() call for U-Boot proper
Date: Wed,  3 Jan 2024 00:12:28 +0000	[thread overview]
Message-ID: <20240103001239.17482-9-andre.przywara@arm.com> (raw)
In-Reply-To: <20240103001239.17482-1-andre.przywara@arm.com>

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>
---
 board/sunxi/board.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 8c12c8deade..1313b01dcea 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -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;
-- 
2.35.8


  parent reply	other threads:[~2024-01-03  0:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03  0:12 [PATCH 00/19] sunxi: SPL cleanup part 1 Andre Przywara
2024-01-03  0:12 ` [PATCH 01/19] sunxi: cleanup sunxi-common.h Andre Przywara
2024-01-03  0:12 ` [PATCH 02/19] sunxi: sun50i-h6: remove unneeded base addresses from header Andre Przywara
2024-01-03  0:12 ` [PATCH 03/19] sunxi: sun4i: " Andre Przywara
2024-01-03  0:12 ` [PATCH 04/19] sunxi: sun9i: " Andre Przywara
2024-01-03  0:12 ` [PATCH 05/19] sunxi: move #ifdef guards around tzpc_init() to header file Andre Przywara
2024-01-03  0:12 ` [PATCH 06/19] sunxi: remove common.h inclusion Andre Przywara
2024-01-03  0:12 ` [PATCH 07/19] sunxi: simplify U-Boot proper only builds Andre Przywara
2024-01-03  0:12 ` Andre Przywara [this message]
2024-01-03  0:12 ` [PATCH 09/19] sunxi: compile clock.c for SPL only Andre Przywara
2024-01-03  0:12 ` [PATCH 10/19] sunxi: sun4i: make more clock functions " Andre Przywara
2024-01-03  0:12 ` [PATCH 11/19] sunxi: sun6i: " Andre Przywara
2024-01-03  0:12 ` [PATCH 12/19] sunxi: sun50i_h6: " Andre Przywara
2024-01-03  0:12 ` [PATCH 13/19] sunxi: sun8i_a83t: " Andre Przywara
2024-01-03  0:12 ` [PATCH 14/19] sunxi: sun9i: " Andre Przywara
2024-01-03  0:12 ` [PATCH 15/19] sunxi: move pinmux setup into separate SPL only file Andre Przywara
2024-01-03  0:12 ` [PATCH 16/19] sunxi: SPL pinmux: rewrite without #ifdefs Andre Przywara
2024-01-03  0:12 ` [PATCH 17/19] sunxi: move UART pinmux setup into separate file Andre Przywara
2024-01-03  0:12 ` [PATCH 18/19] sunxi: SPL pinmux: split out UART pinmux per port Andre Przywara
2024-01-03  0:12 ` [PATCH 19/19] sunxi: SPL pinmux: rewrite UART setup without #ifdefs Andre Przywara
2024-01-17 13:52 ` [PATCH 00/19] sunxi: SPL cleanup part 1 Andre Przywara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240103001239.17482-9-andre.przywara@arm.com \
    --to=andre.przywara@arm.com \
    --cc=jagan@amarulasolutions.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=samuel@sholland.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox