public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.arm.linux.org.uk, linux-omap@vger.kernel.org
Subject: Re: [PATCH 3/17] ARM: OMAP2: Add common register access for 24xx and 34xx
Date: Wed, 9 Apr 2008 20:50:06 +0000	[thread overview]
Message-ID: <20080409205005.GL31071@atomide.com> (raw)
In-Reply-To: <20080407162049.GF5306@flint.arm.linux.org.uk>

Hi,

Thanks for looking through this big set, I'll repost the series
with your comments fixed.

Few comments below on what was changed.

* Russell King - ARM Linux <linux@arm.linux.org.uk> [080407 16:21]:
> On Tue, Mar 18, 2008 at 04:02:01PM +0200, Tony Lindgren wrote:
> > diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h
> > new file mode 100644
> > index 0000000..f575a87
> > --- /dev/null
> > +++ b/arch/arm/mach-omap2/cm.h
> > @@ -0,0 +1,142 @@
> > +
> > +#ifndef __ASSEMBLER__
> > +/* Clock management global register get/set */
> > +
> > +static void __attribute__((unused)) cm_write_reg(u32 val, void __iomem *addr)
> > +{
> > +	pr_debug("cm_write_reg: writing 0x%0x to 0x%0x\n", val, (u32)addr);
> > +
> > +	__raw_writel(val, addr);
> > +}
> > +
> > +static u32 __attribute__((unused)) cm_read_reg(void __iomem *addr)
> > +{
> > +	return __raw_readl(addr);
> > +}
> > +#endif
> 
> Erm, code in a header file?  Make them __inline__ or if you really want
> to have them as separate functions, put them in a .c file.
> 
> Next point - what's the purpose of them.  They're doing nothing (apart
> from that excess debug statement).

I've made them __inline__ and removed extra debug stuff from these
functions.


> > +#ifndef __ASSEMBLER__
> > +static void __attribute__((unused)) cm_write_mod_reg(u32 val, s16 module,
> > +							s16 idx)
> > +{
> > +	cm_write_reg(val, OMAP_CM_REGADDR(module, idx));
> > +}
> > +
> > +static u32 __attribute__((unused)) cm_read_mod_reg(s16 module, s16 idx)
> > +{
> > +	return cm_read_reg(OMAP_CM_REGADDR(module, idx));
> > +}
> > +#endif
> 
> Ditto.
> 
> > diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
> > index 90f5305..01ab3bc 100644
> > --- a/arch/arm/mach-omap2/prcm.c
> > +++ b/arch/arm/mach-omap2/prcm.c
> > @@ -16,6 +16,7 @@
> >  #include <linux/module.h>
> >  #include <linux/init.h>
> >  #include <linux/clk.h>
> > +#include <linux/io.h>
> 
> Always suspicious of changes which just _add_ includes.  Is this actually
> needed?  Did it build before?

I've moved this to a later patch that needs it.


> > diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h
> > new file mode 100644
> > index 0000000..455b060
> > --- /dev/null
> > +++ b/arch/arm/mach-omap2/prm.h
> > @@ -0,0 +1,334 @@
> >..
> > +#ifndef __ASSEMBLER__
> > +
> > +/* Power/reset management global register get/set */
> > +
> > +static void __attribute__((unused)) prm_write_reg(u32 val, void __iomem *addr)
> > +{
> > +	pr_debug("prm_write_reg: writing 0x%0x to 0x%0x\n", val, (u32)addr);
> > +
> > +	__raw_writel(val, addr);
> > +}
> > +
> > +static u32 __attribute__((unused)) prm_read_reg(void __iomem *addr)
> > +{
> > +	return __raw_readl(addr);
> > +}
> > +
> > +#endif
> 
> Yet more code in includes.  And this looks like a pointless abstraction.
> 
> > +#ifndef __ASSEMBLER__
> > +
> > +/* Power/reset management domain register get/set */
> > +
> > +static void __attribute__((unused)) prm_write_mod_reg(u32 val, s16 module, s16 idx)
> > +{
> > +	prm_write_reg(val, OMAP_PRM_REGADDR(module, idx));
> > +}
> > +
> > +static u32 __attribute__((unused)) prm_read_mod_reg(s16 module, s16 idx)
> > +{
> > +	return prm_read_reg(OMAP_PRM_REGADDR(module, idx));
> > +}
> > +
> > +#endif
> 
> And more.
> 
> > diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h
> > new file mode 100644
> > index 0000000..928e1c4
> > --- /dev/null
> > +++ b/arch/arm/mach-omap2/sdrc.h
> >...
> > +#ifndef __ASSEMBLER__
> > +extern unsigned long omap2_sdrc_base;
> > +extern unsigned long omap2_sms_base;
> > +
> > +#define OMAP_SDRC_REGADDR(reg)						\
> > +		(void __iomem *)IO_ADDRESS(omap2_sdrc_base + (reg))
> > +#define OMAP_SMS_REGADDR(reg)						\
> > +		(void __iomem *)IO_ADDRESS(omap2_sms_base + (reg))
> > +
> > +/* SDRC global register get/set */
> > +
> > +static void __attribute__((unused)) sdrc_write_reg(u32 val, u16 reg)
> > +{
> > +	pr_debug("sdrc_write_reg: writing 0x%0x to 0x%0x\n", val,
> > +		 (u32)OMAP_SDRC_REGADDR(reg));
> > +
> > +	__raw_writel(val, OMAP_SDRC_REGADDR(reg));
> > +}
> > +
> > +static u32 __attribute__((unused)) sdrc_read_reg(u16 reg)
> > +{
> > +	return __raw_readl(OMAP_SDRC_REGADDR(reg));
> > +}
> > +
> > +/* SMS global register get/set */
> > +
> > +static void __attribute__((unused)) sms_write_reg(u32 val, u16 reg)
> > +{
> > +	pr_debug("sms_write_reg: writing 0x%0x to 0x%0x\n", val,
> > +		 (u32)OMAP_SMS_REGADDR(reg));
> > +
> > +	__raw_writel(val, OMAP_SMS_REGADDR(reg));
> > +}
> > +
> > +static u32 __attribute__((unused)) sms_read_reg(u16 reg)
> > +{
> > +	return __raw_readl(OMAP_SMS_REGADDR(reg));
> > +}
> 
> And more.
> 
> So that's a NAK.


  reply	other threads:[~2008-04-09 20:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-18 14:01 [PATCH 0/17] omap2 patches for post 2.6.25, take #2 Tony Lindgren
2008-03-18 14:01 ` [PATCH 1/17] ARM: OMAP2: Add new pin multiplexing configurations Tony Lindgren
2008-03-18 14:02   ` [PATCH 2/17] ARM: OMAP2: Clean-up mux code Tony Lindgren
2008-03-18 14:02     ` [PATCH 3/17] ARM: OMAP2: Add common register access for 24xx and 34xx Tony Lindgren
2008-03-18 14:02       ` [PATCH 4/17] ARM: OMAP2: Add register access for 34xx Tony Lindgren
2008-03-18 14:02         ` [PATCH 5/17] ARM: OMAP2: Change 24xx to use new register access Tony Lindgren
2008-03-18 14:02           ` [PATCH 6/17] ARM: OMAP2: Remove old 24xx PM code Tony Lindgren
2008-03-18 14:02             ` [PATCH 7/17] ARM: OMAP2: Move clock.h to clock24xx.h Tony Lindgren
2008-03-18 14:02               ` [PATCH 8/17] ARM: OMAP2: Move clock.c to clock24xx.c Tony Lindgren
2008-03-18 14:02                 ` [PATCH 9/17] ARM: OMAP2: Add common clock framework for 24xx and 34xx Tony Lindgren
2008-03-18 14:02                   ` [PATCH 10/17] ARM: OMAP2: Change 24xx to use shared clock code and new reg access Tony Lindgren
2008-03-18 14:02                     ` [PATCH 11/17] ARM: OMAP: Add rest of 24xx clocks Tony Lindgren
2008-03-18 14:02                       ` [PATCH 12/17] ARM: OMAP2: Remove old 24xx specific clock functions Tony Lindgren
2008-03-18 14:02                         ` [PATCH 13/17] ARM: OMAP2: Clean up 24xx clock code Tony Lindgren
2008-03-18 14:02                           ` [PATCH 14/17] ARM: OMAP2: Remove old PRCM register access code Tony Lindgren
2008-03-18 14:02                             ` [PATCH 15/17] ARM: OMAP2: Add 34xx clocks Tony Lindgren
2008-03-18 14:02                               ` [PATCH 16/17] ARM: OMAP2: Add 34xx clock code Tony Lindgren
2008-03-18 14:02                                 ` [PATCH 17/17] ARM: OMAP2: New DPLL clock framework Tony Lindgren
2008-03-28 12:39                                   ` Tony Lindgren
2008-03-28 12:39                                 ` [PATCH 16/17] ARM: OMAP2: Add 34xx clock code Tony Lindgren
2008-03-28 12:38                     ` [PATCH 10/17] ARM: OMAP2: Change 24xx to use shared clock code and new reg access Tony Lindgren
2008-03-28 12:38                   ` [PATCH 9/17] ARM: OMAP2: Add common clock framework for 24xx and 34xx Tony Lindgren
2008-03-30 18:49                     ` Eduardo Valentin
2008-03-31  7:56                       ` Tony Lindgren
2008-04-07 16:48           ` [PATCH 5/17] ARM: OMAP2: Change 24xx to use new register access Russell King - ARM Linux
2008-04-09 20:57             ` Tony Lindgren
2008-04-09 21:22               ` Russell King - ARM Linux
2008-04-09 21:54                 ` Tony Lindgren
2008-04-09 23:24                   ` Tony Lindgren
2008-03-28 12:37         ` [PATCH 4/17] ARM: OMAP2: Add register access for 34xx Tony Lindgren
2008-03-28 12:36       ` [PATCH 3/17] ARM: OMAP2: Add common register access for 24xx and 34xx Tony Lindgren
2008-04-07 16:20       ` Russell King - ARM Linux
2008-04-09 20:50         ` Tony Lindgren [this message]
2008-04-14 14:05           ` Russell King - ARM Linux
2008-04-14 17:39             ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2008-04-09 21:03 [PATCH 0/17] omap2 patches for post 2.6.25, take #3 Tony Lindgren
2008-04-09 21:03 ` [PATCH 1/17] ARM: OMAP2: Add new pin multiplexing configurations Tony Lindgren
2008-04-09 21:03   ` [PATCH 2/17] ARM: OMAP2: Clean-up mux code Tony Lindgren
2008-04-09 21:03     ` [PATCH 3/17] ARM: OMAP2: Add common register access for 24xx and 34xx Tony Lindgren
2008-04-14 17:36       ` 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=20080409205005.GL31071@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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