All of lore.kernel.org
 help / color / mirror / Atom feed
* [V3 0/6] rtc-sa1100 clean up
@ 2011-11-30  4:26 Jett.Zhou
       [not found] ` <1322627186-32345-7-git-send-email-jtzhou@marvell.com>
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jett.Zhou @ 2011-11-30  4:26 UTC (permalink / raw)
  To: linux-arm-kernel

This patch set do the following things:
  1) clean up sa1100-rtc for support sa1100/pxa/mmp series
  2) add dummy clock for pxa arch
  3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
  4) fix build error for sa1100 arch

Jett.Zhou (6):
  RTC: sa1100: Clean out ost register
  RTC: sa1100: remove redundant code of setting alarm
  RTC: sa1100: support sa1100, pxa and mmp soc families
  ARM: pxa: add dummy clock for sa1100-rtc
  ARM: sa1100: clean up of the clock support
  ARM: sa1100: fix build error

 arch/arm/Kconfig                   |    2 +-
 arch/arm/mach-pxa/devices.c        |   20 +++
 arch/arm/mach-pxa/pxa25x.c         |    1 +
 arch/arm/mach-pxa/pxa27x.c         |    1 +
 arch/arm/mach-pxa/pxa300.c         |    1 +
 arch/arm/mach-pxa/pxa320.c         |    1 +
 arch/arm/mach-pxa/pxa3xx.c         |    1 +
 arch/arm/mach-pxa/pxa95x.c         |    1 +
 arch/arm/mach-sa1100/Makefile.boot |    4 +-
 arch/arm/mach-sa1100/clock.c       |   91 ++++++++---
 arch/arm/mach-sa1100/generic.c     |   20 +++
 drivers/rtc/Kconfig                |    2 +-
 drivers/rtc/rtc-sa1100.c           |  300 ++++++++++++++++++++++--------------
 13 files changed, 299 insertions(+), 146 deletions(-)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 6/6] ARM: sa1100: fix build error
       [not found] ` <1322627186-32345-7-git-send-email-jtzhou@marvell.com>
@ 2011-11-30  4:37   ` Haojian Zhuang
  0 siblings, 0 replies; 13+ messages in thread
From: Haojian Zhuang @ 2011-11-30  4:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 30, 2011 at 12:26 PM, Jett.Zhou <jtzhou@marvell.com> wrote:
> arm-eabi-4.4.3-ld:--defsym zreladdr=: syntax error
> make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
> make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
> make: *** [uImage] Error 2
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
> Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
> ---
> ?arch/arm/mach-sa1100/Makefile.boot | ? ?4 ++--
> ?1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-sa1100/Makefile.boot b/arch/arm/mach-sa1100/Makefile.boot
> index 5a616f6..f7951aa 100644
> --- a/arch/arm/mach-sa1100/Makefile.boot
> +++ b/arch/arm/mach-sa1100/Makefile.boot
> @@ -1,5 +1,5 @@
> -ifeq ($(CONFIG_ARCH_SA1100),y)
> - ? zreladdr-$(CONFIG_SA1111) ? ? ? ? ? += 0xc0208000
> +ifeq ($(CONFIG_SA1111),y)
> + ? zreladdr-y ?+= 0xc0208000
> ?else
> ? ?zreladdr-y ?+= 0xc0008000
> ?endif
> --
> 1.7.0.4
>

Loop Russell

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 5/6] ARM: sa1100: clean up of the clock support
       [not found] ` <1322627186-32345-6-git-send-email-jtzhou@marvell.com>
