* pxa-dt and multiple platforms support
@ 2014-09-27 17:56 Robert Jarzmik
2014-09-27 18:08 ` Daniel Mack
0 siblings, 1 reply; 5+ messages in thread
From: Robert Jarzmik @ 2014-09-27 17:56 UTC (permalink / raw)
To: linux-arm-kernel
Hi Daniel,
When you added support for device-tree for pxa3xx, in commit "ARM: pxa3xx: add
generic DT machine code" (e7749a2) you wrote : "This file can be extended to
also support pxa2xx".
I was wondering is that is really possible with the current pxa status, because
:
- you have to include mach/pxa3xx.h
=> this includes mach/pxa3xx-regs.h
=> this is specific to pxa3xx architecture
If I add pxa27x support into the same file, I'll have to include mach/pxa27x.h
(because the initialization functions are there, same reason as yours for
mach/pxa3xx-regs.h).
=> this includes mach/pxa2xx-regs.h
=> this is specific to pxa2xx architecture
Of course there will be a lot of defines conflicts, as both platforms share the
same register names ...
So did you have something specific in mind, or should I rename pxa-dt.c into
pxa3xx-dt.c, and create pxa27-dt.c (this last option is my current choice unless
a better ideas emerges) ?
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
* pxa-dt and multiple platforms support
2014-09-27 17:56 pxa-dt and multiple platforms support Robert Jarzmik
@ 2014-09-27 18:08 ` Daniel Mack
2014-09-27 19:29 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Mack @ 2014-09-27 18:08 UTC (permalink / raw)
To: linux-arm-kernel
Hi Robert,
On 09/27/2014 07:56 PM, Robert Jarzmik wrote:
> When you added support for device-tree for pxa3xx, in commit "ARM: pxa3xx: add
> generic DT machine code" (e7749a2) you wrote : "This file can be extended to
> also support pxa2xx".
>
> I was wondering is that is really possible with the current pxa status, because
> :
> - you have to include mach/pxa3xx.h
> => this includes mach/pxa3xx-regs.h
> => this is specific to pxa3xx architecture
>
> If I add pxa27x support into the same file, I'll have to include mach/pxa27x.h
> (because the initialization functions are there, same reason as yours for
> mach/pxa3xx-regs.h).
> => this includes mach/pxa2xx-regs.h
> => this is specific to pxa2xx architecture
>
> Of course there will be a lot of defines conflicts, as both platforms share the
> same register names ...
>
> So did you have something specific in mind, or should I rename pxa-dt.c into
> pxa3xx-dt.c, and create pxa27-dt.c (this last option is my current choice unless
> a better ideas emerges) ?
I think the latter is fine for now. I certainly didn't work on pxa27x DT
bits yet.
Thanks,
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
* pxa-dt and multiple platforms support
2014-09-27 18:08 ` Daniel Mack
@ 2014-09-27 19:29 ` Arnd Bergmann
2014-09-27 19:43 ` Robert Jarzmik
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2014-09-27 19:29 UTC (permalink / raw)
To: linux-arm-kernel
On Saturday 27 September 2014 20:08:51 Daniel Mack wrote:
>
> On 09/27/2014 07:56 PM, Robert Jarzmik wrote:
> > When you added support for device-tree for pxa3xx, in commit "ARM: pxa3xx: add
> > generic DT machine code" (e7749a2) you wrote : "This file can be extended to
> > also support pxa2xx".
> >
> > I was wondering is that is really possible with the current pxa status, because
> > :
> > - you have to include mach/pxa3xx.h
> > => this includes mach/pxa3xx-regs.h
> > => this is specific to pxa3xx architecture
> >
> > If I add pxa27x support into the same file, I'll have to include mach/pxa27x.h
> > (because the initialization functions are there, same reason as yours for
> > mach/pxa3xx-regs.h).
> > => this includes mach/pxa2xx-regs.h
> > => this is specific to pxa2xx architecture
> >
> > Of course there will be a lot of defines conflicts, as both platforms share the
> > same register names ...
> >
> > So did you have something specific in mind, or should I rename pxa-dt.c into
> > pxa3xx-dt.c, and create pxa27-dt.c (this last option is my current choice unless
> > a better ideas emerges) ?
>
> I think the latter is fine for now. I certainly didn't work on pxa27x DT
> bits yet.
I think it should be easy enough to move the function declarations you need out of
mach/pxa3xx.h and mach/pxa27x.h into a file that is shared between the platforms,
and that is included by both. The DT file won't need the register definitions
or a lot of the other things that are provided by mach/pxa3xx.h.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* pxa-dt and multiple platforms support
2014-09-27 19:29 ` Arnd Bergmann
@ 2014-09-27 19:43 ` Robert Jarzmik
2014-09-27 19:56 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Robert Jarzmik @ 2014-09-27 19:43 UTC (permalink / raw)
To: linux-arm-kernel
Arnd Bergmann <arnd@arndb.de> writes:
> I think it should be easy enough to move the function declarations you need out of
> mach/pxa3xx.h and mach/pxa27x.h into a file that is shared between the platforms,
> and that is included by both. The DT file won't need the register definitions
> or a lot of the other things that are provided by mach/pxa3xx.h.
Yes, I had thought of that, and generic.h would be a good candidate.
I have not mentioned it because there is one thing I'm afraid of : should we
discover that any pxa variant initialization requires one register to be
accessed, then the pxa-dt should be split into several pxaXXX-dt.c anyway.
It is not the case AFAIK. I'm pondering the risk against having 2 split apart
files ...
--
Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
* pxa-dt and multiple platforms support
2014-09-27 19:43 ` Robert Jarzmik
@ 2014-09-27 19:56 ` Arnd Bergmann
0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2014-09-27 19:56 UTC (permalink / raw)
To: linux-arm-kernel
On Saturday 27 September 2014 21:43:40 Robert Jarzmik wrote:
> Arnd Bergmann <arnd@arndb.de> writes:
>
> > I think it should be easy enough to move the function declarations you need out of
> > mach/pxa3xx.h and mach/pxa27x.h into a file that is shared between the platforms,
> > and that is included by both. The DT file won't need the register definitions
> > or a lot of the other things that are provided by mach/pxa3xx.h.
>
> Yes, I had thought of that, and generic.h would be a good candidate.
>
> I have not mentioned it because there is one thing I'm afraid of : should we
> discover that any pxa variant initialization requires one register to be
> accessed, then the pxa-dt should be split into several pxaXXX-dt.c anyway.
>
> It is not the case AFAIK. I'm pondering the risk against having 2 split apart
> files ...
The register definitions are total crap and you shouldn't use them for the
DT file anyway. If you get to the point where you have to touch some
registers, I think the right answer would be to have a DT node for the
register block and use of_iomap with a platform specific offset, or
a proper device driver.
It's more likely that you won't actually need this though.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-27 19:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-27 17:56 pxa-dt and multiple platforms support Robert Jarzmik
2014-09-27 18:08 ` Daniel Mack
2014-09-27 19:29 ` Arnd Bergmann
2014-09-27 19:43 ` Robert Jarzmik
2014-09-27 19:56 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox