hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/rtc/rtc-m48t35.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for the SGS-Thomson M48T35 Timekeeper RAM chip
34 *
....@@ -7,11 +8,6 @@
78 * Copyright (C) 2008 Thomas Bogendoerfer
89 *
910 * Based on code written by Paul Gortmaker.
10
- *
11
- * This program is free software; you can redistribute it and/or modify it
12
- * under the terms of the GNU General Public License as published by the
13
- * Free Software Foundation; either version 2 of the License, or (at your
14
- * option) any later version.
1511 */
1612
1713 #include <linux/module.h>
....@@ -24,6 +20,16 @@
2420
2521 struct m48t35_rtc {
2622 u8 pad[0x7ff8]; /* starts at 0x7ff8 */
23
+#ifdef CONFIG_SGI_IP27
24
+ u8 hour;
25
+ u8 min;
26
+ u8 sec;
27
+ u8 control;
28
+ u8 year;
29
+ u8 month;
30
+ u8 date;
31
+ u8 day;
32
+#else
2733 u8 control;
2834 u8 sec;
2935 u8 min;
....@@ -32,6 +38,7 @@
3238 u8 date;
3339 u8 month;
3440 u8 year;
41
+#endif
3542 };
3643
3744 #define M48T35_RTC_SET 0x80
....@@ -153,15 +160,10 @@
153160 return -ENOMEM;
154161
155162 priv->size = resource_size(res);
156
- /*
157
- * kludge: remove the #ifndef after ioc3 resource
158
- * conflicts are resolved
159
- */
160
-#ifndef CONFIG_SGI_IP27
161163 if (!devm_request_mem_region(&pdev->dev, res->start, priv->size,
162164 pdev->name))
163165 return -EBUSY;
164
-#endif
166
+
165167 priv->baseaddr = res->start;
166168 priv->reg = devm_ioremap(&pdev->dev, priv->baseaddr, priv->size);
167169 if (!priv->reg)