@ 2011-11-30  4:38   ` Haojian Zhuang
  0 siblings, 0 replies; 13+ messages in thread
From: Haojian Zhuang @ 2011-11-30  4:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 30, 2011 at 12:26 PM, Jett.Zhou <jtzhou@marvell.com> wrote:
> Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
> ---
> ?arch/arm/Kconfig ? ? ? ? ? ? | ? ?2 +-
> ?arch/arm/mach-sa1100/clock.c | ? 91 ++++++++++++++++++++++++++++++-----------
> ?2 files changed, 67 insertions(+), 26 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index fe6b052..aabc3a6 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -737,7 +737,7 @@ config ARCH_SA1100
> ? ? ? ?select ARCH_HAS_CPUFREQ
> ? ? ? ?select CPU_FREQ
> ? ? ? ?select GENERIC_CLOCKEVENTS
> - ? ? ? select HAVE_CLK
> + ? ? ? select CLKDEV_LOOKUP
> ? ? ? ?select HAVE_SCHED_CLOCK
> ? ? ? ?select TICK_ONESHOT
> ? ? ? ?select ARCH_REQUIRE_GPIOLIB
> diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
> index dab3c63..d6df9f6 100644
> --- a/arch/arm/mach-sa1100/clock.c
> +++ b/arch/arm/mach-sa1100/clock.c
> @@ -11,17 +11,39 @@
> ?#include <linux/clk.h>
> ?#include <linux/spinlock.h>
> ?#include <linux/mutex.h>
> +#include <linux/io.h>
> +#include <linux/clkdev.h>
>
> ?#include <mach/hardware.h>
>
> -/*
> - * Very simple clock implementation - we only have one clock to deal with.
> - */
> +struct clkops {
> + ? ? ? void ? ? ? ? ? ? ? ? ? ?(*enable)(struct clk *);
> + ? ? ? void ? ? ? ? ? ? ? ? ? ?(*disable)(struct clk *);
> + ? ? ? unsigned long ? ? ? ? ? (*getrate)(struct clk *);
> +};
> +
> ?struct clk {
> + ? ? ? const struct clkops ? ? *ops;
> + ? ? ? unsigned long ? ? ? ? ? rate;
> ? ? ? ?unsigned int ? ? ? ? ? ?enabled;
> ?};
>
> -static void clk_gpio27_enable(void)
> +#define INIT_CLKREG(_clk, _devname, _conname) ? ? ? ? ?\
> + ? ? ? { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
> + ? ? ? ? ? ? ? .clk ? ? ? ? ? ?= _clk, ? ? ? ? ? ? ? ? \
> + ? ? ? ? ? ? ? .dev_id ? ? ? ? = _devname, ? ? ? ? ? ? \
> + ? ? ? ? ? ? ? .con_id ? ? ? ? = _conname, ? ? ? ? ? ? \
> + ? ? ? }
> +
> +#define DEFINE_CLK(_name, _ops, _rate) ? ? ? ? ? ? ? ? \
> +struct clk clk_##_name = { ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
> + ? ? ? ? ? ? ? .ops ? ?= _ops, ? ? ? ? ? ? ? ? ? ? ? ? \
> + ? ? ? ? ? ? ? .rate ? = _rate, ? ? ? ? ? ? ? ? ? ? ? ?\
> + ? ? ? }
> +
> +static DEFINE_SPINLOCK(clocks_lock);
> +
> +static void clk_gpio27_enable(struct clk *clk)
> ?{
> ? ? ? ?/*
> ? ? ? ? * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111:
> @@ -32,38 +54,22 @@ static void clk_gpio27_enable(void)
> ? ? ? ?TUCR = TUCR_3_6864MHz;
> ?}
>
> -static void clk_gpio27_disable(void)
> +static void clk_gpio27_disable(struct clk *clk)
> ?{
> ? ? ? ?TUCR = 0;
> ? ? ? ?GPDR &= ~GPIO_32_768kHz;
> ? ? ? ?GAFR &= ~GPIO_32_768kHz;
> ?}
>
> -static struct clk clk_gpio27;
> -
> -static DEFINE_SPINLOCK(clocks_lock);
> -
> -struct clk *clk_get(struct device *dev, const char *id)
> -{
> - ? ? ? const char *devname = dev_name(dev);
> -
> - ? ? ? return strcmp(devname, "sa1111.0") ? ERR_PTR(-ENOENT) : &clk_gpio27;
> -}
> -EXPORT_SYMBOL(clk_get);
> -
> -void clk_put(struct clk *clk)If you have any concern or questions, let me know.
> -{
> -}
> -EXPORT_SYMBOL(clk_put);
> -
> ?int clk_enable(struct clk *clk)
> ?{
> ? ? ? ?unsigned long flags;
>
> ? ? ? ?spin_lock_irqsave(&clocks_lock, flags);
> ? ? ? ?if (clk->enabled++ == 0)
> - ? ? ? ? ? ? ? clk_gpio27_enable();
> + ? ? ? ? ? ? ? clk->ops->enable(clk);
> ? ? ? ?spin_unlock_irqrestore(&clocks_lock, flags);
> +
> ? ? ? ?return 0;
> ?}
> ?EXPORT_SYMBOL(clk_enable);
> @@ -76,13 +82,48 @@ void clk_disable(struct clk *clk)
>
> ? ? ? ?spin_lock_irqsave(&clocks_lock, flags);
> ? ? ? ?if (--clk->enabled == 0)
> - ? ? ? ? ? ? ? clk_gpio27_disable();
> + ? ? ? ? ? ? ? clk->ops->disable(clk);
> ? ? ? ?spin_unlock_irqrestore(&clocks_lock, flags);
> ?}
> ?EXPORT_SYMBOL(clk_disable);
>
> ?unsigned long clk_get_rate(struct clk *clk)
> ?{
> - ? ? ? return 3686400;
> + ? ? ? unsigned long rate;
> +
> + ? ? ? rate = clk->rate;If you have any concern or questions, let me know.
> + ? ? ? if (clk->ops->getrate)
> + ? ? ? ? ? ? ? rate = clk->ops->getrate(clk);
> +
> + ? ? ? return rate;
> ?}
> ?EXPORT_SYMBOL(clk_get_rate);
> +
> +const struct clkops clk_gpio27_ops = {
> + ? ? ? .enable ? ? ? ? = clk_gpio27_enable,
> + ? ? ? .disable ? ? ? ?= clk_gpio27_disable,
> +};
> +
> +static void clk_dummy_enable(struct clk *clk) { }
> +static void clk_dummy_disable(struct clk *clk) { }
> +
> +const struct clkops clk_dummy_ops = {
> + ? ? ? .enable ? ? ? ? = clk_dummy_enable,
> + ? ? ? .disable ? ? ? ?= clk_dummy_disable,
> +};
> +
> +static DEFINE_CLK(gpio27, &clk_gpio27_ops, 3686400);
> +static DEFINE_CLK(dummy, &clk_dummy_ops, 0);
> +
> +static struct clk_lookup sa11xx_clkregs[] = {
> + ? ? ? INIT_CLKREG(&clk_gpio27, "sa1111.0", NULL),
> + ? ? ? INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL),
> +};
> +
> +static int __init sa11xx_clk_init(void)
> +{
> + ? ? ? clkdev_add_table(sa11xx_clkregs, ARRAY_SIZE(sa11xx_clkregs));
> + ? ? ? return 0;
> +}
> +
> +postcore_initcall(sa11xx_clk_init);
> --
> 1.7.0.4
>

Loop Russell

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
  2011-11-30  4:26 [V3 0/6] rtc-sa1100 clean up Jett.Zhou
       [not found] ` <1322627186-32345-7-git-send-email-jtzhou@marvell.com>
       [not found] ` <1322627186-32345-6-git-send-email-jtzhou@marvell.com>
@ 2011-11-30  4:56 ` Jean-Christophe PLAGNIOL-VILLARD
  2011-11-30  6:37   ` Jett Zhou
  2 siblings, 1 reply; 13+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-11-30  4:56 UTC (permalink / raw)
  To: linux-arm-kernel

I did not receive you patch

can you check please

Best Regards,
J.
On 12:26 Wed 30 Nov     , Jett.Zhou wrote:
> This patch set do the following things:
>   1) clean up sa1100-rtc for support sa1100/pxa/mmp series
>   2) add dummy clock for pxa arch
>   3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
>   4) fix build error for sa1100 arch
> 
> Jett.Zhou (6):
>   RTC: sa1100: Clean out ost register
>   RTC: sa1100: remove redundant code of setting alarm
>   RTC: sa1100: support sa1100, pxa and mmp soc families
>   ARM: pxa: add dummy clock for sa1100-rtc
>   ARM: sa1100: clean up of the clock support
>   ARM: sa1100: fix build error
> 
>  arch/arm/Kconfig                   |    2 +-
>  arch/arm/mach-pxa/devices.c        |   20 +++
>  arch/arm/mach-pxa/pxa25x.c         |    1 +
>  arch/arm/mach-pxa/pxa27x.c         |    1 +
>  arch/arm/mach-pxa/pxa300.c         |    1 +
>  arch/arm/mach-pxa/pxa320.c         |    1 +
>  arch/arm/mach-pxa/pxa3xx.c         |    1 +
>  arch/arm/mach-pxa/pxa95x.c         |    1 +
>  arch/arm/mach-sa1100/Makefile.boot |    4 +-
>  arch/arm/mach-sa1100/clock.c       |   91 ++++++++---
>  arch/arm/mach-sa1100/generic.c     |   20 +++
>  drivers/rtc/Kconfig                |    2 +-
>  drivers/rtc/rtc-sa1100.c           |  300 ++++++++++++++++++++++--------------
>  13 files changed, 299 insertions(+), 146 deletions(-)
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
  2011-11-30  4:56 ` [V3 0/6] rtc-sa1100 clean up Jean-Christophe PLAGNIOL-VILLARD
