linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <me@felipebalbi.com>,
	Scott Ellis <scott@jumpnowtek.com>,
	spi-devel-general@lists.sourceforge.net,
	David Brownell <dbrownell@users.sourceforge.net>,
	Grant Likely <grant.likely@secretlab.ca>,
	Andrew Morton <akpm@linux-foundation.org>,
	Roman Tereshonkov <roman.tereshonkov@nokia.com>,
	linux-omap@vger.kernel.org,
	Aaro Koskinen <Aaro.Koskinen@nokia.com>,
	Kevin Hilman <khilman@deeprootsystems.com>
Subject: Re: [PATCH 2/6 Revised] SPI omap2_mcspi: Add max_clk_div field to mcspi platform config
Date: Mon, 15 Mar 2010 21:16:49 +0200	[thread overview]
Message-ID: <20100315191648.GC25452@gandalf> (raw)
In-Reply-To: <20100315185213.GW2900@atomide.com>

Hi,

On Mon, Mar 15, 2010 at 11:52:13AM -0700, Tony Lindgren wrote:
> Yeah I've been thinking about that too earlier. We could have common
> devices.c with the init code, then dev24xx.c and dev34xx.c et al
> would just call the common init functions with something like this:
> 
> 
> static int __init dev34xx_init(void)
> {
> 	if (!cpu_is_omap34xx())
> 		return -ENODEV;
> 
> 	omap_init_mbox(omap34xx_mbox_resources, omap34xx_mbox_nr_resources);
> 	omap_init_sti(omap34xx_sti_resources, omap34xx_sti_nr_resources);
> 	...	
> 
> 	return 0;
> }
> 
> subsys_initcall(emu_init);
> 
> Of course that needs to be coordinated with the pending hwmod patches.

sure. Exactly what I was thinking :-p

> > personally I think we should have mach-omap3 and mach-omap4 directories
> > but that would be too intrusive IMO.
> 
> I think we can achieve most of that by right naming of the files and
> with hwmod. Having separate directories typically means multiple copies
> of almost the same code.

could be, but we already have separated clk, pm, cpuidle, mux and soon
to become devices. So pretty much the base support is already splitted,
then why not completely avoiding ifdefs also with dma (which today is
full of ifdefs and could be converted to a platform_device also).

-- 
balbi

  reply	other threads:[~2010-03-15 19:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12 15:21 [PATCH 2/6] SPI omap2_mcspi: Add max_clk_div field to mcspi platform config Scott Ellis
2010-03-12 17:21 ` Tony Lindgren
2010-03-14 17:25   ` [PATCH 2/6 Revised] " Scott Ellis
2010-03-15 16:32     ` Tony Lindgren
2010-03-15 18:03       ` Felipe Balbi
2010-03-15 18:52         ` Tony Lindgren
2010-03-15 19:16           ` Felipe Balbi [this message]
2010-03-15 19:29             ` Tony Lindgren
2010-03-15 19:31               ` Felipe Balbi
2010-03-15 20:06                 ` Tony Lindgren
2010-03-15 20:30       ` Scott Ellis
2010-03-15 21:02         ` Tony Lindgren
2010-03-19 19:46           ` Scott Ellis
2010-03-19 20:38             ` Tony Lindgren
2010-05-24 14:26               ` Scott Ellis

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=20100315191648.GC25452@gandalf \
    --to=me@felipebalbi.com \
    --cc=Aaro.Koskinen@nokia.com \
    --cc=akpm@linux-foundation.org \
    --cc=dbrownell@users.sourceforge.net \
    --cc=grant.likely@secretlab.ca \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=roman.tereshonkov@nokia.com \
    --cc=scott@jumpnowtek.com \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=tony@atomide.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).