Skip to content

Commit

Permalink
char/genrtc: remove mn10300 support
Browse files Browse the repository at this point in the history
The genrtc driver serves no purpose on mn10300 because it drives the
same hardware as the original rtc.c driver, and the newer rtc-generic.c
or rtc-cmos.c drivers on architectures that use the asm-generic/rtc.h
header.

I assume it was initially only added for completeness when the
mn10300 port was done, but the older rtc.c driver was always used
instead.

We can also stop include asm-generic/rtc.h now, because we
just call mc146818_set_time() directly.

It would be nice to change the architecture to use the rtc-cmos driver
next, and remove support for the old rtc driver as well.

[linux@roeck-us.net: Add missing include file to proc-init.c]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
  • Loading branch information
Arnd Bergmann authored and Alexandre Belloni committed Jun 3, 2016
1 parent 1cb1e35 commit 7ee9421
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions arch/mn10300/include/asm/rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ static inline void calibrate_clock(void)

#endif /* !CONFIG_MN10300_RTC */

#include <asm-generic/rtc.h>

#endif /* _ASM_RTC_H */
2 changes: 1 addition & 1 deletion arch/mn10300/kernel/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void read_persistent_clock(struct timespec *ts)
{
struct rtc_time tm;

get_rtc_time(&tm);
mc146818_set_time(&tm);

ts->tv_nsec = 0;
ts->tv_sec = mktime(tm.tm_year, tm.tm_mon, tm.tm_mday,
Expand Down
2 changes: 2 additions & 0 deletions arch/mn10300/proc-mn103e010/proc-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
* 2 of the Licence, or (at your option) any later version.
*/
#include <linux/kernel.h>
#include <asm/cacheflush.h>
#include <asm/fpu.h>
#include <asm/irq.h>
#include <asm/rtc.h>
#include <asm/busctl-regs.h>

Expand Down
1 change: 1 addition & 0 deletions arch/mn10300/proc-mn2ws0050/proc-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/delay.h>
#include <linux/interrupt.h>

#include <asm/cacheflush.h>
#include <asm/processor.h>
#include <asm/uaccess.h>
#include <asm/io.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ config JS_RTC
config GEN_RTC
tristate "Generic /dev/rtc emulation"
depends on RTC!=y
depends on M68K || MN10300 || PARISC || PPC
depends on M68K || PARISC || PPC
---help---
If you say Y here and create a character special file /dev/rtc with
major number 10 and minor number 135 using mknod ("man mknod"), you
Expand Down

0 comments on commit 7ee9421

Please sign in to comment.