public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Behun <marek.behun@nic.cz>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: mvebu: move i2c slave disable to generic SPL code
Date: Mon, 28 May 2018 14:43:40 +0200	[thread overview]
Message-ID: <20180528144340.765796fc@nic.cz> (raw)
In-Reply-To: <8ff2bd53-3be7-ae60-decd-9595f89f2f28@denx.de>

On Mon, 28 May 2018 14:34:07 +0200
Stefan Roese <sr@denx.de> wrote:

> On 28.05.2018 12:42, Baruch Siach wrote:
> 
> <snip>
> 
> >>>>> __twsi_i2c_init() is called from the main U-Boot image, but not
> >>>>> from SPL as far as my testing shows. Clearfog doesn't use i2c
> >>>>> from SPL, but the Turris board does.  
> >>>>
> >>>> Can't you switch to DM_I2C then? This should make sure, that the
> >>>> probe function is always called before the xfer functions are
> >>>> used.  
> >>>
> >>> I plan to do so for Clearfog. But the turris_omnia_defconfig does
> >>> not enable DM_I2C. So that would regress Turris.  
> >>
> >> Regress? Definitely not. We plan to remove all non-DM parts at some
> >> time. So a move from the ancient driver parts to DM is definitely
> >> preferred (especially if the platform and the driver already
> >> support DM) - better sooner than later.  
> > 
> > What I meant to say is that moving the i2c slave disable code from
> > Turris code to the mvtwsi driver would regress Turris unless Turris
> > migrates to DM_I2C first. I have no access to the Turris hardware,
> > so I can't test the DM_I2C migration on that platform.
> > 
> > If you prefer I can leave the Turris code alone. Instead, I'll add
> > the i2c slave disable to mvtwsi. Once Turris migrates to DM_I2C we
> > can remove the redundant code from its platform code.
> > 
> > What do you think?  
> 
> I would prefer to do this conversion right now and pollute the driver
> with stuff that is not needed for DM users.
> 
> Marek Behún is the maintainer of the Turris Omnia board and should be
> able to test such a change quite easily.
> 
> Perhaps its best for now to just add a comment to this code in
> board/CZ.NIC/turris_omnia/turris_omnia.c, that this code is not needed
> any more, once the board moves over to DM_I2C. And create the same
> functionality in the I2C driver for DM_I2C users. This is what you
> will be using / testing then and Marek can (read should) move to
> DM_I2C soon and remove this code from the board C file then.
> 
> What do you think?
> 
> Thanks,
> Stefan

Turris Omnia is currently broken in mainline anyway. As far as I am
concerned, do what Stefan suggests, add a comment to turris_omnia.c. As
soon as I will be more free from Turris Mox work, I am going to work on
Turris Omnia...

Marek

  reply	other threads:[~2018-05-28 12:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-27 15:25 [U-Boot] [PATCH] arm: mvebu: move i2c slave disable to generic SPL code Baruch Siach
2018-05-28  8:11 ` Chris Packham
2018-05-28  8:20   ` Stefan Roese
2018-05-28  9:56     ` Baruch Siach
2018-05-28 10:05       ` Stefan Roese
2018-05-28 10:08         ` Baruch Siach
2018-05-28 10:24           ` Stefan Roese
2018-05-28 10:29             ` Baruch Siach
2018-05-28 10:33               ` Stefan Roese
2018-05-28 10:42                 ` Baruch Siach
2018-05-28 12:34                   ` Stefan Roese
2018-05-28 12:43                     ` Marek Behun [this message]
2018-05-28  8:22   ` Baruch Siach
2018-05-28  8:55     ` Chris Packham
2018-05-28  9:04       ` Stefan Roese
2018-05-29 15:39         ` Maxime Ripard
2018-05-29 15:43           ` Stefan Roese
2018-05-29 16:32             ` Maxime Ripard
2018-05-30  4:25               ` Baruch Siach
2018-05-31  9:40                 ` Maxime Ripard

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=20180528144340.765796fc@nic.cz \
    --to=marek.behun@nic.cz \
    --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