Skip to content

Commit

Permalink
powerpc: Hook up rtc-generic, and kill rtc-ppc
Browse files Browse the repository at this point in the history
PowerPC has been a long time user of the generic RTC abstraction, so hook up
rtc-generic:
  - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set,
  - Kill rtc-ppc, as rtc-generic offers the same functionality in a more
    generic way, and supports autoloading through udev.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
  • Loading branch information
Geert Uytterhoeven authored and Kyle McMartin committed Apr 2, 2009
1 parent 2ceb3ad commit bcd68a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 79 deletions.
16 changes: 16 additions & 0 deletions arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,3 +1127,19 @@ void div128_by_32(u64 dividend_high, u64 dividend_low,
dr->result_low = ((u64)y << 32) + z;

}

static int __init rtc_init(void)
{
struct platform_device *pdev;

if (!ppc_md.get_rtc_time)
return -ENODEV;

pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);

return 0;
}

module_init(rtc_init);
10 changes: 1 addition & 9 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -692,20 +692,12 @@ config RTC_DRV_GENERIC
tristate "Generic RTC support"
# Please consider writing a new RTC driver instead of using the generic
# RTC abstraction
depends on PARISC || M68K
depends on PARISC || M68K || PPC
help
Say Y or M here to enable RTC support on systems using the generic
RTC abstraction. If you do not know what you are doing, you should
just say Y.

config RTC_DRV_PPC
tristate "PowerPC machine dependent RTC support"
depends on PPC
help
The PowerPC kernel has machine-specific functions for accessing
the RTC. This exposes that functionality through the generic RTC
class.

config RTC_DRV_PXA
tristate "PXA27x/PXA3xx"
depends on ARCH_PXA
Expand Down
1 change: 0 additions & 1 deletion drivers/rtc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o
obj-$(CONFIG_RTC_DRV_PL030) += rtc-pl030.o
obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o
obj-$(CONFIG_RTC_DRV_GENERIC) += rtc-generic.o
obj-$(CONFIG_RTC_DRV_PPC) += rtc-ppc.o
obj-$(CONFIG_RTC_DRV_PXA) += rtc-pxa.o
obj-$(CONFIG_RTC_DRV_R9701) += rtc-r9701.o
obj-$(CONFIG_RTC_DRV_RS5C313) += rtc-rs5c313.o
Expand Down
69 changes: 0 additions & 69 deletions drivers/rtc/rtc-ppc.c

This file was deleted.

0 comments on commit bcd68a7

Please sign in to comment.