public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Sebastian Reichel <sre@kernel.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 0/8] ARM: at91: Remove mach/ includes from the reset driver
Date: Tue, 28 Oct 2014 09:59:08 +0100	[thread overview]
Message-ID: <20141028085908.GB31979@lukather> (raw)
In-Reply-To: <20141028085202.GC722@piout.net>

[-- Attachment #1: Type: text/plain, Size: 3202 bytes --]

Hi,

On Tue, Oct 28, 2014 at 09:52:03AM +0100, Alexandre Belloni wrote:
> Hi,
> 
> On 28/10/2014 at 08:50:53 +0100, Boris Brezillon wrote :
> > Hi,
> > 
> > On Tue, 28 Oct 2014 00:09:29 +0100
> > Alexandre Belloni <alexandre.belloni@free-electrons.com> wrote:
> > 
> > > This series removes the mach/ headers dependency from the reset driver. It is
> > > also laying some groundwork for the necessary power management support rework.
> > > 
> > > The first patch adds and export a function to shutdown the sdram from the sdramc
> > > driver. That function also take the RSTC CR register and a value as parameters
> > > to be able to reset the chip. This is a hackish way of doing it but it ensures
> > > that all the code fits in one cache line. We already have plan to start using
> > > the sram to have a cleaner way to execute that code safely as soon as that
> > > series goes in:
> > > http://lists.infradead.org/pipermail/linux-arm-kernel/2013-September/198778.html
> > > 
> > > The second patch makes the sdramc driver usable from the board files.
> > > 
> > > The third patch actually registers the sdramc driver from the boards files.
> > > The fourth patch does the same, only for sam9g45 and sam9rl to simplify future
> > > merging as the board files have been removed. Simply drop that patch.
> > > 
> > > The fifth patch makes the at91-reset driver use the newly created
> > > at91_ramc_shutdown() function and removes the mach/ headers inclusion.
> > 
> > I'm not a big fan of this approach.
> > 
> > I definitely think each step of the reset process should be handled in
> > the appropriate block (and the patch series you pointed out would
> > definitely help in achieving this goal), but you're just moving all the
> > stuff done in the reset driver into the SDRAM one, which means you're
> > solving one design issue by introducing a new one.
> > 
> > Moreover, the errata at the origin of this hack is attached to the RSTC
> > (Rest Controller) block in the datasheets.
> > 
> 
> I agree it is still not clean but it is a step in the good direction.
> The sdram shutdown will have to be down in the sdram driver at some
> point, even if the errata is attached to the reset controller. At least,
> the series introduces a function to do the sdram shutdown.

Not really. AFAICS, this adds a function to reset the CPU. Actually,
it doesn't add anything at all, it just copies what was done in the
reset driver.

> > I'd rather keep the reset driver as is and move SDRAM related macros
> > into a specific header (include/linux/memory/atmel-sdram.h or
> > include/soc/atmel/memory.h as you proposed) so that the reset driver
> > can reference them without including mach headers.
> > 
> 
> My personal opinion is that it is better to hide the registers/bits from
> the reset driver right now as we have two different IPs and the sdram
> driver already knows how to make the difference between them.

The reset driver doesn't do anything anymore with these patches. Why
not just remove it altogether?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-10-28  9:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27 23:09 [PATCH v2 0/8] ARM: at91: Remove mach/ includes from the reset driver Alexandre Belloni
2014-10-27 23:09 ` [PATCH v2 1/8] memory: atmel-sdramc: export a shutdown function Alexandre Belloni
2014-10-27 23:09 ` [PATCH v2 2/8] memory: atmel-sdramc: allow probing from pdata Alexandre Belloni
2014-10-27 23:09 ` [PATCH v2 3/8] ARM: at91: sam9: probe the RAMC driver " Alexandre Belloni
2014-10-27 23:09 ` [PATCH v2 4/8] ARM: at91: sam9g45/sam9rl: probe the ramc driver Alexandre Belloni
2014-10-27 23:09 ` [PATCH v2 5/8] power: reset: at91-reset: use at91_ramc_shutdown Alexandre Belloni
2014-10-28  2:18   ` Sebastian Reichel
2014-10-27 23:09 ` [PATCH v2 6/8] ARM: at91: sam9: remove useless resource for rstc Alexandre Belloni
2014-10-27 23:09 ` [PATCH v2 7/8] ARM: at91: sam9g45/sam9rl: remove useless resources " Alexandre Belloni
2014-10-27 23:09 ` [PATCH v2 8/8] MAINTAINERS: add at91 power and memory entries Alexandre Belloni
2014-10-27 23:17   ` Joe Perches
2014-11-21 20:17     ` Pavel Machek
2014-10-28  7:50 ` [PATCH v2 0/8] ARM: at91: Remove mach/ includes from the reset driver Boris Brezillon
2014-10-28  8:52   ` Alexandre Belloni
2014-10-28  8:59     ` Maxime Ripard [this message]
2014-10-28  9:04       ` Alexandre Belloni
2014-10-28  9:11         ` 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=20141028085908.GB31979@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=sre@kernel.org \
    /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