linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dong Aisheng <aisheng.dong@freescale.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Dong Aisheng <b29396@freescale.com>,
	devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, vinod.koul@linux.intel.com,
	s.hauer@pengutronix.de, rob.herring@calxeda.com,
	grant.likely@secretlab.ca, rdunlap@xenotime.net,
	kernel@pengutronix.de, cjb@laptop.org, shawn.guo@freescale.com
Subject: Re: [PATCH v1 1/5] ARM: imx28: add basic dt support
Date: Wed, 14 Mar 2012 14:23:55 +0800	[thread overview]
Message-ID: <20120314062354.GA8494@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <4F5F5B3F.2000303@gmail.com>

On Tue, Mar 13, 2012 at 09:35:43AM -0500, Rob Herring wrote:
> On 03/13/2012 03:47 AM, Dong Aisheng wrote:
> > From: Dong Aisheng <dong.aisheng@linaro.org>
> > 
> > This patch includes basic dt support which can boot via nfs rootfs.
> > 
> > Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/arm/fsl.txt |    4 +
> >  arch/arm/boot/dts/imx28-evk.dts               |   31 +++++++++
> >  arch/arm/boot/dts/imx28.dtsi                  |   88 +++++++++++++++++++++++++
> >  arch/arm/mach-mxs/Kconfig                     |    9 +++
> >  arch/arm/mach-mxs/Makefile                    |    1 +
> >  arch/arm/mach-mxs/imx28-dt.c                  |   67 +++++++++++++++++++
> >  6 files changed, 200 insertions(+), 0 deletions(-)
....
> > +				interrupts = <47>;
> > +			};
> > +		};
> > +	};
> > +
> > +	ahb@80080000 {
> > +		compatible = "simple-bus";
> > +		#address-cells = <1>;
> > +		#size-cells = <1>;
> > +		reg = <0x80080000 0x80000>;
> > +		ranges;
> > +
> > +		fec@800f0000 {
> > +			compatible = "fsl,imx28-fec";
> > +			reg = <0x800f0000 0x4000>;
> 
> This too IIRC.
> 
The size is 16KB/0x4000 in iMX28 spec. :)

> > +			interrupts = <101>;
> > +			status = "disabled";
> > +		};
> > +
> > +		fec@800f4000 {
> > +			compatible = "fsl,imx28-fec";
> > +			reg = <0x800f4000 0x4000>;
> > +			interrupts = <102>;
> > +			status = "disabled";
> > +		};
> > +
> > +	};
> > +};
> > diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
> > index c57f996..6ab66af 100644
> > --- a/arch/arm/mach-mxs/Kconfig
> > +++ b/arch/arm/mach-mxs/Kconfig
> > @@ -17,6 +17,15 @@ config SOC_IMX28
> >  
> >  comment "MXS platforms:"
> >  
> > +config MACH_IMX28_DT
> 
> Perhaps this should be more generic like MACH_MXS_DT to eventually
> support MX23 as well?
> 
I just did like the imx ways.
But yes if we see the need when do imx23 dt support.

> > +	bool "Support i.MX28 platforms from device tree"
> > +	select SOC_IMX28
> > +	select USE_OF
> > +	select MACH_MX28EVK
> 
> This should not be selected here.
> 
Like other imx soc dt board files, the imx28-dt.c may need to use some bits
like pinmux in mx28evk.c board file.

Yes, currently i can remove it since it is using uboot pinmux setting.
But when add other devices support which is not covered in u-boot like flexcan,
i may need to use non-dt board's pinmux setting.
So maybe we can keep it first and remove it when totally not dependent
on non-dt files.

