All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Generic RTC class driver
@ 2009-03-09 13:26 ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier


        Hi Alessandro et al,

This patch series:
  1. Adds the missing module alias to rtc-parisc (which is a bugfix), a=
nd
     performs a few cleanups,
  2. Moves the platform device creation out of rtc-ppc and into arch-sp=
ecific
     code (which is also a bugfix),
  3. Consolidates rtc-parisc and rtc-ppc into rtc-generic (which is a c=
leanup),
  4. Hooks up rtc-generic on m68k (it's been using [sg]et_rtc_time() si=
nce
     ages),
  5. Makes rtc-generic dependent on PARISC, PPC, and M68K (the existing
     [sg]et_rtc_time() users):
       a. without introducing ARCH_HAS_GENERIC_RTC,
       b. with a big fat warning in the Kconfig comment discouraging pe=
ople
          from relaxing the dependencies.
  6. Converts the PS3 RTC support into a separate driver, called rtc-ps=
3
     (as a bonus ;-)

To reduce code churn, the order and number of the actual patches slight=
ly
differs:
  [1] parisc: rtc: get_rtc_time() returns unsigned int
  [2] parisc: rtc: platform_driver_probe() fixups
  [3] parisc: rtc: Add missing module alias
  [4] parisc: rtc: Rename rtc-parisc to rtc-generic
  [5] m68k: Hook up rtc-generic
  [6] powerpc: Hook up rtc-generic, and kill rtc-ppc
  [7] powerpc/ps3: Add rtc-ps3

 a/drivers/rtc/rtc-parisc.c              |   85 -----------------------=
--
 b/arch/m68k/include/asm/rtc.h           |    7 +-
 b/arch/m68k/kernel/time.c               |   18 +++++
 b/arch/parisc/Kconfig                   |    2=20
 b/arch/parisc/kernel/time.c             |    6 -
 b/arch/powerpc/include/asm/ps3.h        |    3=20
 b/arch/powerpc/kernel/time.c            |   16 ++++
 b/arch/powerpc/platforms/ps3/os-area.c  |    2=20
 b/arch/powerpc/platforms/ps3/platform.h |    2=20
 b/arch/powerpc/platforms/ps3/setup.c    |    2=20
 b/arch/powerpc/platforms/ps3/time.c     |   26 +++----
 b/drivers/rtc/Kconfig                   |   10 +--
 b/drivers/rtc/Makefile                  |    2=20
 b/drivers/rtc/rtc-generic.c             |   84 +++++++++++++++++++++++=
++
 b/drivers/rtc/rtc-parisc.c              |    5 -
 b/drivers/rtc/rtc-ps3.c                 |  106 +++++++++++++++++++++++=
++++++++-
 drivers/rtc/Kconfig                     |   22 +++---
 drivers/rtc/Makefile                    |    2=20
 drivers/rtc/rtc-parisc.c                |    6 -
 drivers/rtc/rtc-ppc.c                   |   70 ---------------------
 20 files changed, 271 insertions(+), 205 deletions(-)

These patches are relative to the "rtc-parisc" branch of Kyle's PA-RISC=
 git
repository, which already contains some cleanups for the rtc-parisc dri=
ver by
Dann, which already have been ack'ed by Alessandro:

http://git.kernel.org/?p=3Dlinux/kernel/git/kyle/parisc-2.6.git;a=3Dsho=
rtlog;h=3Drtc-parisc

Paul: Feel free to add your SuperH support.

I suppose the easiest way for this to go in is through Kyle's PA-RISC t=
ree, as
he already has the preceding patches? Can I have your acks, please?

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village =C2=B7 Da Vincilaan 7-D1 =C2=B7 B-1935 Zaventem =C2=
=B7 Belgium

Phone:    +32 (0)2 700 8453
=46ax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 =C2=B7 RPR Brussels
=46ortis =C2=B7 BIC GEBABEBB =C2=B7 IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/7] Generic RTC class driver
@ 2009-03-09 13:26 ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier


        Hi Alessandro et al,

This patch series:
  1. Adds the missing module alias to rtc-parisc (which is a bugfix), and
     performs a few cleanups,
  2. Moves the platform device creation out of rtc-ppc and into arch-specific
     code (which is also a bugfix),
  3. Consolidates rtc-parisc and rtc-ppc into rtc-generic (which is a cleanup),
  4. Hooks up rtc-generic on m68k (it's been using [sg]et_rtc_time() since
     ages),
  5. Makes rtc-generic dependent on PARISC, PPC, and M68K (the existing
     [sg]et_rtc_time() users):
       a. without introducing ARCH_HAS_GENERIC_RTC,
       b. with a big fat warning in the Kconfig comment discouraging people
          from relaxing the dependencies.
  6. Converts the PS3 RTC support into a separate driver, called rtc-ps3
     (as a bonus ;-)

To reduce code churn, the order and number of the actual patches slightly
differs:
  [1] parisc: rtc: get_rtc_time() returns unsigned int
  [2] parisc: rtc: platform_driver_probe() fixups
  [3] parisc: rtc: Add missing module alias
  [4] parisc: rtc: Rename rtc-parisc to rtc-generic
  [5] m68k: Hook up rtc-generic
  [6] powerpc: Hook up rtc-generic, and kill rtc-ppc
  [7] powerpc/ps3: Add rtc-ps3

 a/drivers/rtc/rtc-parisc.c              |   85 -------------------------
 b/arch/m68k/include/asm/rtc.h           |    7 +-
 b/arch/m68k/kernel/time.c               |   18 +++++
 b/arch/parisc/Kconfig                   |    2 
 b/arch/parisc/kernel/time.c             |    6 -
 b/arch/powerpc/include/asm/ps3.h        |    3 
 b/arch/powerpc/kernel/time.c            |   16 ++++
 b/arch/powerpc/platforms/ps3/os-area.c  |    2 
 b/arch/powerpc/platforms/ps3/platform.h |    2 
 b/arch/powerpc/platforms/ps3/setup.c    |    2 
 b/arch/powerpc/platforms/ps3/time.c     |   26 +++----
 b/drivers/rtc/Kconfig                   |   10 +--
 b/drivers/rtc/Makefile                  |    2 
 b/drivers/rtc/rtc-generic.c             |   84 +++++++++++++++++++++++++
 b/drivers/rtc/rtc-parisc.c              |    5 -
 b/drivers/rtc/rtc-ps3.c                 |  106 +++++++++++++++++++++++++++++++-
 drivers/rtc/Kconfig                     |   22 +++---
 drivers/rtc/Makefile                    |    2 
 drivers/rtc/rtc-parisc.c                |    6 -
 drivers/rtc/rtc-ppc.c                   |   70 ---------------------
 20 files changed, 271 insertions(+), 205 deletions(-)

These patches are relative to the "rtc-parisc" branch of Kyle's PA-RISC git
repository, which already contains some cleanups for the rtc-parisc driver by
Dann, which already have been ack'ed by Alessandro:

http://git.kernel.org/?p=linux/kernel/git/kyle/parisc-2.6.git;a=shortlog;h=rtc-parisc

Paul: Feel free to add your SuperH support.

I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
he already has the preceding patches? Can I have your acks, please?

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* [PATCH 0/7] Generic RTC class driver
@ 2009-03-09 13:26 ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier


        Hi Alessandro et al,

This patch series:
  1. Adds the missing module alias to rtc-parisc (which is a bugfix), and
     performs a few cleanups,
  2. Moves the platform device creation out of rtc-ppc and into arch-specific
     code (which is also a bugfix),
  3. Consolidates rtc-parisc and rtc-ppc into rtc-generic (which is a cleanup),
  4. Hooks up rtc-generic on m68k (it's been using [sg]et_rtc_time() since
     ages),
  5. Makes rtc-generic dependent on PARISC, PPC, and M68K (the existing
     [sg]et_rtc_time() users):
       a. without introducing ARCH_HAS_GENERIC_RTC,
       b. with a big fat warning in the Kconfig comment discouraging people
          from relaxing the dependencies.
  6. Converts the PS3 RTC support into a separate driver, called rtc-ps3
     (as a bonus ;-)

To reduce code churn, the order and number of the actual patches slightly
differs:
  [1] parisc: rtc: get_rtc_time() returns unsigned int
  [2] parisc: rtc: platform_driver_probe() fixups
  [3] parisc: rtc: Add missing module alias
  [4] parisc: rtc: Rename rtc-parisc to rtc-generic
  [5] m68k: Hook up rtc-generic
  [6] powerpc: Hook up rtc-generic, and kill rtc-ppc
  [7] powerpc/ps3: Add rtc-ps3

 a/drivers/rtc/rtc-parisc.c              |   85 -------------------------
 b/arch/m68k/include/asm/rtc.h           |    7 +-
 b/arch/m68k/kernel/time.c               |   18 +++++
 b/arch/parisc/Kconfig                   |    2 
 b/arch/parisc/kernel/time.c             |    6 -
 b/arch/powerpc/include/asm/ps3.h        |    3 
 b/arch/powerpc/kernel/time.c            |   16 ++++
 b/arch/powerpc/platforms/ps3/os-area.c  |    2 
 b/arch/powerpc/platforms/ps3/platform.h |    2 
 b/arch/powerpc/platforms/ps3/setup.c    |    2 
 b/arch/powerpc/platforms/ps3/time.c     |   26 +++----
 b/drivers/rtc/Kconfig                   |   10 +--
 b/drivers/rtc/Makefile                  |    2 
 b/drivers/rtc/rtc-generic.c             |   84 +++++++++++++++++++++++++
 b/drivers/rtc/rtc-parisc.c              |    5 -
 b/drivers/rtc/rtc-ps3.c                 |  106 +++++++++++++++++++++++++++++++-
 drivers/rtc/Kconfig                     |   22 +++---
 drivers/rtc/Makefile                    |    2 
 drivers/rtc/rtc-parisc.c                |    6 -
 drivers/rtc/rtc-ppc.c                   |   70 ---------------------
 20 files changed, 271 insertions(+), 205 deletions(-)

These patches are relative to the "rtc-parisc" branch of Kyle's PA-RISC git
repository, which already contains some cleanups for the rtc-parisc driver by
Dann, which already have been ack'ed by Alessandro:

http://git.kernel.org/?p=linux/kernel/git/kyle/parisc-2.6.git;a=shortlog;h=rtc-parisc

Paul: Feel free to add your SuperH support.

I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
he already has the preceding patches? Can I have your acks, please?

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/7] Generic RTC class driver
@ 2009-03-09 13:26 ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, linuxppc-dev,
	Paul Mundt, Dann Frazier


        Hi Alessandro et al,

This patch series:
  1. Adds the missing module alias to rtc-parisc (which is a bugfix), and
     performs a few cleanups,
  2. Moves the platform device creation out of rtc-ppc and into arch-specific
     code (which is also a bugfix),
  3. Consolidates rtc-parisc and rtc-ppc into rtc-generic (which is a cleanup),
  4. Hooks up rtc-generic on m68k (it's been using [sg]et_rtc_time() since
     ages),
  5. Makes rtc-generic dependent on PARISC, PPC, and M68K (the existing
     [sg]et_rtc_time() users):
       a. without introducing ARCH_HAS_GENERIC_RTC,
       b. with a big fat warning in the Kconfig comment discouraging people
          from relaxing the dependencies.
  6. Converts the PS3 RTC support into a separate driver, called rtc-ps3
     (as a bonus ;-)

To reduce code churn, the order and number of the actual patches slightly
differs:
  [1] parisc: rtc: get_rtc_time() returns unsigned int
  [2] parisc: rtc: platform_driver_probe() fixups
  [3] parisc: rtc: Add missing module alias
  [4] parisc: rtc: Rename rtc-parisc to rtc-generic
  [5] m68k: Hook up rtc-generic
  [6] powerpc: Hook up rtc-generic, and kill rtc-ppc
  [7] powerpc/ps3: Add rtc-ps3

 a/drivers/rtc/rtc-parisc.c              |   85 -------------------------
 b/arch/m68k/include/asm/rtc.h           |    7 +-
 b/arch/m68k/kernel/time.c               |   18 +++++
 b/arch/parisc/Kconfig                   |    2 
 b/arch/parisc/kernel/time.c             |    6 -
 b/arch/powerpc/include/asm/ps3.h        |    3 
 b/arch/powerpc/kernel/time.c            |   16 ++++
 b/arch/powerpc/platforms/ps3/os-area.c  |    2 
 b/arch/powerpc/platforms/ps3/platform.h |    2 
 b/arch/powerpc/platforms/ps3/setup.c    |    2 
 b/arch/powerpc/platforms/ps3/time.c     |   26 +++----
 b/drivers/rtc/Kconfig                   |   10 +--
 b/drivers/rtc/Makefile                  |    2 
 b/drivers/rtc/rtc-generic.c             |   84 +++++++++++++++++++++++++
 b/drivers/rtc/rtc-parisc.c              |    5 -
 b/drivers/rtc/rtc-ps3.c                 |  106 +++++++++++++++++++++++++++++++-
 drivers/rtc/Kconfig                     |   22 +++---
 drivers/rtc/Makefile                    |    2 
 drivers/rtc/rtc-parisc.c                |    6 -
 drivers/rtc/rtc-ppc.c                   |   70 ---------------------
 20 files changed, 271 insertions(+), 205 deletions(-)

These patches are relative to the "rtc-parisc" branch of Kyle's PA-RISC git
repository, which already contains some cleanups for the rtc-parisc driver by
Dann, which already have been ack'ed by Alessandro:

http://git.kernel.org/?p=linux/kernel/git/kyle/parisc-2.6.git;a=shortlog;h=rtc-parisc

Paul: Feel free to add your SuperH support.

I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
he already has the preceding patches? Can I have your acks, please?

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* [PATCH 1/7] parisc: rtc: get_rtc_time() returns unsigned int
  2009-03-09 13:26 ` Geert Uytterhoeven
  (?)
@ 2009-03-09 13:26   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 drivers/rtc/rtc-parisc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index b966f56..620b949 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -13,9 +13,7 @@
 
 static int parisc_get_time(struct device *dev, struct rtc_time *tm)
 {
-	unsigned long ret;

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

* [PATCH 1/7] parisc: rtc: get_rtc_time() returns unsigned int
@ 2009-03-09 13:26   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 drivers/rtc/rtc-parisc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index b966f56..620b949 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -13,9 +13,7 @@
 
 static int parisc_get_time(struct device *dev, struct rtc_time *tm)
 {
-	unsigned long ret;
-
-	ret = get_rtc_time(tm);
+	unsigned int ret = get_rtc_time(tm);
 
 	if (ret & RTC_BATT_BAD)
 		return -EOPNOTSUPP;
-- 
1.6.0.4


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

* [PATCH 1/7] parisc: rtc: get_rtc_time() returns unsigned int
@ 2009-03-09 13:26   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, linuxppc-dev,
	Paul Mundt, Geert Uytterhoeven, Dann Frazier

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 drivers/rtc/rtc-parisc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index b966f56..620b949 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -13,9 +13,7 @@
 
 static int parisc_get_time(struct device *dev, struct rtc_time *tm)
 {
-	unsigned long ret;
-
-	ret = get_rtc_time(tm);
+	unsigned int ret = get_rtc_time(tm);
 
 	if (ret & RTC_BATT_BAD)
 		return -EOPNOTSUPP;
-- 
1.6.0.4

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

* [PATCH 2/7] parisc: rtc: platform_driver_probe() fixups
  2009-03-09 13:26   ` Geert Uytterhoeven
@ 2009-03-09 13:26     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven, dann frazier

When using platform_driver_probe(), it's not needed to setup a .probe
function, and .remove should be marked __exit_p(), not __devexit_p().

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: dann frazier <dannf@hp.com>
---
 drivers/rtc/rtc-parisc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index 620b949..f4e871c 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -62,8 +62,7 @@ static struct platform_driver parisc_rtc_driver = {
 		.name = "rtc-parisc",
 		.owner = THIS_MODULE,
 	},
-	.probe = parisc_rtc_probe,
-	.remove = __devexit_p(parisc_rtc_remove),
+	.remove = __exit_p(parisc_rtc_remove),
 };
 
 static int __init parisc_rtc_init(void)
-- 
1.6.0.4


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

* [PATCH 2/7] parisc: rtc: platform_driver_probe() fixups
@ 2009-03-09 13:26     ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, dann frazier,
	linuxppc-dev, Paul Mundt, Geert Uytterhoeven, Dann Frazier

When using platform_driver_probe(), it's not needed to setup a .probe
function, and .remove should be marked __exit_p(), not __devexit_p().

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: dann frazier <dannf@hp.com>
---
 drivers/rtc/rtc-parisc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index 620b949..f4e871c 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -62,8 +62,7 @@ static struct platform_driver parisc_rtc_driver = {
 		.name = "rtc-parisc",
 		.owner = THIS_MODULE,
 	},
-	.probe = parisc_rtc_probe,
-	.remove = __devexit_p(parisc_rtc_remove),
+	.remove = __exit_p(parisc_rtc_remove),
 };
 
 static int __init parisc_rtc_init(void)
-- 
1.6.0.4

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

* [PATCH 3/7] parisc: rtc: Add missing module alias
  2009-03-09 13:26     ` Geert Uytterhoeven
@ 2009-03-09 13:26       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven

Make udev autoload the driver

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 drivers/rtc/rtc-parisc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index f4e871c..48ef5b4 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -81,3 +81,4 @@ module_exit(parisc_rtc_fini);
 MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("HP PA-RISC RTC driver");
+MODULE_ALIAS("platform:rtc-parisc");
-- 
1.6.0.4


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

* [PATCH 3/7] parisc: rtc: Add missing module alias
@ 2009-03-09 13:26       ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, linuxppc-dev,
	Paul Mundt, Geert Uytterhoeven, Dann Frazier

Make udev autoload the driver

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 drivers/rtc/rtc-parisc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index f4e871c..48ef5b4 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -81,3 +81,4 @@ module_exit(parisc_rtc_fini);
 MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("HP PA-RISC RTC driver");
+MODULE_ALIAS("platform:rtc-parisc");
-- 
1.6.0.4

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

* [PATCH 4/7] parisc: rtc: Rename rtc-parisc to rtc-generic
  2009-03-09 13:26       ` Geert Uytterhoeven
@ 2009-03-09 13:26         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven

The rtc-parisc driver is not PA-RISC specific at all, as it uses the existing
(but deprecated) generic RTC infrastructure ([gs]et_rtc_time()).
Rename the driver from rtc-parisc to rtc-generic.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 arch/parisc/Kconfig       |    2 +-
 arch/parisc/kernel/time.c |    6 ++--
 drivers/rtc/Kconfig       |   10 +++--
 drivers/rtc/Makefile      |    2 +-
 drivers/rtc/rtc-generic.c |   84 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/rtc/rtc-parisc.c  |   84 ---------------------------------------------
 6 files changed, 95 insertions(+), 93 deletions(-)
 create mode 100644 drivers/rtc/rtc-generic.c
 delete mode 100644 drivers/rtc/rtc-parisc.c

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index aacf11d..378b649 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -10,7 +10,7 @@ config PARISC
 	select HAVE_IDE
 	select HAVE_OPROFILE
 	select RTC_CLASS
-	select RTC_DRV_PARISC
+	select RTC_DRV_GENERIC
 	select INIT_ALL_POSSIBLE
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index e75cae6..86a99d0 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -216,14 +216,14 @@ void __init start_cpu_itimer(void)
 	per_cpu(cpu_data, cpu).it_value = next_tick;
 }
 
-static struct platform_device rtc_parisc_dev = {
-	.name = "rtc-parisc",
+static struct platform_device rtc_generic_dev = {
+	.name = "rtc-generic",
 	.id = -1,
 };
 
 static int __init rtc_init(void)
 {
-	if (platform_device_register(&rtc_parisc_dev) < 0)
+	if (platform_device_register(&rtc_generic_dev) < 0)
 		printk(KERN_ERR "unable to register rtc device...\n");
 
 	/* not necessarily an error */
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 81450fb..d0aeff2 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -677,12 +677,14 @@ config RTC_DRV_RS5C313
 	help
 	  If you say yes here you get support for the Ricoh RS5C313 RTC chips.
 
-config RTC_DRV_PARISC
-	tristate "PA-RISC firmware RTC support"
+config RTC_DRV_GENERIC
+	tristate "Generic RTC support"
+	# Please consider writing a new RTC driver instead of using the generic
+	# RTC abstraction
 	depends on PARISC
 	help
-	  Say Y or M here to enable RTC support on PA-RISC systems using
-	  firmware calls. If you do not know what you are doing, you should
+	  Say Y or M here to enable RTC support on systems using the generic
+	  RTC abstraction. If you do not know what you are doing, you should
 	  just say Y.
 
 config RTC_DRV_PPC
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 0e697aa..9c18a01 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -55,7 +55,7 @@ obj-$(CONFIG_RTC_DRV_PCF8563)	+= rtc-pcf8563.o
 obj-$(CONFIG_RTC_DRV_PCF8583)	+= rtc-pcf8583.o
 obj-$(CONFIG_RTC_DRV_PL030)	+= rtc-pl030.o
 obj-$(CONFIG_RTC_DRV_PL031)	+= rtc-pl031.o
-obj-$(CONFIG_RTC_DRV_PARISC)	+= rtc-parisc.o
+obj-$(CONFIG_RTC_DRV_GENERIC)	+= rtc-generic.o
 obj-$(CONFIG_RTC_DRV_PPC)	+= rtc-ppc.o
 obj-$(CONFIG_RTC_DRV_PXA)	+= rtc-pxa.o
 obj-$(CONFIG_RTC_DRV_R9701)	+= rtc-r9701.o
diff --git a/drivers/rtc/rtc-generic.c b/drivers/rtc/rtc-generic.c
new file mode 100644
index 0000000..9832200
--- /dev/null
+++ b/drivers/rtc/rtc-generic.c
@@ -0,0 +1,84 @@
+/* rtc-generic: RTC driver using the generic RTC abstraction
+ *
+ * Copyright (C) 2008 Kyle McMartin <kyle@mcmartin.ca>
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/time.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+
+#include <asm/rtc.h>
+
+static int generic_get_time(struct device *dev, struct rtc_time *tm)
+{
+	unsigned int ret = get_rtc_time(tm);
+
+	if (ret & RTC_BATT_BAD)
+		return -EOPNOTSUPP;
+
+	return rtc_valid_tm(tm);
+}
+
+static int generic_set_time(struct device *dev, struct rtc_time *tm)
+{
+	if (set_rtc_time(tm) < 0)
+		return -EOPNOTSUPP;
+
+	return 0;
+}
+
+static const struct rtc_class_ops generic_rtc_ops = {
+	.read_time = generic_get_time,
+	.set_time = generic_set_time,
+};
+
+static int __init generic_rtc_probe(struct platform_device *dev)
+{
+	struct rtc_device *rtc;
+
+	rtc = rtc_device_register("rtc-generic", &dev->dev, &generic_rtc_ops,
+				  THIS_MODULE);
+	if (IS_ERR(rtc))
+		return PTR_ERR(rtc);
+
+	platform_set_drvdata(dev, rtc);
+
+	return 0;
+}
+
+static int __exit generic_rtc_remove(struct platform_device *dev)
+{
+	struct rtc_device *rtc = platform_get_drvdata(dev);
+
+	rtc_device_unregister(rtc);
+
+	return 0;
+}
+
+static struct platform_driver generic_rtc_driver = {
+	.driver = {
+		.name = "rtc-generic",
+		.owner = THIS_MODULE,
+	},
+	.remove = __exit_p(generic_rtc_remove),
+};
+
+static int __init generic_rtc_init(void)
+{
+	return platform_driver_probe(&generic_rtc_driver, generic_rtc_probe);
+}
+
+static void __exit generic_rtc_fini(void)
+{
+	platform_driver_unregister(&generic_rtc_driver);
+}
+
+module_init(generic_rtc_init);
+module_exit(generic_rtc_fini);
+
+MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Generic RTC driver");
+MODULE_ALIAS("platform:rtc-generic");
diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
deleted file mode 100644
index 48ef5b4..0000000
--- a/drivers/rtc/rtc-parisc.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* rtc-parisc: RTC for HP PA-RISC firmware
- *
- * Copyright (C) 2008 Kyle McMartin <kyle@mcmartin.ca>
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/time.h>
-#include <linux/platform_device.h>
-#include <linux/rtc.h>
-
-#include <asm/rtc.h>
-
-static int parisc_get_time(struct device *dev, struct rtc_time *tm)
-{
-	unsigned int ret = get_rtc_time(tm);
-
-	if (ret & RTC_BATT_BAD)
-		return -EOPNOTSUPP;
-
-	return rtc_valid_tm(tm);
-}
-
-static int parisc_set_time(struct device *dev, struct rtc_time *tm)
-{
-	if (set_rtc_time(tm) < 0)
-		return -EOPNOTSUPP;
-
-	return 0;
-}
-
-static const struct rtc_class_ops parisc_rtc_ops = {
-	.read_time = parisc_get_time,
-	.set_time = parisc_set_time,
-};
-
-static int __init parisc_rtc_probe(struct platform_device *dev)
-{
-	struct rtc_device *rtc;
-
-	rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
-				  THIS_MODULE);
-	if (IS_ERR(rtc))
-		return PTR_ERR(rtc);
-
-	platform_set_drvdata(dev, rtc);
-
-	return 0;
-}
-
-static int __exit parisc_rtc_remove(struct platform_device *dev)
-{
-	struct rtc_device *rtc = platform_get_drvdata(dev);
-
-	rtc_device_unregister(rtc);
-
-	return 0;
-}
-
-static struct platform_driver parisc_rtc_driver = {
-	.driver = {
-		.name = "rtc-parisc",
-		.owner = THIS_MODULE,
-	},
-	.remove = __exit_p(parisc_rtc_remove),
-};
-
-static int __init parisc_rtc_init(void)
-{
-	return platform_driver_probe(&parisc_rtc_driver, parisc_rtc_probe);
-}
-
-static void __exit parisc_rtc_fini(void)
-{
-	platform_driver_unregister(&parisc_rtc_driver);
-}
-
-module_init(parisc_rtc_init);
-module_exit(parisc_rtc_fini);
-
-MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("HP PA-RISC RTC driver");
-MODULE_ALIAS("platform:rtc-parisc");
-- 
1.6.0.4


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

* [PATCH 4/7] parisc: rtc: Rename rtc-parisc to rtc-generic
@ 2009-03-09 13:26         ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, linuxppc-dev,
	Paul Mundt, Geert Uytterhoeven, Dann Frazier

The rtc-parisc driver is not PA-RISC specific at all, as it uses the existing
(but deprecated) generic RTC infrastructure ([gs]et_rtc_time()).
Rename the driver from rtc-parisc to rtc-generic.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 arch/parisc/Kconfig       |    2 +-
 arch/parisc/kernel/time.c |    6 ++--
 drivers/rtc/Kconfig       |   10 +++--
 drivers/rtc/Makefile      |    2 +-
 drivers/rtc/rtc-generic.c |   84 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/rtc/rtc-parisc.c  |   84 ---------------------------------------------
 6 files changed, 95 insertions(+), 93 deletions(-)
 create mode 100644 drivers/rtc/rtc-generic.c
 delete mode 100644 drivers/rtc/rtc-parisc.c

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index aacf11d..378b649 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -10,7 +10,7 @@ config PARISC
 	select HAVE_IDE
 	select HAVE_OPROFILE
 	select RTC_CLASS
-	select RTC_DRV_PARISC
+	select RTC_DRV_GENERIC
 	select INIT_ALL_POSSIBLE
 	help
 	  The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index e75cae6..86a99d0 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -216,14 +216,14 @@ void __init start_cpu_itimer(void)
 	per_cpu(cpu_data, cpu).it_value = next_tick;
 }
 
-static struct platform_device rtc_parisc_dev = {
-	.name = "rtc-parisc",
+static struct platform_device rtc_generic_dev = {
+	.name = "rtc-generic",
 	.id = -1,
 };
 
 static int __init rtc_init(void)
 {
-	if (platform_device_register(&rtc_parisc_dev) < 0)
+	if (platform_device_register(&rtc_generic_dev) < 0)
 		printk(KERN_ERR "unable to register rtc device...\n");
 
 	/* not necessarily an error */
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 81450fb..d0aeff2 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -677,12 +677,14 @@ config RTC_DRV_RS5C313
 	help
 	  If you say yes here you get support for the Ricoh RS5C313 RTC chips.
 
-config RTC_DRV_PARISC
-	tristate "PA-RISC firmware RTC support"
+config RTC_DRV_GENERIC
+	tristate "Generic RTC support"
+	# Please consider writing a new RTC driver instead of using the generic
+	# RTC abstraction
 	depends on PARISC
 	help
-	  Say Y or M here to enable RTC support on PA-RISC systems using
-	  firmware calls. If you do not know what you are doing, you should
+	  Say Y or M here to enable RTC support on systems using the generic
+	  RTC abstraction. If you do not know what you are doing, you should
 	  just say Y.
 
 config RTC_DRV_PPC
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 0e697aa..9c18a01 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -55,7 +55,7 @@ obj-$(CONFIG_RTC_DRV_PCF8563)	+= rtc-pcf8563.o
 obj-$(CONFIG_RTC_DRV_PCF8583)	+= rtc-pcf8583.o
 obj-$(CONFIG_RTC_DRV_PL030)	+= rtc-pl030.o
 obj-$(CONFIG_RTC_DRV_PL031)	+= rtc-pl031.o
-obj-$(CONFIG_RTC_DRV_PARISC)	+= rtc-parisc.o
+obj-$(CONFIG_RTC_DRV_GENERIC)	+= rtc-generic.o
 obj-$(CONFIG_RTC_DRV_PPC)	+= rtc-ppc.o
 obj-$(CONFIG_RTC_DRV_PXA)	+= rtc-pxa.o
 obj-$(CONFIG_RTC_DRV_R9701)	+= rtc-r9701.o
diff --git a/drivers/rtc/rtc-generic.c b/drivers/rtc/rtc-generic.c
new file mode 100644
index 0000000..9832200
--- /dev/null
+++ b/drivers/rtc/rtc-generic.c
@@ -0,0 +1,84 @@
+/* rtc-generic: RTC driver using the generic RTC abstraction
+ *
+ * Copyright (C) 2008 Kyle McMartin <kyle@mcmartin.ca>
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/time.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+
+#include <asm/rtc.h>
+
+static int generic_get_time(struct device *dev, struct rtc_time *tm)
+{
+	unsigned int ret = get_rtc_time(tm);
+
+	if (ret & RTC_BATT_BAD)
+		return -EOPNOTSUPP;
+
+	return rtc_valid_tm(tm);
+}
+
+static int generic_set_time(struct device *dev, struct rtc_time *tm)
+{
+	if (set_rtc_time(tm) < 0)
+		return -EOPNOTSUPP;
+
+	return 0;
+}
+
+static const struct rtc_class_ops generic_rtc_ops = {
+	.read_time = generic_get_time,
+	.set_time = generic_set_time,
+};
+
+static int __init generic_rtc_probe(struct platform_device *dev)
+{
+	struct rtc_device *rtc;
+
+	rtc = rtc_device_register("rtc-generic", &dev->dev, &generic_rtc_ops,
+				  THIS_MODULE);
+	if (IS_ERR(rtc))
+		return PTR_ERR(rtc);
+
+	platform_set_drvdata(dev, rtc);
+
+	return 0;
+}
+
+static int __exit generic_rtc_remove(struct platform_device *dev)
+{
+	struct rtc_device *rtc = platform_get_drvdata(dev);
+
+	rtc_device_unregister(rtc);
+
+	return 0;
+}
+
+static struct platform_driver generic_rtc_driver = {
+	.driver = {
+		.name = "rtc-generic",
+		.owner = THIS_MODULE,
+	},
+	.remove = __exit_p(generic_rtc_remove),
+};
+
+static int __init generic_rtc_init(void)
+{
+	return platform_driver_probe(&generic_rtc_driver, generic_rtc_probe);
+}
+
+static void __exit generic_rtc_fini(void)
+{
+	platform_driver_unregister(&generic_rtc_driver);
+}
+
+module_init(generic_rtc_init);
+module_exit(generic_rtc_fini);
+
+MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Generic RTC driver");
+MODULE_ALIAS("platform:rtc-generic");
diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
deleted file mode 100644
index 48ef5b4..0000000
--- a/drivers/rtc/rtc-parisc.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* rtc-parisc: RTC for HP PA-RISC firmware
- *
- * Copyright (C) 2008 Kyle McMartin <kyle@mcmartin.ca>
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/time.h>
-#include <linux/platform_device.h>
-#include <linux/rtc.h>
-
-#include <asm/rtc.h>
-
-static int parisc_get_time(struct device *dev, struct rtc_time *tm)
-{
-	unsigned int ret = get_rtc_time(tm);
-
-	if (ret & RTC_BATT_BAD)
-		return -EOPNOTSUPP;
-
-	return rtc_valid_tm(tm);
-}
-
-static int parisc_set_time(struct device *dev, struct rtc_time *tm)
-{
-	if (set_rtc_time(tm) < 0)
-		return -EOPNOTSUPP;
-
-	return 0;
-}
-
-static const struct rtc_class_ops parisc_rtc_ops = {
-	.read_time = parisc_get_time,
-	.set_time = parisc_set_time,
-};
-
-static int __init parisc_rtc_probe(struct platform_device *dev)
-{
-	struct rtc_device *rtc;
-
-	rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
-				  THIS_MODULE);
-	if (IS_ERR(rtc))
-		return PTR_ERR(rtc);
-
-	platform_set_drvdata(dev, rtc);
-
-	return 0;
-}
-
-static int __exit parisc_rtc_remove(struct platform_device *dev)
-{
-	struct rtc_device *rtc = platform_get_drvdata(dev);
-
-	rtc_device_unregister(rtc);
-
-	return 0;
-}
-
-static struct platform_driver parisc_rtc_driver = {
-	.driver = {
-		.name = "rtc-parisc",
-		.owner = THIS_MODULE,
-	},
-	.remove = __exit_p(parisc_rtc_remove),
-};
-
-static int __init parisc_rtc_init(void)
-{
-	return platform_driver_probe(&parisc_rtc_driver, parisc_rtc_probe);
-}
-
-static void __exit parisc_rtc_fini(void)
-{
-	platform_driver_unregister(&parisc_rtc_driver);
-}
-
-module_init(parisc_rtc_init);
-module_exit(parisc_rtc_fini);
-
-MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("HP PA-RISC RTC driver");
-MODULE_ALIAS("platform:rtc-parisc");
-- 
1.6.0.4

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

* [PATCH 5/7] m68k: Hook up rtc-generic
  2009-03-09 13:26         ` Geert Uytterhoeven
@ 2009-03-09 13:26           ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven

m68k has been a long time user of the generic RTC abstraction, so hook up
rtc-generic:
  - Create the "rtc-generic" platform device if mach_hwclk is set,
  - Add checks for mach_hwclk, in anticipation of RTC chip drivers being moved
    to drivers/rtc/.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 arch/m68k/include/asm/rtc.h |    7 +++++--
 arch/m68k/kernel/time.c     |   18 ++++++++++++++++++
 drivers/rtc/Kconfig         |    2 +-
 3 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/include/asm/rtc.h b/arch/m68k/include/asm/rtc.h
index 5d3e038..a4d08ea 100644
--- a/arch/m68k/include/asm/rtc.h
+++ b/arch/m68k/include/asm/rtc.h
@@ -36,13 +36,16 @@ static inline unsigned int get_rtc_time(struct rtc_time *time)
 	 * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
 	 * by the RTC when initially set to a non-zero value.
 	 */
-	mach_hwclk(0, time);
+	if (mach_hwclk)
+		mach_hwclk(0, time);
 	return RTC_24H;
 }
 
 static inline int set_rtc_time(struct rtc_time *time)
 {
-	return mach_hwclk(1, time);
+	if (mach_hwclk)
+		return mach_hwclk(1, time);
+	return -EINVAL;
 }
 
 static inline unsigned int get_rtc_ss(void)
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 7db4159..54d9807 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -18,6 +18,7 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/rtc.h>
+#include <linux/platform_device.h>
 
 #include <asm/machdep.h>
 #include <asm/io.h>
@@ -159,3 +160,20 @@ int do_settimeofday(struct timespec *tv)
 }
 
 EXPORT_SYMBOL(do_settimeofday);
+
+
+static int __init rtc_init(void)
+{
+	struct platform_device *pdev;
+
+	if (!mach_hwclk)
+		return -ENODEV;
+
+	pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
+}
+
+module_init(rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index d0aeff2..c8ead87 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -681,7 +681,7 @@ config RTC_DRV_GENERIC
 	tristate "Generic RTC support"
 	# Please consider writing a new RTC driver instead of using the generic
 	# RTC abstraction
-	depends on PARISC
+	depends on PARISC || M68K
 	help
 	  Say Y or M here to enable RTC support on systems using the generic
 	  RTC abstraction. If you do not know what you are doing, you should
-- 
1.6.0.4


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

* [PATCH 5/7] m68k: Hook up rtc-generic
@ 2009-03-09 13:26           ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, linuxppc-dev,
	Paul Mundt, Geert Uytterhoeven, Dann Frazier

m68k has been a long time user of the generic RTC abstraction, so hook up
rtc-generic:
  - Create the "rtc-generic" platform device if mach_hwclk is set,
  - Add checks for mach_hwclk, in anticipation of RTC chip drivers being moved
    to drivers/rtc/.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
 arch/m68k/include/asm/rtc.h |    7 +++++--
 arch/m68k/kernel/time.c     |   18 ++++++++++++++++++
 drivers/rtc/Kconfig         |    2 +-
 3 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/include/asm/rtc.h b/arch/m68k/include/asm/rtc.h
index 5d3e038..a4d08ea 100644
--- a/arch/m68k/include/asm/rtc.h
+++ b/arch/m68k/include/asm/rtc.h
@@ -36,13 +36,16 @@ static inline unsigned int get_rtc_time(struct rtc_time *time)
 	 * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
 	 * by the RTC when initially set to a non-zero value.
 	 */
-	mach_hwclk(0, time);
+	if (mach_hwclk)
+		mach_hwclk(0, time);
 	return RTC_24H;
 }
 
 static inline int set_rtc_time(struct rtc_time *time)
 {
-	return mach_hwclk(1, time);
+	if (mach_hwclk)
+		return mach_hwclk(1, time);
+	return -EINVAL;
 }
 
 static inline unsigned int get_rtc_ss(void)
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 7db4159..54d9807 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -18,6 +18,7 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/rtc.h>
+#include <linux/platform_device.h>
 
 #include <asm/machdep.h>
 #include <asm/io.h>
@@ -159,3 +160,20 @@ int do_settimeofday(struct timespec *tv)
 }
 
 EXPORT_SYMBOL(do_settimeofday);
+
+
+static int __init rtc_init(void)
+{
+	struct platform_device *pdev;
+
+	if (!mach_hwclk)
+		return -ENODEV;
+
+	pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
+}
+
+module_init(rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index d0aeff2..c8ead87 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -681,7 +681,7 @@ config RTC_DRV_GENERIC
 	tristate "Generic RTC support"
 	# Please consider writing a new RTC driver instead of using the generic
 	# RTC abstraction
-	depends on PARISC
+	depends on PARISC || M68K
 	help
 	  Say Y or M here to enable RTC support on systems using the generic
 	  RTC abstraction. If you do not know what you are doing, you should
-- 
1.6.0.4

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

* [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc
  2009-03-09 13:26           ` Geert Uytterhoeven
  (?)
  (?)
@ 2009-03-09 13:26             ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven, David Woodhouse

PowerPC has been a long time user of the generic RTC abstraction, so ho=
ok up
rtc-generic:
  - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is =
set,
  - Kill rtc-ppc, as rtc-generic offers the same functionality in a mor=
e
    generic way, and supports autoloading through udev.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: David Woodhouse <dwmw2@infradead.org>
---
 arch/powerpc/kernel/time.c |   16 ++++++++++
 drivers/rtc/Kconfig        |   10 +------
 drivers/rtc/Makefile       |    1 -
 drivers/rtc/rtc-ppc.c      |   69 ------------------------------------=
--------
 4 files changed, 17 insertions(+), 79 deletions(-)
 delete mode 100644 drivers/rtc/rtc-ppc.c

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index c956403..926ea86 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -1127,3 +1127,19 @@ void div128_by_32(u64 dividend_high, u64 dividen=
d_low,
 	dr->result_low  =3D ((u64)y << 32) + z;
=20
 }
+
+static int __init rtc_init(void)
+{
+	struct platform_device *pdev;
+
+	if (!ppc_md.get_rtc_time)
+		return -ENODEV;
+
+	pdev =3D platform_device_register_simple("rtc-generic", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
+}
+
+module_init(rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index c8ead87..6488c50 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -681,20 +681,12 @@ config RTC_DRV_GENERIC
 	tristate "Generic RTC support"
 	# Please consider writing a new RTC driver instead of using the gener=
ic
 	# RTC abstraction
-	depends on PARISC || M68K
+	depends on PARISC || M68K || PPC
 	help
 	  Say Y or M here to enable RTC support on systems using the generic
 	  RTC abstraction. If you do not know what you are doing, you should
 	  just say Y.
=20
-config RTC_DRV_PPC
-       tristate "PowerPC machine dependent RTC support"
-       depends on PPC
-       help
-	 The PowerPC kernel has machine-specific functions for accessing
-	 the RTC. This exposes that functionality through the generic RTC
-	 class.
-
 config RTC_DRV_PXA
        tristate "PXA27x/PXA3xx"
        depends on ARCH_PXA
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 9c18a01..bd209a5 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -56,7 +56,6 @@ obj-$(CONFIG_RTC_DRV_PCF8583)	+=3D rtc-pcf8583.o
 obj-$(CONFIG_RTC_DRV_PL030)	+=3D rtc-pl030.o
 obj-$(CONFIG_RTC_DRV_PL031)	+=3D rtc-pl031.o
 obj-$(CONFIG_RTC_DRV_GENERIC)	+=3D rtc-generic.o
-obj-$(CONFIG_RTC_DRV_PPC)	+=3D rtc-ppc.o
 obj-$(CONFIG_RTC_DRV_PXA)	+=3D rtc-pxa.o
 obj-$(CONFIG_RTC_DRV_R9701)	+=3D rtc-r9701.o
 obj-$(CONFIG_RTC_DRV_RS5C313)	+=3D rtc-rs5c313.o
diff --git a/drivers/rtc/rtc-ppc.c b/drivers/rtc/rtc-ppc.c
deleted file mode 100644
index c8e97e2..0000000
--- a/drivers/rtc/rtc-ppc.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * RTC driver for ppc_md RTC functions
- *
- * =C2=A9 2007 Red Hat, Inc.
- *
- * Author: David Woodhouse <dwmw2@infradead.org>
- *
- * This program is free software; you can redistribute it and/or modif=
y
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-
-#include <linux/module.h>
-#include <linux/err.h>
-#include <linux/rtc.h>
-#include <linux/platform_device.h>
-#include <asm/machdep.h>
-
-static int ppc_rtc_read_time(struct device *dev, struct rtc_time *tm)
-{
-	ppc_md.get_rtc_time(tm);
-	return 0;
-}
-
-static int ppc_rtc_set_time(struct device *dev, struct rtc_time *tm)
-{
-	return ppc_md.set_rtc_time(tm);
-}
-
-static const struct rtc_class_ops ppc_rtc_ops =3D {
-	.set_time =3D ppc_rtc_set_time,
-	.read_time =3D ppc_rtc_read_time,
-};
-
-static struct rtc_device *rtc;
-static struct platform_device *ppc_rtc_pdev;
-
-static int __init ppc_rtc_init(void)
-{
-	if (!ppc_md.get_rtc_time || !ppc_md.set_rtc_time)
-		return -ENODEV;
-
-	ppc_rtc_pdev =3D platform_device_register_simple("ppc-rtc", 0, NULL, =
0);
-	if (IS_ERR(ppc_rtc_pdev))
-		return PTR_ERR(ppc_rtc_pdev);
-
-	rtc =3D rtc_device_register("ppc_md", &ppc_rtc_pdev->dev,
-				  &ppc_rtc_ops, THIS_MODULE);
-	if (IS_ERR(rtc)) {
-		platform_device_unregister(ppc_rtc_pdev);
-		return PTR_ERR(rtc);
-	}
-
-	return 0;
-}
-
-static void __exit ppc_rtc_exit(void)
-{
-	rtc_device_unregister(rtc);
-	platform_device_unregister(ppc_rtc_pdev);
-}
-
-module_init(ppc_rtc_init);
-module_exit(ppc_rtc_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
-MODULE_DESCRIPTION("Generic RTC class driver for PowerPC");
--=20
1.6.0.4

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

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

* [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc
@ 2009-03-09 13:26             ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven, David Woodhouse

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4531 bytes --]

PowerPC has been a long time user of the generic RTC abstraction, so hook up
rtc-generic:
  - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set,
  - Kill rtc-ppc, as rtc-generic offers the same functionality in a more
    generic way, and supports autoloading through udev.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: David Woodhouse <dwmw2@infradead.org>
---
 arch/powerpc/kernel/time.c |   16 ++++++++++
 drivers/rtc/Kconfig        |   10 +------
 drivers/rtc/Makefile       |    1 -
 drivers/rtc/rtc-ppc.c      |   69 --------------------------------------------
 4 files changed, 17 insertions(+), 79 deletions(-)
 delete mode 100644 drivers/rtc/rtc-ppc.c

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index c956403..926ea86 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -1127,3 +1127,19 @@ void div128_by_32(u64 dividend_high, u64 dividend_low,
 	dr->result_low  = ((u64)y << 32) + z;
 
 }
+
+static int __init rtc_init(void)
+{
+	struct platform_device *pdev;
+
+	if (!ppc_md.get_rtc_time)
+		return -ENODEV;
+
+	pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
+}
+
+module_init(rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index c8ead87..6488c50 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -681,20 +681,12 @@ config RTC_DRV_GENERIC
 	tristate "Generic RTC support"
 	# Please consider writing a new RTC driver instead of using the generic
 	# RTC abstraction
-	depends on PARISC || M68K
+	depends on PARISC || M68K || PPC
 	help
 	  Say Y or M here to enable RTC support on systems using the generic
 	  RTC abstraction. If you do not know what you are doing, you should
 	  just say Y.
 
-config RTC_DRV_PPC
-       tristate "PowerPC machine dependent RTC support"
-       depends on PPC
-       help
-	 The PowerPC kernel has machine-specific functions for accessing
-	 the RTC. This exposes that functionality through the generic RTC
-	 class.
-
 config RTC_DRV_PXA
        tristate "PXA27x/PXA3xx"
        depends on ARCH_PXA
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 9c18a01..bd209a5 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -56,7 +56,6 @@ obj-$(CONFIG_RTC_DRV_PCF8583)	+= rtc-pcf8583.o
 obj-$(CONFIG_RTC_DRV_PL030)	+= rtc-pl030.o
 obj-$(CONFIG_RTC_DRV_PL031)	+= rtc-pl031.o
 obj-$(CONFIG_RTC_DRV_GENERIC)	+= rtc-generic.o
-obj-$(CONFIG_RTC_DRV_PPC)	+= rtc-ppc.o
 obj-$(CONFIG_RTC_DRV_PXA)	+= rtc-pxa.o
 obj-$(CONFIG_RTC_DRV_R9701)	+= rtc-r9701.o
 obj-$(CONFIG_RTC_DRV_RS5C313)	+= rtc-rs5c313.o
diff --git a/drivers/rtc/rtc-ppc.c b/drivers/rtc/rtc-ppc.c
deleted file mode 100644
index c8e97e2..0000000
--- a/drivers/rtc/rtc-ppc.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * RTC driver for ppc_md RTC functions
- *
- * © 2007 Red Hat, Inc.
- *
- * Author: David Woodhouse <dwmw2@infradead.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-
-#include <linux/module.h>
-#include <linux/err.h>
-#include <linux/rtc.h>
-#include <linux/platform_device.h>
-#include <asm/machdep.h>
-
-static int ppc_rtc_read_time(struct device *dev, struct rtc_time *tm)
-{
-	ppc_md.get_rtc_time(tm);
-	return 0;
-}
-
-static int ppc_rtc_set_time(struct device *dev, struct rtc_time *tm)
-{
-	return ppc_md.set_rtc_time(tm);
-}
-
-static const struct rtc_class_ops ppc_rtc_ops = {
-	.set_time = ppc_rtc_set_time,
-	.read_time = ppc_rtc_read_time,
-};
-
-static struct rtc_device *rtc;
-static struct platform_device *ppc_rtc_pdev;
-
-static int __init ppc_rtc_init(void)
-{
-	if (!ppc_md.get_rtc_time || !ppc_md.set_rtc_time)
-		return -ENODEV;
-
-	ppc_rtc_pdev = platform_device_register_simple("ppc-rtc", 0, NULL, 0);
-	if (IS_ERR(ppc_rtc_pdev))
-		return PTR_ERR(ppc_rtc_pdev);
-
-	rtc = rtc_device_register("ppc_md", &ppc_rtc_pdev->dev,
-				  &ppc_rtc_ops, THIS_MODULE);
-	if (IS_ERR(rtc)) {
-		platform_device_unregister(ppc_rtc_pdev);
-		return PTR_ERR(rtc);
-	}
-
-	return 0;
-}
-
-static void __exit ppc_rtc_exit(void)
-{
-	rtc_device_unregister(rtc);
-	platform_device_unregister(ppc_rtc_pdev);
-}
-
-module_init(ppc_rtc_init);
-module_exit(ppc_rtc_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
-MODULE_DESCRIPTION("Generic RTC class driver for PowerPC");
-- 
1.6.0.4


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

* [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc
@ 2009-03-09 13:26             ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven, David Woodhouse

PowerPC has been a long time user of the generic RTC abstraction, so hook up
rtc-generic:
  - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set,
  - Kill rtc-ppc, as rtc-generic offers the same functionality in a more
    generic way, and supports autoloading through udev.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: David Woodhouse <dwmw2@infradead.org>
---
 arch/powerpc/kernel/time.c |   16 ++++++++++
 drivers/rtc/Kconfig        |   10 +------
 drivers/rtc/Makefile       |    1 -
 drivers/rtc/rtc-ppc.c      |   69 --------------------------------------------
 4 files changed, 17 insertions(+), 79 deletions(-)
 delete mode 100644 drivers/rtc/rtc-ppc.c

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index c956403..926ea86 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -1127,3 +1127,19 @@ void div128_by_32(u64 dividend_high, u64 dividend_low,
 	dr->result_low  = ((u64)y << 32) + z;
 
 }
+
+static int __init rtc_init(void)
+{
+	struct platform_device *pdev;
+
+	if (!ppc_md.get_rtc_time)
+		return -ENODEV;
+
+	pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
+}
+
+module_init(rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index c8ead87..6488c50 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -681,20 +681,12 @@ config RTC_DRV_GENERIC
 	tristate "Generic RTC support"
 	# Please consider writing a new RTC driver instead of using the generic
 	# RTC abstraction
-	depends on PARISC || M68K
+	depends on PARISC || M68K || PPC
 	help
 	  Say Y or M here to enable RTC support on systems using the generic
 	  RTC abstraction. If you do not know what you are doing, you should
 	  just say Y.
 
-config RTC_DRV_PPC
-       tristate "PowerPC machine dependent RTC support"
-       depends on PPC
-       help
-	 The PowerPC kernel has machine-specific functions for accessing
-	 the RTC. This exposes that functionality through the generic RTC
-	 class.
-
 config RTC_DRV_PXA
        tristate "PXA27x/PXA3xx"
        depends on ARCH_PXA
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 9c18a01..bd209a5 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -56,7 +56,6 @@ obj-$(CONFIG_RTC_DRV_PCF8583)	+= rtc-pcf8583.o
 obj-$(CONFIG_RTC_DRV_PL030)	+= rtc-pl030.o
 obj-$(CONFIG_RTC_DRV_PL031)	+= rtc-pl031.o
 obj-$(CONFIG_RTC_DRV_GENERIC)	+= rtc-generic.o
-obj-$(CONFIG_RTC_DRV_PPC)	+= rtc-ppc.o
 obj-$(CONFIG_RTC_DRV_PXA)	+= rtc-pxa.o
 obj-$(CONFIG_RTC_DRV_R9701)	+= rtc-r9701.o
 obj-$(CONFIG_RTC_DRV_RS5C313)	+= rtc-rs5c313.o
diff --git a/drivers/rtc/rtc-ppc.c b/drivers/rtc/rtc-ppc.c
deleted file mode 100644
index c8e97e2..0000000
--- a/drivers/rtc/rtc-ppc.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * RTC driver for ppc_md RTC functions
- *
- * © 2007 Red Hat, Inc.
- *
- * Author: David Woodhouse <dwmw2@infradead.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-
-#include <linux/module.h>
-#include <linux/err.h>
-#include <linux/rtc.h>
-#include <linux/platform_device.h>
-#include <asm/machdep.h>
-
-static int ppc_rtc_read_time(struct device *dev, struct rtc_time *tm)
-{
-	ppc_md.get_rtc_time(tm);
-	return 0;
-}
-
-static int ppc_rtc_set_time(struct device *dev, struct rtc_time *tm)
-{
-	return ppc_md.set_rtc_time(tm);
-}
-
-static const struct rtc_class_ops ppc_rtc_ops = {
-	.set_time = ppc_rtc_set_time,
-	.read_time = ppc_rtc_read_time,
-};
-
-static struct rtc_device *rtc;
-static struct platform_device *ppc_rtc_pdev;
-
-static int __init ppc_rtc_init(void)
-{
-	if (!ppc_md.get_rtc_time || !ppc_md.set_rtc_time)
-		return -ENODEV;
-
-	ppc_rtc_pdev = platform_device_register_simple("ppc-rtc", 0, NULL, 0);
-	if (IS_ERR(ppc_rtc_pdev))
-		return PTR_ERR(ppc_rtc_pdev);
-
-	rtc = rtc_device_register("ppc_md", &ppc_rtc_pdev->dev,
-				  &ppc_rtc_ops, THIS_MODULE);
-	if (IS_ERR(rtc)) {
-		platform_device_unregister(ppc_rtc_pdev);
-		return PTR_ERR(rtc);
-	}
-
-	return 0;
-}
-
-static void __exit ppc_rtc_exit(void)
-{
-	rtc_device_unregister(rtc);
-	platform_device_unregister(ppc_rtc_pdev);
-}
-
-module_init(ppc_rtc_init);
-module_exit(ppc_rtc_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
-MODULE_DESCRIPTION("Generic RTC class driver for PowerPC");
-- 
1.6.0.4

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

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

* [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc
@ 2009-03-09 13:26             ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, linuxppc-dev,
	Paul Mundt, Geert Uytterhoeven, David Woodhouse, Dann Frazier

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4530 bytes --]

PowerPC has been a long time user of the generic RTC abstraction, so hook up
rtc-generic:
  - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set,
  - Kill rtc-ppc, as rtc-generic offers the same functionality in a more
    generic way, and supports autoloading through udev.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: David Woodhouse <dwmw2@infradead.org>
---
 arch/powerpc/kernel/time.c |   16 ++++++++++
 drivers/rtc/Kconfig        |   10 +------
 drivers/rtc/Makefile       |    1 -
 drivers/rtc/rtc-ppc.c      |   69 --------------------------------------------
 4 files changed, 17 insertions(+), 79 deletions(-)
 delete mode 100644 drivers/rtc/rtc-ppc.c

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index c956403..926ea86 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -1127,3 +1127,19 @@ void div128_by_32(u64 dividend_high, u64 dividend_low,
 	dr->result_low  = ((u64)y << 32) + z;
 
 }
+
+static int __init rtc_init(void)
+{
+	struct platform_device *pdev;
+
+	if (!ppc_md.get_rtc_time)
+		return -ENODEV;
+
+	pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
+}
+
+module_init(rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index c8ead87..6488c50 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -681,20 +681,12 @@ config RTC_DRV_GENERIC
 	tristate "Generic RTC support"
 	# Please consider writing a new RTC driver instead of using the generic
 	# RTC abstraction
-	depends on PARISC || M68K
+	depends on PARISC || M68K || PPC
 	help
 	  Say Y or M here to enable RTC support on systems using the generic
 	  RTC abstraction. If you do not know what you are doing, you should
 	  just say Y.
 
-config RTC_DRV_PPC
-       tristate "PowerPC machine dependent RTC support"
-       depends on PPC
-       help
-	 The PowerPC kernel has machine-specific functions for accessing
-	 the RTC. This exposes that functionality through the generic RTC
-	 class.
-
 config RTC_DRV_PXA
        tristate "PXA27x/PXA3xx"
        depends on ARCH_PXA
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 9c18a01..bd209a5 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -56,7 +56,6 @@ obj-$(CONFIG_RTC_DRV_PCF8583)	+= rtc-pcf8583.o
 obj-$(CONFIG_RTC_DRV_PL030)	+= rtc-pl030.o
 obj-$(CONFIG_RTC_DRV_PL031)	+= rtc-pl031.o
 obj-$(CONFIG_RTC_DRV_GENERIC)	+= rtc-generic.o
-obj-$(CONFIG_RTC_DRV_PPC)	+= rtc-ppc.o
 obj-$(CONFIG_RTC_DRV_PXA)	+= rtc-pxa.o
 obj-$(CONFIG_RTC_DRV_R9701)	+= rtc-r9701.o
 obj-$(CONFIG_RTC_DRV_RS5C313)	+= rtc-rs5c313.o
diff --git a/drivers/rtc/rtc-ppc.c b/drivers/rtc/rtc-ppc.c
deleted file mode 100644
index c8e97e2..0000000
--- a/drivers/rtc/rtc-ppc.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * RTC driver for ppc_md RTC functions
- *
- * © 2007 Red Hat, Inc.
- *
- * Author: David Woodhouse <dwmw2@infradead.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-
-#include <linux/module.h>
-#include <linux/err.h>
-#include <linux/rtc.h>
-#include <linux/platform_device.h>
-#include <asm/machdep.h>
-
-static int ppc_rtc_read_time(struct device *dev, struct rtc_time *tm)
-{
-	ppc_md.get_rtc_time(tm);
-	return 0;
-}
-
-static int ppc_rtc_set_time(struct device *dev, struct rtc_time *tm)
-{
-	return ppc_md.set_rtc_time(tm);
-}
-
-static const struct rtc_class_ops ppc_rtc_ops = {
-	.set_time = ppc_rtc_set_time,
-	.read_time = ppc_rtc_read_time,
-};
-
-static struct rtc_device *rtc;
-static struct platform_device *ppc_rtc_pdev;
-
-static int __init ppc_rtc_init(void)
-{
-	if (!ppc_md.get_rtc_time || !ppc_md.set_rtc_time)
-		return -ENODEV;
-
-	ppc_rtc_pdev = platform_device_register_simple("ppc-rtc", 0, NULL, 0);
-	if (IS_ERR(ppc_rtc_pdev))
-		return PTR_ERR(ppc_rtc_pdev);
-
-	rtc = rtc_device_register("ppc_md", &ppc_rtc_pdev->dev,
-				  &ppc_rtc_ops, THIS_MODULE);
-	if (IS_ERR(rtc)) {
-		platform_device_unregister(ppc_rtc_pdev);
-		return PTR_ERR(rtc);
-	}
-
-	return 0;
-}
-
-static void __exit ppc_rtc_exit(void)
-{
-	rtc_device_unregister(rtc);
-	platform_device_unregister(ppc_rtc_pdev);
-}
-
-module_init(ppc_rtc_init);
-module_exit(ppc_rtc_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
-MODULE_DESCRIPTION("Generic RTC class driver for PowerPC");
-- 
1.6.0.4

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

* [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 13:26             ` Geert Uytterhoeven
@ 2009-03-09 13:26               ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: rtc-linux, linux-parisc, linuxppc-dev, linux-m68k, linux-kernel,
	Paul Mundt, Dann Frazier, Geert Uytterhoeven, Geoff Levand

Create a real RTC driver for PS3, and unhook the deprecated
ppc_md.[gs]et_rtc_time.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
---
 arch/powerpc/include/asm/ps3.h        |    3 +
 arch/powerpc/platforms/ps3/os-area.c  |    2 +
 arch/powerpc/platforms/ps3/platform.h |    2 -
 arch/powerpc/platforms/ps3/setup.c    |    2 -
 arch/powerpc/platforms/ps3/time.c     |   26 ++++-----
 drivers/rtc/Kconfig                   |    9 +++
 drivers/rtc/Makefile                  |    1 +
 drivers/rtc/rtc-ps3.c                 |  105 +++++++++++++++++++++++++++++++++
 8 files changed, 132 insertions(+), 18 deletions(-)
 create mode 100644 drivers/rtc/rtc-ps3.c

diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h
index 67f1812..cdb6fd8 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -50,6 +50,9 @@ enum ps3_param_av_multi_out {
 
 enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void);
 
+extern u64 ps3_os_area_get_rtc_diff(void);
+extern void ps3_os_area_set_rtc_diff(u64 rtc_diff);
+
 /* dma routines */
 
 enum ps3_dma_page_size {
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index e1c83c2..86e392b 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -808,6 +808,7 @@ u64 ps3_os_area_get_rtc_diff(void)
 {
 	return saved_params.rtc_diff;
 }
+EXPORT_SYMBOL(ps3_os_area_get_rtc_diff);
 
 /**
  * ps3_os_area_set_rtc_diff - Set the rtc diff value.
@@ -823,6 +824,7 @@ void ps3_os_area_set_rtc_diff(u64 rtc_diff)
 		os_area_queue_work();
 	}
 }
+EXPORT_SYMBOL(ps3_os_area_set_rtc_diff);
 
 /**
  * ps3_os_area_get_av_multi_out - Returns the default video mode.
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 235c13e..136aa06 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -64,8 +64,6 @@ int ps3_set_rtc_time(struct rtc_time *time);
 
 void __init ps3_os_area_save_params(void);
 void __init ps3_os_area_init(void);
-u64 ps3_os_area_get_rtc_diff(void);
-void ps3_os_area_set_rtc_diff(u64 rtc_diff);
 
 /* spu */
 
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 3331ccb..6618182 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -270,8 +270,6 @@ define_machine(ps3) {
 	.init_IRQ			= ps3_init_IRQ,
 	.panic				= ps3_panic,
 	.get_boot_time			= ps3_get_boot_time,
-	.set_rtc_time			= ps3_set_rtc_time,
-	.get_rtc_time			= ps3_get_rtc_time,
 	.set_dabr			= ps3_set_dabr,
 	.calibrate_decr			= ps3_calibrate_decr,
 	.progress			= ps3_progress,
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index d0daf7d..b178a1e 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -19,6 +19,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/platform_device.h>
 
 #include <asm/rtc.h>
 #include <asm/lv1call.h>
@@ -74,23 +75,20 @@ static u64 read_rtc(void)
 	return rtc_val;
 }
 
-int ps3_set_rtc_time(struct rtc_time *tm)
+unsigned long __init ps3_get_boot_time(void)
 {
-	u64 now = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
-		tm->tm_hour, tm->tm_min, tm->tm_sec);
-
-	ps3_os_area_set_rtc_diff(now - read_rtc());
-	return 0;
+	return read_rtc() + ps3_os_area_get_rtc_diff();
 }
 
-void ps3_get_rtc_time(struct rtc_time *tm)
+static int __init ps3_rtc_init(void)
 {
-	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
-	tm->tm_year -= 1900;
-	tm->tm_mon -= 1;
-}
+	struct platform_device *pdev;
 
-unsigned long __init ps3_get_boot_time(void)
-{
-	return read_rtc() + ps3_os_area_get_rtc_diff();
+	pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
 }
+
+module_init(ps3_rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 6488c50..7b6b63a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -730,4 +730,13 @@ config RTC_DRV_MV
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-mv.
 
+config RTC_DRV_PS3
+	tristate "PS3 RTC"
+	depends on PPC_PS3
+	help
+	  If you say yes here you will get support for the RTC on PS3.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-ps3.
+
 endif # RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index bd209a5..d161d1d 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -75,3 +75,4 @@ obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
 obj-$(CONFIG_RTC_DRV_WM8350)	+= rtc-wm8350.o
 obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
 obj-$(CONFIG_RTC_DRV_PCF50633)	+= rtc-pcf50633.o
+obj-$(CONFIG_RTC_DRV_PS3)	+= rtc-ps3.o
diff --git a/drivers/rtc/rtc-ps3.c b/drivers/rtc/rtc-ps3.c
new file mode 100644
index 0000000..bacf37f
--- /dev/null
+++ b/drivers/rtc/rtc-ps3.c
@@ -0,0 +1,105 @@
+/*
+ * PS3 RTC Driver
+ *
+ * Copyright 2009 Sony Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.
+ * If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+
+#include <asm/lv1call.h>
+#include <asm/ps3.h>
+
+
+static u64 read_rtc(void)
+{
+	int result;
+	u64 rtc_val;
+	u64 tb_val;
+
+	result = lv1_get_rtc(&rtc_val, &tb_val);
+	BUG_ON(result);
+
+	return rtc_val;
+}
+
+static int ps3_get_time(struct device *dev, struct rtc_time *tm)
+{
+	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
+	tm->tm_year -= 1900;
+	tm->tm_mon -= 1;
+	return 0;
+}
+
+static int ps3_set_time(struct device *dev, struct rtc_time *tm)
+{
+	u64 now = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
+			 tm->tm_hour, tm->tm_min, tm->tm_sec);
+	ps3_os_area_set_rtc_diff(now - read_rtc());
+	return 0;
+}
+
+static const struct rtc_class_ops ps3_rtc_ops = {
+	.read_time = ps3_get_time,
+	.set_time = ps3_set_time,
+};
+
+static int __init ps3_rtc_probe(struct platform_device *dev)
+{
+	struct rtc_device *rtc;
+
+	rtc = rtc_device_register("rtc-ps3", &dev->dev, &ps3_rtc_ops,
+				  THIS_MODULE);
+	if (IS_ERR(rtc))
+		return PTR_ERR(rtc);
+
+	platform_set_drvdata(dev, rtc);
+	return 0;
+}
+
+static int __exit ps3_rtc_remove(struct platform_device *dev)
+{
+	rtc_device_unregister(platform_get_drvdata(dev));
+	return 0;
+}
+
+static struct platform_driver ps3_rtc_driver = {
+	.driver = {
+		.name = "rtc-ps3",
+		.owner = THIS_MODULE,
+	},
+	.remove = __exit_p(ps3_rtc_remove),
+};
+
+static int __init ps3_rtc_init(void)
+{
+	return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe);
+}
+
+static void __exit ps3_rtc_fini(void)
+{
+	platform_driver_unregister(&ps3_rtc_driver);
+}
+
+module_init(ps3_rtc_init);
+module_exit(ps3_rtc_fini);
+
+MODULE_AUTHOR("Sony Corporation");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("ps3 RTC driver");
+MODULE_ALIAS("platform:rtc-ps3");
-- 
1.6.0.4


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

* [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 13:26               ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 13:26 UTC (permalink / raw)
  To: Alessandro Zummo, Kyle McMartin
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, linuxppc-dev,
	Paul Mundt, Geert Uytterhoeven, Dann Frazier

Create a real RTC driver for PS3, and unhook the deprecated
ppc_md.[gs]et_rtc_time.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
---
 arch/powerpc/include/asm/ps3.h        |    3 +
 arch/powerpc/platforms/ps3/os-area.c  |    2 +
 arch/powerpc/platforms/ps3/platform.h |    2 -
 arch/powerpc/platforms/ps3/setup.c    |    2 -
 arch/powerpc/platforms/ps3/time.c     |   26 ++++-----
 drivers/rtc/Kconfig                   |    9 +++
 drivers/rtc/Makefile                  |    1 +
 drivers/rtc/rtc-ps3.c                 |  105 +++++++++++++++++++++++++++++++++
 8 files changed, 132 insertions(+), 18 deletions(-)
 create mode 100644 drivers/rtc/rtc-ps3.c

diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h
index 67f1812..cdb6fd8 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -50,6 +50,9 @@ enum ps3_param_av_multi_out {
 
 enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void);
 
+extern u64 ps3_os_area_get_rtc_diff(void);
+extern void ps3_os_area_set_rtc_diff(u64 rtc_diff);
+
 /* dma routines */
 
 enum ps3_dma_page_size {
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index e1c83c2..86e392b 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -808,6 +808,7 @@ u64 ps3_os_area_get_rtc_diff(void)
 {
 	return saved_params.rtc_diff;
 }
+EXPORT_SYMBOL(ps3_os_area_get_rtc_diff);
 
 /**
  * ps3_os_area_set_rtc_diff - Set the rtc diff value.
@@ -823,6 +824,7 @@ void ps3_os_area_set_rtc_diff(u64 rtc_diff)
 		os_area_queue_work();
 	}
 }
+EXPORT_SYMBOL(ps3_os_area_set_rtc_diff);
 
 /**
  * ps3_os_area_get_av_multi_out - Returns the default video mode.
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 235c13e..136aa06 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -64,8 +64,6 @@ int ps3_set_rtc_time(struct rtc_time *time);
 
 void __init ps3_os_area_save_params(void);
 void __init ps3_os_area_init(void);
-u64 ps3_os_area_get_rtc_diff(void);
-void ps3_os_area_set_rtc_diff(u64 rtc_diff);
 
 /* spu */
 
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 3331ccb..6618182 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -270,8 +270,6 @@ define_machine(ps3) {
 	.init_IRQ			= ps3_init_IRQ,
 	.panic				= ps3_panic,
 	.get_boot_time			= ps3_get_boot_time,
-	.set_rtc_time			= ps3_set_rtc_time,
-	.get_rtc_time			= ps3_get_rtc_time,
 	.set_dabr			= ps3_set_dabr,
 	.calibrate_decr			= ps3_calibrate_decr,
 	.progress			= ps3_progress,
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index d0daf7d..b178a1e 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -19,6 +19,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/platform_device.h>
 
 #include <asm/rtc.h>
 #include <asm/lv1call.h>
@@ -74,23 +75,20 @@ static u64 read_rtc(void)
 	return rtc_val;
 }
 
-int ps3_set_rtc_time(struct rtc_time *tm)
+unsigned long __init ps3_get_boot_time(void)
 {
-	u64 now = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
-		tm->tm_hour, tm->tm_min, tm->tm_sec);
-
-	ps3_os_area_set_rtc_diff(now - read_rtc());
-	return 0;
+	return read_rtc() + ps3_os_area_get_rtc_diff();
 }
 
-void ps3_get_rtc_time(struct rtc_time *tm)
+static int __init ps3_rtc_init(void)
 {
-	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
-	tm->tm_year -= 1900;
-	tm->tm_mon -= 1;
-}
+	struct platform_device *pdev;
 
-unsigned long __init ps3_get_boot_time(void)
-{
-	return read_rtc() + ps3_os_area_get_rtc_diff();
+	pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
 }
+
+module_init(ps3_rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 6488c50..7b6b63a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -730,4 +730,13 @@ config RTC_DRV_MV
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-mv.
 
+config RTC_DRV_PS3
+	tristate "PS3 RTC"
+	depends on PPC_PS3
+	help
+	  If you say yes here you will get support for the RTC on PS3.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-ps3.
+
 endif # RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index bd209a5..d161d1d 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -75,3 +75,4 @@ obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
 obj-$(CONFIG_RTC_DRV_WM8350)	+= rtc-wm8350.o
 obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
 obj-$(CONFIG_RTC_DRV_PCF50633)	+= rtc-pcf50633.o
+obj-$(CONFIG_RTC_DRV_PS3)	+= rtc-ps3.o
diff --git a/drivers/rtc/rtc-ps3.c b/drivers/rtc/rtc-ps3.c
new file mode 100644
index 0000000..bacf37f
--- /dev/null
+++ b/drivers/rtc/rtc-ps3.c
@@ -0,0 +1,105 @@
+/*
+ * PS3 RTC Driver
+ *
+ * Copyright 2009 Sony Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.
+ * If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+
+#include <asm/lv1call.h>
+#include <asm/ps3.h>
+
+
+static u64 read_rtc(void)
+{
+	int result;
+	u64 rtc_val;
+	u64 tb_val;
+
+	result = lv1_get_rtc(&rtc_val, &tb_val);
+	BUG_ON(result);
+
+	return rtc_val;
+}
+
+static int ps3_get_time(struct device *dev, struct rtc_time *tm)
+{
+	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
+	tm->tm_year -= 1900;
+	tm->tm_mon -= 1;
+	return 0;
+}
+
+static int ps3_set_time(struct device *dev, struct rtc_time *tm)
+{
+	u64 now = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
+			 tm->tm_hour, tm->tm_min, tm->tm_sec);
+	ps3_os_area_set_rtc_diff(now - read_rtc());
+	return 0;
+}
+
+static const struct rtc_class_ops ps3_rtc_ops = {
+	.read_time = ps3_get_time,
+	.set_time = ps3_set_time,
+};
+
+static int __init ps3_rtc_probe(struct platform_device *dev)
+{
+	struct rtc_device *rtc;
+
+	rtc = rtc_device_register("rtc-ps3", &dev->dev, &ps3_rtc_ops,
+				  THIS_MODULE);
+	if (IS_ERR(rtc))
+		return PTR_ERR(rtc);
+
+	platform_set_drvdata(dev, rtc);
+	return 0;
+}
+
+static int __exit ps3_rtc_remove(struct platform_device *dev)
+{
+	rtc_device_unregister(platform_get_drvdata(dev));
+	return 0;
+}
+
+static struct platform_driver ps3_rtc_driver = {
+	.driver = {
+		.name = "rtc-ps3",
+		.owner = THIS_MODULE,
+	},
+	.remove = __exit_p(ps3_rtc_remove),
+};
+
+static int __init ps3_rtc_init(void)
+{
+	return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe);
+}
+
+static void __exit ps3_rtc_fini(void)
+{
+	platform_driver_unregister(&ps3_rtc_driver);
+}
+
+module_init(ps3_rtc_init);
+module_exit(ps3_rtc_fini);
+
+MODULE_AUTHOR("Sony Corporation");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("ps3 RTC driver");
+MODULE_ALIAS("platform:rtc-ps3");
-- 
1.6.0.4

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

* Re: [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc
  2009-03-09 13:26             ` Geert Uytterhoeven
@ 2009-03-09 13:59               ` David Woodhouse
  -1 siblings, 0 replies; 71+ messages in thread
From: David Woodhouse @ 2009-03-09 13:59 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Alessandro Zummo, Kyle McMartin, rtc-linux, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

On Mon, 2009-03-09 at 14:26 +0100, Geert Uytterhoeven wrote:
> PowerPC has been a long time user of the generic RTC abstraction, so hook up
> rtc-generic:
>   - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set,
>   - Kill rtc-ppc, as rtc-generic offers the same functionality in a more
>     generic way, and supports autoloading through udev.
> 
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>

Acked-By: David Woodhouse <David.Woodhouse@intel.com>

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation


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

* Re: [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc
@ 2009-03-09 13:59               ` David Woodhouse
  0 siblings, 0 replies; 71+ messages in thread
From: David Woodhouse @ 2009-03-09 13:59 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	linux-kernel, Kyle McMartin, linuxppc-dev, Paul Mundt,
	Dann Frazier

On Mon, 2009-03-09 at 14:26 +0100, Geert Uytterhoeven wrote:
> PowerPC has been a long time user of the generic RTC abstraction, so hook up
> rtc-generic:
>   - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set,
>   - Kill rtc-ppc, as rtc-generic offers the same functionality in a more
>     generic way, and supports autoloading through udev.
> 
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>

Acked-By: David Woodhouse <David.Woodhouse@intel.com>

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

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

* Re: [rtc-linux] [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 13:26               ` Geert Uytterhoeven
@ 2009-03-09 14:12                 ` Alessandro Zummo
  -1 siblings, 0 replies; 71+ messages in thread
From: Alessandro Zummo @ 2009-03-09 14:12 UTC (permalink / raw)
  To: rtc-linux
  Cc: Geert.Uytterhoeven, Kyle McMartin, linux-parisc, linuxppc-dev,
	linux-m68k, linux-kernel, Paul Mundt, Dann Frazier, Geoff Levand

On Mon,  9 Mar 2009 14:26:23 +0100
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:

 Hi,

   just a few notes:

> +
> +static int ps3_get_time(struct device *dev, struct rtc_time *tm)
> +{
> +	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
> +	tm->tm_year -= 1900;
> +	tm->tm_mon -= 1;
> +	return 0;
> +}

 this should be return rtc_valid_tm() .

 can't you use functions from rtc-lib.c instead of 
 that to_tm ?

> +
> +MODULE_AUTHOR("Sony Corporation");

 real name, if possible and a contact address
 here . Just in case I need someone to bother :)

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


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

* Re: [rtc-linux] [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 14:12                 ` Alessandro Zummo
  0 siblings, 0 replies; 71+ messages in thread
From: Alessandro Zummo @ 2009-03-09 14:12 UTC (permalink / raw)
  To: rtc-linux
  Cc: linux-m68k, linux-parisc, linux-kernel, Kyle McMartin,
	linuxppc-dev, Paul Mundt, Geert.Uytterhoeven, Dann Frazier

On Mon,  9 Mar 2009 14:26:23 +0100
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:

 Hi,

   just a few notes:

> +
> +static int ps3_get_time(struct device *dev, struct rtc_time *tm)
> +{
> +	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
> +	tm->tm_year -= 1900;
> +	tm->tm_mon -= 1;
> +	return 0;
> +}

 this should be return rtc_valid_tm() .

 can't you use functions from rtc-lib.c instead of 
 that to_tm ?

> +
> +MODULE_AUTHOR("Sony Corporation");

 real name, if possible and a contact address
 here . Just in case I need someone to bother :)

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it

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

* Re: [rtc-linux] [PATCH 0/7] Generic RTC class driver
  2009-03-09 13:26 ` Geert Uytterhoeven
@ 2009-03-09 14:14   ` Alessandro Zummo
  -1 siblings, 0 replies; 71+ messages in thread
From: Alessandro Zummo @ 2009-03-09 14:14 UTC (permalink / raw)
  To: rtc-linux
  Cc: Geert.Uytterhoeven, Kyle McMartin, linux-parisc, linuxppc-dev,
	linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

On Mon,  9 Mar 2009 14:26:16 +0100
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:


>         Hi Alessandro et al,
> 
> These patches are relative to the "rtc-parisc" branch of Kyle's PA-RISC git
> repository, which already contains some cleanups for the rtc-parisc driver by
> Dann, which already have been ack'ed by Alessandro:
> 
> http://git.kernel.org/?p=linux/kernel/git/kyle/parisc-2.6.git;a=shortlog;h=rtc-parisc
> 
> Paul: Feel free to add your SuperH support.
> 
> I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
> he already has the preceding patches? Can I have your acks, please?

 Here's mine. Thanks for your efforts . 
 
 Acked-by: Alessandro Zummo <a.zummo@towertech.it>

 btw I'll pretend I had never seen this patch
 if asked in court :)

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


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

* Re: [rtc-linux] [PATCH 0/7] Generic RTC class driver
@ 2009-03-09 14:14   ` Alessandro Zummo
  0 siblings, 0 replies; 71+ messages in thread
From: Alessandro Zummo @ 2009-03-09 14:14 UTC (permalink / raw)
  To: rtc-linux
  Cc: linux-m68k, linux-parisc, linux-kernel, Kyle McMartin,
	linuxppc-dev, Paul Mundt, Geert.Uytterhoeven, Dann Frazier

On Mon,  9 Mar 2009 14:26:16 +0100
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:


>         Hi Alessandro et al,
> 
> These patches are relative to the "rtc-parisc" branch of Kyle's PA-RISC git
> repository, which already contains some cleanups for the rtc-parisc driver by
> Dann, which already have been ack'ed by Alessandro:
> 
> http://git.kernel.org/?p=linux/kernel/git/kyle/parisc-2.6.git;a=shortlog;h=rtc-parisc
> 
> Paul: Feel free to add your SuperH support.
> 
> I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
> he already has the preceding patches? Can I have your acks, please?

 Here's mine. Thanks for your efforts . 
 
 Acked-by: Alessandro Zummo <a.zummo@towertech.it>

 btw I'll pretend I had never seen this patch
 if asked in court :)

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it

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

* Re: [rtc-linux] [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 14:12                 ` Alessandro Zummo
  (?)
  (?)
@ 2009-03-09 15:24                   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 15:24 UTC (permalink / raw)
  To: Alessandro Zummo
  Cc: rtc-linux, Kyle McMartin, linux-parisc, linuxppc-dev, linux-m68k,
	linux-kernel, Paul Mundt, Dann Frazier, Geoff Levand

On Mon, 9 Mar 2009, Alessandro Zummo wrote:
> On Mon,  9 Mar 2009 14:26:23 +0100
> Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
> > +
> > +static int ps3_get_time(struct device *dev, struct rtc_time *tm)
> > +{
> > +	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
> > +	tm->tm_year -=3D 1900;
> > +	tm->tm_mon -=3D 1;
> > +	return 0;
> > +}
>=20
>  this should be return rtc_valid_tm() .

=46ixed.

>  can't you use functions from rtc-lib.c instead of=20
>  that to_tm ?

Ah, those pesky PPC-specific functions... switched to rtc_time_to_tm() =
and
rtc_tm_to_time().

> > +
> > +MODULE_AUTHOR("Sony Corporation");
>=20
>  real name, if possible and a contact address
>  here . Just in case I need someone to bother :)

All PS3-specific drivers have this. But there's an official PS3 platfor=
m
maintainer in MAINTAINERS.

=46rom 41020647c3e2b07e0302a905a926d6221061a128 Mon Sep 17 00:00:00 200=
1
=46rom: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Date: Tue, 24 Feb 2009 14:04:20 +0100
Subject: powerpc/ps3: Add rtc-ps3

Create a real RTC driver for PS3, and unhook the deprecated
ppc_md.[gs]et_rtc_time.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
---
 arch/powerpc/include/asm/ps3.h        |    3 +
 arch/powerpc/platforms/ps3/os-area.c  |    2 +
 arch/powerpc/platforms/ps3/platform.h |    2 -
 arch/powerpc/platforms/ps3/setup.c    |    2 -
 arch/powerpc/platforms/ps3/time.c     |   26 ++++-----
 drivers/rtc/Kconfig                   |    9 +++
 drivers/rtc/Makefile                  |    1 +
 drivers/rtc/rtc-ps3.c                 |  104 +++++++++++++++++++++++++=
++++++++
 8 files changed, 131 insertions(+), 18 deletions(-)
 create mode 100644 drivers/rtc/rtc-ps3.c

diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/=
ps3.h
index 67f1812..cdb6fd8 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -50,6 +50,9 @@ enum ps3_param_av_multi_out {
=20
 enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void);
=20
+extern u64 ps3_os_area_get_rtc_diff(void);
+extern void ps3_os_area_set_rtc_diff(u64 rtc_diff);
+
 /* dma routines */
=20
 enum ps3_dma_page_size {
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platfo=
rms/ps3/os-area.c
index e1c83c2..86e392b 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -808,6 +808,7 @@ u64 ps3_os_area_get_rtc_diff(void)
 {
 	return saved_params.rtc_diff;
 }
+EXPORT_SYMBOL(ps3_os_area_get_rtc_diff);
=20
 /**
  * ps3_os_area_set_rtc_diff - Set the rtc diff value.
@@ -823,6 +824,7 @@ void ps3_os_area_set_rtc_diff(u64 rtc_diff)
 		os_area_queue_work();
 	}
 }
+EXPORT_SYMBOL(ps3_os_area_set_rtc_diff);
=20
 /**
  * ps3_os_area_get_av_multi_out - Returns the default video mode.
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platf=
orms/ps3/platform.h
index 235c13e..136aa06 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -64,8 +64,6 @@ int ps3_set_rtc_time(struct rtc_time *time);
=20
 void __init ps3_os_area_save_params(void);
 void __init ps3_os_area_init(void);
-u64 ps3_os_area_get_rtc_diff(void);
-void ps3_os_area_set_rtc_diff(u64 rtc_diff);
=20
 /* spu */
=20
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platform=
s/ps3/setup.c
index 3331ccb..6618182 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -270,8 +270,6 @@ define_machine(ps3) {
 	.init_IRQ			=3D ps3_init_IRQ,
 	.panic				=3D ps3_panic,
 	.get_boot_time			=3D ps3_get_boot_time,
-	.set_rtc_time			=3D ps3_set_rtc_time,
-	.get_rtc_time			=3D ps3_get_rtc_time,
 	.set_dabr			=3D ps3_set_dabr,
 	.calibrate_decr			=3D ps3_calibrate_decr,
 	.progress			=3D ps3_progress,
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms=
/ps3/time.c
index d0daf7d..b178a1e 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -19,6 +19,7 @@
  */
=20
 #include <linux/kernel.h>
+#include <linux/platform_device.h>
=20
 #include <asm/rtc.h>
 #include <asm/lv1call.h>
@@ -74,23 +75,20 @@ static u64 read_rtc(void)
 	return rtc_val;
 }
=20
-int ps3_set_rtc_time(struct rtc_time *tm)
+unsigned long __init ps3_get_boot_time(void)
 {
-	u64 now =3D mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
-		tm->tm_hour, tm->tm_min, tm->tm_sec);
-
-	ps3_os_area_set_rtc_diff(now - read_rtc());
-	return 0;
+	return read_rtc() + ps3_os_area_get_rtc_diff();
 }
=20
-void ps3_get_rtc_time(struct rtc_time *tm)
+static int __init ps3_rtc_init(void)
 {
-	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
-	tm->tm_year -=3D 1900;
-	tm->tm_mon -=3D 1;
-}
+	struct platform_device *pdev;
=20
-unsigned long __init ps3_get_boot_time(void)
-{
-	return read_rtc() + ps3_os_area_get_rtc_diff();
+	pdev =3D platform_device_register_simple("rtc-ps3", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
 }
+
+module_init(ps3_rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 6488c50..7b6b63a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -730,4 +730,13 @@ config RTC_DRV_MV
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-mv.
=20
+config RTC_DRV_PS3
+	tristate "PS3 RTC"
+	depends on PPC_PS3
+	help
+	  If you say yes here you will get support for the RTC on PS3.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-ps3.
+
 endif # RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index bd209a5..d161d1d 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -75,3 +75,4 @@ obj-$(CONFIG_RTC_DRV_VR41XX)	+=3D rtc-vr41xx.o
 obj-$(CONFIG_RTC_DRV_WM8350)	+=3D rtc-wm8350.o
 obj-$(CONFIG_RTC_DRV_X1205)	+=3D rtc-x1205.o
 obj-$(CONFIG_RTC_DRV_PCF50633)	+=3D rtc-pcf50633.o
+obj-$(CONFIG_RTC_DRV_PS3)	+=3D rtc-ps3.o
diff --git a/drivers/rtc/rtc-ps3.c b/drivers/rtc/rtc-ps3.c
new file mode 100644
index 0000000..968133c
--- /dev/null
+++ b/drivers/rtc/rtc-ps3.c
@@ -0,0 +1,104 @@
+/*
+ * PS3 RTC Driver
+ *
+ * Copyright 2009 Sony Corporation
+ *
+ * This program is free software; you can redistribute it and/or modif=
y
+ * it under the terms of the GNU General Public License as published b=
y
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.
+ * If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+
+#include <asm/lv1call.h>
+#include <asm/ps3.h>
+
+
+static u64 read_rtc(void)
+{
+	int result;
+	u64 rtc_val;
+	u64 tb_val;
+
+	result =3D lv1_get_rtc(&rtc_val, &tb_val);
+	BUG_ON(result);
+
+	return rtc_val;
+}
+
+static int ps3_get_time(struct device *dev, struct rtc_time *tm)
+{
+	rtc_time_to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
+	return rtc_valid_tm(tm);
+}
+
+static int ps3_set_time(struct device *dev, struct rtc_time *tm)
+{
+	unsigned long now;
+
+	rtc_tm_to_time(tm, &now);
+	ps3_os_area_set_rtc_diff(now - read_rtc());
+	return 0;
+}
+
+static const struct rtc_class_ops ps3_rtc_ops =3D {
+	.read_time =3D ps3_get_time,
+	.set_time =3D ps3_set_time,
+};
+
+static int __init ps3_rtc_probe(struct platform_device *dev)
+{
+	struct rtc_device *rtc;
+
+	rtc =3D rtc_device_register("rtc-ps3", &dev->dev, &ps3_rtc_ops,
+				  THIS_MODULE);
+	if (IS_ERR(rtc))
+		return PTR_ERR(rtc);
+
+	platform_set_drvdata(dev, rtc);
+	return 0;
+}
+
+static int __exit ps3_rtc_remove(struct platform_device *dev)
+{
+	rtc_device_unregister(platform_get_drvdata(dev));
+	return 0;
+}
+
+static struct platform_driver ps3_rtc_driver =3D {
+	.driver =3D {
+		.name =3D "rtc-ps3",
+		.owner =3D THIS_MODULE,
+	},
+	.remove =3D __exit_p(ps3_rtc_remove),
+};
+
+static int __init ps3_rtc_init(void)
+{
+	return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe);
+}
+
+static void __exit ps3_rtc_fini(void)
+{
+	platform_driver_unregister(&ps3_rtc_driver);
+}
+
+module_init(ps3_rtc_init);
+module_exit(ps3_rtc_fini);
+
+MODULE_AUTHOR("Sony Corporation");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("ps3 RTC driver");
+MODULE_ALIAS("platform:rtc-ps3");
--=20
1.6.0.4

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village =B7 Da Vincilaan 7-D1 =B7 B-1935 Zaventem =B7 Bel=
gium

Phone:    +32 (0)2 700 8453
=46ax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 =B7 RPR Brussels
=46ortis =B7 BIC GEBABEBB =B7 IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [rtc-linux] [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 15:24                   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 15:24 UTC (permalink / raw)
  To: Alessandro Zummo
  Cc: rtc-linux, Kyle McMartin, linux-parisc, linuxppc-dev, linux-m68k,
	linux-kernel, Paul Mundt, Dann Frazier, Geoff Levand

On Mon, 9 Mar 2009, Alessandro Zummo wrote:
> On Mon,  9 Mar 2009 14:26:23 +0100
> Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
> > +
> > +static int ps3_get_time(struct device *dev, struct rtc_time *tm)
> > +{
> > +	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
> > +	tm->tm_year -= 1900;
> > +	tm->tm_mon -= 1;
> > +	return 0;
> > +}
> 
>  this should be return rtc_valid_tm() .

Fixed.

>  can't you use functions from rtc-lib.c instead of 
>  that to_tm ?

Ah, those pesky PPC-specific functions... switched to rtc_time_to_tm() and
rtc_tm_to_time().

> > +
> > +MODULE_AUTHOR("Sony Corporation");
> 
>  real name, if possible and a contact address
>  here . Just in case I need someone to bother :)

All PS3-specific drivers have this. But there's an official PS3 platform
maintainer in MAINTAINERS.

>From 41020647c3e2b07e0302a905a926d6221061a128 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Date: Tue, 24 Feb 2009 14:04:20 +0100
Subject: powerpc/ps3: Add rtc-ps3

Create a real RTC driver for PS3, and unhook the deprecated
ppc_md.[gs]et_rtc_time.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
---
 arch/powerpc/include/asm/ps3.h        |    3 +
 arch/powerpc/platforms/ps3/os-area.c  |    2 +
 arch/powerpc/platforms/ps3/platform.h |    2 -
 arch/powerpc/platforms/ps3/setup.c    |    2 -
 arch/powerpc/platforms/ps3/time.c     |   26 ++++-----
 drivers/rtc/Kconfig                   |    9 +++
 drivers/rtc/Makefile                  |    1 +
 drivers/rtc/rtc-ps3.c                 |  104 +++++++++++++++++++++++++++++++++
 8 files changed, 131 insertions(+), 18 deletions(-)
 create mode 100644 drivers/rtc/rtc-ps3.c

diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h
index 67f1812..cdb6fd8 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -50,6 +50,9 @@ enum ps3_param_av_multi_out {
 
 enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void);
 
+extern u64 ps3_os_area_get_rtc_diff(void);
+extern void ps3_os_area_set_rtc_diff(u64 rtc_diff);
+
 /* dma routines */
 
 enum ps3_dma_page_size {
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index e1c83c2..86e392b 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -808,6 +808,7 @@ u64 ps3_os_area_get_rtc_diff(void)
 {
 	return saved_params.rtc_diff;
 }
+EXPORT_SYMBOL(ps3_os_area_get_rtc_diff);
 
 /**
  * ps3_os_area_set_rtc_diff - Set the rtc diff value.
@@ -823,6 +824,7 @@ void ps3_os_area_set_rtc_diff(u64 rtc_diff)
 		os_area_queue_work();
 	}
 }
+EXPORT_SYMBOL(ps3_os_area_set_rtc_diff);
 
 /**
  * ps3_os_area_get_av_multi_out - Returns the default video mode.
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 235c13e..136aa06 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -64,8 +64,6 @@ int ps3_set_rtc_time(struct rtc_time *time);
 
 void __init ps3_os_area_save_params(void);
 void __init ps3_os_area_init(void);
-u64 ps3_os_area_get_rtc_diff(void);
-void ps3_os_area_set_rtc_diff(u64 rtc_diff);
 
 /* spu */
 
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 3331ccb..6618182 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -270,8 +270,6 @@ define_machine(ps3) {
 	.init_IRQ			= ps3_init_IRQ,
 	.panic				= ps3_panic,
 	.get_boot_time			= ps3_get_boot_time,
-	.set_rtc_time			= ps3_set_rtc_time,
-	.get_rtc_time			= ps3_get_rtc_time,
 	.set_dabr			= ps3_set_dabr,
 	.calibrate_decr			= ps3_calibrate_decr,
 	.progress			= ps3_progress,
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index d0daf7d..b178a1e 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -19,6 +19,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/platform_device.h>
 
 #include <asm/rtc.h>
 #include <asm/lv1call.h>
@@ -74,23 +75,20 @@ static u64 read_rtc(void)
 	return rtc_val;
 }
 
-int ps3_set_rtc_time(struct rtc_time *tm)
+unsigned long __init ps3_get_boot_time(void)
 {
-	u64 now = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
-		tm->tm_hour, tm->tm_min, tm->tm_sec);
-
-	ps3_os_area_set_rtc_diff(now - read_rtc());
-	return 0;
+	return read_rtc() + ps3_os_area_get_rtc_diff();
 }
 
-void ps3_get_rtc_time(struct rtc_time *tm)
+static int __init ps3_rtc_init(void)
 {
-	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
-	tm->tm_year -= 1900;
-	tm->tm_mon -= 1;
-}
+	struct platform_device *pdev;
 
-unsigned long __init ps3_get_boot_time(void)
-{
-	return read_rtc() + ps3_os_area_get_rtc_diff();
+	pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
 }
+
+module_init(ps3_rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 6488c50..7b6b63a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -730,4 +730,13 @@ config RTC_DRV_MV
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-mv.
 
+config RTC_DRV_PS3
+	tristate "PS3 RTC"
+	depends on PPC_PS3
+	help
+	  If you say yes here you will get support for the RTC on PS3.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-ps3.
+
 endif # RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index bd209a5..d161d1d 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -75,3 +75,4 @@ obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
 obj-$(CONFIG_RTC_DRV_WM8350)	+= rtc-wm8350.o
 obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
 obj-$(CONFIG_RTC_DRV_PCF50633)	+= rtc-pcf50633.o
+obj-$(CONFIG_RTC_DRV_PS3)	+= rtc-ps3.o
diff --git a/drivers/rtc/rtc-ps3.c b/drivers/rtc/rtc-ps3.c
new file mode 100644
index 0000000..968133c
--- /dev/null
+++ b/drivers/rtc/rtc-ps3.c
@@ -0,0 +1,104 @@
+/*
+ * PS3 RTC Driver
+ *
+ * Copyright 2009 Sony Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.
+ * If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+
+#include <asm/lv1call.h>
+#include <asm/ps3.h>
+
+
+static u64 read_rtc(void)
+{
+	int result;
+	u64 rtc_val;
+	u64 tb_val;
+
+	result = lv1_get_rtc(&rtc_val, &tb_val);
+	BUG_ON(result);
+
+	return rtc_val;
+}
+
+static int ps3_get_time(struct device *dev, struct rtc_time *tm)
+{
+	rtc_time_to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
+	return rtc_valid_tm(tm);
+}
+
+static int ps3_set_time(struct device *dev, struct rtc_time *tm)
+{
+	unsigned long now;
+
+	rtc_tm_to_time(tm, &now);
+	ps3_os_area_set_rtc_diff(now - read_rtc());
+	return 0;
+}
+
+static const struct rtc_class_ops ps3_rtc_ops = {
+	.read_time = ps3_get_time,
+	.set_time = ps3_set_time,
+};
+
+static int __init ps3_rtc_probe(struct platform_device *dev)
+{
+	struct rtc_device *rtc;
+
+	rtc = rtc_device_register("rtc-ps3", &dev->dev, &ps3_rtc_ops,
+				  THIS_MODULE);
+	if (IS_ERR(rtc))
+		return PTR_ERR(rtc);
+
+	platform_set_drvdata(dev, rtc);
+	return 0;
+}
+
+static int __exit ps3_rtc_remove(struct platform_device *dev)
+{
+	rtc_device_unregister(platform_get_drvdata(dev));
+	return 0;
+}
+
+static struct platform_driver ps3_rtc_driver = {
+	.driver = {
+		.name = "rtc-ps3",
+		.owner = THIS_MODULE,
+	},
+	.remove = __exit_p(ps3_rtc_remove),
+};
+
+static int __init ps3_rtc_init(void)
+{
+	return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe);
+}
+
+static void __exit ps3_rtc_fini(void)
+{
+	platform_driver_unregister(&ps3_rtc_driver);
+}
+
+module_init(ps3_rtc_init);
+module_exit(ps3_rtc_fini);
+
+MODULE_AUTHOR("Sony Corporation");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("ps3 RTC driver");
+MODULE_ALIAS("platform:rtc-ps3");
-- 
1.6.0.4

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [rtc-linux] [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 15:24                   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 15:24 UTC (permalink / raw)
  To: Alessandro Zummo
  Cc: rtc-linux, Kyle McMartin, linux-parisc, linuxppc-dev, linux-m68k,
	linux-kernel, Paul Mundt, Dann Frazier, Geoff Levand

On Mon, 9 Mar 2009, Alessandro Zummo wrote:
> On Mon,  9 Mar 2009 14:26:23 +0100
> Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
> > +
> > +static int ps3_get_time(struct device *dev, struct rtc_time *tm)
> > +{
> > +	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
> > +	tm->tm_year -= 1900;
> > +	tm->tm_mon -= 1;
> > +	return 0;
> > +}
> 
>  this should be return rtc_valid_tm() .

Fixed.

>  can't you use functions from rtc-lib.c instead of 
>  that to_tm ?

Ah, those pesky PPC-specific functions... switched to rtc_time_to_tm() and
rtc_tm_to_time().

> > +
> > +MODULE_AUTHOR("Sony Corporation");
> 
>  real name, if possible and a contact address
>  here . Just in case I need someone to bother :)

All PS3-specific drivers have this. But there's an official PS3 platform
maintainer in MAINTAINERS.

From 41020647c3e2b07e0302a905a926d6221061a128 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Date: Tue, 24 Feb 2009 14:04:20 +0100
Subject: powerpc/ps3: Add rtc-ps3

Create a real RTC driver for PS3, and unhook the deprecated
ppc_md.[gs]et_rtc_time.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
---
 arch/powerpc/include/asm/ps3.h        |    3 +
 arch/powerpc/platforms/ps3/os-area.c  |    2 +
 arch/powerpc/platforms/ps3/platform.h |    2 -
 arch/powerpc/platforms/ps3/setup.c    |    2 -
 arch/powerpc/platforms/ps3/time.c     |   26 ++++-----
 drivers/rtc/Kconfig                   |    9 +++
 drivers/rtc/Makefile                  |    1 +
 drivers/rtc/rtc-ps3.c                 |  104 +++++++++++++++++++++++++++++++++
 8 files changed, 131 insertions(+), 18 deletions(-)
 create mode 100644 drivers/rtc/rtc-ps3.c

diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h
index 67f1812..cdb6fd8 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -50,6 +50,9 @@ enum ps3_param_av_multi_out {
 
 enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void);
 
+extern u64 ps3_os_area_get_rtc_diff(void);
+extern void ps3_os_area_set_rtc_diff(u64 rtc_diff);
+
 /* dma routines */
 
 enum ps3_dma_page_size {
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index e1c83c2..86e392b 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -808,6 +808,7 @@ u64 ps3_os_area_get_rtc_diff(void)
 {
 	return saved_params.rtc_diff;
 }
+EXPORT_SYMBOL(ps3_os_area_get_rtc_diff);
 
 /**
  * ps3_os_area_set_rtc_diff - Set the rtc diff value.
@@ -823,6 +824,7 @@ void ps3_os_area_set_rtc_diff(u64 rtc_diff)
 		os_area_queue_work();
 	}
 }
+EXPORT_SYMBOL(ps3_os_area_set_rtc_diff);
 
 /**
  * ps3_os_area_get_av_multi_out - Returns the default video mode.
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 235c13e..136aa06 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -64,8 +64,6 @@ int ps3_set_rtc_time(struct rtc_time *time);
 
 void __init ps3_os_area_save_params(void);
 void __init ps3_os_area_init(void);
-u64 ps3_os_area_get_rtc_diff(void);
-void ps3_os_area_set_rtc_diff(u64 rtc_diff);
 
 /* spu */
 
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 3331ccb..6618182 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -270,8 +270,6 @@ define_machine(ps3) {
 	.init_IRQ			= ps3_init_IRQ,
 	.panic				= ps3_panic,
 	.get_boot_time			= ps3_get_boot_time,
-	.set_rtc_time			= ps3_set_rtc_time,
-	.get_rtc_time			= ps3_get_rtc_time,
 	.set_dabr			= ps3_set_dabr,
 	.calibrate_decr			= ps3_calibrate_decr,
 	.progress			= ps3_progress,
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index d0daf7d..b178a1e 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -19,6 +19,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/platform_device.h>
 
 #include <asm/rtc.h>
 #include <asm/lv1call.h>
@@ -74,23 +75,20 @@ static u64 read_rtc(void)
 	return rtc_val;
 }
 
-int ps3_set_rtc_time(struct rtc_time *tm)
+unsigned long __init ps3_get_boot_time(void)
 {
-	u64 now = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
-		tm->tm_hour, tm->tm_min, tm->tm_sec);
-
-	ps3_os_area_set_rtc_diff(now - read_rtc());
-	return 0;
+	return read_rtc() + ps3_os_area_get_rtc_diff();
 }
 
-void ps3_get_rtc_time(struct rtc_time *tm)
+static int __init ps3_rtc_init(void)
 {
-	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
-	tm->tm_year -= 1900;
-	tm->tm_mon -= 1;
-}
+	struct platform_device *pdev;
 
-unsigned long __init ps3_get_boot_time(void)
-{
-	return read_rtc() + ps3_os_area_get_rtc_diff();
+	pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
 }
+
+module_init(ps3_rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 6488c50..7b6b63a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -730,4 +730,13 @@ config RTC_DRV_MV
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-mv.
 
+config RTC_DRV_PS3
+	tristate "PS3 RTC"
+	depends on PPC_PS3
+	help
+	  If you say yes here you will get support for the RTC on PS3.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-ps3.
+
 endif # RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index bd209a5..d161d1d 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -75,3 +75,4 @@ obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
 obj-$(CONFIG_RTC_DRV_WM8350)	+= rtc-wm8350.o
 obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
 obj-$(CONFIG_RTC_DRV_PCF50633)	+= rtc-pcf50633.o
+obj-$(CONFIG_RTC_DRV_PS3)	+= rtc-ps3.o
diff --git a/drivers/rtc/rtc-ps3.c b/drivers/rtc/rtc-ps3.c
new file mode 100644
index 0000000..968133c
--- /dev/null
+++ b/drivers/rtc/rtc-ps3.c
@@ -0,0 +1,104 @@
+/*
+ * PS3 RTC Driver
+ *
+ * Copyright 2009 Sony Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.
+ * If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+
+#include <asm/lv1call.h>
+#include <asm/ps3.h>
+
+
+static u64 read_rtc(void)
+{
+	int result;
+	u64 rtc_val;
+	u64 tb_val;
+
+	result = lv1_get_rtc(&rtc_val, &tb_val);
+	BUG_ON(result);
+
+	return rtc_val;
+}
+
+static int ps3_get_time(struct device *dev, struct rtc_time *tm)
+{
+	rtc_time_to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
+	return rtc_valid_tm(tm);
+}
+
+static int ps3_set_time(struct device *dev, struct rtc_time *tm)
+{
+	unsigned long now;
+
+	rtc_tm_to_time(tm, &now);
+	ps3_os_area_set_rtc_diff(now - read_rtc());
+	return 0;
+}
+
+static const struct rtc_class_ops ps3_rtc_ops = {
+	.read_time = ps3_get_time,
+	.set_time = ps3_set_time,
+};
+
+static int __init ps3_rtc_probe(struct platform_device *dev)
+{
+	struct rtc_device *rtc;
+
+	rtc = rtc_device_register("rtc-ps3", &dev->dev, &ps3_rtc_ops,
+				  THIS_MODULE);
+	if (IS_ERR(rtc))
+		return PTR_ERR(rtc);
+
+	platform_set_drvdata(dev, rtc);
+	return 0;
+}
+
+static int __exit ps3_rtc_remove(struct platform_device *dev)
+{
+	rtc_device_unregister(platform_get_drvdata(dev));
+	return 0;
+}
+
+static struct platform_driver ps3_rtc_driver = {
+	.driver = {
+		.name = "rtc-ps3",
+		.owner = THIS_MODULE,
+	},
+	.remove = __exit_p(ps3_rtc_remove),
+};
+
+static int __init ps3_rtc_init(void)
+{
+	return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe);
+}
+
+static void __exit ps3_rtc_fini(void)
+{
+	platform_driver_unregister(&ps3_rtc_driver);
+}
+
+module_init(ps3_rtc_init);
+module_exit(ps3_rtc_fini);
+
+MODULE_AUTHOR("Sony Corporation");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("ps3 RTC driver");
+MODULE_ALIAS("platform:rtc-ps3");
-- 
1.6.0.4

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [rtc-linux] [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 15:24                   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-09 15:24 UTC (permalink / raw)
  To: Alessandro Zummo
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, Kyle McMartin,
	linuxppc-dev, Paul Mundt, Dann Frazier

On Mon, 9 Mar 2009, Alessandro Zummo wrote:
> On Mon,  9 Mar 2009 14:26:23 +0100
> Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
> > +
> > +static int ps3_get_time(struct device *dev, struct rtc_time *tm)
> > +{
> > +	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
> > +	tm->tm_year -= 1900;
> > +	tm->tm_mon -= 1;
> > +	return 0;
> > +}
> 
>  this should be return rtc_valid_tm() .

Fixed.

>  can't you use functions from rtc-lib.c instead of 
>  that to_tm ?

Ah, those pesky PPC-specific functions... switched to rtc_time_to_tm() and
rtc_tm_to_time().

> > +
> > +MODULE_AUTHOR("Sony Corporation");
> 
>  real name, if possible and a contact address
>  here . Just in case I need someone to bother :)

All PS3-specific drivers have this. But there's an official PS3 platform
maintainer in MAINTAINERS.

>From 41020647c3e2b07e0302a905a926d6221061a128 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Date: Tue, 24 Feb 2009 14:04:20 +0100
Subject: powerpc/ps3: Add rtc-ps3

Create a real RTC driver for PS3, and unhook the deprecated
ppc_md.[gs]et_rtc_time.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
---
 arch/powerpc/include/asm/ps3.h        |    3 +
 arch/powerpc/platforms/ps3/os-area.c  |    2 +
 arch/powerpc/platforms/ps3/platform.h |    2 -
 arch/powerpc/platforms/ps3/setup.c    |    2 -
 arch/powerpc/platforms/ps3/time.c     |   26 ++++-----
 drivers/rtc/Kconfig                   |    9 +++
 drivers/rtc/Makefile                  |    1 +
 drivers/rtc/rtc-ps3.c                 |  104 +++++++++++++++++++++++++++++++++
 8 files changed, 131 insertions(+), 18 deletions(-)
 create mode 100644 drivers/rtc/rtc-ps3.c

diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h
index 67f1812..cdb6fd8 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -50,6 +50,9 @@ enum ps3_param_av_multi_out {
 
 enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void);
 
+extern u64 ps3_os_area_get_rtc_diff(void);
+extern void ps3_os_area_set_rtc_diff(u64 rtc_diff);
+
 /* dma routines */
 
 enum ps3_dma_page_size {
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index e1c83c2..86e392b 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -808,6 +808,7 @@ u64 ps3_os_area_get_rtc_diff(void)
 {
 	return saved_params.rtc_diff;
 }
+EXPORT_SYMBOL(ps3_os_area_get_rtc_diff);
 
 /**
  * ps3_os_area_set_rtc_diff - Set the rtc diff value.
@@ -823,6 +824,7 @@ void ps3_os_area_set_rtc_diff(u64 rtc_diff)
 		os_area_queue_work();
 	}
 }
+EXPORT_SYMBOL(ps3_os_area_set_rtc_diff);
 
 /**
  * ps3_os_area_get_av_multi_out - Returns the default video mode.
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 235c13e..136aa06 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -64,8 +64,6 @@ int ps3_set_rtc_time(struct rtc_time *time);
 
 void __init ps3_os_area_save_params(void);
 void __init ps3_os_area_init(void);
-u64 ps3_os_area_get_rtc_diff(void);
-void ps3_os_area_set_rtc_diff(u64 rtc_diff);
 
 /* spu */
 
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 3331ccb..6618182 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -270,8 +270,6 @@ define_machine(ps3) {
 	.init_IRQ			= ps3_init_IRQ,
 	.panic				= ps3_panic,
 	.get_boot_time			= ps3_get_boot_time,
-	.set_rtc_time			= ps3_set_rtc_time,
-	.get_rtc_time			= ps3_get_rtc_time,
 	.set_dabr			= ps3_set_dabr,
 	.calibrate_decr			= ps3_calibrate_decr,
 	.progress			= ps3_progress,
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index d0daf7d..b178a1e 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -19,6 +19,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/platform_device.h>
 
 #include <asm/rtc.h>
 #include <asm/lv1call.h>
@@ -74,23 +75,20 @@ static u64 read_rtc(void)
 	return rtc_val;
 }
 
-int ps3_set_rtc_time(struct rtc_time *tm)
+unsigned long __init ps3_get_boot_time(void)
 {
-	u64 now = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
-		tm->tm_hour, tm->tm_min, tm->tm_sec);
-
-	ps3_os_area_set_rtc_diff(now - read_rtc());
-	return 0;
+	return read_rtc() + ps3_os_area_get_rtc_diff();
 }
 
-void ps3_get_rtc_time(struct rtc_time *tm)
+static int __init ps3_rtc_init(void)
 {
-	to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
-	tm->tm_year -= 1900;
-	tm->tm_mon -= 1;
-}
+	struct platform_device *pdev;
 
-unsigned long __init ps3_get_boot_time(void)
-{
-	return read_rtc() + ps3_os_area_get_rtc_diff();
+	pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
 }
+
+module_init(ps3_rtc_init);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 6488c50..7b6b63a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -730,4 +730,13 @@ config RTC_DRV_MV
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-mv.
 
+config RTC_DRV_PS3
+	tristate "PS3 RTC"
+	depends on PPC_PS3
+	help
+	  If you say yes here you will get support for the RTC on PS3.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-ps3.
+
 endif # RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index bd209a5..d161d1d 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -75,3 +75,4 @@ obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
 obj-$(CONFIG_RTC_DRV_WM8350)	+= rtc-wm8350.o
 obj-$(CONFIG_RTC_DRV_X1205)	+= rtc-x1205.o
 obj-$(CONFIG_RTC_DRV_PCF50633)	+= rtc-pcf50633.o
+obj-$(CONFIG_RTC_DRV_PS3)	+= rtc-ps3.o
diff --git a/drivers/rtc/rtc-ps3.c b/drivers/rtc/rtc-ps3.c
new file mode 100644
index 0000000..968133c
--- /dev/null
+++ b/drivers/rtc/rtc-ps3.c
@@ -0,0 +1,104 @@
+/*
+ * PS3 RTC Driver
+ *
+ * Copyright 2009 Sony Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.
+ * If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/rtc.h>
+
+#include <asm/lv1call.h>
+#include <asm/ps3.h>
+
+
+static u64 read_rtc(void)
+{
+	int result;
+	u64 rtc_val;
+	u64 tb_val;
+
+	result = lv1_get_rtc(&rtc_val, &tb_val);
+	BUG_ON(result);
+
+	return rtc_val;
+}
+
+static int ps3_get_time(struct device *dev, struct rtc_time *tm)
+{
+	rtc_time_to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
+	return rtc_valid_tm(tm);
+}
+
+static int ps3_set_time(struct device *dev, struct rtc_time *tm)
+{
+	unsigned long now;
+
+	rtc_tm_to_time(tm, &now);
+	ps3_os_area_set_rtc_diff(now - read_rtc());
+	return 0;
+}
+
+static const struct rtc_class_ops ps3_rtc_ops = {
+	.read_time = ps3_get_time,
+	.set_time = ps3_set_time,
+};
+
+static int __init ps3_rtc_probe(struct platform_device *dev)
+{
+	struct rtc_device *rtc;
+
+	rtc = rtc_device_register("rtc-ps3", &dev->dev, &ps3_rtc_ops,
+				  THIS_MODULE);
+	if (IS_ERR(rtc))
+		return PTR_ERR(rtc);
+
+	platform_set_drvdata(dev, rtc);
+	return 0;
+}
+
+static int __exit ps3_rtc_remove(struct platform_device *dev)
+{
+	rtc_device_unregister(platform_get_drvdata(dev));
+	return 0;
+}
+
+static struct platform_driver ps3_rtc_driver = {
+	.driver = {
+		.name = "rtc-ps3",
+		.owner = THIS_MODULE,
+	},
+	.remove = __exit_p(ps3_rtc_remove),
+};
+
+static int __init ps3_rtc_init(void)
+{
+	return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe);
+}
+
+static void __exit ps3_rtc_fini(void)
+{
+	platform_driver_unregister(&ps3_rtc_driver);
+}
+
+module_init(ps3_rtc_init);
+module_exit(ps3_rtc_fini);
+
+MODULE_AUTHOR("Sony Corporation");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("ps3 RTC driver");
+MODULE_ALIAS("platform:rtc-ps3");
-- 
1.6.0.4

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [PATCH 0/7] Generic RTC class driver
  2009-03-09 13:26 ` Geert Uytterhoeven
@ 2009-03-09 15:46   ` Paul Mundt
  -1 siblings, 0 replies; 71+ messages in thread
From: Paul Mundt @ 2009-03-09 15:46 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Alessandro Zummo, Kyle McMartin, rtc-linux, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Dann Frazier

On Mon, Mar 09, 2009 at 02:26:16PM +0100, Geert Uytterhoeven wrote:
> Paul: Feel free to add your SuperH support.
> 
> I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
> he already has the preceding patches? Can I have your acks, please?
> 
I'll add the SH support once the patch set is merged, it's not a very
pressing matter, so no need to make the patch juggling any more
complicated :-)

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-03-09 15:46   ` Paul Mundt
  0 siblings, 0 replies; 71+ messages in thread
From: Paul Mundt @ 2009-03-09 15:46 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	linux-kernel, Kyle McMartin, linuxppc-dev, Dann Frazier

On Mon, Mar 09, 2009 at 02:26:16PM +0100, Geert Uytterhoeven wrote:
> Paul: Feel free to add your SuperH support.
> 
> I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
> he already has the preceding patches? Can I have your acks, please?
> 
I'll add the SH support once the patch set is merged, it's not a very
pressing matter, so no need to make the patch juggling any more
complicated :-)

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

* Re: [rtc-linux] [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 14:12                 ` Alessandro Zummo
@ 2009-03-09 18:04                   ` Geoff Levand
  -1 siblings, 0 replies; 71+ messages in thread
From: Geoff Levand @ 2009-03-09 18:04 UTC (permalink / raw)
  To: Alessandro Zummo
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, Kyle McMartin,
	linuxppc-dev, Paul Mundt, Geert.Uytterhoeven, Dann Frazier

Hi,

On 03/09/2009 07:12 AM, Alessandro Zummo wrote:
> On Mon,  9 Mar 2009 14:26:23 +0100
> Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
>> +
>> +MODULE_AUTHOR("Sony Corporation");
> 
>  real name, if possible and a contact address
>  here . Just in case I need someone to bother :)

Please look at the MAINTAINERS file, that will give
the contact for PS3.  It is much easier to maintain
a single place for the contact than many spread
throughout the kernel sources.

-Geoff

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

* Re: [rtc-linux] [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 18:04                   ` Geoff Levand
  0 siblings, 0 replies; 71+ messages in thread
From: Geoff Levand @ 2009-03-09 18:04 UTC (permalink / raw)
  To: Alessandro Zummo
  Cc: rtc-linux, Geert.Uytterhoeven, Kyle McMartin, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

Hi,

On 03/09/2009 07:12 AM, Alessandro Zummo wrote:
> On Mon,  9 Mar 2009 14:26:23 +0100
> Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
>> +
>> +MODULE_AUTHOR("Sony Corporation");
> 
>  real name, if possible and a contact address
>  here . Just in case I need someone to bother :)

Please look at the MAINTAINERS file, that will give
the contact for PS3.  It is much easier to maintain
a single place for the contact than many spread
throughout the kernel sources.

-Geoff


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

* Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 13:26               ` Geert Uytterhoeven
@ 2009-03-09 18:35                 ` Geoff Levand
  -1 siblings, 0 replies; 71+ messages in thread
From: Geoff Levand @ 2009-03-09 18:35 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Alessandro Zummo, Kyle McMartin, rtc-linux, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

On 03/09/2009 06:26 AM, Geert Uytterhoeven wrote:
> Create a real RTC driver for PS3, and unhook the deprecated
> ppc_md.[gs]et_rtc_time.

>  8 files changed, 132 insertions(+), 18 deletions(-)

Sorry, I hadn't been following the discussion closely, but
could you explain why we are going from a generic framework
where we hook in our platform specific part to a totally
independent driver that has such an increase in code size.

Why couldn't you fix the generic part so that udev could
load it automatically?

I much prefer to have this code in the platform support
code as it was.  It is much more effort (a pain) to maintain
a separate driver were I have to cater to a subsystem's
maintainer, and with this rtc it seems everyone who was
using the generic PPC driver will need to do the same.

-Geoff


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

* Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 18:35                 ` Geoff Levand
  0 siblings, 0 replies; 71+ messages in thread
From: Geoff Levand @ 2009-03-09 18:35 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	linux-kernel, Kyle McMartin, linuxppc-dev, Paul Mundt,
	Dann Frazier

On 03/09/2009 06:26 AM, Geert Uytterhoeven wrote:
> Create a real RTC driver for PS3, and unhook the deprecated
> ppc_md.[gs]et_rtc_time.

>  8 files changed, 132 insertions(+), 18 deletions(-)

Sorry, I hadn't been following the discussion closely, but
could you explain why we are going from a generic framework
where we hook in our platform specific part to a totally
independent driver that has such an increase in code size.

Why couldn't you fix the generic part so that udev could
load it automatically?

I much prefer to have this code in the platform support
code as it was.  It is much more effort (a pain) to maintain
a separate driver were I have to cater to a subsystem's
maintainer, and with this rtc it seems everyone who was
using the generic PPC driver will need to do the same.

-Geoff

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

* Re: [rtc-linux] Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 18:04                   ` Geoff Levand
@ 2009-03-09 18:43                     ` Alessandro Zummo
  -1 siblings, 0 replies; 71+ messages in thread
From: Alessandro Zummo @ 2009-03-09 18:43 UTC (permalink / raw)
  To: rtc-linux
  Cc: geoffrey.levand, Geert.Uytterhoeven, Kyle McMartin, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

On Mon, 9 Mar 2009 11:04:17 -0700
Geoff Levand <geoffrey.levand@am.sony.com> wrote:

> 
> Hi,
> 
> On 03/09/2009 07:12 AM, Alessandro Zummo wrote:
> > On Mon,  9 Mar 2009 14:26:23 +0100
> > Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
> >> +
> >> +MODULE_AUTHOR("Sony Corporation");
> > 
> >  real name, if possible and a contact address
> >  here . Just in case I need someone to bother :)
> 
> Please look at the MAINTAINERS file, that will give
> the contact for PS3.  It is much easier to maintain
> a single place for the contact than many spread
> throughout the kernel sources.

 Having it in MODULE_AUTHOR allow my scripts to automatically
 send an email when appropriate.

 MAINTAINERS lists the files with an arbitrary
 driver title so that the search must be made by an human and there's
 no field that links a person to a specific .c .

 so every time I want to address someone I need to check MODULE_AUTHOR,
 the git log and the MAINTAINERS file.

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


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

* Re: [rtc-linux] Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 18:43                     ` Alessandro Zummo
  0 siblings, 0 replies; 71+ messages in thread
From: Alessandro Zummo @ 2009-03-09 18:43 UTC (permalink / raw)
  To: rtc-linux
  Cc: linux-m68k, linux-parisc, Dann, Kyle, linux-kernel, McMartin,
	linuxppc-dev, Paul Mundt, Geert.Uytterhoeven, Frazier

On Mon, 9 Mar 2009 11:04:17 -0700
Geoff Levand <geoffrey.levand@am.sony.com> wrote:

> 
> Hi,
> 
> On 03/09/2009 07:12 AM, Alessandro Zummo wrote:
> > On Mon,  9 Mar 2009 14:26:23 +0100
> > Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
> >> +
> >> +MODULE_AUTHOR("Sony Corporation");
> > 
> >  real name, if possible and a contact address
> >  here . Just in case I need someone to bother :)
> 
> Please look at the MAINTAINERS file, that will give
> the contact for PS3.  It is much easier to maintain
> a single place for the contact than many spread
> throughout the kernel sources.

 Having it in MODULE_AUTHOR allow my scripts to automatically
 send an email when appropriate.

 MAINTAINERS lists the files with an arbitrary
 driver title so that the search must be made by an human and there's
 no field that links a person to a specific .c .

 so every time I want to address someone I need to check MODULE_AUTHOR,
 the git log and the MAINTAINERS file.

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it

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

* Re: [rtc-linux] Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 18:43                     ` Alessandro Zummo
@ 2009-03-09 19:06                       ` Geoff Levand
  -1 siblings, 0 replies; 71+ messages in thread
From: Geoff Levand @ 2009-03-09 19:06 UTC (permalink / raw)
  To: Alessandro Zummo, Joe Perches
  Cc: rtc-linux, Geert.Uytterhoeven, Kyle McMartin, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

Hi,

On 03/09/2009 11:43 AM, Alessandro Zummo wrote:
> Geoff Levand <geoffrey.levand@am.sony.com> wrote:
>> On 03/09/2009 07:12 AM, Alessandro Zummo wrote:
>> > On Mon,  9 Mar 2009 14:26:23 +0100
>> > Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
>> >> +
>> >> +MODULE_AUTHOR("Sony Corporation");
>> > 
>> >  real name, if possible and a contact address
>> >  here . Just in case I need someone to bother :)
>> 
>> Please look at the MAINTAINERS file, that will give
>> the contact for PS3.  It is much easier to maintain
>> a single place for the contact than many spread
>> throughout the kernel sources.
> 
>  Having it in MODULE_AUTHOR allow my scripts to automatically
>  send an email when appropriate.
> 
>  MAINTAINERS lists the files with an arbitrary
>  driver title so that the search must be made by an human and there's
>  no field that links a person to a specific .c .
> 
>  so every time I want to address someone I need to check MODULE_AUTHOR,
>  the git log and the MAINTAINERS file.

I see.  It seems what you want is MODULE_MAINTAINER, as author is
the author, who after some time, may not be the maintainer any more.

There was some work by Joe Perches to list the files a maintainer is
responsible for into the MAINTAINERS file.  I think that would give
you what you want, a way to automatically get the maintainer of a
file.

Joe, could you let us know the status of that work?

-Geoff


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

* Re: [rtc-linux] Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 19:06                       ` Geoff Levand
  0 siblings, 0 replies; 71+ messages in thread
From: Geoff Levand @ 2009-03-09 19:06 UTC (permalink / raw)
  To: Alessandro Zummo, Joe Perches
  Cc: linux-m68k, rtc-linux, linux-parisc, linux-kernel, Kyle McMartin,
	linuxppc-dev, Paul Mundt, Geert.Uytterhoeven, Dann Frazier

Hi,

On 03/09/2009 11:43 AM, Alessandro Zummo wrote:
> Geoff Levand <geoffrey.levand@am.sony.com> wrote:
>> On 03/09/2009 07:12 AM, Alessandro Zummo wrote:
>> > On Mon,  9 Mar 2009 14:26:23 +0100
>> > Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
>> >> +
>> >> +MODULE_AUTHOR("Sony Corporation");
>> > 
>> >  real name, if possible and a contact address
>> >  here . Just in case I need someone to bother :)
>> 
>> Please look at the MAINTAINERS file, that will give
>> the contact for PS3.  It is much easier to maintain
>> a single place for the contact than many spread
>> throughout the kernel sources.
> 
>  Having it in MODULE_AUTHOR allow my scripts to automatically
>  send an email when appropriate.
> 
>  MAINTAINERS lists the files with an arbitrary
>  driver title so that the search must be made by an human and there's
>  no field that links a person to a specific .c .
> 
>  so every time I want to address someone I need to check MODULE_AUTHOR,
>  the git log and the MAINTAINERS file.

I see.  It seems what you want is MODULE_MAINTAINER, as author is
the author, who after some time, may not be the maintainer any more.

There was some work by Joe Perches to list the files a maintainer is
responsible for into the MAINTAINERS file.  I think that would give
you what you want, a way to automatically get the maintainer of a
file.

Joe, could you let us know the status of that work?

-Geoff

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

* Re: [rtc-linux] Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 19:06                       ` Geoff Levand
@ 2009-03-09 19:18                         ` Joe Perches
  -1 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2009-03-09 19:18 UTC (permalink / raw)
  To: Geoff Levand
  Cc: Alessandro Zummo, rtc-linux, Geert.Uytterhoeven, Kyle McMartin,
	linux-parisc, linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt,
	Dann Frazier, Andrew Morton, Linus Torvalds

On Mon, 2009-03-09 at 12:06 -0700, Geoff Levand wrote:
> There was some work by Joe Perches to list the files a maintainer is
> responsible for into the MAINTAINERS file.  I think that would give
> you what you want, a way to automatically get the maintainer of a
> file.
> 
> Joe, could you let us know the status of that work?

I think it works fine, and is an acceptable
approach to finding a maintainer for either a
patch or a specific file.

The changes I've posted are probably not suitable
for merging by anyone other than Linus as
MAINTAINERS is the most heavily modified file
in the kernel tree.

I've submitted it several times after merging it
with the latest kernel without response from Linus.

I'd merge and submit it again if it could be accepted.

If someone would propose a mechanism that would
improve the possibility to get it merged, I'd
also appreciate that.


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

* Re: [rtc-linux] Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-09 19:18                         ` Joe Perches
  0 siblings, 0 replies; 71+ messages in thread
From: Joe Perches @ 2009-03-09 19:18 UTC (permalink / raw)
  To: Geoff Levand
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	linux-kernel, Kyle McMartin, linuxppc-dev, Paul Mundt,
	Geert.Uytterhoeven, Andrew Morton, Linus Torvalds, Dann Frazier

On Mon, 2009-03-09 at 12:06 -0700, Geoff Levand wrote:
> There was some work by Joe Perches to list the files a maintainer is
> responsible for into the MAINTAINERS file.  I think that would give
> you what you want, a way to automatically get the maintainer of a
> file.
> 
> Joe, could you let us know the status of that work?

I think it works fine, and is an acceptable
approach to finding a maintainer for either a
patch or a specific file.

The changes I've posted are probably not suitable
for merging by anyone other than Linus as
MAINTAINERS is the most heavily modified file
in the kernel tree.

I've submitted it several times after merging it
with the latest kernel without response from Linus.

I'd merge and submit it again if it could be accepted.

If someone would propose a mechanism that would
improve the possibility to get it merged, I'd
also appreciate that.

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

* Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 18:35                 ` Geoff Levand
  (?)
@ 2009-03-10  9:21                   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-10  9:21 UTC (permalink / raw)
  To: Geoff Levand
  Cc: Alessandro Zummo, Kyle McMartin, rtc-linux, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

On Mon, 9 Mar 2009, Geoff Levand wrote:
> On 03/09/2009 06:26 AM, Geert Uytterhoeven wrote:
> > Create a real RTC driver for PS3, and unhook the deprecated
> > ppc_md.[gs]et_rtc_time.
>=20
> >  8 files changed, 132 insertions(+), 18 deletions(-)
>=20
> Sorry, I hadn't been following the discussion closely, but
> could you explain why we are going from a generic framework
> where we hook in our platform specific part to a totally
> independent driver that has such an increase in code size.

Alessandro prefers not to have generic RTC drivers on top of some other
abstraction, but wants platform/chip-specific drivers under drivers/rtc=
/
instead. The goal is to convert all RTC drivers buried in platform code
to separate RTC drivers.

(Alessandro, please correct me if I'm wrong)

> Why couldn't you fix the generic part so that udev could
> load it automatically?

BTW, I also fixed the generic part, which is now called rtc-generic and
autoloaded (patch 4).

> I much prefer to have this code in the platform support
> code as it was.  It is much more effort (a pain) to maintain
> a separate driver were I have to cater to a subsystem's
> maintainer, and with this rtc it seems everyone who was
> using the generic PPC driver will need to do the same.

They can keep on using rtc-generic for now (patch 6).

If you do not want rtc-ps3, you can nak it, and keep on using rtc-gener=
ic :-)
But please consider before doing that...

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village =B7 Da Vincilaan 7-D1 =B7 B-1935 Zaventem =B7 Bel=
gium

Phone:    +32 (0)2 700 8453
=46ax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 =B7 RPR Brussels
=46ortis =B7 BIC GEBABEBB =B7 IBAN BE41293037680010

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

* Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-10  9:21                   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-10  9:21 UTC (permalink / raw)
  To: Geoff Levand
  Cc: Alessandro Zummo, Kyle McMartin, rtc-linux, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

On Mon, 9 Mar 2009, Geoff Levand wrote:
> On 03/09/2009 06:26 AM, Geert Uytterhoeven wrote:
> > Create a real RTC driver for PS3, and unhook the deprecated
> > ppc_md.[gs]et_rtc_time.
> 
> >  8 files changed, 132 insertions(+), 18 deletions(-)
> 
> Sorry, I hadn't been following the discussion closely, but
> could you explain why we are going from a generic framework
> where we hook in our platform specific part to a totally
> independent driver that has such an increase in code size.

Alessandro prefers not to have generic RTC drivers on top of some other
abstraction, but wants platform/chip-specific drivers under drivers/rtc/
instead. The goal is to convert all RTC drivers buried in platform code
to separate RTC drivers.

(Alessandro, please correct me if I'm wrong)

> Why couldn't you fix the generic part so that udev could
> load it automatically?

BTW, I also fixed the generic part, which is now called rtc-generic and
autoloaded (patch 4).

> I much prefer to have this code in the platform support
> code as it was.  It is much more effort (a pain) to maintain
> a separate driver were I have to cater to a subsystem's
> maintainer, and with this rtc it seems everyone who was
> using the generic PPC driver will need to do the same.

They can keep on using rtc-generic for now (patch 6).

If you do not want rtc-ps3, you can nak it, and keep on using rtc-generic :-)
But please consider before doing that...

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-10  9:21                   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-10  9:21 UTC (permalink / raw)
  To: Geoff Levand
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	linux-kernel, Kyle McMartin, linuxppc-dev, Paul Mundt,
	Dann Frazier

On Mon, 9 Mar 2009, Geoff Levand wrote:
> On 03/09/2009 06:26 AM, Geert Uytterhoeven wrote:
> > Create a real RTC driver for PS3, and unhook the deprecated
> > ppc_md.[gs]et_rtc_time.
> 
> >  8 files changed, 132 insertions(+), 18 deletions(-)
> 
> Sorry, I hadn't been following the discussion closely, but
> could you explain why we are going from a generic framework
> where we hook in our platform specific part to a totally
> independent driver that has such an increase in code size.

Alessandro prefers not to have generic RTC drivers on top of some other
abstraction, but wants platform/chip-specific drivers under drivers/rtc/
instead. The goal is to convert all RTC drivers buried in platform code
to separate RTC drivers.

(Alessandro, please correct me if I'm wrong)

> Why couldn't you fix the generic part so that udev could
> load it automatically?

BTW, I also fixed the generic part, which is now called rtc-generic and
autoloaded (patch 4).

> I much prefer to have this code in the platform support
> code as it was.  It is much more effort (a pain) to maintain
> a separate driver were I have to cater to a subsystem's
> maintainer, and with this rtc it seems everyone who was
> using the generic PPC driver will need to do the same.

They can keep on using rtc-generic for now (patch 6).

If you do not want rtc-ps3, you can nak it, and keep on using rtc-generic :-)
But please consider before doing that...

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [rtc-linux] Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-10  9:21                   ` Geert Uytterhoeven
@ 2009-03-10  9:39                     ` Alessandro Zummo
  -1 siblings, 0 replies; 71+ messages in thread
From: Alessandro Zummo @ 2009-03-10  9:39 UTC (permalink / raw)
  To: rtc-linux
  Cc: Geert.Uytterhoeven, Geoff Levand, Kyle McMartin, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

On Tue, 10 Mar 2009 10:21:14 +0100 (CET)
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:

> Alessandro prefers not to have generic RTC drivers on top of some other
> abstraction, but wants platform/chip-specific drivers under drivers/rtc/
> instead. The goal is to convert all RTC drivers buried in platform code
> to separate RTC drivers.
> 
> (Alessandro, please correct me if I'm wrong)

 yes, that's my dream :)

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


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

* Re: [rtc-linux] Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-10  9:39                     ` Alessandro Zummo
  0 siblings, 0 replies; 71+ messages in thread
From: Alessandro Zummo @ 2009-03-10  9:39 UTC (permalink / raw)
  To: rtc-linux
  Cc: linux-m68k, linux-parisc, linux-kernel, Kyle McMartin,
	linuxppc-dev, Paul Mundt, Geert.Uytterhoeven, Dann Frazier

On Tue, 10 Mar 2009 10:21:14 +0100 (CET)
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:

> Alessandro prefers not to have generic RTC drivers on top of some other
> abstraction, but wants platform/chip-specific drivers under drivers/rtc/
> instead. The goal is to convert all RTC drivers buried in platform code
> to separate RTC drivers.
> 
> (Alessandro, please correct me if I'm wrong)

 yes, that's my dream :)

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it

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

* Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
  2009-03-09 13:26               ` Geert Uytterhoeven
@ 2009-03-10 16:18                 ` Geoff Levand
  -1 siblings, 0 replies; 71+ messages in thread
From: Geoff Levand @ 2009-03-10 16:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Alessandro Zummo, Kyle McMartin, rtc-linux, linux-parisc,
	linuxppc-dev, linux-m68k, linux-kernel, Paul Mundt, Dann Frazier

On 03/09/2009 06:26 AM, Geert Uytterhoeven wrote:
> Create a real RTC driver for PS3, and unhook the deprecated
> ppc_md.[gs]et_rtc_time.
> 
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Cc: Geoff Levand <geoffrey.levand@am.sony.com>
> ---
>  arch/powerpc/include/asm/ps3.h        |    3 +
>  arch/powerpc/platforms/ps3/os-area.c  |    2 +
>  arch/powerpc/platforms/ps3/platform.h |    2 -
>  arch/powerpc/platforms/ps3/setup.c    |    2 -
>  arch/powerpc/platforms/ps3/time.c     |   26 ++++-----
>  drivers/rtc/Kconfig                   |    9 +++
>  drivers/rtc/Makefile                  |    1 +
>  drivers/rtc/rtc-ps3.c                 |  105 +++++++++++++++++++++++++++++++++
>  8 files changed, 132 insertions(+), 18 deletions(-)
>  create mode 100644 drivers/rtc/rtc-ps3.c

Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>


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

* Re: [PATCH 7/7] powerpc/ps3: Add rtc-ps3
@ 2009-03-10 16:18                 ` Geoff Levand
  0 siblings, 0 replies; 71+ messages in thread
From: Geoff Levand @ 2009-03-10 16:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	linux-kernel, Kyle McMartin, linuxppc-dev, Paul Mundt,
	Dann Frazier

On 03/09/2009 06:26 AM, Geert Uytterhoeven wrote:
> Create a real RTC driver for PS3, and unhook the deprecated
> ppc_md.[gs]et_rtc_time.
> 
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Cc: Geoff Levand <geoffrey.levand@am.sony.com>
> ---
>  arch/powerpc/include/asm/ps3.h        |    3 +
>  arch/powerpc/platforms/ps3/os-area.c  |    2 +
>  arch/powerpc/platforms/ps3/platform.h |    2 -
>  arch/powerpc/platforms/ps3/setup.c    |    2 -
>  arch/powerpc/platforms/ps3/time.c     |   26 ++++-----
>  drivers/rtc/Kconfig                   |    9 +++
>  drivers/rtc/Makefile                  |    1 +
>  drivers/rtc/rtc-ps3.c                 |  105 +++++++++++++++++++++++++++++++++
>  8 files changed, 132 insertions(+), 18 deletions(-)
>  create mode 100644 drivers/rtc/rtc-ps3.c

Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>

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

* Re: [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc
  2009-03-09 13:59               ` David Woodhouse
@ 2009-03-11  4:15                 ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 71+ messages in thread
From: Benjamin Herrenschmidt @ 2009-03-11  4:15 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Geert Uytterhoeven, linux-m68k, Alessandro Zummo, rtc-linux,
	linux-parisc, linux-kernel, Kyle McMartin, linuxppc-dev,
	Paul Mundt, Dann Frazier

On Mon, 2009-03-09 at 13:59 +0000, David Woodhouse wrote:
> On Mon, 2009-03-09 at 14:26 +0100, Geert Uytterhoeven wrote:
> > PowerPC has been a long time user of the generic RTC abstraction, so hook up
> > rtc-generic:
> >   - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set,
> >   - Kill rtc-ppc, as rtc-generic offers the same functionality in a more
> >     generic way, and supports autoloading through udev.
> > 
> > Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> 
> Acked-By: David Woodhouse <David.Woodhouse@intel.com>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>



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

* Re: [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc
@ 2009-03-11  4:15                 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 71+ messages in thread
From: Benjamin Herrenschmidt @ 2009-03-11  4:15 UTC (permalink / raw)
  To: David Woodhouse
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	linux-kernel, Kyle McMartin, linuxppc-dev, Paul Mundt,
	Geert Uytterhoeven, Dann Frazier

On Mon, 2009-03-09 at 13:59 +0000, David Woodhouse wrote:
> On Mon, 2009-03-09 at 14:26 +0100, Geert Uytterhoeven wrote:
> > PowerPC has been a long time user of the generic RTC abstraction, so hook up
> > rtc-generic:
> >   - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set,
> >   - Kill rtc-ppc, as rtc-generic offers the same functionality in a more
> >     generic way, and supports autoloading through udev.
> > 
> > Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> 
> Acked-By: David Woodhouse <David.Woodhouse@intel.com>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

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

* Re: [PATCH 0/7] Generic RTC class driver
  2009-03-09 13:26 ` Geert Uytterhoeven
  (?)
  (?)
@ 2009-03-11 10:36   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-11 10:36 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Alessandro Zummo, linux-m68k, rtc-linux, linux-parisc,
	Linux Kernel Development, Linux/PPC Development, Paul Mundt,
	Dann Frazier

	Hi Kyle,

On Mon, 9 Mar 2009, Geert Uytterhoeven wrote:
> These patches are relative to the "rtc-parisc" branch of Kyle's PA-RI=
SC git
> repository, which already contains some cleanups for the rtc-parisc d=
river by
> Dann, which already have been ack'ed by Alessandro:
>=20
> http://git.kernel.org/?p=3Dlinux/kernel/git/kyle/parisc-2.6.git;a=3Ds=
hortlog;h=3Drtc-parisc
>=20
> Paul: Feel free to add your SuperH support.
>=20
> I suppose the easiest way for this to go in is through Kyle's PA-RISC=
 tree, as
> he already has the preceding patches? Can I have your acks, please?

Is it OK for you to take it through your PA-RISC tree?
If yes, I can resend the patch series with the collected acks.

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village =C2=B7 Da Vincilaan 7-D1 =C2=B7 B-1935 Zaventem =C2=
=B7 Belgium

Phone:    +32 (0)2 700 8453
=46ax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 =C2=B7 RPR Brussels
=46ortis =C2=B7 BIC GEBABEBB =C2=B7 IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-03-11 10:36   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-11 10:36 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Alessandro Zummo, linux-m68k, rtc-linux, linux-parisc,
	Linux Kernel Development, Linux/PPC Development, Paul Mundt,
	Dann Frazier

	Hi Kyle,

On Mon, 9 Mar 2009, Geert Uytterhoeven wrote:
> These patches are relative to the "rtc-parisc" branch of Kyle's PA-RISC git
> repository, which already contains some cleanups for the rtc-parisc driver by
> Dann, which already have been ack'ed by Alessandro:
> 
> http://git.kernel.org/?p=linux/kernel/git/kyle/parisc-2.6.git;a=shortlog;h=rtc-parisc
> 
> Paul: Feel free to add your SuperH support.
> 
> I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
> he already has the preceding patches? Can I have your acks, please?

Is it OK for you to take it through your PA-RISC tree?
If yes, I can resend the patch series with the collected acks.

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-03-11 10:36   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-11 10:36 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Alessandro Zummo, linux-m68k, rtc-linux, linux-parisc,
	Linux Kernel Development, Linux/PPC Development, Paul Mundt,
	Dann Frazier

	Hi Kyle,

On Mon, 9 Mar 2009, Geert Uytterhoeven wrote:
> These patches are relative to the "rtc-parisc" branch of Kyle's PA-RISC git
> repository, which already contains some cleanups for the rtc-parisc driver by
> Dann, which already have been ack'ed by Alessandro:
> 
> http://git.kernel.org/?p=linux/kernel/git/kyle/parisc-2.6.git;a=shortlog;h=rtc-parisc
> 
> Paul: Feel free to add your SuperH support.
> 
> I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
> he already has the preceding patches? Can I have your acks, please?

Is it OK for you to take it through your PA-RISC tree?
If yes, I can resend the patch series with the collected acks.

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-03-11 10:36   ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-11 10:36 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	Linux Kernel Development, Linux/PPC Development, Paul Mundt,
	Dann Frazier

	Hi Kyle,

On Mon, 9 Mar 2009, Geert Uytterhoeven wrote:
> These patches are relative to the "rtc-parisc" branch of Kyle's PA-RISC git
> repository, which already contains some cleanups for the rtc-parisc driver by
> Dann, which already have been ack'ed by Alessandro:
> 
> http://git.kernel.org/?p=linux/kernel/git/kyle/parisc-2.6.git;a=shortlog;h=rtc-parisc
> 
> Paul: Feel free to add your SuperH support.
> 
> I suppose the easiest way for this to go in is through Kyle's PA-RISC tree, as
> he already has the preceding patches? Can I have your acks, please?

Is it OK for you to take it through your PA-RISC tree?
If yes, I can resend the patch series with the collected acks.

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [PATCH 0/7] Generic RTC class driver
  2009-03-11 10:36   ` Geert Uytterhoeven
@ 2009-03-11 15:45     ` Kyle McMartin
  -1 siblings, 0 replies; 71+ messages in thread
From: Kyle McMartin @ 2009-03-11 15:45 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kyle McMartin, Alessandro Zummo, linux-m68k, rtc-linux,
	linux-parisc, Linux Kernel Development, Linux/PPC Development,
	Paul Mundt, Dann Frazier

On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> Is it OK for you to take it through your PA-RISC tree?
> If yes, I can resend the patch series with the collected acks.
> 

That's fine with me, just hit me up with a git tree address and I'll
suck it all into the rtc-parisc tree?

regards, Kyle

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-03-11 15:45     ` Kyle McMartin
  0 siblings, 0 replies; 71+ messages in thread
From: Kyle McMartin @ 2009-03-11 15:45 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	Linux Kernel Development, Kyle McMartin, Linux/PPC Development,
	Paul Mundt, Dann Frazier

On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> Is it OK for you to take it through your PA-RISC tree?
> If yes, I can resend the patch series with the collected acks.
> 

That's fine with me, just hit me up with a git tree address and I'll
suck it all into the rtc-parisc tree?

regards, Kyle

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

* Re: [PATCH 0/7] Generic RTC class driver
  2009-03-11 15:45     ` Kyle McMartin
  (?)
@ 2009-03-11 17:26       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-11 17:26 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Kyle McMartin, Alessandro Zummo, linux-m68k, rtc-linux,
	linux-parisc, Linux Kernel Development, Linux/PPC Development,
	Paul Mundt, Dann Frazier

	Hi Kyle,

On Wed, 11 Mar 2009, Kyle McMartin wrote:
> On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > Is it OK for you to take it through your PA-RISC tree?
> > If yes, I can resend the patch series with the collected acks.
>=20
> That's fine with me, just hit me up with a git tree address and I'll
> suck it all into the rtc-parisc tree?

I put it up at:

master.kernel.org:/pub/scm/linux/kernel/git/geert/linux-rtc-generic.git

The master branch should be a descendant of your rtc-parisc branch.

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village =B7 Da Vincilaan 7-D1 =B7 B-1935 Zaventem =B7 Bel=
gium

Phone:    +32 (0)2 700 8453
=46ax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 =B7 RPR Brussels
=46ortis =B7 BIC GEBABEBB =B7 IBAN BE41293037680010

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-03-11 17:26       ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-11 17:26 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Kyle McMartin, Alessandro Zummo, linux-m68k, rtc-linux,
	linux-parisc, Linux Kernel Development, Linux/PPC Development,
	Paul Mundt, Dann Frazier

	Hi Kyle,

On Wed, 11 Mar 2009, Kyle McMartin wrote:
> On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > Is it OK for you to take it through your PA-RISC tree?
> > If yes, I can resend the patch series with the collected acks.
> 
> That's fine with me, just hit me up with a git tree address and I'll
> suck it all into the rtc-parisc tree?

I put it up at:

master.kernel.org:/pub/scm/linux/kernel/git/geert/linux-rtc-generic.git

The master branch should be a descendant of your rtc-parisc branch.

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-03-11 17:26       ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-03-11 17:26 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	Linux Kernel Development, Kyle McMartin, Linux/PPC Development,
	Paul Mundt, Dann Frazier

	Hi Kyle,

On Wed, 11 Mar 2009, Kyle McMartin wrote:
> On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > Is it OK for you to take it through your PA-RISC tree?
> > If yes, I can resend the patch series with the collected acks.
> 
> That's fine with me, just hit me up with a git tree address and I'll
> suck it all into the rtc-parisc tree?

I put it up at:

master.kernel.org:/pub/scm/linux/kernel/git/geert/linux-rtc-generic.git

The master branch should be a descendant of your rtc-parisc branch.

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [PATCH 0/7] Generic RTC class driver
  2009-03-11 17:26       ` Geert Uytterhoeven
@ 2009-03-13  4:25         ` Kyle McMartin
  -1 siblings, 0 replies; 71+ messages in thread
From: Kyle McMartin @ 2009-03-13  4:25 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kyle McMartin, Kyle McMartin, Alessandro Zummo, linux-m68k,
	rtc-linux, linux-parisc, Linux Kernel Development,
	Linux/PPC Development, Paul Mundt, Dann Frazier

On Wed, Mar 11, 2009 at 06:26:12PM +0100, Geert Uytterhoeven wrote:
> 	Hi Kyle,
> 
> On Wed, 11 Mar 2009, Kyle McMartin wrote:
> > On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > > Is it OK for you to take it through your PA-RISC tree?
> > > If yes, I can resend the patch series with the collected acks.
> > 
> > That's fine with me, just hit me up with a git tree address and I'll
> > suck it all into the rtc-parisc tree?
> 
> I put it up at:
> 
> master.kernel.org:/pub/scm/linux/kernel/git/geert/linux-rtc-generic.git
> 
> The master branch should be a descendant of your rtc-parisc branch.
> 
> Thanks!
>

Great, thanks Geert!

I've pulled it and pushed it back out, I'll submit it when the merge
window opens.

cheers, Kyle

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-03-13  4:25         ` Kyle McMartin
  0 siblings, 0 replies; 71+ messages in thread
From: Kyle McMartin @ 2009-03-13  4:25 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-m68k, Alessandro Zummo, linux-parisc, rtc-linux,
	Paul Mundt, Linux Kernel Development, Kyle McMartin,
	Linux/PPC Development, Kyle McMartin, Dann Frazier

On Wed, Mar 11, 2009 at 06:26:12PM +0100, Geert Uytterhoeven wrote:
> 	Hi Kyle,
> 
> On Wed, 11 Mar 2009, Kyle McMartin wrote:
> > On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > > Is it OK for you to take it through your PA-RISC tree?
> > > If yes, I can resend the patch series with the collected acks.
> > 
> > That's fine with me, just hit me up with a git tree address and I'll
> > suck it all into the rtc-parisc tree?
> 
> I put it up at:
> 
> master.kernel.org:/pub/scm/linux/kernel/git/geert/linux-rtc-generic.git
> 
> The master branch should be a descendant of your rtc-parisc branch.
> 
> Thanks!
>

Great, thanks Geert!

I've pulled it and pushed it back out, I'll submit it when the merge
window opens.

cheers, Kyle

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

* Re: [PATCH 4/7] parisc: rtc: Rename rtc-parisc to rtc-generic
  2009-03-09 13:26         ` Geert Uytterhoeven
@ 2009-03-16 13:09           ` Christoph Hellwig
  -1 siblings, 0 replies; 71+ messages in thread
From: Christoph Hellwig @ 2009-03-16 13:09 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Alessandro Zummo, Kyle McMartin, linux-m68k, rtc-linux,
	linux-parisc, linux-kernel, linuxppc-dev, Paul Mundt,
	Dann Frazier

On Mon, Mar 09, 2009 at 02:26:20PM +0100, Geert Uytterhoeven wrote:
> The rtc-parisc driver is not PA-RISC specific at all, as it uses the existing
> (but deprecated) generic RTC infrastructure ([gs]et_rtc_time()).
> Rename the driver from rtc-parisc to rtc-generic.

Maybe it should be called rtc-legacy instead?


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

* Re: [PATCH 4/7] parisc: rtc: Rename rtc-parisc to rtc-generic
@ 2009-03-16 13:09           ` Christoph Hellwig
  0 siblings, 0 replies; 71+ messages in thread
From: Christoph Hellwig @ 2009-03-16 13:09 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	linux-kernel, Kyle McMartin, linuxppc-dev, Paul Mundt,
	Dann Frazier

On Mon, Mar 09, 2009 at 02:26:20PM +0100, Geert Uytterhoeven wrote:
> The rtc-parisc driver is not PA-RISC specific at all, as it uses the existing
> (but deprecated) generic RTC infrastructure ([gs]et_rtc_time()).
> Rename the driver from rtc-parisc to rtc-generic.

Maybe it should be called rtc-legacy instead?

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

* Re: [PATCH 0/7] Generic RTC class driver
  2009-03-13  4:25         ` Kyle McMartin
  (?)
  (?)
@ 2009-04-02  9:42           ` Geert Uytterhoeven
  -1 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-04-02  9:42 UTC (permalink / raw)
  To: Kyle McMartin, Andrew Morton
  Cc: Kyle McMartin, Alessandro Zummo, linux-m68k, rtc-linux,
	linux-parisc, Linux Kernel Development, Linux/PPC Development,
	Paul Mundt, Dann Frazier

On Fri, 13 Mar 2009, Kyle McMartin wrote:
> On Wed, Mar 11, 2009 at 06:26:12PM +0100, Geert Uytterhoeven wrote:
> > On Wed, 11 Mar 2009, Kyle McMartin wrote:
> > > On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrot=
e:
> > > > Is it OK for you to take it through your PA-RISC tree?
> > > > If yes, I can resend the patch series with the collected acks.
> > >=20
> I've pulled it and pushed it back out, I'll submit it when the merge
> window opens.

Apparently the first half went it through akpm. Will you take care of t=
he
remaining commits?

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village =B7 Da Vincilaan 7-D1 =B7 B-1935 Zaventem =B7 Bel=
gium

Phone:    +32 (0)2 700 8453
=46ax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 =B7 RPR Brussels
=46ortis =B7 BIC GEBABEBB =B7 IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-04-02  9:42           ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-04-02  9:42 UTC (permalink / raw)
  To: Kyle McMartin, Andrew Morton
  Cc: Kyle McMartin, Alessandro Zummo, linux-m68k, rtc-linux,
	linux-parisc, Linux Kernel Development, Linux/PPC Development,
	Paul Mundt, Dann Frazier

On Fri, 13 Mar 2009, Kyle McMartin wrote:
> On Wed, Mar 11, 2009 at 06:26:12PM +0100, Geert Uytterhoeven wrote:
> > On Wed, 11 Mar 2009, Kyle McMartin wrote:
> > > On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > > > Is it OK for you to take it through your PA-RISC tree?
> > > > If yes, I can resend the patch series with the collected acks.
> > > 
> I've pulled it and pushed it back out, I'll submit it when the merge
> window opens.

Apparently the first half went it through akpm. Will you take care of the
remaining commits?

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-04-02  9:42           ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-04-02  9:42 UTC (permalink / raw)
  To: Kyle McMartin, Andrew Morton
  Cc: Kyle McMartin, Alessandro Zummo, linux-m68k, rtc-linux,
	linux-parisc, Linux Kernel Development, Linux/PPC Development,
	Paul Mundt, Dann Frazier

On Fri, 13 Mar 2009, Kyle McMartin wrote:
> On Wed, Mar 11, 2009 at 06:26:12PM +0100, Geert Uytterhoeven wrote:
> > On Wed, 11 Mar 2009, Kyle McMartin wrote:
> > > On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > > > Is it OK for you to take it through your PA-RISC tree?
> > > > If yes, I can resend the patch series with the collected acks.
> > > 
> I've pulled it and pushed it back out, I'll submit it when the merge
> window opens.

Apparently the first half went it through akpm. Will you take care of the
remaining commits?

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-04-02  9:42           ` Geert Uytterhoeven
  0 siblings, 0 replies; 71+ messages in thread
From: Geert Uytterhoeven @ 2009-04-02  9:42 UTC (permalink / raw)
  To: Kyle McMartin, Andrew Morton
  Cc: linux-m68k, Alessandro Zummo, rtc-linux, linux-parisc,
	Linux Kernel Development, Kyle McMartin, Linux/PPC Development,
	Paul Mundt, Dann Frazier

On Fri, 13 Mar 2009, Kyle McMartin wrote:
> On Wed, Mar 11, 2009 at 06:26:12PM +0100, Geert Uytterhoeven wrote:
> > On Wed, 11 Mar 2009, Kyle McMartin wrote:
> > > On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > > > Is it OK for you to take it through your PA-RISC tree?
> > > > If yes, I can resend the patch series with the collected acks.
> > > 
> I've pulled it and pushed it back out, I'll submit it when the merge
> window opens.

Apparently the first half went it through akpm. Will you take care of the
remaining commits?

Thanks!

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

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

* Re: [PATCH 0/7] Generic RTC class driver
  2009-04-02  9:42           ` Geert Uytterhoeven
@ 2009-04-02 13:56             ` Kyle McMartin
  -1 siblings, 0 replies; 71+ messages in thread
From: Kyle McMartin @ 2009-04-02 13:56 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kyle McMartin, Andrew Morton, Kyle McMartin, Alessandro Zummo,
	linux-m68k, rtc-linux, linux-parisc, Linux Kernel Development,
	Linux/PPC Development, Paul Mundt, Dann Frazier

On Thu, Apr 02, 2009 at 11:42:02AM +0200, Geert Uytterhoeven wrote:
> On Fri, 13 Mar 2009, Kyle McMartin wrote:
> > On Wed, Mar 11, 2009 at 06:26:12PM +0100, Geert Uytterhoeven wrote:
> > > On Wed, 11 Mar 2009, Kyle McMartin wrote:
> > > > On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > > > > Is it OK for you to take it through your PA-RISC tree?
> > > > > If yes, I can resend the patch series with the collected acks.
> > > > 
> > I've pulled it and pushed it back out, I'll submit it when the merge
> > window opens.
> 
> Apparently the first half went it through akpm. Will you take care of the
> remaining commits?
> 

Yup, I updated the rtc-parisc branch last night, I'll push it along to
Linus this morning.

Thanks again, Geert.

cheers, Kyle

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

* Re: [PATCH 0/7] Generic RTC class driver
@ 2009-04-02 13:56             ` Kyle McMartin
  0 siblings, 0 replies; 71+ messages in thread
From: Kyle McMartin @ 2009-04-02 13:56 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-m68k, Kyle McMartin, linux-parisc, rtc-linux, Paul Mundt,
	Linux Kernel Development, Kyle McMartin, Linux/PPC Development,
	Alessandro Zummo, Andrew Morton, Dann Frazier

On Thu, Apr 02, 2009 at 11:42:02AM +0200, Geert Uytterhoeven wrote:
> On Fri, 13 Mar 2009, Kyle McMartin wrote:
> > On Wed, Mar 11, 2009 at 06:26:12PM +0100, Geert Uytterhoeven wrote:
> > > On Wed, 11 Mar 2009, Kyle McMartin wrote:
> > > > On Wed, Mar 11, 2009 at 11:36:02AM +0100, Geert Uytterhoeven wrote:
> > > > > Is it OK for you to take it through your PA-RISC tree?
> > > > > If yes, I can resend the patch series with the collected acks.
> > > > 
> > I've pulled it and pushed it back out, I'll submit it when the merge
> > window opens.
> 
> Apparently the first half went it through akpm. Will you take care of the
> remaining commits?
> 

Yup, I updated the rtc-parisc branch last night, I'll push it along to
Linus this morning.

Thanks again, Geert.

cheers, Kyle

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

end of thread, other threads:[~2009-04-02 13:56 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 13:26 [PATCH 0/7] Generic RTC class driver Geert Uytterhoeven
2009-03-09 13:26 ` Geert Uytterhoeven
2009-03-09 13:26 ` Geert Uytterhoeven
2009-03-09 13:26 ` Geert Uytterhoeven
2009-03-09 13:26 ` [PATCH 1/7] parisc: rtc: get_rtc_time() returns unsigned int Geert Uytterhoeven
2009-03-09 13:26   ` Geert Uytterhoeven
2009-03-09 13:26   ` Geert Uytterhoeven
2009-03-09 13:26   ` [PATCH 2/7] parisc: rtc: platform_driver_probe() fixups Geert Uytterhoeven
2009-03-09 13:26     ` Geert Uytterhoeven
2009-03-09 13:26     ` [PATCH 3/7] parisc: rtc: Add missing module alias Geert Uytterhoeven
2009-03-09 13:26       ` Geert Uytterhoeven
2009-03-09 13:26       ` [PATCH 4/7] parisc: rtc: Rename rtc-parisc to rtc-generic Geert Uytterhoeven
2009-03-09 13:26         ` Geert Uytterhoeven
2009-03-09 13:26         ` [PATCH 5/7] m68k: Hook up rtc-generic Geert Uytterhoeven
2009-03-09 13:26           ` Geert Uytterhoeven
2009-03-09 13:26           ` [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc Geert Uytterhoeven
2009-03-09 13:26             ` Geert Uytterhoeven
2009-03-09 13:26             ` Geert Uytterhoeven
2009-03-09 13:26             ` Geert Uytterhoeven
2009-03-09 13:26             ` [PATCH 7/7] powerpc/ps3: Add rtc-ps3 Geert Uytterhoeven
2009-03-09 13:26               ` Geert Uytterhoeven
2009-03-09 14:12               ` [rtc-linux] " Alessandro Zummo
2009-03-09 14:12                 ` Alessandro Zummo
2009-03-09 15:24                 ` Geert Uytterhoeven
2009-03-09 15:24                   ` Geert Uytterhoeven
2009-03-09 15:24                   ` Geert Uytterhoeven
2009-03-09 15:24                   ` Geert Uytterhoeven
2009-03-09 18:04                 ` Geoff Levand
2009-03-09 18:04                   ` Geoff Levand
2009-03-09 18:43                   ` [rtc-linux] " Alessandro Zummo
2009-03-09 18:43                     ` Alessandro Zummo
2009-03-09 19:06                     ` Geoff Levand
2009-03-09 19:06                       ` Geoff Levand
2009-03-09 19:18                       ` Joe Perches
2009-03-09 19:18                         ` Joe Perches
2009-03-09 18:35               ` Geoff Levand
2009-03-09 18:35                 ` Geoff Levand
2009-03-10  9:21                 ` Geert Uytterhoeven
2009-03-10  9:21                   ` Geert Uytterhoeven
2009-03-10  9:21                   ` Geert Uytterhoeven
2009-03-10  9:39                   ` [rtc-linux] " Alessandro Zummo
2009-03-10  9:39                     ` Alessandro Zummo
2009-03-10 16:18               ` Geoff Levand
2009-03-10 16:18                 ` Geoff Levand
2009-03-09 13:59             ` [PATCH 6/7] powerpc: Hook up rtc-generic, and kill rtc-ppc David Woodhouse
2009-03-09 13:59               ` David Woodhouse
2009-03-11  4:15               ` Benjamin Herrenschmidt
2009-03-11  4:15                 ` Benjamin Herrenschmidt
2009-03-16 13:09         ` [PATCH 4/7] parisc: rtc: Rename rtc-parisc to rtc-generic Christoph Hellwig
2009-03-16 13:09           ` Christoph Hellwig
2009-03-09 14:14 ` [rtc-linux] [PATCH 0/7] Generic RTC class driver Alessandro Zummo
2009-03-09 14:14   ` Alessandro Zummo
2009-03-09 15:46 ` Paul Mundt
2009-03-09 15:46   ` Paul Mundt
2009-03-11 10:36 ` Geert Uytterhoeven
2009-03-11 10:36   ` Geert Uytterhoeven
2009-03-11 10:36   ` Geert Uytterhoeven
2009-03-11 10:36   ` Geert Uytterhoeven
2009-03-11 15:45   ` Kyle McMartin
2009-03-11 15:45     ` Kyle McMartin
2009-03-11 17:26     ` Geert Uytterhoeven
2009-03-11 17:26       ` Geert Uytterhoeven
2009-03-11 17:26       ` Geert Uytterhoeven
2009-03-13  4:25       ` Kyle McMartin
2009-03-13  4:25         ` Kyle McMartin
2009-04-02  9:42         ` Geert Uytterhoeven
2009-04-02  9:42           ` Geert Uytterhoeven
2009-04-02  9:42           ` Geert Uytterhoeven
2009-04-02  9:42           ` Geert Uytterhoeven
2009-04-02 13:56           ` Kyle McMartin
2009-04-02 13:56             ` Kyle McMartin

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.