@ 2011-11-30  6:37   ` Jett Zhou
  0 siblings, 0 replies; 13+ messages in thread
From: Jett Zhou @ 2011-11-30  6:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Jean

Sorry, I made a mistake on your email address, I sent again.

Best Regards
Jett

-----Original Message-----
From: Jean-Christophe PLAGNIOL-VILLARD [mailto:plagnioj at jcrosoft.com] 
Sent: Wednesday, November 30, 2011 12:56 PM
To: Jett Zhou
Cc: obert.jarzmik at free.fr; a.zummo at towertech.it; haojian.zhuang at gmail.com; linux-arm-kernel at lists.infradead.org; rtc-linux at googlegroups.com; plagnioj at jcrosoft.come
Subject: Re: [V3 0/6] rtc-sa1100 clean up

I did not receive you patch

can you check please

Best Regards,
J.
On 12:26 Wed 30 Nov     , Jett.Zhou wrote:
> This patch set do the following things:
>   1) clean up sa1100-rtc for support sa1100/pxa/mmp series
>   2) add dummy clock for pxa arch
>   3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
>   4) fix build error for sa1100 arch
> 
> Jett.Zhou (6):
>   RTC: sa1100: Clean out ost register
>   RTC: sa1100: remove redundant code of setting alarm
>   RTC: sa1100: support sa1100, pxa and mmp soc families
>   ARM: pxa: add dummy clock for sa1100-rtc
>   ARM: sa1100: clean up of the clock support
>   ARM: sa1100: fix build error
> 
>  arch/arm/Kconfig                   |    2 +-
>  arch/arm/mach-pxa/devices.c        |   20 +++
>  arch/arm/mach-pxa/pxa25x.c         |    1 +
>  arch/arm/mach-pxa/pxa27x.c         |    1 +
>  arch/arm/mach-pxa/pxa300.c         |    1 +
>  arch/arm/mach-pxa/pxa320.c         |    1 +
>  arch/arm/mach-pxa/pxa3xx.c         |    1 +
>  arch/arm/mach-pxa/pxa95x.c         |    1 +
>  arch/arm/mach-sa1100/Makefile.boot |    4 +-
>  arch/arm/mach-sa1100/clock.c       |   91 ++++++++---
>  arch/arm/mach-sa1100/generic.c     |   20 +++
>  drivers/rtc/Kconfig                |    2 +-
>  drivers/rtc/rtc-sa1100.c           |  300 ++++++++++++++++++++++--------------
>  13 files changed, 299 insertions(+), 146 deletions(-)
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
  2012-01-19 11:46   ` Russell King - ARM Linux
