From: t-kristo@ti•com (Tero Kristo)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 00/55]: ARM: OMAP2+: PRCM move to drivers
Date: Tue, 1 Apr 2014 11:34:43 +0300 [thread overview]
Message-ID: <533A7A23.8020606@ti.com> (raw)
In-Reply-To: <20140331220903.GA11328@atomide.com>
On 04/01/2014 01:09 AM, Tony Lindgren wrote:
> * Tero Kristo <t-kristo@ti•com> [140331 08:20]:
>> Hi,
>>
>> This set is continuation for the work started earlier to cleanup the CM/PRM
>> and attempt to make it a separate driver. This set depends on these
>> two sets:
>>
>> CM/PRM cleanup set:
>> http://marc.info/?l=linux-omap&m=139395000918201&w=2
>>
>> OMAP2 clock DT set:
>> http://comments.gmane.org/gmane.linux.ports.arm.omap/111257
>>
>> This set is pretty huge but the patches can be applied in stages if need be.
>> Anyway, it would be good to get some feedback whether the driver folder
>> locations etc. are good, and whether the effort taken here will be enough
>> to actually move the driver. Clockdomain / powerdomain code can also be
>> moved easily under the drivers/power/omap folder (or someplace else if
>> requested) once this set is in. Also, clockdomain / powerdomain data
>> should be possible to convert to DT format or some sort of firmware
>> blob once this is done.
>
> Good to see this happening :)
>
>> Patch #55 in this set is pretty massive as it moves all the C files at
>> the same time, this should probably be split up as multiple patches.
>
> Maybe try to break this series into few smaller sets of patches?
Yes, this was the idea once getting the initial feedback for the
approach itself. I will post smaller sets (split from this one) once the
CM/PRM cleanup set referenced above gets in.
>
> Then a diffstat with these kind of large patch sets would be nice
> in the cover letter to get some kind of idea what's going on :)
>
> Browsing through the set it seems that all the patches in this
> series moving register defines "to a public location" are bad news.
>
> We don't want to make access to these registers available without
> proper frameworks as that will lead into misuse by various drivers.
> And cleaning up that mess later in is a huge pain.
Currently, only thing that requires access to the register offsets is
basically all the legacy clock data still in the kernel (when can we get
rid of this, I have posted patches for it already?) and also the
clockdomain / powerdomain data. I can work on getting clockdomain +
powerdomain data to DT format if this would be preferred, then we can
remove these data files also. Alternatively I can just move all these
defines to the C files which actually use them.
>
> To avoid that, you can probably do something like this:
>
> 1. Set up the PRCM registers as multiple regmap areas
>
> See for example these commits in linux next how one of the SCM misc
> register areas is now available for drivers as tisyscon defined
> in the .dts files:
>
> 11469e0bb1c5 regulator: add pbias regulator support
> cd042fe5c1f6 ARM: dts: add pbias dt node
>
> So basically we now have drivers/regulators/pbias-regulator.c
> that claims some of the tisyscon registers and implements a
> regulator. Then the MMC driver can just use the standard regulator
> related functions.
>
> It seems that you can set up multiple PRCM register ranges in a
> similar way as regmap ranges and that way partition the PRCM
> register areas to something that's private to individual drivers.
So, basically you are proposing to add a regmap or regmap like API for
the PRCM, which would provide access to a subset of registers only
outside the PRCM driver? Some functions provided by PRCM spawn to
multiple registers (like clocks), and the ranges have holes, and would
require finetuning a register / bit level access map (some registers may
contain functions for several drivers.)
> 2. Have the core PRCM driver(s) claim some of the regmap ranges
>
> Some PRCM features can potentially be implemented using existing
> Linux generic frameworks where possible for clocks, regulators, reset
> drivers etc. That way you can keep the register defines for these
> ranges private to the core PRCM driver(s). Ideally with no need
> to add _any_ custom exported functions here.
There is separate work ongoing for reset driver, and for VC/VP, there
has been some regulator related work. But yes, mostly this approach
should be fine.
> 3. Have the other drivers claim some regmap ranges
>
> The register ranges that are clearly owned by some driver should
> be claimed by those drivers. Then the defines for those registers
> can stay private to that driver. Some drivers that can probably
> own some PRCM ranges are clock drivers and voltage related drivers.
Yeah, this sounds reasonable.
-Tero
next prev parent reply other threads:[~2014-04-01 8:34 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 15:15 [PATCH 00/55]: ARM: OMAP2+: PRCM move to drivers Tero Kristo
2014-03-31 15:15 ` [PATCH 01/55] ARM: OMAP4: CM: use cm_base* in register address calculations Tero Kristo
2014-03-31 15:20 ` Felipe Balbi
2014-03-31 15:15 ` [PATCH 02/55] ARM: OMAP2+: PRCM: cleanup some header includes Tero Kristo
2014-03-31 15:15 ` [PATCH 03/55] ARM: OMAP2+: PRM: remove unnecessary cpu_is_XXX calls from prm_init / exit Tero Kristo
2014-03-31 15:15 ` [PATCH 04/55] ARM: OMAP3/4: PRM: provide io chain reconfig function through irq setup Tero Kristo
2014-03-31 15:15 ` [PATCH 05/55] ARM: OMAP3/OMAP4: PRM: add prm_features flags and add IO wakeup under it Tero Kristo
2014-03-31 15:15 ` [PATCH 06/55] ARM: OMAP3/4: PRM: add support of late_init call to prm_ll_ops Tero Kristo
2014-03-31 15:15 ` [PATCH 07/55] ARM: OMAP3+: PRM: add cpu-type as parameter to prm_init calls Tero Kristo
2014-03-31 15:21 ` Felipe Balbi
2014-03-31 15:15 ` [PATCH 08/55] ARM: DRA7: PRM: add voltage processor check behind a prm_feature flag Tero Kristo
2014-03-31 15:15 ` [PATCH 09/55] ARM: OMAP4+: PRM: add prm_dev_inst offset as a global parameter Tero Kristo
2014-03-31 15:15 ` [PATCH 10/55] ARM: OMAP3+: PRM: get rid of some unnecessary header files Tero Kristo
2014-03-31 15:15 ` [PATCH 11/55] CLK: TI: clockdomain: add support for retrying init Tero Kristo
2014-03-31 15:15 ` [PATCH 12/55] ARM: PRCM: split PRCM module init to their own driver files Tero Kristo
2014-03-31 15:15 ` [PATCH 13/55] ARM: OMAP4: PRCM: remove references to cm-regbits-44xx.h from PRCM core files Tero Kristo
2014-03-31 15:15 ` [PATCH 14/55] ARM: OMAP2: CM: remove references to cm-regbits-24xx.h from CM core code Tero Kristo
2014-03-31 15:15 ` [PATCH 15/55] ARM: AM33xx: CM: remove references to cm-regbits-33xx.h " Tero Kristo
2014-03-31 15:15 ` [PATCH 16/55] ARM: OMAP2: PRM: remove references to prm-regbits-24xx.h from PRM " Tero Kristo
2014-03-31 15:15 ` [PATCH 17/55] ARM: AM33xx: PRM: remove references to prm-regbits-33xx.h " Tero Kristo
2014-03-31 15:15 ` [PATCH 18/55] ARM: OMAP4: PRM: remove references to prm-regbits-44xx.h " Tero Kristo
2014-03-31 15:15 ` [PATCH 19/55] ARM: OMAP3: PRM: remove references to prm-regbits-34xx.h " Tero Kristo
2014-03-31 15:15 ` [PATCH 20/55] ARM: OMAP3+: PRCM: remove references to cm-regbits-34xx.h from PRCM " Tero Kristo
2014-03-31 15:16 ` [PATCH 21/55] ARM: OMAP2+: PRCM: remove references to clock.h " Tero Kristo
2014-03-31 15:16 ` [PATCH 22/55] ARM: OMAP2: CM: move cm2xxx.h header to a public location Tero Kristo
2014-03-31 15:16 ` [PATCH 23/55] ARM: AM33xx: CM: move cm33xx.h " Tero Kristo
2014-03-31 15:16 ` [PATCH 24/55] ARM: OMAP3: CM: move cm3xxx.h header to " Tero Kristo
2014-03-31 15:16 ` [PATCH 25/55] ARM: OMAP4: CM: remove unnecessary cm44xx.h header file Tero Kristo
2014-03-31 15:16 ` [PATCH 26/55] ARM: OMAP3: move cm2xxx_3xxx.h header to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 27/55] ARM: OMAP4+: CM: remove unused cm_44xx_54xx.h header file Tero Kristo
2014-03-31 15:16 ` [PATCH 28/55] ARM: OMAP4: CM: make all omap4_cminst_read/write calls static Tero Kristo
2014-03-31 15:16 ` [PATCH 29/55] ARM: OMAP4: CM: rename cminst44xx.h to cm44xx.h and move it to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 30/55] ARM: OMAP2+: CM: move cm.h header " Tero Kristo
2014-03-31 15:16 ` [PATCH 31/55] ARM: OMAP2: export parts of prm2xxx.h header file Tero Kristo
2014-03-31 15:16 ` [PATCH 32/55] ARM: OMAP2+: PRM: move prm2xxx_3xxx.h to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 33/55] ARM: AM33xx: PRM: move global warm reset implementation to driver Tero Kristo
2014-03-31 15:16 ` [PATCH 34/55] ARM: AM33XX: PRM: move parts of the prm33xx.h header file to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 35/55] ARM: OMAP3: PRM: remove direct register declaration macros Tero Kristo
2014-03-31 15:16 ` [PATCH 36/55] ARM: OMAP3: PRM: move prm3xxx.h header to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 37/55] ARM: OMAP4: PRM: remove direct register declaration macros Tero Kristo
2014-03-31 15:16 ` [PATCH 38/55] ARM: OMAP4: PRM: move parts of prm44xx.h header file to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 39/55] ARM: OMAP5: PRM: remove direct register declaration macros Tero Kristo
2014-03-31 15:16 ` [PATCH 40/55] ARM: OMAP5: PRM: move parts of prm54xx.h header file to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 41/55] ARM: DRA7: PRM: remove direct register declaration macros Tero Kristo
2014-03-31 15:16 ` [PATCH 42/55] ARM: DRA7: PRM: move parts of prm7xx.h header file to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 43/55] ARM: OMAP4: PRM: get rid of prminst44xx.h header file Tero Kristo
2014-03-31 15:16 ` [PATCH 44/55] ARM: OMAP4: PRM: make omap4_prm_read/write_inst_reg calls static Tero Kristo
2014-03-31 15:16 ` [PATCH 45/55] ARM: OMAP4: PRM: move prm44xx_54xx.h header to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 46/55] ARM: OMAP3+: VP: move OMAP*_VP_VDD_*_ID definitions to prm public headers Tero Kristo
2014-03-31 15:16 ` [PATCH 47/55] ARM: OMAP2+: PRM: move prcm-common.h header to public location Tero Kristo
2014-03-31 15:16 ` [PATCH 48/55] ARM: OMAP2+: move prm.h " Tero Kristo
2014-03-31 15:16 ` [PATCH 49/55] ARM: OMAP4: move prcm44xx.h " Tero Kristo
2014-03-31 15:16 ` [PATCH 50/55] ARM: OMAP2+: clockdomain: move clockdomain.h " Tero Kristo
2014-03-31 15:16 ` [PATCH 51/55] ARM: OMAP2+: powerdomain: move powerdomain.h " Tero Kristo
2014-03-31 15:16 ` [PATCH 52/55] ARM: OMAP2+: PRCM: add prcm_base init call for DT boot Tero Kristo
2014-03-31 15:16 ` [PATCH 53/55] ARM: OMAP4: CM: remove unnecessary cm*_44xx.h header files from core code Tero Kristo
2014-03-31 15:16 ` [PATCH 54/55] ARM: OMAP4: PRCM: move prcm_mpu_base definition to a public header Tero Kristo
2014-03-31 16:47 ` [PATCH 00/55]: ARM: OMAP2+: PRCM move to drivers Nishanth Menon
2014-03-31 19:59 ` Nishanth Menon
2014-03-31 21:10 ` Felipe Balbi
2014-03-31 22:09 ` Tony Lindgren
2014-04-01 8:34 ` Tero Kristo [this message]
2014-04-01 17:13 ` Tony Lindgren
2014-04-12 10:21 ` Tero Kristo
2014-04-12 14:52 ` Tony Lindgren
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=533A7A23.8020606@ti.com \
--to=t-kristo@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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