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>
This commit is contained in:
parent
169047f447
commit
835ea93e9d
@ -1,78 +0,0 @@
|
||||
/*
|
||||
* Real-time clock definitions and interfaces
|
||||
*
|
||||
* Author: Tom Rini <trini@mvista.com>
|
||||
*
|
||||
* 2002 (c) MontaVista, Software, Inc. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*
|
||||
* Based on:
|
||||
* include/asm-m68k/rtc.h
|
||||
*
|
||||
* Copyright Richard Zidlicky
|
||||
* implementation details for genrtc/q40rtc driver
|
||||
*
|
||||
* And the old drivers/macintosh/rtc.c which was heavily based on:
|
||||
* Linux/SPARC Real Time Clock Driver
|
||||
* Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu)
|
||||
*
|
||||
* With additional work by Paul Mackerras and Franz Sirl.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_POWERPC_RTC_H__
|
||||
#define __ASM_POWERPC_RTC_H__
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/rtc.h>
|
||||
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
#define RTC_PIE 0x40 /* periodic interrupt enable */
|
||||
#define RTC_AIE 0x20 /* alarm interrupt enable */
|
||||
#define RTC_UIE 0x10 /* update-finished interrupt enable */
|
||||
|
||||
/* some dummy definitions */
|
||||
#define RTC_BATT_BAD 0x100 /* battery bad */
|
||||
#define RTC_SQWE 0x08 /* enable square-wave output */
|
||||
#define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */
|
||||
#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */
|
||||
#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */
|
||||
|
||||
static inline unsigned int get_rtc_time(struct rtc_time *time)
|
||||
{
|
||||
if (ppc_md.get_rtc_time)
|
||||
ppc_md.get_rtc_time(time);
|
||||
return RTC_24H;
|
||||
}
|
||||
|
||||
/* Set the current date and time in the real time clock. */
|
||||
static inline int set_rtc_time(struct rtc_time *time)
|
||||
{
|
||||
if (ppc_md.set_rtc_time)
|
||||
return ppc_md.set_rtc_time(time);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline unsigned int get_rtc_ss(void)
|
||||
{
|
||||
struct rtc_time h;
|
||||
|
||||
get_rtc_time(&h);
|
||||
return h.tm_sec;
|
||||
}
|
||||
|
||||
static inline int get_rtc_pll(struct rtc_pll_info *pll)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline int set_rtc_pll(struct rtc_pll_info *pll)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_POWERPC_RTC_H__ */
|
@ -321,6 +321,17 @@ config OF_RTC
|
||||
Uses information from the OF or flattened device tree to instantiate
|
||||
platform devices for direct mapped RTC chips like the DS1742 or DS1743.
|
||||
|
||||
config GEN_RTC
|
||||
bool "Use the platform RTC operations from user space"
|
||||
select RTC_CLASS
|
||||
select RTC_DRV_GENERIC
|
||||
help
|
||||
This option provides backwards compatibility with the old gen_rtc.ko
|
||||
module that was traditionally used for old PowerPC machines.
|
||||
Platforms should migrate to enabling the RTC_DRV_GENERIC by hand
|
||||
replacing their get_rtc_time/set_rtc_time callbacks with
|
||||
a proper RTC device driver.
|
||||
|
||||
config SIMPLE_GPIO
|
||||
bool "Support for simple, memory-mapped GPIO controllers"
|
||||
depends on PPC
|
||||
|
@ -20,9 +20,9 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/rtc.h>
|
||||
|
||||
#include <asm/firmware.h>
|
||||
#include <asm/rtc.h>
|
||||
#include <asm/lv1call.h>
|
||||
#include <asm/ps3.h>
|
||||
|
||||
|
@ -325,10 +325,10 @@ config JS_RTC
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called js-rtc.
|
||||
|
||||
config GEN_RTC
|
||||
config OLD_GEN_RTC
|
||||
tristate "Generic /dev/rtc emulation"
|
||||
depends on RTC!=y
|
||||
depends on PPC
|
||||
depends on BROKEN
|
||||
---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
|
||||
|
@ -25,7 +25,7 @@ obj-$(CONFIG_APPLICOM) += applicom.o
|
||||
obj-$(CONFIG_SONYPI) += sonypi.o
|
||||
obj-$(CONFIG_RTC) += rtc.o
|
||||
obj-$(CONFIG_HPET) += hpet.o
|
||||
obj-$(CONFIG_GEN_RTC) += genrtc.o
|
||||
obj-$(CONFIG_OLD_GEN_RTC) += genrtc.o
|
||||
obj-$(CONFIG_EFI_RTC) += efirtc.o
|
||||
obj-$(CONFIG_DS1302) += ds1302.o
|
||||
obj-$(CONFIG_XILINX_HWICAP) += xilinx_hwicap/
|
||||
|
Loading…
Reference in New Issue
Block a user