@ 2012-01-19 12:03     ` Russell King - ARM Linux
  0 siblings, 0 replies; 13+ messages in thread
From: Russell King - ARM Linux @ 2012-01-19 12:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 19, 2012 at 11:46:27AM +0000, Russell King - ARM Linux wrote:
> On Thu, Jan 19, 2012 at 11:39:40AM +0000, Russell King - ARM Linux wrote:
> > On Wed, Nov 30, 2011 at 02:34:03PM +0800, Jett.Zhou wrote:
> > > This patch set do the following things:
> > >   1) clean up sa1100-rtc for support sa1100/pxa/mmp series
> > >   2) add dummy clock for pxa arch
> > >   3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
> > >   4) fix build error for sa1100 arch
> > 
> > Guys,
> > 
> > If you're modifying a driver which is shared across different architectures
> > please try to build it for those different architectures.  It helps to
> > avoid receiving reports like the below:
> > 
> > drivers/rtc/rtc-sa1100.c:42:1: warning: "RCNR" redefined
> > In file included from arch/arm/mach-sa1100/include/mach/hardware.h:73,
> >                  from drivers/rtc/rtc-sa1100.c:35:
> > arch/arm/mach-sa1100/include/mach/SA-1100.h:877:1: warning: this is the location of the previous definition
> > drivers/rtc/rtc-sa1100.c:43:1: warning: "RTAR" redefined
> > arch/arm/mach-sa1100/include/mach/SA-1100.h:876:1: warning: this is the location of the previous definition
> > drivers/rtc/rtc-sa1100.c:44:1: warning: "RTSR" redefined
> > arch/arm/mach-sa1100/include/mach/SA-1100.h:879:1: warning: this is the location of the previous definition
> > drivers/rtc/rtc-sa1100.c:45:1: warning: "RTTR" redefined
> > arch/arm/mach-sa1100/include/mach/SA-1100.h:878:1: warning: this is the location of the previous definition
> > drivers/rtc/rtc-sa1100.c:47:1: warning: "RTSR_HZE" redefined
> > arch/arm/mach-sa1100/include/mach/SA-1100.h:891:1: warning: this is the location of the previous definition
> > drivers/rtc/rtc-sa1100.c:48:1: warning: "RTSR_ALE" redefined
> > arch/arm/mach-sa1100/include/mach/SA-1100.h:890:1: warning: this is the location of the previous definition
> > drivers/rtc/rtc-sa1100.c:49:1: warning: "RTSR_HZ" redefined
> > arch/arm/mach-sa1100/include/mach/SA-1100.h:889:1: warning: this is the location of the previous definition
> > drivers/rtc/rtc-sa1100.c:50:1: warning: "RTSR_AL" redefined
> > arch/arm/mach-sa1100/include/mach/SA-1100.h:888:1: warning: this is the location of the previous definition
> > 
> > Please fix it.
> 
> And what's more, it doesn't even work on sa1100 anymore.  So it's regressed
> during this merge window.
> 
> Ok, this is a total bollocks change - what was added to this file
> was:
> 
> #define RCNR            0x00    /* RTC Count Register */
> #define RTAR            0x04    /* RTC Alarm Register */
> #define RTSR            0x08    /* RTC Status Register */
> #define RTTR            0x0c    /* RTC Timer Trim Register */
> 
> and the SA11x0 definitions are different:
> 
> #define RTAR            __REG(0x90010000)  /* RTC Alarm Reg. */
> #define RCNR            __REG(0x90010004)  /* RTC CouNt Reg. */
> #define RTTR            __REG(0x90010008)  /* RTC Trim Reg. */
> #define RTSR            __REG(0x90010010)  /* RTC Status Reg. */
> 
> Notice the different register positioning in the address space.
> 
> Therefore, this driver restructuring is fatally wrong.  I'm going to
> revert this entire series in my tree so SA11x0 continues to work here,
> whether I send that to Linus depends on how quickly a fix can be
> produced, and whether Alessandro agrees.

Moreover, the previous cleanup patch ("RTC: sa1100: remove redundant
code of setting alarm") wasn't tested without the other patches:

drivers/rtc/rtc-sa1100.c: In function 'sa1100_rtc_set_alarm':
drivers/rtc/rtc-sa1100.c:208: error: 'now' undeclared (first use in this function)
drivers/rtc/rtc-sa1100.c:208: error: (Each undeclared identifier is reported only once
drivers/rtc/rtc-sa1100.c:208: error: for each function it appears in.)
drivers/rtc/rtc-sa1100.c:210: error: incompatible type for argument 3 of 'rtc_next_alarm_time'
drivers/rtc/rtc-sa1100.c:211: error: 'time' undeclared (first use in this function)

so I've had to revert what should've been an independent change as well.

All these reverts are now sitting in my 'fixes' branch, and they are
the minimal set to restore the driver to a working state.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
  2012-01-19 11:39 ` Russell King - ARM Linux
