LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: devicetree-discuss@lists.ozlabs.org,
	John Jacques <john.jacques@lsi.com>,
	linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Torez Smith <torez@us.ibm.com>,
	Russell King <rmk@arm.linux.org.uk>
Subject: RE: ARM clock API to PowerPC
Date: Fri, 14 Aug 2009 13:29:54 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0908141255230.5980@axis700.grange> (raw)
In-Reply-To: <1250242149.24143.36.camel@pasglop>

On Fri, 14 Aug 2009, Benjamin Herrenschmidt wrote:

> On Thu, 2009-08-13 at 16:59 +0800, Li Yang-R58472 wrote:
> > >Now, I know there is at least one person on earth 
> > >contemplating sharing some drivers between PPC and ARM. I 
> > >won't tell much more at this stage, but it makes sense in the 
> > >grand scheme of things to see SoC vendors put similar IO cores 
> > >into either PPC or ARM and providing that clock API is a good 
> > >way to also allow these drivers to work since the drivers in 
> > >questions make use of it.
> > 
> > Freescale USB UDC driver is another example that shared between PowerPC
> > and ARM(i.mx).  Currently, the imx part of the driver uses clk API, but
> > PowerPC part uses static initialization.  It will be better if we can
> > unify the clk setting part of the driver.
> 
> I had a look at it looks like it uses the API in a way that would fit
> nicely with my plans, ie, it should be possible to use the same driver
> on both archs pretty much without changes provided the ppc platform
> provides a clock source driver and hooks it up to the device-tree.
> 
> I'll work on some proof-of-concept implementation of the core bits
> early next week.

You might have a look at these threads:

http://marc.info/?t=124876760500001&r=1&w=2
http://marc.info/?t=124782904600005&r=2&w=2

but since they are quite long, in short, in them a patch has been 
discussed, that allowed to re-use an MMC driver, used on some MFDs, on 
SuperH SoCs. The patch was taking the "easy route" of adding the 
possibility to use the clock API to the tmio_mmc.c driver, while leaving 
it to use static clock configurations with MFD drivers. This approach has 
been rejected and initially it has been suggested to implement a 
platform-independent clock API like what had been proposed by clocklib, 
but since the future of clocklib is unclear, it has then been decided to 
remove the clock (and power) management from the driver proper and move 
them to some callbacks. I.e., there would be more users interested in a 
unified clock API, including other platforms and platform-independent 
drivers like MFD. Currently the reason, why MFD drivers cannot implement 
their own clock devices is that the "struct clk" differs between 
platforms.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

  reply	other threads:[~2009-08-14 11:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12  7:57 ARM clock API to PowerPC Benjamin Herrenschmidt
2009-08-12  8:29 ` Benjamin Herrenschmidt
2009-08-12 17:31   ` Mitch Bradley
2009-08-12 21:30     ` Benjamin Herrenschmidt
2009-08-12 11:19 ` Josh Boyer
2009-08-12 13:40   ` Kumar Gala
2009-08-12 21:29     ` Benjamin Herrenschmidt
2009-08-13  8:59       ` Li Yang-R58472
2009-08-14  9:29         ` Benjamin Herrenschmidt
2009-08-14 11:29           ` Guennadi Liakhovetski [this message]
2009-08-14 12:07             ` Benjamin Herrenschmidt
2009-08-15 12:43               ` Russell King
2009-08-15 22:18                 ` Benjamin Herrenschmidt
2009-08-16  5:09                   ` Grant Likely
2009-08-12 12:35 ` Mark Brown
2009-08-12 21:34   ` Benjamin Herrenschmidt
2009-08-12 21:44     ` Mark Brown
2009-08-12 21:56       ` Benjamin Herrenschmidt
2009-08-12 22:20         ` Mark Brown
2009-08-12 22:32           ` Benjamin Herrenschmidt
2009-08-12 23:00             ` Mark Brown
2009-08-12 23:15               ` Benjamin Herrenschmidt
2009-08-12 22:28         ` Russell King
2009-08-12 22:45           ` Mark Brown
2009-08-12 22:52           ` Benjamin Herrenschmidt
2009-08-12 23:40             ` Russell King
2009-08-12 23:47               ` Benjamin Herrenschmidt
2009-08-13  3:45               ` Benjamin Herrenschmidt

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=Pine.LNX.4.64.0908141255230.5980@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=benh@kernel.crashing.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=john.jacques@lsi.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=torez@us.ibm.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