linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* mach header files
@ 2014-04-04  8:19 Phil Edworthy
  2014-04-04 10:29 ` Grant Likely
  0 siblings, 1 reply; 26+ messages in thread
From: Phil Edworthy @ 2014-04-04  8:19 UTC (permalink / raw)
  To: linux-arm-kernel

Resent, hopefully without the automatic corporate signature appended this time...

Hi,

I am porting the kernel to a new device, for which I've created a new arch/arm/mach-... directory, and I also a clock driver that lives under driver/clk. Everything is all working fine, though I am now cleaning up the code and have a question about mach specific header files.

The clock driver is completely specific to this device, but needs to read from a system register (just for external boot mode pins) to determine some PLL settings. This register is in a block of system registers which are also used by the mach code in arch/arm/mach-...

Since the clock driver is specific to the mach, is there any point in specifying the address of this reg in the corresponding dtsi? The format and functionality described by this register would not be the same on any other device.

If I don't specify the address of the register in the dtsi, I think it would be best to have a common header file for all of the system registers. I've seen some drivers, e.g.  exynos-cpufreq.c, doing this by including files from mach-exynos/include/mach. Is that the right way to do this?

Thanks
Phil

^ permalink raw reply	[flat|nested] 26+ messages in thread
* mach header files
@ 2014-04-02 15:11 Phil Edworthy
  2014-04-02 15:16 ` Arnd Bergmann
  2014-04-02 15:20 ` Ben Dooks
  0 siblings, 2 replies; 26+ messages in thread
From: Phil Edworthy @ 2014-04-02 15:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I am porting the kernel to a new device, for which I've created a new arch/arm/mach-... directory, and I also a clock driver that lives under driver/clk. Everything is all working fine, though I am now cleaning up the code and have a question about mach specific header files.

The clock driver is completely specific to this device, but needs to read from a system register (just for external boot mode pins) to determine some PLL settings. This register is in a block of system registers which are also used by the mach code in arch/arm/mach-...

Since the clock driver is specific to the mach, is there any point in specifying the address of this reg in the corresponding dtsi? The format and functionality described by this register would not be the same on any other device.

If I don't specify the address of the register in the dtsi, I think it would be best to have a common header file for all of the system registers. I've seen some drivers, e.g.  exynos-cpufreq.c, doing this by including files from mach-exynos/include/mach. Is that the right way to do this?

Thanks
Phil


This message is intended only for the use of the addressee(s) and may contain confidential and/or legally privileged information. If you are not the intended recipient, you are hereby notified that any dissemination of this email (including any attachments thereto) is strictly prohibited. If you have received this email in error, please notify the sender immediately by telephone or email and permanently destroy the original without making any copy. Please note that any material and advice from this mail is provided free of charge and shall be used as an example for demonstration purposes only.
RENESAS MAKES NO WARRANTIES THAT THE USAGE OF INFORMATION OR ADVICE FROM THIS E-MAIL WILL NOT INFRINGE ANY INTELLECTUAL PROPERTY RIGHTS (E.G. PATENTS, COPYRIGHTS). RENESAS CANNOT GUARANTEE BUG FREE OPERATION AND THE RECIPIENT WILL USE AND/OR DISTRIBUTE IT ONLY AT HIS OWN RISK. IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DAMAGE. The communication with Renesas Electronics Europe Ltd does not amend any written agreement in place.

Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2014-04-08 14:00 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-04  8:19 mach header files Phil Edworthy
2014-04-04 10:29 ` Grant Likely
2014-04-04 12:16   ` Phil Edworthy
2014-04-04 12:22     ` Grant Likely
2014-04-04 13:14       ` Phil Edworthy
2014-04-04 13:20         ` Thomas Petazzoni
2014-04-08 14:00           ` Laurent Pinchart
2014-04-04 13:44         ` Grant Likely
2014-04-04 13:24   ` Arnd Bergmann
2014-04-04 13:32     ` Barry Song
2014-04-04 15:27       ` Arnd Bergmann
2014-04-04 13:52     ` Phil Edworthy
2014-04-04 15:30       ` Arnd Bergmann
2014-04-04 15:42         ` Phil Edworthy
2014-04-04 15:50           ` Arnd Bergmann
2014-04-04 16:02             ` Phil Edworthy
2014-04-04 16:22               ` Russell King - ARM Linux
2014-04-04 16:38                 ` Phil Edworthy
2014-04-04 18:01     ` Kent Borg
2014-04-04 18:49       ` Arnd Bergmann
2014-04-04 19:01         ` Kent Borg
2014-04-04 19:19           ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2014-04-02 15:11 Phil Edworthy
2014-04-02 15:16 ` Arnd Bergmann
2014-04-03  7:48   ` Phil Edworthy
2014-04-02 15:20 ` Ben Dooks

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).