@ 2012-01-19 11:46   ` Russell King - ARM Linux
  2012-01-19 12:03     ` Russell King - ARM Linux
  0 siblings, 1 reply; 13+ messages in thread
From: Russell King - ARM Linux @ 2012-01-19 11:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 19, 2012 at 11:39:40AM +0000, Russell King - ARM Linux wrote:
> On Wed, Nov 30, 2011 at 02:34:03PM +0800, Jett.Zhou wrote:
> > This patch set do the following things:
> >   1) clean up sa1100-rtc for support sa1100/pxa/mmp series
> >   2) add dummy clock for pxa arch
> >   3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
> >   4) fix build error for sa1100 arch
> 
> Guys,
> 
> If you're modifying a driver which is shared across different architectures
> please try to build it for those different architectures.  It helps to
> avoid receiving reports like the below:
> 
> drivers/rtc/rtc-sa1100.c:42:1: warning: "RCNR" redefined
> In file included from arch/arm/mach-sa1100/include/mach/hardware.h:73,
>                  from drivers/rtc/rtc-sa1100.c:35:
> arch/arm/mach-sa1100/include/mach/SA-1100.h:877:1: warning: this is the location of the previous definition
> drivers/rtc/rtc-sa1100.c:43:1: warning: "RTAR" redefined
> arch/arm/mach-sa1100/include/mach/SA-1100.h:876:1: warning: this is the location of the previous definition
> drivers/rtc/rtc-sa1100.c:44:1: warning: "RTSR" redefined
> arch/arm/mach-sa1100/include/mach/SA-1100.h:879:1: warning: this is the location of the previous definition
> drivers/rtc/rtc-sa1100.c:45:1: warning: "RTTR" redefined
> arch/arm/mach-sa1100/include/mach/SA-1100.h:878:1: warning: this is the location of the previous definition
> drivers/rtc/rtc-sa1100.c:47:1: warning: "RTSR_HZE" redefined
> arch/arm/mach-sa1100/include/mach/SA-1100.h:891:1: warning: this is the location of the previous definition
> drivers/rtc/rtc-sa1100.c:48:1: warning: "RTSR_ALE" redefined
> arch/arm/mach-sa1100/include/mach/SA-1100.h:890:1: warning: this is the location of the previous definition
> drivers/rtc/rtc-sa1100.c:49:1: warning: "RTSR_HZ" redefined
> arch/arm/mach-sa1100/include/mach/SA-1100.h:889:1: warning: this is the location of the previous definition
> drivers/rtc/rtc-sa1100.c:50:1: warning: "RTSR_AL" redefined
> arch/arm/mach-sa1100/include/mach/SA-1100.h:888:1: warning: this is the location of the previous definition
> 
> Please fix it.

