devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "G, Manjunath Kondaiah" <manjugk@ti.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: devicetree-discuss@lists.ozlabs.org, linux-omap@vger.kernel.org,
	ben-linux@fluff.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 3/5] OMAP3: Beagle: Update beagle board file to use DT
Date: Thu, 7 Jul 2011 22:34:08 +0530	[thread overview]
Message-ID: <20110707170408.GB3124@manju-desktop> (raw)
In-Reply-To: <20110706190022.GL4871@ponder.secretlab.ca>

On Wed, Jul 06, 2011 at 01:00:22PM -0600, Grant Likely wrote:
> On Thu, Jun 30, 2011 at 03:07:25PM +0500, G, Manjunath Kondaiah wrote:
> > 
> > The beagle board file is updated to use i2c nodes from device
> > tree data structures.
> > 
> > Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
> > ---
> >  arch/arm/mach-omap2/board-omap3beagle.c |   24 ++++++++++++++++++++----
> >  1 files changed, 20 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> > index 213c4cd..db494aa 100644
> > --- a/arch/arm/mach-omap2/board-omap3beagle.c
> > +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> > @@ -20,6 +20,7 @@
> >  #include <linux/clk.h>
> >  #include <linux/io.h>
> >  #include <linux/of_platform.h>
> > +#include <linux/of_address.h>
> >  #include <linux/leds.h>
> >  #include <linux/gpio.h>
> >  #include <linux/input.h>
> > @@ -33,6 +34,7 @@
> >  
> >  #include <linux/regulator/machine.h>
> >  #include <linux/i2c/twl.h>
> > +#include <linux/irq.h>
> >  
> >  #include <mach/hardware.h>
> >  #include <asm/mach-types.h>
> > @@ -421,8 +423,8 @@ static int __init omap3_beagle_i2c_init(void)
> >  	omap3_pmic_init("twl4030", &beagle_twldata);
> >  	/* Bus 3 is attached to the DVI port where devices like the pico DLP
> >  	 * projector don't work reliably with 400kHz */
> > +#if !defined(CONFIG_OF)
> >  	omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom));
> > -#ifdef CONFIG_OF
> >  	omap_register_i2c_bus(2, 100, NULL, 0);
> >  #endif /* CONFIG_OF */
> >  	return 0;
> > @@ -565,11 +567,24 @@ static void __init beagle_opp_init(void)
> >  	return;
> >  }
> >  
> > +static struct of_device_id omap_dt_gic_match[] __initdata = {
> > +	{ .compatible = "ti,omap-gic", },
> > +	{}
> > +};
> > +
> > +static struct of_device_id omap_dt_match_table[] __initdata = {
> > +	{ .compatible = "ti,omap3-beagle", },
> > +	{}
> > +};
> > +
> >  static void __init omap3_beagle_init(void)
> >  {
> > -#ifdef CONFIG_OF
> > -	of_platform_prepare(NULL, NULL);
> > -#endif /* CONFIG_OF */
> > +	struct device_node *node;
> > +
> > +	node = of_find_matching_node_by_address(NULL, omap_dt_gic_match,
> > +						OMAP34XX_IC_BASE);
> > +	if (node)
> > +		irq_domain_add_simple(node, 0);
> >  
> >  	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
> >  	omap3_beagle_init_rev();
> > @@ -597,6 +612,7 @@ static void __init omap3_beagle_init(void)
> >  
> >  	beagle_display_init();
> >  	beagle_opp_init();
> > +	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
> 
> This is probably a loosing approach.  Until the DT stuff is stable on
> omap, you should avoid doing anything that might break existing board
> ports.  Instead, I recommend creating an board-omap3-dt.c board file,
> and pull in only the static beagle device registrations that you need
> to get up and running, then you can pull them back out as the beagle
> DT board support matures.
yes. that is the plan. I have mentioned the same in PATCH 0/5

-Manjunath

  reply	other threads:[~2011-07-07 17:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30 10:07 [RFC PATCH 0/5] OMAP: I2C: Add device tree support G, Manjunath Kondaiah
2011-06-30 10:07 ` [RFC PATCH 1/5] OMAP3:I2C: Add device tree nodes for beagle board G, Manjunath Kondaiah
2011-06-30 14:27   ` Tony Lindgren
2011-07-06 18:49     ` Grant Likely
2011-07-06 18:55   ` Grant Likely
2011-07-06 23:26     ` Stephen Warren
     [not found]       ` <74CDBE0F657A3D45AFBB94109FB122FF049E21C203-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-07-07  0:12         ` Grant Likely
     [not found]           ` <CACxGe6u8qq7FA7kFXbU5uCk6m_GA8GWLqsdjFCXN+NMJfFKxmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-20 11:04             ` Shawn Guo
     [not found]               ` <20110720110419.GA6999-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-07-20 18:55                 ` Grant Likely
     [not found]                   ` <20110720185513.GI4642-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-07-20 22:33                     ` Shawn Guo
     [not found]                       ` <20110720223348.GH6999-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-07-20 23:14                         ` Grant Likely
2011-06-30 10:07 ` [RFC PATCH 2/5] OMAP4:I2C: Add device tree nodes for panda board G, Manjunath Kondaiah
2011-07-06 18:57   ` Grant Likely
2011-07-07 16:59     ` G, Manjunath Kondaiah
2011-06-30 10:07 ` [RFC PATCH 3/5] OMAP3: Beagle: Update beagle board file to use DT G, Manjunath Kondaiah
2011-07-06 19:00   ` Grant Likely
2011-07-07 17:04     ` G, Manjunath Kondaiah [this message]
2011-06-30 10:07 ` [RFC PATCH 4/5] OMAP4: Panda: Update panda " G, Manjunath Kondaiah
2011-07-06 19:01   ` Grant Likely
2011-06-30 10:07 ` [RFC PATCH 5/5] OMAP: I2C: Convert I2C driver to use device tree G, Manjunath Kondaiah
2011-07-06 19:08   ` Grant Likely
2011-07-07 17:13     ` G, Manjunath Kondaiah
2011-07-07 18:28       ` Grant Likely

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=20110707170408.GB3124@manju-desktop \
    --to=manjugk@ti.com \
    --cc=ben-linux@fluff.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.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).