linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Tero Kristo <t-kristo@ti.com>
Cc: linux-omap@vger.kernel.org, paul@pwsan.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 00/55]: ARM: OMAP2+: PRCM move to drivers
Date: Mon, 31 Mar 2014 15:09:04 -0700	[thread overview]
Message-ID: <20140331220903.GA11328@atomide.com> (raw)
In-Reply-To: <1396278994-12624-1-git-send-email-t-kristo@ti.com>

* 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?

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.

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.

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.

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.

Regards,

Tony

  parent reply	other threads:[~2014-03-31 22:09 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 [this message]
2014-04-01  8:34   ` Tero Kristo
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=20140331220903.GA11328@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=t-kristo@ti.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;
as well as URLs for NNTP newsgroup(s).