From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: PXA 2xx devictree port and clock infrastructure
Date: Tue, 27 May 2014 16:43:03 +0100 [thread overview]
Message-ID: <20140527154303.GA6835@leverpostej> (raw)
In-Reply-To: <201405271717.48783.arnd@arndb.de>
On Tue, May 27, 2014 at 04:17:48PM +0100, Arnd Bergmann wrote:
> On Tuesday 27 May 2014, Robert Jarzmik wrote:
> > I'm playing with devicetree to port the mioa701 machine code to devicetree (or
> > rather to eliminate the mioa701 machine code).
> >
> > While porting the pxa2xx device drivers, I came to a question about the clock
> > infrastructure, and I'd need a bit of guidance.
> >
> > Many drivers, in their probe code are doing something like :
> > 1) regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > 2) irq = platform_get_irq(pdev, 0);
> > 3) clk = clk_get(&pdev->dev, NULL);
> >
> > Points 1 and 2 are straightforward with DT. Point 3 is not so obvious to me.
> >
> > As there is no platform data anymore, the clock infrastructure wants to match
> > the OF device (in my case udc at 40600000) with the registered
> > clocks. Unfortunately, the registered clock is named "pxa27x-udc", which works
> > well in "platform data" devices, but not in devicetree populated devices.
> >
> > Therefore, I'd like to know what to do, and an example in another platform would
> > be great. Should I create a clkdev driver in drivers/clk, or is there another
> > ... faster way ? And Daniel, you probably solved it already for
> > arch/arm/mach-pxa/pxa-dt.c, didn't you ?
>
> There are generally three ways of doing this:
>
> a) use an auxdata table to reassign the device names to what they
> used to be
> b) change the clkdev lookup to also include the new names (e.g. "40600000.udc")
> c) write a DT-aware clock driver and list all clocks in DT
Out of these, c would be my preferred solution. It would match the
solutions for problems 1 and 2, and it's almost inevitable that later
we'll want DT clocks anyway...
Cheers,
Mark.
next prev parent reply other threads:[~2014-05-27 15:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 13:02 PXA 2xx devictree port and clock infrastructure Robert Jarzmik
2014-05-27 15:17 ` Arnd Bergmann
2014-05-27 15:43 ` Mark Rutland [this message]
2014-05-27 15:49 ` Arnd Bergmann
2014-05-27 23:20 ` Robert Jarzmik
2014-05-28 1:05 ` Mike Turquette
2014-06-05 3:01 ` Andrew Ruder
2014-06-07 18:49 ` Robert Jarzmik
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=20140527154303.GA6835@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.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