Skip to content

Commit 835ea93

Browse files
arndbalexandrebelloni
authored andcommitted
char/genrtc: remove powerpc support
PowerPC is the last architecture using the GEN_RTC driver on some machines, but we can migrate them all to using the RTC_DRV_GENERIC driver instead now. This moves over the CONFIG_GEN_RTC option from drivers/char into arch/powerpc/platforms/Kconfig and makes it just select the replacement driver instead, for the only reason of not breaking existing defconfig and .config files that users may have. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
1 parent 169047f commit 835ea93

5 files changed

Lines changed: 15 additions & 82 deletions

File tree

‎arch/powerpc/include/asm/rtc.h‎

Lines changed: 0 additions & 78 deletions
This file was deleted.

‎arch/powerpc/platforms/Kconfig‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,17 @@ config OF_RTC
321321
Uses information from the OF or flattened device tree to instantiate
322322
platform devices for direct mapped RTC chips like the DS1742 or DS1743.
323323

324+
config GEN_RTC
325+
bool "Use the platform RTC operations from user space"
326+
select RTC_CLASS
327+
select RTC_DRV_GENERIC
328+
help
329+
This option provides backwards compatibility with the old gen_rtc.ko
330+
module that was traditionally used for old PowerPC machines.
331+
Platforms should migrate to enabling the RTC_DRV_GENERIC by hand
332+
replacing their get_rtc_time/set_rtc_time callbacks with
333+
a proper RTC device driver.
334+
324335
config SIMPLE_GPIO
325336
bool "Support for simple, memory-mapped GPIO controllers"
326337
depends on PPC

‎arch/powerpc/platforms/ps3/time.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
#include <linux/kernel.h>
2222
#include <linux/platform_device.h>
23+
#include <linux/rtc.h>
2324

2425
#include <asm/firmware.h>
25-
#include <asm/rtc.h>
2626
#include <asm/lv1call.h>
2727
#include <asm/ps3.h>
2828

‎drivers/char/Kconfig‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ config JS_RTC
325325
To compile this driver as a module, choose M here: the
326326
module will be called js-rtc.
327327

328-
config GEN_RTC
328+
config OLD_GEN_RTC
329329
tristate "Generic /dev/rtc emulation"
330330
depends on RTC!=y
331-
depends on PPC
331+
depends on BROKEN
332332
---help---
333333
If you say Y here and create a character special file /dev/rtc with
334334
major number 10 and minor number 135 using mknod ("man mknod"), you

‎drivers/char/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ obj-$(CONFIG_APPLICOM) += applicom.o
2525
obj-$(CONFIG_SONYPI) += sonypi.o
2626
obj-$(CONFIG_RTC) += rtc.o
2727
obj-$(CONFIG_HPET) += hpet.o
28-
obj-$(CONFIG_GEN_RTC) += genrtc.o
28+
obj-$(CONFIG_OLD_GEN_RTC) += genrtc.o
2929
obj-$(CONFIG_EFI_RTC) += efirtc.o
3030
obj-$(CONFIG_DS1302) += ds1302.o
3131
obj-$(CONFIG_XILINX_HWICAP) += xilinx_hwicap/

0 commit comments

Comments
 (0)