public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Uwe Kleine-König" <ukleinek@strlen.de>
Cc: linux-arm-kernel@lists.arm.linux.org.uk,
	linux-omap@vger.kernel.org, Chandra Shekhar <x0044955@ti.com>
Subject: Re: [PATCH 1/3] ARM: OMAP: Allocate McBSP devices dynamically, add 34xx support
Date: Wed, 24 Sep 2008 15:10:01 +0300	[thread overview]
Message-ID: <20080924121001.GP5222@atomide.com> (raw)
In-Reply-To: <20080924115838.GB18700@strlen.de>

* Uwe Kleine-König <ukleinek@strlen.de> [080924 14:58]:
> Hello,
> 
> I wonder if this patch should be further split.
> 
> To my taste this should be at least:
> 
>  - Allocate McBSP devices dynamically,
>  - add 34xx support

Sure, I think it's a bit hard to read too. Will repost split.

> maybe more, see below.
> 
> > diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
> > index afb5789..7de7c69 100644
> > --- a/arch/arm/mach-omap1/mcbsp.c
> > +++ b/arch/arm/mach-omap1/mcbsp.c
> > @@ -103,30 +103,6 @@ static inline void omap_mcbsp_clk_init(struct mcbsp_internal_clk *mclk)
> >  { }
> >  #endif
> >  
> > -static int omap1_mcbsp_check(unsigned int id)
> > -{
> > -	/* REVISIT: Check correctly for number of registered McBSPs */
> > -	if (cpu_is_omap730()) {
> > -		if (id > OMAP_MAX_MCBSP_COUNT - 2) {
> > -		       printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n",
> > -				id + 1);
> > -		       return -ENODEV;
> > -		}
> > -		return 0;
> > -	}
> > -
> > -	if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
> > -		if (id > OMAP_MAX_MCBSP_COUNT - 1) {
> > -			printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n",
> > -				id + 1);
> > -			return -ENODEV;
> > -		}
> > -		return 0;
> > -	}
> > -
> > -	return -ENODEV;
> > -}
> > -
> >  static void omap1_mcbsp_request(unsigned int id)
> >  {
> >  	/*
> > @@ -151,7 +127,6 @@ static void omap1_mcbsp_free(unsigned int id)
> >  }
> >  
> >  static struct omap_mcbsp_ops omap1_mcbsp_ops = {
> > -	.check		= omap1_mcbsp_check,
> Why can this function go away?  IMHO it should either go away in a
> separate commit or be extended to be more general to apply for the 34xx
> case, too.  (Same for omap2_mcbsp_check.)

It also removes omap2_mcbsp_check. There's now:
#define omap_mcbsp_check_valid_id() (id < omap_mcbsp_count)

> > @@ -185,7 +226,7 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
> >  #define OMAP34XX_MCBSP_PDATA_SZ		0
> >  #endif
> >  
> > -int __init omap2_mcbsp_init(void)
> > +static int __init omap2_mcbsp_init(void)
> >  {
> >  	int i;
> >  
> OK, this is trivial, but if you ask me, at least note it in the commit
> message.

Will add.

> > @@ -196,9 +237,18 @@ int __init omap2_mcbsp_init(void)
> >  	}
> >  
> >  	if (cpu_is_omap24xx())
> > +		omap_mcbsp_count = OMAP24XX_MCBSP_PDATA_SZ;
> > +	if (cpu_is_omap34xx())
> > +		omap_mcbsp_count = OMAP34XX_MCBSP_PDATA_SZ;
> > +
> > +	mcbsp_ptr = kzalloc(omap_mcbsp_count * sizeof(struct omap_mcbsp *),
> > +								GFP_KERNEL);
> > +	if (!mcbsp_ptr)
> > +		return -ENOMEM;
> > +
> > +	if (cpu_is_omap24xx())
> >  		omap_mcbsp_register_board_cfg(omap24xx_mcbsp_pdata,
> >  						OMAP24XX_MCBSP_PDATA_SZ);
> > -
> >  	if (cpu_is_omap34xx())
> >  		omap_mcbsp_register_board_cfg(omap34xx_mcbsp_pdata,
> >  						OMAP34XX_MCBSP_PDATA_SZ);
> Hhm, it looks there is already some 34xx support in the file.  Should
> the commit log be more detailed?

Will split into a separate patch.

> (Note, I didn't check the rest of the patch.)

Thanks for looking!

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-09-24 12:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-24  9:52 [PATCH 0/3] Omap McBSP updates from linux-omap tree Tony Lindgren
2008-09-24  9:52 ` [PATCH 1/3] ARM: OMAP: Allocate McBSP devices dynamically, add 34xx support Tony Lindgren
2008-09-24  9:52   ` [PATCH 2/3] ARM: OMAP: Add support for OMAP2430 in McBSP Tony Lindgren
2008-09-24  9:52     ` [PATCH 3/3] ARM: OMAP: Fixes to omap_mcbsp_request function Tony Lindgren
2008-09-24 11:58   ` [PATCH 1/3] ARM: OMAP: Allocate McBSP devices dynamically, add 34xx support Uwe Kleine-König
2008-09-24 12:10     ` Tony Lindgren [this message]
2008-09-24 12:32       ` Tony Lindgren
2008-09-24 11:45 ` [PATCH 0/3] Omap McBSP updates from linux-omap tree Uwe Kleine-König
2008-09-24 12:02   ` Tony Lindgren

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=20080924121001.GP5222@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=ukleinek@strlen.de \
    --cc=x0044955@ti.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