aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2007-11-08 14:37:06 -0500
committerKumar Gala <galak@kernel.crashing.org>2007-11-20 16:39:54 -0500
commit27f49807d79cf44642f98cb7854729836340d98d (patch)
tree1e7c7d50dba76d68f3f6681830b2d11352fe72ba
parent0b47759db54f82df68ed179ddc5cb2becea56158 (diff)
[POWERPC] 8xxx: MDS board RTC fixes
Now the rtc class ds1374 driver has been added, remove the old rtc driver hookup code, add rtc node to device trees, and turn on the new driver in the defconfigs. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts7
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts9
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts9
-rw-r--r--arch/powerpc/configs/mpc832x_mds_defconfig48
-rw-r--r--arch/powerpc/configs/mpc834x_mds_defconfig48
-rw-r--r--arch/powerpc/configs/mpc836x_mds_defconfig48
-rw-r--r--arch/powerpc/configs/mpc8568mds_defconfig48
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c24
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c24
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_mds.c24
10 files changed, 213 insertions, 76 deletions
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index eeafa8ba4d16..c64f3037a13b 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -57,12 +57,19 @@
57 }; 57 };
58 58
59 i2c@3000 { 59 i2c@3000 {
60 #address-cells = <1>;
61 #size-cells = <0>;
60 device_type = "i2c"; 62 device_type = "i2c";
61 compatible = "fsl-i2c"; 63 compatible = "fsl-i2c";
62 reg = <3000 100>; 64 reg = <3000 100>;
63 interrupts = <e 8>; 65 interrupts = <e 8>;
64 interrupt-parent = < &ipic >; 66 interrupt-parent = < &ipic >;
65 dfsrr; 67 dfsrr;
68
69 rtc@68 {
70 compatible = "dallas,ds1374";
71 reg = <68>;
72 };
66 }; 73 };
67 74
68 serial@4500 { 75 serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index e5a84ef9f4b0..49363f89cb71 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -57,15 +57,24 @@
57 }; 57 };
58 58
59 i2c@3000 { 59 i2c@3000 {
60 #address-cells = <1>;
61 #size-cells = <0>;
60 device_type = "i2c"; 62 device_type = "i2c";
61 compatible = "fsl-i2c"; 63 compatible = "fsl-i2c";
62 reg = <3000 100>; 64 reg = <3000 100>;
63 interrupts = <e 8>; 65 interrupts = <e 8>;
64 interrupt-parent = < &ipic >; 66 interrupt-parent = < &ipic >;
65 dfsrr; 67 dfsrr;
68
69 rtc@68 {
70 compatible = "dallas,ds1374";
71 reg = <68>;
72 };
66 }; 73 };
67 74
68 i2c@3100 { 75 i2c@3100 {
76 #address-cells = <1>;
77 #size-cells = <0>;
69 device_type = "i2c"; 78 device_type = "i2c";
70 compatible = "fsl-i2c"; 79 compatible = "fsl-i2c";
71 reg = <3100 100>; 80 reg = <3100 100>;
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index fbd1573c348b..0b2d2b588daa 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -62,15 +62,24 @@
62 }; 62 };
63 63
64 i2c@3000 { 64 i2c@3000 {
65 #address-cells = <1>;
66 #size-cells = <0>;
65 device_type = "i2c"; 67 device_type = "i2c";
66 compatible = "fsl-i2c"; 68 compatible = "fsl-i2c";
67 reg = <3000 100>; 69 reg = <3000 100>;
68 interrupts = <e 8>; 70 interrupts = <e 8>;
69 interrupt-parent = < &ipic >; 71 interrupt-parent = < &ipic >;
70 dfsrr; 72 dfsrr;
73
74 rtc@68 {
75 compatible = "dallas,ds1374";
76 reg = <68>;
77 };
71 }; 78 };
72 79
73 i2c@3100 { 80 i2c@3100 {
81 #address-cells = <1>;
82 #size-cells = <0>;
74 device_type = "i2c"; 83 device_type = "i2c";
75 compatible = "fsl-i2c"; 84 compatible = "fsl-i2c";
76 reg = <3100 100>; 85 reg = <3100 100>;
diff --git a/arch/powerpc/configs/mpc832x_mds_defconfig b/arch/powerpc/configs/mpc832x_mds_defconfig
index dd68d1818d6b..e069018276ca 100644
--- a/arch/powerpc/configs/mpc832x_mds_defconfig
+++ b/arch/powerpc/configs/mpc832x_mds_defconfig
@@ -774,7 +774,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y
774# CONFIG_NEW_LEDS is not set 774# CONFIG_NEW_LEDS is not set
775# CONFIG_INFINIBAND is not set 775# CONFIG_INFINIBAND is not set
776# CONFIG_EDAC is not set 776# CONFIG_EDAC is not set
777# CONFIG_RTC_CLASS is not set 777CONFIG_RTC_LIB=y
778CONFIG_RTC_CLASS=y
779CONFIG_RTC_HCTOSYS=y
780CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
781# CONFIG_RTC_DEBUG is not set
782
783#
784# RTC interfaces
785#
786CONFIG_RTC_INTF_SYSFS=y
787CONFIG_RTC_INTF_PROC=y
788CONFIG_RTC_INTF_DEV=y
789# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
790# CONFIG_RTC_DRV_TEST is not set
791
792#
793# I2C RTC drivers
794#
795# CONFIG_RTC_DRV_DS1307 is not set
796CONFIG_RTC_DRV_DS1374=y
797# CONFIG_RTC_DRV_DS1672 is not set
798# CONFIG_RTC_DRV_MAX6900 is not set
799# CONFIG_RTC_DRV_RS5C372 is not set
800# CONFIG_RTC_DRV_ISL1208 is not set
801# CONFIG_RTC_DRV_X1205 is not set
802# CONFIG_RTC_DRV_PCF8563 is not set
803# CONFIG_RTC_DRV_PCF8583 is not set
804# CONFIG_RTC_DRV_M41T80 is not set
805
806#
807# SPI RTC drivers
808#
809
810#
811# Platform RTC drivers
812#
813# CONFIG_RTC_DRV_CMOS is not set
814# CONFIG_RTC_DRV_DS1553 is not set
815# CONFIG_RTC_DRV_STK17TA8 is not set
816# CONFIG_RTC_DRV_DS1742 is not set
817# CONFIG_RTC_DRV_M48T86 is not set
818# CONFIG_RTC_DRV_M48T59 is not set
819# CONFIG_RTC_DRV_V3020 is not set
820
821#
822# on-CPU RTC drivers
823#
778 824
779# 825#
780# DMA Engine support 826# DMA Engine support
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig
index e59a88e95486..356f736a5d3d 100644
--- a/arch/powerpc/configs/mpc834x_mds_defconfig
+++ b/arch/powerpc/configs/mpc834x_mds_defconfig
@@ -721,7 +721,53 @@ CONFIG_USB_EHCI_FSL=y
721# CONFIG_NEW_LEDS is not set 721# CONFIG_NEW_LEDS is not set
722# CONFIG_INFINIBAND is not set 722# CONFIG_INFINIBAND is not set
723# CONFIG_EDAC is not set 723# CONFIG_EDAC is not set
724# CONFIG_RTC_CLASS is not set 724CONFIG_RTC_LIB=y
725CONFIG_RTC_CLASS=y
726CONFIG_RTC_HCTOSYS=y
727CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
728# CONFIG_RTC_DEBUG is not set
729
730#
731# RTC interfaces
732#
733CONFIG_RTC_INTF_SYSFS=y
734CONFIG_RTC_INTF_PROC=y
735CONFIG_RTC_INTF_DEV=y
736# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
737# CONFIG_RTC_DRV_TEST is not set
738
739#
740# I2C RTC drivers
741#
742# CONFIG_RTC_DRV_DS1307 is not set
743CONFIG_RTC_DRV_DS1374=y
744# CONFIG_RTC_DRV_DS1672 is not set
745# CONFIG_RTC_DRV_MAX6900 is not set
746# CONFIG_RTC_DRV_RS5C372 is not set
747# CONFIG_RTC_DRV_ISL1208 is not set
748# CONFIG_RTC_DRV_X1205 is not set
749# CONFIG_RTC_DRV_PCF8563 is not set
750# CONFIG_RTC_DRV_PCF8583 is not set
751# CONFIG_RTC_DRV_M41T80 is not set
752
753#
754# SPI RTC drivers
755#
756
757#
758# Platform RTC drivers
759#
760# CONFIG_RTC_DRV_CMOS is not set
761# CONFIG_RTC_DRV_DS1553 is not set
762# CONFIG_RTC_DRV_STK17TA8 is not set
763# CONFIG_RTC_DRV_DS1742 is not set
764# CONFIG_RTC_DRV_M48T86 is not set
765# CONFIG_RTC_DRV_M48T59 is not set
766# CONFIG_RTC_DRV_V3020 is not set
767
768#
769# on-CPU RTC drivers
770#
725 771
726# 772#
727# DMA Engine support 773# DMA Engine support
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/mpc836x_mds_defconfig
index 75657528518e..1b4d37570eb1 100644
--- a/arch/powerpc/configs/mpc836x_mds_defconfig
+++ b/arch/powerpc/configs/mpc836x_mds_defconfig
@@ -773,7 +773,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y
773# CONFIG_NEW_LEDS is not set 773# CONFIG_NEW_LEDS is not set
774# CONFIG_INFINIBAND is not set 774# CONFIG_INFINIBAND is not set
775# CONFIG_EDAC is not set 775# CONFIG_EDAC is not set
776# CONFIG_RTC_CLASS is not set 776CONFIG_RTC_LIB=y
777CONFIG_RTC_CLASS=y
778CONFIG_RTC_HCTOSYS=y
779CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
780# CONFIG_RTC_DEBUG is not set
781
782#
783# RTC interfaces
784#
785CONFIG_RTC_INTF_SYSFS=y
786CONFIG_RTC_INTF_PROC=y
787CONFIG_RTC_INTF_DEV=y
788# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
789# CONFIG_RTC_DRV_TEST is not set
790
791#
792# I2C RTC drivers
793#
794# CONFIG_RTC_DRV_DS1307 is not set
795CONFIG_RTC_DRV_DS1374=y
796# CONFIG_RTC_DRV_DS1672 is not set
797# CONFIG_RTC_DRV_MAX6900 is not set
798# CONFIG_RTC_DRV_RS5C372 is not set
799# CONFIG_RTC_DRV_ISL1208 is not set
800# CONFIG_RTC_DRV_X1205 is not set
801# CONFIG_RTC_DRV_PCF8563 is not set
802# CONFIG_RTC_DRV_PCF8583 is not set
803# CONFIG_RTC_DRV_M41T80 is not set
804
805#
806# SPI RTC drivers
807#
808
809#
810# Platform RTC drivers
811#
812# CONFIG_RTC_DRV_CMOS is not set
813# CONFIG_RTC_DRV_DS1553 is not set
814# CONFIG_RTC_DRV_STK17TA8 is not set
815# CONFIG_RTC_DRV_DS1742 is not set
816# CONFIG_RTC_DRV_M48T86 is not set
817# CONFIG_RTC_DRV_M48T59 is not set
818# CONFIG_RTC_DRV_V3020 is not set
819
820#
821# on-CPU RTC drivers
822#
777 823
778# 824#
779# DMA Engine support 825# DMA Engine support
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig
index 883d8af9debd..d665e7a797c0 100644
--- a/arch/powerpc/configs/mpc8568mds_defconfig
+++ b/arch/powerpc/configs/mpc8568mds_defconfig
@@ -768,7 +768,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y
768# CONFIG_NEW_LEDS is not set 768# CONFIG_NEW_LEDS is not set
769# CONFIG_INFINIBAND is not set 769# CONFIG_INFINIBAND is not set
770# CONFIG_EDAC is not set 770# CONFIG_EDAC is not set
771# CONFIG_RTC_CLASS is not set 771CONFIG_RTC_LIB=y
772CONFIG_RTC_CLASS=y
773CONFIG_RTC_HCTOSYS=y
774CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
775# CONFIG_RTC_DEBUG is not set
776
777#
778# RTC interfaces
779#
780CONFIG_RTC_INTF_SYSFS=y
781CONFIG_RTC_INTF_PROC=y
782CONFIG_RTC_INTF_DEV=y
783# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
784# CONFIG_RTC_DRV_TEST is not set
785
786#
787# I2C RTC drivers
788#
789# CONFIG_RTC_DRV_DS1307 is not set
790CONFIG_RTC_DRV_DS1374=y
791# CONFIG_RTC_DRV_DS1672 is not set
792# CONFIG_RTC_DRV_MAX6900 is not set
793# CONFIG_RTC_DRV_RS5C372 is not set
794# CONFIG_RTC_DRV_ISL1208 is not set
795# CONFIG_RTC_DRV_X1205 is not set
796# CONFIG_RTC_DRV_PCF8563 is not set
797# CONFIG_RTC_DRV_PCF8583 is not set
798# CONFIG_RTC_DRV_M41T80 is not set
799
800#
801# SPI RTC drivers
802#
803
804#
805# Platform RTC drivers
806#
807# CONFIG_RTC_DRV_CMOS is not set
808# CONFIG_RTC_DRV_DS1553 is not set
809# CONFIG_RTC_DRV_STK17TA8 is not set
810# CONFIG_RTC_DRV_DS1742 is not set
811# CONFIG_RTC_DRV_M48T86 is not set
812# CONFIG_RTC_DRV_M48T59 is not set
813# CONFIG_RTC_DRV_V3020 is not set
814
815#
816# on-CPU RTC drivers
817#
772 818
773# 819#
774# DMA Engine support 820# DMA Engine support
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 9e3bfcca1cea..39ee7a13b25a 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -146,30 +146,6 @@ static void __init mpc832x_sys_init_IRQ(void)
146#endif /* CONFIG_QUICC_ENGINE */ 146#endif /* CONFIG_QUICC_ENGINE */
147} 147}
148 148
149#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
150extern ulong ds1374_get_rtc_time(void);
151extern int ds1374_set_rtc_time(ulong);
152
153static int __init mpc832x_rtc_hookup(void)
154{
155 struct timespec tv;
156
157 if (!machine_is(mpc832x_mds))
158 return 0;
159
160 ppc_md.get_rtc_time = ds1374_get_rtc_time;
161 ppc_md.set_rtc_time = ds1374_set_rtc_time;
162
163 tv.tv_nsec = 0;
164 tv.tv_sec = (ppc_md.get_rtc_time) ();
165 do_settimeofday(&tv);
166
167 return 0;
168}
169
170late_initcall(mpc832x_rtc_hookup);
171#endif
172
173/* 149/*
174 * Called very early, MMU is off, device-tree isn't unflattened 150 * Called very early, MMU is off, device-tree isn't unflattened
175 */ 151 */
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index 00aed7c2269e..a81bb3ce6b94 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)
106 ipic_set_default_priority(); 106 ipic_set_default_priority();
107} 107}
108 108
109#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
110extern ulong ds1374_get_rtc_time(void);
111extern int ds1374_set_rtc_time(ulong);
112
113static int __init mpc834x_rtc_hookup(void)
114{
115 struct timespec tv;
116
117 if (!machine_is(mpc834x_mds))
118 return 0;
119
120 ppc_md.get_rtc_time = ds1374_get_rtc_time;
121 ppc_md.set_rtc_time = ds1374_set_rtc_time;
122
123 tv.tv_nsec = 0;
124 tv.tv_sec = (ppc_md.get_rtc_time) ();
125 do_settimeofday(&tv);
126
127 return 0;
128}
129
130late_initcall(mpc834x_rtc_hookup);
131#endif
132
133/* 109/*
134 * Called very early, MMU is off, device-tree isn't unflattened 110 * Called very early, MMU is off, device-tree isn't unflattened
135 */ 111 */
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index 0a722601a2f0..e40012f8f488 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -177,30 +177,6 @@ static void __init mpc836x_mds_init_IRQ(void)
177#endif /* CONFIG_QUICC_ENGINE */ 177#endif /* CONFIG_QUICC_ENGINE */
178} 178}
179 179
180#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
181extern ulong ds1374_get_rtc_time(void);
182extern int ds1374_set_rtc_time(ulong);
183
184static int __init mpc8360_rtc_hookup(void)
185{
186 struct timespec tv;
187
188 if (!machine_is(mpc836x_mds))
189 return 0;
190
191 ppc_md.get_rtc_time = ds1374_get_rtc_time;
192 ppc_md.set_rtc_time = ds1374_set_rtc_time;
193
194 tv.tv_nsec = 0;
195 tv.tv_sec = (ppc_md.get_rtc_time) ();
196 do_settimeofday(&tv);
197
198 return 0;
199}
200
201late_initcall(mpc8360_rtc_hookup);
202#endif
203
204/* 180/*
205 * Called very early, MMU is off, device-tree isn't unflattened 181 * Called very early, MMU is off, device-tree isn't unflattened
206 */ 182 */