> > + * The code contained herein is licensed under the GNU General Public
> > + * License. You may obtain a copy of the GNU General Public License
> > + * Version 2 or later at the following locations:
> > + *
> > + * http://www.opensource.org/licenses/gpl-license.html
> > + * http://www.gnu.org/copyleft/gpl.html
> > + */
> > +
> > +#include <linux/init.h>
> > +#include <linux/irqdomain.h>
> > +#include <linux/of_irq.h>
> > +#include <linux/of_platform.h>
> > +#include <asm/mach/arch.h>
> > +#include <asm/mach/time.h>
> > +#include <mach/common.h>
> > +#include <mach/mx28.h>
> > +
> > +static const struct of_dev_auxdata imx28_auxdata_lookup[] __initconst = {
> > +	OF_DEV_AUXDATA("arm,pl011", MX28_DUART_BASE_ADDR, "duart", NULL),
> > +	OF_DEV_AUXDATA("fsl,imx28-fec", MX28_ENET_MAC0_BASE_ADDR, "imx28-fec.0", NULL),
> > +	OF_DEV_AUXDATA("fsl,imx28-fec", MX28_ENET_MAC1_BASE_ADDR, "imx28-fec.1", NULL),
> 
> Why do you need the old names?
> 
To keep align with the old clocks.
See arch/arm/mach-mxs/clock-mx28.c:
_REGISTER_CLOCK("imx28-fec.0", NULL, fec_clk)
_REGISTER_CLOCK("imx28-fec.1", NULL, fec_clk)
Is there any better way to avoid this?

> > +	{ /* sentinel */ }
> > +};
> > +
> > +static void __init imx28_init(void)
> > +{
> > +	of_platform_populate(NULL, of_default_bus_match_table,
> > +			     imx28_auxdata_lookup, NULL);
> > +}
> > +
> > +static const struct of_device_id icoll_of_match[] __initconst = {
> > +	{ .compatible = "fsl,imx28-icoll", },
> > +	{},
> > +};
> > +
> > +static void __init imx28_dt_init_irq(void)
> > +{
> > +	irq_domain_generate_simple(icoll_of_match, MX28_ICOLL_BASE_ADDR, 0);
> 
> Please do "proper" domain support for the interrupt controller and use
> of_irq_init.
> 
Ok, i will see it.

For others, will fix them all.
Thanks for the review.

Regards
Dong Aisheng


  parent reply	other threads:[~2012-03-14  6:22 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13  8:47 [PATCH v1 0/5] dt: add basic imx28 support Dong Aisheng
2012-03-13  8:47 ` [PATCH v1 1/5] ARM: imx28: add basic dt support Dong Aisheng
2012-03-13 14:35   ` Rob Herring
2012-03-13 14:59     ` Zach Sadecki
2012-03-13 17:28       ` Grant Likely
2012-03-14  5:38         ` Shawn Guo
2012-03-14  6:23     ` Dong Aisheng [this message]
2012-03-14  6:51       ` Marek Vasut
2012-03-14 13:05       ` Rob Herring
2012-03-15  2:57         ` Dong Aisheng
2012-03-13 17:23   ` Grant Likely
2012-03-14  5:41     ` Shawn Guo
2012-03-14  5:56       ` Marek Vasut
2012-03-14  6:30       ` Dong Aisheng
2012-03-14 12:45     ` Dong Aisheng
2012-03-14 14:16       ` s.hauer
2012-03-15  3:02         ` Dong Aisheng
2012-03-15  6:53           ` Lothar Waßmann
2012-03-15 10:59             ` Dong Aisheng
     [not found]               ` <20120315105927.GE13022-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-03-15 11:22                 ` Lothar Waßmann
2012-03-16  3:01                   ` Dong Aisheng
2012-03-16  7:48                     ` Lothar Waßmann
2012-03-16  8:22                       ` Dong Aisheng
     [not found]                     ` <20120316030134.GA5161-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-03-18 18:47                       ` Grant Likely
2012-03-19  6:54                         ` Lothar Waßmann
     [not found]                           ` <20326.55337.249575.289067-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
2012-03-19 15:06                             ` Grant Likely
2012-03-19 16:49                               ` Lothar Waßmann
     [not found]                                 ` <20327.25470.723875.916422-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
2012-03-19 22:02                                   ` Grant Likely
2012-03-20 12:49                                     ` Dong Aisheng
2012-03-20 13:17                                       ` Lothar Waßmann
2012-03-21 11:06                                         ` Dong Aisheng
2012-03-16  8:49                   ` Shawn Guo
2012-03-15 11:24               ` s.hauer
2012-03-16  3:05                 ` Dong Aisheng
2012-03-14 19:41   ` Sascha Hauer
2012-03-15  3:05     ` Dong Aisheng
2012-03-13  8:47 ` [PATCH v1 2/5] mmc: mxs-mmc: add dt probe support Dong Aisheng
2012-03-13 17:42   ` Grant Likely
2012-03-14  6:42     ` Dong Aisheng
2012-03-14  5:58   ` Marek Vasut
2012-03-14  6:55     ` Dong Aisheng
2012-03-14  7:09       ` Marek Vasut
2012-03-14  7:13         ` s.hauer
2012-03-14  7:26         ` Dong Aisheng
2012-03-14 11:17           ` Marek Vasut
2012-03-14  7:23   ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14  8:09     ` Dong Aisheng
     [not found]       ` <20120314080939.GA1180-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-03-14  8:52         ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-13  8:47 ` [PATCH v1 3/5] ARM: imx28evk: add mmc dt support Dong Aisheng
2012-03-13 14:39   ` Rob Herring
2012-03-13 16:52     ` Sascha Hauer
2012-03-13 17:45       ` Rob Herring
2012-03-14  7:30         ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14  8:20           ` Dong Aisheng
2012-03-14  8:54             ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14  7:28   ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-13  8:47 ` [PATCH v1 4/5] dma: mxs-dma: add dt probe support Dong Aisheng
2012-03-14  7:54   ` Huang Shijie
2012-03-14  8:23     ` Dong Aisheng
2012-03-13  8:47 ` [PATCH v1 5/5] ARM: mxs: add mxs dma dt support Dong Aisheng
2012-03-14  7:58   ` Huang Shijie
2012-03-14  8:30     ` Dong Aisheng
2012-03-14  8:43       ` Huang Shijie
2012-03-14  6:01 ` [PATCH v1 0/5] dt: add basic imx28 support Marek Vasut
2012-03-14  7:34   ` Dong Aisheng

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=20120314062354.GA8494@shlinux2.ap.freescale.net \
    --to=aisheng.dong@freescale.com \
    --cc=b29396@freescale.com \
    --cc=cjb@laptop.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=rob.herring@calxeda.com \
    --cc=robherring2@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@freescale.com \
    --cc=vinod.koul@linux.intel.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).