diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-03-09 09:59:10 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2018-03-26 09:56:29 -0400 |
commit | fca94ec61363b0d9839e45ebab14d6e257c4f34b (patch) | |
tree | 790bc8f4c901fc29208bdb6e04fa07a760e6b8e9 | |
parent | 889ce12b1650b3c388634451872638a08faf6d6b (diff) |
rtc: remove tile driver
The tile architecture is getting removed, so this driver is
no longer needed.
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | drivers/rtc/Kconfig | 7 | ||||
-rw-r--r-- | drivers/rtc/Makefile | 1 | ||||
-rw-r--r-- | drivers/rtc/rtc-tile.c | 146 |
3 files changed, 0 insertions, 154 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 46af10ac45fc..9664852afc49 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -1656,13 +1656,6 @@ config RTC_DRV_TEGRA | |||
1656 | This drive can also be built as a module. If so, the module | 1656 | This drive can also be built as a module. If so, the module |
1657 | will be called rtc-tegra. | 1657 | will be called rtc-tegra. |
1658 | 1658 | ||
1659 | config RTC_DRV_TILE | ||
1660 | tristate "Tilera hypervisor RTC support" | ||
1661 | depends on TILE | ||
1662 | help | ||
1663 | Enable support for the Linux driver side of the Tilera | ||
1664 | hypervisor's real-time clock interface. | ||
1665 | |||
1666 | config RTC_DRV_PUV3 | 1659 | config RTC_DRV_PUV3 |
1667 | tristate "PKUnity v3 RTC support" | 1660 | tristate "PKUnity v3 RTC support" |
1668 | depends on ARCH_PUV3 | 1661 | depends on ARCH_PUV3 |
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 4fbf87e45a7c..24f0d4247532 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile | |||
@@ -162,7 +162,6 @@ obj-$(CONFIG_RTC_DRV_SUN6I) += rtc-sun6i.o | |||
162 | obj-$(CONFIG_RTC_DRV_SUNXI) += rtc-sunxi.o | 162 | obj-$(CONFIG_RTC_DRV_SUNXI) += rtc-sunxi.o |
163 | obj-$(CONFIG_RTC_DRV_TEGRA) += rtc-tegra.o | 163 | obj-$(CONFIG_RTC_DRV_TEGRA) += rtc-tegra.o |
164 | obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o | 164 | obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o |
165 | obj-$(CONFIG_RTC_DRV_TILE) += rtc-tile.o | ||
166 | obj-$(CONFIG_RTC_DRV_TPS6586X) += rtc-tps6586x.o | 165 | obj-$(CONFIG_RTC_DRV_TPS6586X) += rtc-tps6586x.o |
167 | obj-$(CONFIG_RTC_DRV_TPS65910) += rtc-tps65910.o | 166 | obj-$(CONFIG_RTC_DRV_TPS65910) += rtc-tps65910.o |
168 | obj-$(CONFIG_RTC_DRV_TPS80031) += rtc-tps80031.o | 167 | obj-$(CONFIG_RTC_DRV_TPS80031) += rtc-tps80031.o |
diff --git a/drivers/rtc/rtc-tile.c b/drivers/rtc/rtc-tile.c deleted file mode 100644 index 0b60867d8390..000000000000 --- a/drivers/rtc/rtc-tile.c +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * Tilera-specific RTC driver. | ||
15 | */ | ||
16 | |||
17 | #include <linux/module.h> | ||
18 | #include <linux/device.h> | ||
19 | #include <linux/rtc.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | |||
22 | /* Platform device pointer. */ | ||
23 | static struct platform_device *tile_rtc_platform_device; | ||
24 | |||
25 | /* | ||
26 | * RTC read routine. Gets time info from RTC chip via hypervisor syscall. | ||
27 | */ | ||
28 | static int read_rtc_time(struct device *dev, struct rtc_time *tm) | ||
29 | { | ||
30 | HV_RTCTime hvtm = hv_get_rtc(); | ||
31 | |||
32 | tm->tm_sec = hvtm.tm_sec; | ||
33 | tm->tm_min = hvtm.tm_min; | ||
34 | tm->tm_hour = hvtm.tm_hour; | ||
35 | tm->tm_mday = hvtm.tm_mday; | ||
36 | tm->tm_mon = hvtm.tm_mon; | ||
37 | tm->tm_year = hvtm.tm_year; | ||
38 | tm->tm_wday = 0; | ||
39 | tm->tm_yday = 0; | ||
40 | tm->tm_isdst = 0; | ||
41 | |||
42 | if (rtc_valid_tm(tm) < 0) | ||
43 | dev_warn(dev, "Read invalid date/time from RTC\n"); | ||
44 | |||
45 | return 0; | ||
46 | } | ||
47 | |||
48 | /* | ||
49 | * RTC write routine. Sends time info to hypervisor via syscall, to be | ||
50 | * written to RTC chip. | ||
51 | */ | ||
52 | static int set_rtc_time(struct device *dev, struct rtc_time *tm) | ||
53 | { | ||
54 | HV_RTCTime hvtm; | ||
55 | |||
56 | hvtm.tm_sec = tm->tm_sec; | ||
57 | hvtm.tm_min = tm->tm_min; | ||
58 | hvtm.tm_hour = tm->tm_hour; | ||
59 | hvtm.tm_mday = tm->tm_mday; | ||
60 | hvtm.tm_mon = tm->tm_mon; | ||
61 | hvtm.tm_year = tm->tm_year; | ||
62 | |||
63 | hv_set_rtc(hvtm); | ||
64 | |||
65 | return 0; | ||
66 | } | ||
67 | |||
68 | /* | ||
69 | * RTC read/write ops. | ||
70 | */ | ||
71 | static const struct rtc_class_ops tile_rtc_ops = { | ||
72 | .read_time = read_rtc_time, | ||
73 | .set_time = set_rtc_time, | ||
74 | }; | ||
75 | |||
76 | /* | ||
77 | * Device probe routine. | ||
78 | */ | ||
79 | static int tile_rtc_probe(struct platform_device *dev) | ||
80 | { | ||
81 | struct rtc_device *rtc; | ||
82 | |||
83 | rtc = devm_rtc_device_register(&dev->dev, "tile", | ||
84 | &tile_rtc_ops, THIS_MODULE); | ||
85 | |||
86 | if (IS_ERR(rtc)) | ||
87 | return PTR_ERR(rtc); | ||
88 | |||
89 | platform_set_drvdata(dev, rtc); | ||
90 | |||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | static struct platform_driver tile_rtc_platform_driver = { | ||
95 | .driver = { | ||
96 | .name = "rtc-tile", | ||
97 | }, | ||
98 | .probe = tile_rtc_probe, | ||
99 | }; | ||
100 | |||
101 | /* | ||
102 | * Driver init routine. | ||
103 | */ | ||
104 | static int __init tile_rtc_driver_init(void) | ||
105 | { | ||
106 | int err; | ||
107 | |||
108 | err = platform_driver_register(&tile_rtc_platform_driver); | ||
109 | if (err) | ||
110 | return err; | ||
111 | |||
112 | tile_rtc_platform_device = platform_device_alloc("rtc-tile", 0); | ||
113 | if (tile_rtc_platform_device == NULL) { | ||
114 | err = -ENOMEM; | ||
115 | goto exit_driver_unregister; | ||
116 | } | ||
117 | |||
118 | err = platform_device_add(tile_rtc_platform_device); | ||
119 | if (err) | ||
120 | goto exit_device_put; | ||
121 | |||
122 | return 0; | ||
123 | |||
124 | exit_device_put: | ||
125 | platform_device_put(tile_rtc_platform_device); | ||
126 | |||
127 | exit_driver_unregister: | ||
128 | platform_driver_unregister(&tile_rtc_platform_driver); | ||
129 | return err; | ||
130 | } | ||
131 | |||
132 | /* | ||
133 | * Driver cleanup routine. | ||
134 | */ | ||
135 | static void __exit tile_rtc_driver_exit(void) | ||
136 | { | ||
137 | platform_device_unregister(tile_rtc_platform_device); | ||
138 | platform_driver_unregister(&tile_rtc_platform_driver); | ||
139 | } | ||
140 | |||
141 | module_init(tile_rtc_driver_init); | ||
142 | module_exit(tile_rtc_driver_exit); | ||
143 | |||
144 | MODULE_DESCRIPTION("Tilera-specific Real Time Clock Driver"); | ||
145 | MODULE_LICENSE("GPL"); | ||
146 | MODULE_ALIAS("platform:rtc-tile"); | ||