From: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Cc: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Richard Zhao
	<richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [RFC PATCH 0/3] Convert imx6 clock to device tree
Date: Tue, 22 Nov 2011 09:48:53 +0800	[thread overview]
Message-ID: <1321926536-671-1-git-send-email-shawn.guo@linaro.org> (raw)
As I promised to Arnd, I will convert imx6 clock code to common clock
framework and in turn device tree at the earliest time.  Here it is.
It's based on Mike's common-clk pre-v3 and Grant's clock device tree
binding series.
Along with the conversion to device tree, I feel it's a great idea to
introduce '#clock-cells'.  With adopting it, I'm using 70 nodes to
describe 110 clocks (~35% nodes reduced).  However, the current design
of '#clock-cells' makes the user a little difficult.  For example, when
a consumer node references to provider node which is a blob of 4 clocks,
it has to fill 4 parameters into the phandle.
usdhc@02198000 { /* uSDHC3 */
       compatible = "fsl,imx6q-usdhc";
       reg = <0x02198000 0x4000>;
       interrupts = <0 24 0x04>;
       clock-input = <&usdhc_clk 2 0 0 0>; <--
       clock-input-name = "usdhc3";
};
But we actually need to pass only one parameter to point out the index
of the clock in the blob.  It's a little silly to put a number of
meaningless 0 there to fill the length of the phandle parameters.  Can
we rework the dt core code to make the following one work?
usdhc@02198000 { /* uSDHC3 */
       compatible = "fsl,imx6q-usdhc";
       reg = <0x02198000 0x4000>;
       interrupts = <0 24 0x04>;
       clock-input = <&usdhc_clk 2>; <--
       clock-input-name = "usdhc3";
};
Regards,
Shawn
Shawn Guo (3):
      arm/imx6: describe clocks in device tree source
      arm/imx: add a generic clock implementation for imx
      arm/imx6: convert clock to device tree
 .../devicetree/bindings/clock/clock-imx.txt        |  124 ++
 arch/arm/boot/dts/imx6q.dtsi                       |  943 +++++++++-
 arch/arm/mach-imx/Kconfig                          |    5 +
 arch/arm/mach-imx/Makefile                         |    1 +
 arch/arm/mach-imx/clock-imx6q.c                    | 2135 ++++----------------
 arch/arm/mach-imx/clock.c                          |  222 ++
 arch/arm/mach-imx/clock.h                          |   64 +
 7 files changed, 1734 insertions(+), 1760 deletions(-)
next             reply	other threads:[~2011-11-22  1:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22  1:48 Shawn Guo [this message]
     [not found] ` <1321926536-671-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-22  1:48   ` [RFC PATCH 1/3] arm/imx6: describe clocks in device tree source Shawn Guo
     [not found]     ` <1321926536-671-2-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-22  8:56       ` Sascha Hauer
     [not found]         ` <20111122085649.GC27267-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-11-24  4:01           ` Shawn Guo
     [not found]             ` <20111124040128.GC17979-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-11-24  8:17               ` Sascha Hauer
2011-11-22  1:48   ` [RFC PATCH 2/3] arm/imx: add a generic clock implementation for imx Shawn Guo
2011-11-22  8:23   ` [RFC PATCH 0/3] Convert imx6 clock to device tree Sascha Hauer
     [not found]     ` <20111122082314.GB27267-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-11-24  2:59       ` Shawn Guo
     [not found]         ` <20111124025902.GB17979-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-11-24  8:49           ` Sascha Hauer
     [not found]             ` <20111124084923.GW27267-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-11-24 12:21               ` Shawn Guo
2011-11-22  1:48 ` [RFC PATCH 3/3] arm/imx6: convert " Shawn Guo
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=1321926536-671-1-git-send-email-shawn.guo@linaro.org \
    --to=shawn.guo-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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).