linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pratyush Anand <pratyush.anand@st.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mohit KUMAR DCG <Mohit.KUMAR@st.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	spear-devel <spear-devel@list.st.com>,
	Viresh Kumar <viresh.linux@gmail.com>
Subject: Re: [PATCH 02/12] SPEAr13xx: Move SPEAr1340 definitions to header file
Date: Thu, 16 Jan 2014 17:15:54 +0530	[thread overview]
Message-ID: <20140116114554.GD2290@pratyush-vbox> (raw)
In-Reply-To: <201401161233.40811.arnd@arndb.de>

On Thu, Jan 16, 2014 at 07:33:40PM +0800, Arnd Bergmann wrote:
> On Thursday 16 January 2014, Pratyush Anand wrote:
> > > Though we are almost ready with v2. But few concerns:
> > > 
> > > There are Spear soc common register used for misc configurations of clock, reset etc  for all ips.  Few of 
> > > registers from the same area are also used for pcie/sata muxing and auxiliary clock configurations.
> > > For example: sata_miphy_init in arch/arm/mach-spear/spear1340.c also uses these registers.
> > > 
> > > We have moved all these sata specific spear1340 configurations in a separate driver.  On the basis of spear-ahci dt 
> > > Node this driver's probe is called, which further adds ahci platform driver.
> > > We plan to put all spear1340/1310_pcie_miphy_init/exit functions of patch 9/12 of this series in
> > > The same driver.
> > > 
> > > Now our concern is, what could be the best place to keep that driver, phy, reset or any other framework?
> > > Or we keep this new driver in arch/arm/mach-spear only.
> > 
> > I think this misc configuration register block resource should be
> > passed to syscon (drivers/mfd/syscon.c) driver.
> > 
> > regmap_update_bits should be used to update these registers and hence
> > to configure pcie/sata settings.
> > 
> > As far as place is concerned, that can be kept into mfd and can be
> > named as spear13xx-syscon.c
> > 
> > Whats your opinion arnd?
> 
> That sounds exactly like what I would have suggested, thanks!
> 
> One question remains, which is what driver should directly use 
> syscon_regmap_lookup_by_phandle() to get the syscon registers themselves,
> and which ones should use a higher-level abstraction from spear13xx-syscon.c.
> 
> We can decide this on a case-by-case basis, but in general I would suggest
> to have drivers use syscon_regmap_lookup_by_phandle directly as long as
> it doesn't cause significant code duplication between drivers.

Yes, I think so.

Regards
Pratyush
> 
> 	Arnd

  reply	other threads:[~2014-01-16 11:46 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11  9:38 [PATCH 00/12] PCI:Add SPEAr13xx PCie support Mohit Kumar
2013-12-11  9:38 ` [PATCH 01/12] SPEAr13xx: Correct dt field name for stmmac phy-addr Mohit Kumar
2013-12-11 11:09   ` Rajeev kumar
2013-12-11 11:14     ` Rajeev kumar
2013-12-12  0:39     ` Jingoo Han
2013-12-12  3:59       ` Rajeev kumar
2013-12-12  4:07         ` Chen-Yu Tsai
2013-12-12  5:13           ` Mohit KUMAR DCG
2013-12-11  9:38 ` [PATCH 02/12] SPEAr13xx: Move SPEAr1340 definitions to header file Mohit Kumar
2013-12-11 22:48   ` Arnd Bergmann
2013-12-13  4:18     ` Mohit KUMAR DCG
2013-12-14 19:02       ` Arnd Bergmann
2014-01-16  7:25         ` Mohit KUMAR DCG
2014-01-16  9:19           ` Pratyush Anand
2014-01-16 11:33             ` Arnd Bergmann
2014-01-16 11:45               ` Pratyush Anand [this message]
2013-12-11  9:38 ` [PATCH 03/12] SPEAr13xx: Add SPEAr1310 PCIe register definitions Mohit Kumar
2013-12-11 22:51   ` Arnd Bergmann
2013-12-11  9:38 ` [PATCH 04/12] SPEAr13xx: Fix static mapping table Mohit Kumar
2013-12-11  9:38 ` [PATCH 05/12] clk: SPEAr13xx: Fix pcie clock name Mohit Kumar
2013-12-11 22:42   ` Arnd Bergmann
2013-12-12  5:00     ` Mohit KUMAR DCG
2013-12-12 21:30       ` Arnd Bergmann
2013-12-11  9:38 ` [PATCH 06/12] pcie: designware: Move register definition to the header file Mohit Kumar
2013-12-11 11:38   ` Jagan Teki
2013-12-11 11:55     ` Mohit KUMAR DCG
2013-12-11 12:04       ` Jagan Teki
2013-12-11 21:31       ` Arnd Bergmann
2013-12-11 22:48         ` Jingoo Han
2013-12-12  4:55           ` Mohit KUMAR DCG
2013-12-11  9:38 ` [PATCH 07/12] pcie: designware: add dw_pcie prefix before cfg_read/write Mohit Kumar
2013-12-11 11:40   ` Jagan Teki
2013-12-12  1:12     ` Jingoo Han
2013-12-12  1:05   ` Jingoo Han
2013-12-20 16:35   ` Bjorn Helgaas
2013-12-11  9:38 ` [PATCH 08/12] pcie: designware: Fix IO transfers Mohit Kumar
2013-12-11 10:03   ` Marek Vasut
2013-12-11 11:29     ` Jagan Teki
2013-12-12  1:17       ` Jingoo Han
2013-12-20  3:47         ` Pratyush Anand
2013-12-11 13:34   ` Arnd Bergmann
2013-12-11 23:34   ` Jingoo Han
2013-12-20 16:36   ` Bjorn Helgaas
2013-12-11  9:38 ` [PATCH 09/12] pcie: SPEAr13xx: Add designware pcie support Mohit Kumar
2013-12-11 23:00   ` Arnd Bergmann
2013-12-13  4:30     ` Mohit KUMAR DCG
2013-12-13  4:57       ` Jingoo Han
2013-12-14 19:01         ` Arnd Bergmann
2013-12-11  9:38 ` [PATCH 10/12] SPEAr13xx: defconfig: Update Mohit Kumar
2013-12-11 10:47   ` Rajeev kumar
2013-12-12  4:47     ` Mohit KUMAR DCG
2013-12-11  9:38 ` [PATCH 11/12] MAINTAINERS: Add ST SPEAr13xx PCIe driver maintainer Mohit Kumar
2013-12-12  1:55   ` Jingoo Han
2013-12-11  9:38 ` [PATCH 12/12] MAINTAINERS: Add Synopsis Designware " Mohit Kumar

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=20140116114554.GD2290@pratyush-vbox \
    --to=pratyush.anand@st.com \
    --cc=Mohit.KUMAR@st.com \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=spear-devel@list.st.com \
    --cc=viresh.linux@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).