And what's more, it doesn't even work on sa1100 anymore.  So it's regressed
during this merge window.

Ok, this is a total bollocks change - what was added to this file
was:

#define RCNR            0x00    /* RTC Count Register */
#define RTAR            0x04    /* RTC Alarm Register */
#define RTSR            0x08    /* RTC Status Register */
#define RTTR            0x0c    /* RTC Timer Trim Register */

and the SA11x0 definitions are different:

#define RTAR            __REG(0x90010000)  /* RTC Alarm Reg. */
#define RCNR            __REG(0x90010004)  /* RTC CouNt Reg. */
#define RTTR            __REG(0x90010008)  /* RTC Trim Reg. */
#define RTSR            __REG(0x90010010)  /* RTC Status Reg. */

Notice the different register positioning in the address space.

Therefore, this driver restructuring is fatally wrong.  I'm going to
revert this entire series in my tree so SA11x0 continues to work here,
whether I send that to Linus depends on how quickly a fix can be
produced, and whether Alessandro agrees.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
  2011-11-30  6:34 Jett.Zhou
  2011-11-30 17:45 ` Arnd Bergmann
@ 2012-01-19 11:39 ` Russell King - ARM Linux
  2012-01-19 11:46   ` Russell King - ARM Linux
  1 sibling, 1 reply; 13+ messages in thread
From: Russell King - ARM Linux @ 2012-01-19 11:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 30, 2011 at 02:34:03PM +0800, Jett.Zhou wrote:
> This patch set do the following things:
>   1) clean up sa1100-rtc for support sa1100/pxa/mmp series
>   2) add dummy clock for pxa arch
>   3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
>   4) fix build error for sa1100 arch

Guys,

If you're modifying a driver which is shared across different architectures
please try to build it for those different architectures.  It helps to
avoid receiving reports like the below:

drivers/rtc/rtc-sa1100.c:42:1: warning: "RCNR" redefined
In file included from arch/arm/mach-sa1100/include/mach/hardware.h:73,
                 from drivers/rtc/rtc-sa1100.c:35:
arch/arm/mach-sa1100/include/mach/SA-1100.h:877:1: warning: this is the location of the previous definition
drivers/rtc/rtc-sa1100.c:43:1: warning: "RTAR" redefined
arch/arm/mach-sa1100/include/mach/SA-1100.h:876:1: warning: this is the location of the previous definition
drivers/rtc/rtc-sa1100.c:44:1: warning: "RTSR" redefined
arch/arm/mach-sa1100/include/mach/SA-1100.h:879:1: warning: this is the location of the previous definition
drivers/rtc/rtc-sa1100.c:45:1: warning: "RTTR" redefined
arch/arm/mach-sa1100/include/mach/SA-1100.h:878:1: warning: this is the location of the previous definition
drivers/rtc/rtc-sa1100.c:47:1: warning: "RTSR_HZE" redefined
arch/arm/mach-sa1100/include/mach/SA-1100.h:891:1: warning: this is the location of the previous definition
drivers/rtc/rtc-sa1100.c:48:1: warning: "RTSR_ALE" redefined
arch/arm/mach-sa1100/include/mach/SA-1100.h:890:1: warning: this is the location of the previous definition
drivers/rtc/rtc-sa1100.c:49:1: warning: "RTSR_HZ" redefined
arch/arm/mach-sa1100/include/mach/SA-1100.h:889:1: warning: this is the location of the previous definition
drivers/rtc/rtc-sa1100.c:50:1: warning: "RTSR_AL" redefined
arch/arm/mach-sa1100/include/mach/SA-1100.h:888:1: warning: this is the location of the previous definition

Please fix it.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
  2011-11-30 17:45 ` Arnd Bergmann
  2011-12-01  4:54   ` Jett Zhou
@ 2011-12-08  2:27   ` Haojian Zhuang
  1 sibling, 0 replies; 13+ messages in thread
