diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-07-19 16:59:58 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-20 20:15:48 -0400 |
commit | cdee99d7461d928815db6219fb14d37f99241d44 (patch) | |
tree | 8db5fb8f4d06171f998d19d25980c50205bfb03d /drivers/char/rtc.c | |
parent | 0fe85d504b47267bcdb25a563c535aa2ae075ff4 (diff) |
[SPARC64]: Stop using drivers/char/rtc.c
The existing sparc64 mini_rtc driver can handle CMOS based
rtcs trivially with just a few lines of code and the simplifies
things tremendously.
Tested on SB1500.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/char/rtc.c')
-rw-r--r-- | drivers/char/rtc.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 22cf7aa56cc4..30c3f54c7666 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
@@ -86,12 +86,9 @@ | |||
86 | #include <asm/hpet.h> | 86 | #include <asm/hpet.h> |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | #ifdef __sparc__ | 89 | #ifdef CONFIG_SPARC32 |
90 | #include <linux/pci.h> | 90 | #include <linux/pci.h> |
91 | #include <asm/ebus.h> | 91 | #include <asm/ebus.h> |
92 | #ifdef __sparc_v9__ | ||
93 | #include <asm/isa.h> | ||
94 | #endif | ||
95 | 92 | ||
96 | static unsigned long rtc_port; | 93 | static unsigned long rtc_port; |
97 | static int rtc_irq = PCI_IRQ_NONE; | 94 | static int rtc_irq = PCI_IRQ_NONE; |
@@ -930,13 +927,9 @@ static int __init rtc_init(void) | |||
930 | unsigned int year, ctrl; | 927 | unsigned int year, ctrl; |
931 | char *guess = NULL; | 928 | char *guess = NULL; |
932 | #endif | 929 | #endif |
933 | #ifdef __sparc__ | 930 | #ifdef CONFIG_SPARC32 |
934 | struct linux_ebus *ebus; | 931 | struct linux_ebus *ebus; |
935 | struct linux_ebus_device *edev; | 932 | struct linux_ebus_device *edev; |
936 | #ifdef __sparc_v9__ | ||
937 | struct sparc_isa_bridge *isa_br; | ||
938 | struct sparc_isa_device *isa_dev; | ||
939 | #endif | ||
940 | #else | 933 | #else |
941 | void *r; | 934 | void *r; |
942 | #ifdef RTC_IRQ | 935 | #ifdef RTC_IRQ |
@@ -944,7 +937,7 @@ static int __init rtc_init(void) | |||
944 | #endif | 937 | #endif |
945 | #endif | 938 | #endif |
946 | 939 | ||
947 | #ifdef __sparc__ | 940 | #ifdef CONFIG_SPARC32 |
948 | for_each_ebus(ebus) { | 941 | for_each_ebus(ebus) { |
949 | for_each_ebusdev(edev, ebus) { | 942 | for_each_ebusdev(edev, ebus) { |
950 | if(strcmp(edev->prom_node->name, "rtc") == 0) { | 943 | if(strcmp(edev->prom_node->name, "rtc") == 0) { |
@@ -954,17 +947,6 @@ static int __init rtc_init(void) | |||
954 | } | 947 | } |
955 | } | 948 | } |
956 | } | 949 | } |
957 | #ifdef __sparc_v9__ | ||
958 | for_each_isa(isa_br) { | ||
959 | for_each_isadev(isa_dev, isa_br) { | ||
960 | if (strcmp(isa_dev->prom_node->name, "rtc") == 0) { | ||
961 | rtc_port = isa_dev->resource.start; | ||
962 | rtc_irq = isa_dev->irq; | ||
963 | goto found; | ||
964 | } | ||
965 | } | ||
966 | } | ||
967 | #endif | ||
968 | rtc_has_irq = 0; | 950 | rtc_has_irq = 0; |
969 | printk(KERN_ERR "rtc_init: no PC rtc found\n"); | 951 | printk(KERN_ERR "rtc_init: no PC rtc found\n"); |
970 | return -EIO; | 952 | return -EIO; |
@@ -1020,7 +1002,7 @@ no_irq: | |||
1020 | 1002 | ||
1021 | #endif | 1003 | #endif |
1022 | 1004 | ||
1023 | #endif /* __sparc__ vs. others */ | 1005 | #endif /* CONFIG_SPARC32 vs. others */ |
1024 | 1006 | ||
1025 | if (misc_register(&rtc_dev)) { | 1007 | if (misc_register(&rtc_dev)) { |
1026 | #ifdef RTC_IRQ | 1008 | #ifdef RTC_IRQ |
@@ -1105,7 +1087,7 @@ static void __exit rtc_exit (void) | |||
1105 | remove_proc_entry ("driver/rtc", NULL); | 1087 | remove_proc_entry ("driver/rtc", NULL); |
1106 | misc_deregister(&rtc_dev); | 1088 | misc_deregister(&rtc_dev); |
1107 | 1089 | ||
1108 | #ifdef __sparc__ | 1090 | #ifdef CONFIG_SPARC32 |
1109 | if (rtc_has_irq) | 1091 | if (rtc_has_irq) |
1110 | free_irq (rtc_irq, &rtc_port); | 1092 | free_irq (rtc_irq, &rtc_port); |
1111 | #else | 1093 | #else |
@@ -1117,7 +1099,7 @@ static void __exit rtc_exit (void) | |||
1117 | if (rtc_has_irq) | 1099 | if (rtc_has_irq) |
1118 | free_irq (RTC_IRQ, NULL); | 1100 | free_irq (RTC_IRQ, NULL); |
1119 | #endif | 1101 | #endif |
1120 | #endif /* __sparc__ */ | 1102 | #endif /* CONFIG_SPARC32 */ |
1121 | } | 1103 | } |
1122 | 1104 | ||
1123 | module_init(rtc_init); | 1105 | module_init(rtc_init); |