Skip to contentSkip to conversation

rtc-sa1100 clean up

PATCH Superseded Jett.Zhou 4 participants 7 messages Nov 30, 2011 – Jan 19, 2012

lore
Share & tools
lore

Jett.Zhou

author
#0 lore raw

v3 cover rtc-sa1100 clean up

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(-)
#1 lore raw

v3 cover rtc-sa1100 clean up

Quoted 6 lines · Jett.Zhou

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

Quoted 7 lines

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

author
#2 lore raw

v3 cover rtc-sa1100 clean up

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

Quoted 6 lines · Jett.Zhou

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

Quoted 7 lines

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

#3 lore raw

v3 cover rtc-sa1100 clean up

In reply to Arnd Bergmann
Quoted 22 lines · Arnd Bergmann
Quoted 6 lines · Jett.Zhou

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

Quoted 7 lines

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.

Quoted 4 lines

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

? ? ? ?Arnd

Applied

#4 lore raw

v3 cover rtc-sa1100 clean up

In reply to Jett.Zhou
Quoted 5 lines · Jett.Zhou

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.

#5 lore raw

v3 cover rtc-sa1100 clean up

Quoted 32 lines · Russell King - ARM Linux
Quoted 5 lines · Jett.Zhou

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

Quoted 1 line

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.

#6 lore raw

v3 cover rtc-sa1100 clean up

Quoted 53 lines · Russell King - ARM Linux
Quoted 32 lines · Russell King - ARM Linux
Quoted 5 lines · Jett.Zhou

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

Quoted 1 line

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. */
Quoted 6 lines

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.