From: Haojian Zhuang @ 2011-12-08  2:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 1, 2011 at 1:45 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 30 November 2011, Jett.Zhou wrote:
>> This patch set do the following things:
>> ? 1) clean up sa1100-rtc for support sa1100/pxa/mmp series
>> ? 2) add dummy clock for pxa arch
>> ? 3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
>> ? 4) fix build error for sa1100 arch
>>
>> Jett.Zhou (6):
>> ? RTC: sa1100: Clean out ost register
>> ? RTC: sa1100: remove redundant code of setting alarm
>> ? RTC: sa1100: support sa1100, pxa and mmp soc families
>> ? ARM: pxa: add dummy clock for sa1100-rtc
>> ? ARM: sa1100: clean up of the clock support
>> ? ARM: sa1100: fix build error
>
> Looks good to me, but a small note on the submission:
>
> Please always use the --thread option to git-send-email
> (with --no-chain-reply). I think this is now the default
> for recent versions, and it makes it easier to see which
> patches belong together.
>
> The build fix should be submitted separately so it can
> go into 3.2, while the rest ends up in 3.3.
>
> ? ? ? ?Arnd

Applied

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
  2011-11-30 17:45 ` Arnd Bergmann
@ 2011-12-01  4:54   ` Jett Zhou
  2011-12-08  2:27   ` Haojian Zhuang
  1 sibling, 0 replies; 13+ messages in thread
From: Jett Zhou @ 2011-12-01  4:54 UTC (permalink / raw)
  To: linux-arm-kernel

Arnd

Thanks for your reminder. I will pay attention to it later.

Best Regards
Jett

-----Original Message-----
From: Arnd Bergmann [mailto:arnd at arndb.de] 
Sent: Thursday, December 01, 2011 1:45 AM
To: linux-arm-kernel at lists.infradead.org
Cc: Jett Zhou; robert.jarzmik at free.fr; a.zummo at towertech.it; haojian.zhuang at gmail.com; plagnioj at jcrosoft.com; rtc-linux at googlegroups.com
Subject: Re: [V3 0/6] rtc-sa1100 clean up

On Wednesday 30 November 2011, Jett.Zhou wrote:
> This patch set do the following things:
>   1) clean up sa1100-rtc for support sa1100/pxa/mmp series
>   2) add dummy clock for pxa arch
>   3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
>   4) fix build error for sa1100 arch
> 
> Jett.Zhou (6):
>   RTC: sa1100: Clean out ost register
>   RTC: sa1100: remove redundant code of setting alarm
>   RTC: sa1100: support sa1100, pxa and mmp soc families
>   ARM: pxa: add dummy clock for sa1100-rtc
>   ARM: sa1100: clean up of the clock support
>   ARM: sa1100: fix build error

Looks good to me, but a small note on the submission:

Please always use the --thread option to git-send-email
(with --no-chain-reply). I think this is now the default
for recent versions, and it makes it easier to see which
patches belong together.

The build fix should be submitted separately so it can
go into 3.2, while the rest ends up in 3.3.

	Arnd

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
  2011-11-30  6:34 Jett.Zhou
@ 2011-11-30 17:45 ` Arnd Bergmann
  2011-12-01  4:54   ` Jett Zhou
  2011-12-08  2:27   ` Haojian Zhuang
  2012-01-19 11:39 ` Russell King - ARM Linux
  1 sibling, 2 replies; 13+ messages in thread
From: Arnd Bergmann @ 2011-11-30 17:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 30 November 2011, Jett.Zhou wrote:
> This patch set do the following things:
>   1) clean up sa1100-rtc for support sa1100/pxa/mmp series
>   2) add dummy clock for pxa arch
>   3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
>   4) fix build error for sa1100 arch
> 
> Jett.Zhou (6):
>   RTC: sa1100: Clean out ost register
>   RTC: sa1100: remove redundant code of setting alarm
>   RTC: sa1100: support sa1100, pxa and mmp soc families
>   ARM: pxa: add dummy clock for sa1100-rtc
>   ARM: sa1100: clean up of the clock support
>   ARM: sa1100: fix build error

Looks good to me, but a small note on the submission:

Please always use the --thread option to git-send-email
(with --no-chain-reply). I think this is now the default
for recent versions, and it makes it easier to see which
patches belong together.

The build fix should be submitted separately so it can
go into 3.2, while the rest ends up in 3.3.

	Arnd

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
@ 2011-11-30  6:34 Jett.Zhou
  2011-11-30 17:45 ` Arnd Bergmann
  2012-01-19 11:39 ` Russell King - ARM Linux
  0 siblings, 2 replies; 13+ messages in thread
From: Jett.Zhou @ 2011-11-30  6:34 UTC (permalink / raw)
  To: linux-arm-kernel

This patch set do the following things:
  1) clean up sa1100-rtc for support sa1100/pxa/mmp series
  2) add dummy clock for pxa arch
  3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
  4) fix build error for sa1100 arch

Jett.Zhou (6):
  RTC: sa1100: Clean out ost register
  RTC: sa1100: remove redundant code of setting alarm
  RTC: sa1100: support sa1100, pxa and mmp soc families
  ARM: pxa: add dummy clock for sa1100-rtc
  ARM: sa1100: clean up of the clock support
  ARM: sa1100: fix build error

 arch/arm/Kconfig                   |    2 +-
 arch/arm/mach-pxa/devices.c        |   20 +++
 arch/arm/mach-pxa/pxa25x.c         |    1 +
 arch/arm/mach-pxa/pxa27x.c         |    1 +
 arch/arm/mach-pxa/pxa300.c         |    1 +
 arch/arm/mach-pxa/pxa320.c         |    1 +
 arch/arm/mach-pxa/pxa3xx.c         |    1 +
 arch/arm/mach-pxa/pxa95x.c         |    1 +
 arch/arm/mach-sa1100/Makefile.boot |    4 +-
 arch/arm/mach-sa1100/clock.c       |   91 ++++++++---
 arch/arm/mach-sa1100/generic.c     |   20 +++
 drivers/rtc/Kconfig                |    2 +-
 drivers/rtc/rtc-sa1100.c           |  300 ++++++++++++++++++++++--------------
 13 files changed, 299 insertions(+), 146 deletions(-)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [V3 0/6] rtc-sa1100 clean up
@ 2011-11-30  6:26 Jett.Zhou
  0 siblings, 0 replies; 13+ messages in thread
From: Jett.Zhou @ 2011-11-30  6:26 UTC (permalink / raw)
  To: linux-arm-kernel

This patch set do the following things:
  1) clean up sa1100-rtc for support sa1100/pxa/mmp series
  2) add dummy clock for pxa arch
  3) clean up clock dev for sa1100 arch and add dummy clock for sa1100
  4) fix build error for sa1100 arch

Jett.Zhou (6):
  RTC: sa1100: Clean out ost register
  RTC: sa1100: remove redundant code of setting alarm
  RTC: sa1100: support sa1100, pxa and mmp soc families
  ARM: pxa: add dummy clock for sa1100-rtc
  ARM: sa1100: clean up of the clock support
  ARM: sa1100: fix build error

 arch/arm/Kconfig                   |    2 +-
 arch/arm/mach-pxa/devices.c        |   20 +++
 arch/arm/mach-pxa/pxa25x.c         |    1 +
 arch/arm/mach-pxa/pxa27x.c         |    1 +
 arch/arm/mach-pxa/pxa300.c         |    1 +
 arch/arm/mach-pxa/pxa320.c         |    1 +
 arch/arm/mach-pxa/pxa3xx.c         |    1 +
 arch/arm/mach-pxa/pxa95x.c         |    1 +
 arch/arm/mach-sa1100/Makefile.boot |    4 +-
 arch/arm/mach-sa1100/clock.c       |   91 ++++++++---
 arch/arm/mach-sa1100/generic.c     |   20 +++
 drivers/rtc/Kconfig                |    2 +-
 drivers/rtc/rtc-sa1100.c           |  300 ++++++++++++++++++++++--------------
 13 files changed, 299 insertions(+), 146 deletions(-)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-01-19 12:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-30  4:26 [V3 0/6] rtc-sa1100 clean up Jett.Zhou
     [not found] ` <1322627186-32345-7-git-send-email-jtzhou@marvell.com>
2011-11-30  4:37   ` [V3 6/6] ARM: sa1100: fix build error Haojian Zhuang
     [not found] ` <1322627186-32345-6-git-send-email-jtzhou@marvell.com>
2011-11-30  4:38   ` [V3 5/6] ARM: sa1100: clean up of the clock support Haojian Zhuang
2011-11-30  4:56 ` [V3 0/6] rtc-sa1100 clean up Jean-Christophe PLAGNIOL-VILLARD
2011-11-30  6:37   ` Jett Zhou
2011-11-30  6:26 Jett.Zhou
2011-11-30  6:34 Jett.Zhou
2011-11-30 17:45 ` Arnd Bergmann
2011-12-01  4:54   ` Jett Zhou
2011-12-08  2:27   ` Haojian Zhuang
2012-01-19 11:39 ` Russell King - ARM Linux
2012-01-19 11:46   ` Russell King - ARM Linux
2012-01-19 12:03     ` Russell King - ARM Linux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.