linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/21] ARM: ux500: Enable Clock look-up from Device Tree
Date: Tue, 11 Jun 2013 11:01:08 +0100	[thread overview]
Message-ID: <20130611100108.GC9216@laptop> (raw)
In-Reply-To: <CAPDyKFrJumd79hHWJkGWvRKzhoaprPHu=U6HOHXzVL8WyNS6jw@mail.gmail.com>

> > Nice and simple implementation using standard Clk APIs.
> Hi Lee,
> 
> I may be a bit tired, but I am having a bit hard to follow the steps
> taken in this patch set. :-)
> 
> I should of course tell you why:
> 1. You start out by adding DT definitions in the DT files, should that
> not be done as the final step, after the DT support has been added in
> ux500 clk driver?

No, let me tell you why. ;)

a) The DT definitions will be going in via a separate tree, so it
doesn't really matter where they are placed in _this_ patchset. and b)
they will remain completely dormant until they are backed up with
driver bindings, so there is no harm in putting them in first.

> 2. Moreover, I think it would be enough to group the definitions
> patches into one patch or at least significant fewer. Same feeling
> about the patches were you remove the AUXDATA, this would simplify the
> review for me.

It's generally accepted that lots of lines of code split over a
greater number of patches (so long as they are in consistent groups of
functionality) are easier to review and thus have a greater chance of
acceptance. It also makes things like reverting easier and bisecting
more precise (rather than finding a big patch using bisect, then
having to complete a manual mini-bisect to find the offending change.

Arnd provides the maths for calculating the ease of upstreaming a
patch, which he calls 'weight' (NB: this is from memory, it might be a
little off):

(patch_weight * patch_weight) * patch_count = delta_weight

So if we had a 100 lines split over 2 patches, it would be:

(50 * 50) * 2 = 5000

Whereas if we split those lines over 4 patches we would see:

(25 * 25) * 4 = 1000

Thus, by this convention it would (generally) considered to be twice
as difficult to upstream - at least that's the theory. There is a more
extravagant formula for calculating how difficult it would be to
upstream an entire tree of delta if a) all patches were contained on a
single branch compared to b) if patches were split into topic branches.

Something like:

((patch_weight * patch_weight) * patch_count)  *
 (patch_weight * patch_weight) * patch_count)) *
  branch_count = delta_weight

So following on from the example above and placing 100 lines over 2
patches on 1 branch you would get:

(((25 * 25) * 4) * (25 * 25) * 4) * 1 = 6250000

Whereas if you spread the patches over two branches you'd have:

(((25 * 25) * 2) * (25 * 25) * 2) * 2 = 3125000

Obviously the branch number comparison works better with the larger
numbers you'd expect to find in a typical downstream BSP, but you get
the idea.

</tangent> ... whoops, sorry! :)

> 3. The rest will be commented per patch.
> 
> Kind regards
> Ulf Hansson
> 
> >
> >  arch/arm/boot/dts/dbx5x0.dtsi    |   94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> >  arch/arm/boot/dts/snowball.dts   |    3 ++-
> >  arch/arm/mach-ux500/cpu-db8500.c |   36 +--------------------------
> >  drivers/clk/ux500/u8500_clk.c    |  154 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> >  4 files changed, 249 insertions(+), 38 deletions(-)
> >
> >

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2013-06-11 10:01 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 13:42 [PATCH 00/21] ARM: ux500: Enable Clock look-up from Device Tree Lee Jones
2013-06-03 13:42 ` [PATCH 01/21] ARM: ux500: Supply the PRCMU Clock node Lee Jones
2013-06-03 13:42 ` [PATCH 02/21] ARM: ux500: Supply the Ethernet clock lookup to Snowball's DT Lee Jones
2013-06-03 13:42 ` [PATCH 03/21] ARM: ux500: Supply the TWD Timer clock lookup to the DBX500 DT Lee Jones
2013-06-03 13:42 ` [PATCH 04/21] ARM: ux500: Supply the RTC " Lee Jones
2013-06-03 13:42 ` [PATCH 05/21] ARM: ux500: Supply the GPIO clocks " Lee Jones
2013-06-03 13:42 ` [PATCH 06/21] ARM: ux500: Supply the USB clock " Lee Jones
2013-06-03 13:42 ` [PATCH 07/21] ARM: ux500: Supply the DMA " Lee Jones
2013-06-03 13:42 ` [PATCH 08/21] ARM: ux500: Supply the I2C clocks " Lee Jones
2013-06-03 13:54   ` Arnd Bergmann
2013-06-03 14:27     ` Lee Jones
2013-06-03 15:29       ` Arnd Bergmann
2013-06-03 13:42 ` [PATCH 09/21] ARM: ux500: Supply the UART " Lee Jones
2013-06-03 13:50   ` Arnd Bergmann
2013-06-03 13:42 ` [PATCH 10/21] ARM: ux500: Supply the SDI (MMC) " Lee Jones
2013-06-03 13:42 ` [PATCH 11/21] ARM: ux500: Supply the MSP (Audio) " Lee Jones
2013-06-03 13:42 ` [PATCH 12/21] ARM: ux500: Remove AUXDATA relating to GPIO clock-name bindings Lee Jones
2013-06-03 13:42 ` [PATCH 13/21] ARM: ux500: Remove AUXDATA relating to UART " Lee Jones
2013-06-03 13:42 ` [PATCH 14/21] ARM: ux500: Remove AUXDATA relating to SDI (MMC) " Lee Jones
2013-06-03 13:42 ` [PATCH 15/21] ARM: ux500: Remove AUXDATA relating to I2C " Lee Jones
2013-06-03 13:42 ` [PATCH 16/21] ARM: ux500: Remove AUXDATA relating to MSP (Audio) " Lee Jones
2013-06-03 13:42 ` [PATCH 17/21] ARM: ux500: Remove AUXDATA relating to USB " Lee Jones
2013-06-03 13:42 ` [PATCH 18/21] ARM: ux500: Remove AUXDATA relating to Ethernet " Lee Jones
2013-06-03 13:42 ` [PATCH 19/21] ARM: ux500: Remove AUXDATA relating to DMA " Lee Jones
2013-06-03 13:42 ` [PATCH 20/21] ARM: ux500: Reclassify PRCMU AUXDATA entry Lee Jones
2013-06-03 13:42 ` [PATCH 21/21] clk: ux500: Supply provider look-up functionality to support Device Tree Lee Jones
2013-06-03 15:49   ` Arnd Bergmann
2013-06-04 10:57   ` Linus Walleij
2013-06-04 20:52     ` Arnd Bergmann
2013-06-05  8:05       ` Lee Jones
2013-06-11 20:28       ` Mike Turquette
2013-06-12 12:56     ` Grant Likely
2013-06-10 21:05 ` [PATCH 00/21] ARM: ux500: Enable Clock look-up from " Ulf Hansson
2013-06-11 10:01   ` Lee Jones [this message]
2013-06-11 12:07     ` Ulf Hansson

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=20130611100108.GC9216@laptop \
    --to=lee.jones@linaro.org \
    --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;
as well as URLs for NNTP newsgroup(s).