From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baruch Siach Date: Sun, 28 Apr 2019 14:59:10 +0300 Subject: [U-Boot] [PATCH 2/4] mvebu: turris_omnia: remove redundant code In-Reply-To: <20190425133042.19014-3-marek.behun@nic.cz> References: <20190425133042.19014-1-marek.behun@nic.cz> <20190425133042.19014-3-marek.behun@nic.cz> Message-ID: <87zhoafii9.fsf@tarshish> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Hi Marek, On Thu, Apr 25 2019, Marek BehĂșn wrote: > The i2c slave disabling is done by mvtwsi driver and is not needed here. > > Signed-off-by: Marek BehĂșn > Cc: Baruch Siach > --- > board/CZ.NIC/turris_omnia/turris_omnia.c | 11 ----------- > 1 file changed, 11 deletions(-) > > diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c > index c21d2f3ffa..c446f471a6 100644 > --- a/board/CZ.NIC/turris_omnia/turris_omnia.c > +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c > @@ -297,8 +297,6 @@ static int set_regdomain(void) > > int board_early_init_f(void) > { > - u32 i2c_debug_reg; > - > /* Configure MPP */ > writel(0x11111111, MVEBU_MPP_BASE + 0x00); > writel(0x11111111, MVEBU_MPP_BASE + 0x04); > @@ -321,15 +319,6 @@ int board_early_init_f(void) > writel(OMNIA_GPP_OUT_ENA_LOW, MVEBU_GPIO0_BASE + 0x04); > writel(OMNIA_GPP_OUT_ENA_MID, MVEBU_GPIO1_BASE + 0x04); > > - /* > - * Disable I2C debug mode blocking 0x64 I2C address. > - * Note: that would be redundant once Turris Omnia migrates to DM_I2C, > - * because the mvtwsi driver includes equivalent code. > - */ As this comment notes, Turris Omnia needs to migrate to DM_I2C before removing this code. The non DM code path in the mvtwsi driver does not disable the debug I2C client. Is there a pending patch that enables DM_I2C for Turris Omnia? > - i2c_debug_reg = readl(MVEBU_TWSI_BASE + MVTWSI_ARMADA_DEBUG_REG); > - i2c_debug_reg &= ~(1<<18); > - writel(i2c_debug_reg, MVEBU_TWSI_BASE + MVTWSI_ARMADA_DEBUG_REG); > - > return 0; > } baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -