Re: [2.6 patch] the scheduled I2C RTC driver removal

2007-11-27 Thread Jean Delvare
On Fri, 2 Nov 2007 23:12:43 +0100, Jean Delvare wrote:
 Hi Adrian,
 
 On Thu, 1 Nov 2007 00:03:58 +0100, Adrian Bunk wrote:
  This patch contains the scheduled removal of legacy I2C RTC drivers with 
  replacement drivers.
  (...)
   Documentation/feature-removal-schedule.txt |7 
   arch/powerpc/platforms/83xx/mpc832x_mds.c  |   24 -
   arch/powerpc/platforms/83xx/mpc834x_mds.c  |   24 -
   arch/powerpc/platforms/83xx/mpc836x_mds.c  |   24 -
   arch/ppc/platforms/83xx/mpc834x_sys.c  |   20 -
   arch/ppc/platforms/85xx/tqm85xx.c  |   21 -
   arch/ppc/platforms/katana.c|   21 -
   drivers/i2c/chips/Kconfig  |   38 -
   drivers/i2c/chips/Makefile |3 
   drivers/i2c/chips/ds1337.c |  410 
   drivers/i2c/chips/ds1374.c |  267 -
   drivers/i2c/chips/m41t00.c |  413 -
   include/linux/m41t00.h |   50 --
   13 files changed, 1322 deletions(-)
 
 Obviously we're not yet ready to remove the drivers, as some platforms
 still use them! The remaining platforms need to be updated to use the
 new RTC drivers first. The mapping is as follows:
 
 chip   | old driver | new driver   |
 ---++--+
 DS1337 | ds1337 | rtc-ds1307   |
 DS1339 | ds1337 | rtc-ds1307   |
 DS1374 | ds1374 | rtc-ds1374   |
 M41T00 | m41t00 | rtc-ds1307   |
 M41T81 | m41t00 | rtc-m41t80   |
 M41ST85| m41t00 | rtc-m41t80   |
 
 So, PPC people, please update your platform code to make use of the new
 drivers now, and let me know when you're done. As soon as all platforms
 are converted, I'll apply Adrian's patch.

As of 2.6.24-rc3-git2, I see that the references to the obsolete
drivers have been removed from arch/powerpc/*. Great, I'll update
Adrian's patch. This leaves only 3 platforms under arch/ppc (83xx, 85xx
and katana) that still need updating. Kumar, Paul, what's the status?

Thanks,
-- 
Jean Delvare
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [2.6 patch] the scheduled I2C RTC driver removal

2007-11-02 Thread Jean Delvare
Hi Adrian,

On Thu, 1 Nov 2007 00:03:58 +0100, Adrian Bunk wrote:
 This patch contains the scheduled removal of legacy I2C RTC drivers with 
 replacement drivers.

I'm adding the rtc list in Cc.

 
 Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
 
 ---
 
  Documentation/feature-removal-schedule.txt |7 
  arch/powerpc/platforms/83xx/mpc832x_mds.c  |   24 -
  arch/powerpc/platforms/83xx/mpc834x_mds.c  |   24 -
  arch/powerpc/platforms/83xx/mpc836x_mds.c  |   24 -
  arch/ppc/platforms/83xx/mpc834x_sys.c  |   20 -
  arch/ppc/platforms/85xx/tqm85xx.c  |   21 -
  arch/ppc/platforms/katana.c|   21 -
  drivers/i2c/chips/Kconfig  |   38 -
  drivers/i2c/chips/Makefile |3 
  drivers/i2c/chips/ds1337.c |  410 
  drivers/i2c/chips/ds1374.c |  267 -
  drivers/i2c/chips/m41t00.c |  413 -
  include/linux/m41t00.h |   50 --
  13 files changed, 1322 deletions(-)

Obviously we're not yet ready to remove the drivers, as some platforms
still use them! The remaining platforms need to be updated to use the
new RTC drivers first. The mapping is as follows:

chip   | old driver | new driver   |
---++--+
DS1337 | ds1337 | rtc-ds1307   |
DS1339 | ds1337 | rtc-ds1307   |
DS1374 | ds1374 | rtc-ds1374   |
M41T00 | m41t00 | rtc-ds1307   |
M41T81 | m41t00 | rtc-m41t80   |
M41ST85| m41t00 | rtc-m41t80   |

So, PPC people, please update your platform code to make use of the new
drivers now, and let me know when you're done. As soon as all platforms
are converted, I'll apply Adrian's patch.

Thanks.

 
 bf858b44b3071082be3aaf71e2d46ddb26415247 
 diff --git a/Documentation/feature-removal-schedule.txt 
 b/Documentation/feature-removal-schedule.txt
 index 6bb9be5..391f2d1 100644
 --- a/Documentation/feature-removal-schedule.txt
 +++ b/Documentation/feature-removal-schedule.txt
 @@ -275,13 +275,6 @@ Who:  Tejun Heo [EMAIL PROTECTED]
  
  ---
  
 -What:Legacy RTC drivers (under drivers/i2c/chips)
 -When:November 2007
 -Why: Obsolete. We have a RTC subsystem with better drivers.
 -Who: Jean Delvare [EMAIL PROTECTED]
 -
 
 -
  What:iptables SAME target
  When:1.1. 2008
  Files:   net/ipv4/netfilter/ipt_SAME.c, 
 include/linux/netfilter_ipv4/ipt_SAME.h
 diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c 
 b/arch/powerpc/platforms/83xx/mpc832x_mds.c
 index 972fa85..66382df 100644
 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
 +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
 @@ -145,30 +145,6 @@ static void __init mpc832x_sys_init_IRQ(void)
  #endif   /* CONFIG_QUICC_ENGINE */
  }
  
 -#if defined(CONFIG_I2C_MPC)  defined(CONFIG_SENSORS_DS1374)
 -extern ulong ds1374_get_rtc_time(void);
 -extern int ds1374_set_rtc_time(ulong);
 -
 -static int __init mpc832x_rtc_hookup(void)
 -{
 - struct timespec tv;
 -
 - if (!machine_is(mpc832x_mds))
 - return 0;
 -
 - ppc_md.get_rtc_time = ds1374_get_rtc_time;
 - ppc_md.set_rtc_time = ds1374_set_rtc_time;
 -
 - tv.tv_nsec = 0;
 - tv.tv_sec = (ppc_md.get_rtc_time) ();
 - do_settimeofday(tv);
 -
 - return 0;
 -}
 -
 -late_initcall(mpc832x_rtc_hookup);
 -#endif
 -
  /*
   * Called very early, MMU is off, device-tree isn't unflattened
   */
 diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c 
 b/arch/powerpc/platforms/83xx/mpc834x_mds.c
 index 00aed7c..a81bb3c 100644
 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
 +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
 @@ -106,30 +106,6 @@ static void __init mpc834x_mds_init_IRQ(void)
   ipic_set_default_priority();
  }
  
 -#if defined(CONFIG_I2C_MPC)  defined(CONFIG_SENSORS_DS1374)
 -extern ulong ds1374_get_rtc_time(void);
 -extern int ds1374_set_rtc_time(ulong);
 -
 -static int __init mpc834x_rtc_hookup(void)
 -{
 - struct timespec tv;
 -
 - if (!machine_is(mpc834x_mds))
 - return 0;
 -
 - ppc_md.get_rtc_time = ds1374_get_rtc_time;
 - ppc_md.set_rtc_time = ds1374_set_rtc_time;
 -
 - tv.tv_nsec = 0;
 - tv.tv_sec = (ppc_md.get_rtc_time) ();
 - do_settimeofday(tv);
 -
 - return 0;
 -}
 -
 -late_initcall(mpc834x_rtc_hookup);
 -#endif
 -
  /*
   * Called very early, MMU is off, device-tree isn't unflattened
   */
 diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c 
 b/arch/powerpc/platforms/83xx/mpc836x_mds.c
 index 0f3855c..8d87b9c 100644
 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
 +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
 @@ -152,30 +152,6 @@ static void __init mpc836x_mds_init_IRQ(void)
  #endif   /* CONFIG_QUICC_ENGINE */
  }
  
 -#if defined(CONFIG_I2C_MPC)  defined(CONFIG_SENSORS_DS1374)
 -extern ulong ds1374_get_rtc_time(void);
 -extern int 

[2.6 patch] the scheduled I2C RTC driver removal

2007-10-31 Thread Adrian Bunk
This patch contains the scheduled removal of legacy I2C RTC drivers with 
replacement drivers.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/feature-removal-schedule.txt |7 
 arch/powerpc/platforms/83xx/mpc832x_mds.c  |   24 -
 arch/powerpc/platforms/83xx/mpc834x_mds.c  |   24 -
 arch/powerpc/platforms/83xx/mpc836x_mds.c  |   24 -
 arch/ppc/platforms/83xx/mpc834x_sys.c  |   20 -
 arch/ppc/platforms/85xx/tqm85xx.c  |   21 -
 arch/ppc/platforms/katana.c|   21 -
 drivers/i2c/chips/Kconfig  |   38 -
 drivers/i2c/chips/Makefile |3 
 drivers/i2c/chips/ds1337.c |  410 
 drivers/i2c/chips/ds1374.c |  267 -
 drivers/i2c/chips/m41t00.c |  413 -
 include/linux/m41t00.h |   50 --
 13 files changed, 1322 deletions(-)

bf858b44b3071082be3aaf71e2d46ddb26415247 
diff --git a/Documentation/feature-removal-schedule.txt 
b/Documentation/feature-removal-schedule.txt
index 6bb9be5..391f2d1 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -275,13 +275,6 @@ Who:  Tejun Heo [EMAIL PROTECTED]
 
 ---
 
-What:  Legacy RTC drivers (under drivers/i2c/chips)
-When:  November 2007
-Why:   Obsolete. We have a RTC subsystem with better drivers.
-Who:   Jean Delvare [EMAIL PROTECTED]
-

-
 What:  iptables SAME target
 When:  1.1. 2008
 Files: net/ipv4/netfilter/ipt_SAME.c, include/linux/netfilter_ipv4/ipt_SAME.h
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c 
b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 972fa85..66382df 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -145,30 +145,6 @@ static void __init mpc832x_sys_init_IRQ(void)
 #endif /* CONFIG_QUICC_ENGINE */
 }
 
-#if defined(CONFIG_I2C_MPC)  defined(CONFIG_SENSORS_DS1374)
-extern ulong ds1374_get_rtc_time(void);
-extern int ds1374_set_rtc_time(ulong);
-
-static int __init mpc832x_rtc_hookup(void)
-{
-   struct timespec tv;
-
-   if (!machine_is(mpc832x_mds))
-   return 0;
-
-   ppc_md.get_rtc_time = ds1374_get_rtc_time;
-   ppc_md.set_rtc_time = ds1374_set_rtc_time;
-
-   tv.tv_nsec = 0;
-   tv.tv_sec = (ppc_md.get_rtc_time) ();
-   do_settimeofday(tv);
-
-   return 0;
-}
-
-late_initcall(mpc832x_rtc_hookup);
-#endif
-
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c 
b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index 00aed7c..a81bb3c 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -106,30 +106,6 @@ static void __init mpc834x_mds_init_IRQ(void)
ipic_set_default_priority();
 }
 
-#if defined(CONFIG_I2C_MPC)  defined(CONFIG_SENSORS_DS1374)
-extern ulong ds1374_get_rtc_time(void);
-extern int ds1374_set_rtc_time(ulong);
-
-static int __init mpc834x_rtc_hookup(void)
-{
-   struct timespec tv;
-
-   if (!machine_is(mpc834x_mds))
-   return 0;
-
-   ppc_md.get_rtc_time = ds1374_get_rtc_time;
-   ppc_md.set_rtc_time = ds1374_set_rtc_time;
-
-   tv.tv_nsec = 0;
-   tv.tv_sec = (ppc_md.get_rtc_time) ();
-   do_settimeofday(tv);
-
-   return 0;
-}
-
-late_initcall(mpc834x_rtc_hookup);
-#endif
-
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c 
b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index 0f3855c..8d87b9c 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -152,30 +152,6 @@ static void __init mpc836x_mds_init_IRQ(void)
 #endif /* CONFIG_QUICC_ENGINE */
 }
 
-#if defined(CONFIG_I2C_MPC)  defined(CONFIG_SENSORS_DS1374)
-extern ulong ds1374_get_rtc_time(void);
-extern int ds1374_set_rtc_time(ulong);
-
-static int __init mpc8360_rtc_hookup(void)
-{
-   struct timespec tv;
-
-   if (!machine_is(mpc836x_mds))
-   return 0;
-
-   ppc_md.get_rtc_time = ds1374_get_rtc_time;
-   ppc_md.set_rtc_time = ds1374_set_rtc_time;
-
-   tv.tv_nsec = 0;
-   tv.tv_sec = (ppc_md.get_rtc_time) ();
-   do_settimeofday(tv);
-
-   return 0;
-}
-
-late_initcall(mpc8360_rtc_hookup);
-#endif
-
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c 
b/arch/ppc/platforms/83xx/mpc834x_sys.c
index b84f8df..cb0a749 100644
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -224,26 +224,6 @@ mpc834x_sys_init_IRQ(void)
ipic_set_default_priority();
 }
 
-#if defined(CONFIG_I2C_MPC)  defined(CONFIG_SENSORS_DS1374)
-extern ulong   ds1374_get_rtc_time(void);
-extern int