projects/linux·commit 6c84239d

Merge tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

6c84239d · Linus Torvalds <[email protected]> · 2016-08-05 09:48:22 -04:00

Pull RTC updates from Alexandre Belloni:
 "RTC for 4.8

  Cleanups:
   - huge cleanup of rtc-generic and char/genrtc this allowed to cleanup
     rtc-cmos, rtc-sh, rtc-m68k, rtc-powerpc and rtc-parisc
   - move mn10300 to rtc-cmos

  Subsystem:
   - fix wakealarms after hibernate
   - multiples fixes for rctest
   - simplify implementations of .read_alarm

  New drivers:
   - Maxim MAX6916

  Drivers:
   - ds1307: fix weekday
   - m41t80: add wakeup support
   - pcf85063: add support for PCF85063A variant
   - rv8803: extend i2c fix and other fixes
   - s35390a: fix alarm reading, this fixes instant reboot after
     shutdown for QNAP TS-41x
   - s3c: clock fixes"

* tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (65 commits)
  rtc: rv8803: Clear V1F when setting the time
  rtc: rv8803: Stop the clock while setting the time
  rtc: rv8803: Always apply the I²C workaround
  rtc: rv8803: Fix read day of week
  rtc: rv8803: Remove the check for valid time
  rtc: rv8803: Kconfig: Indicate rx8900 support
  rtc: asm9260: remove .owner field for driver
  rtc: at91sam9: Fix missing spin_lock_init()
  rtc: m41t80: add suspend handlers for alarm IRQ
  rtc: m41t80: make it a real error message
  rtc: pcf85063: Add support for the PCF85063A device
  rtc: pcf85063: fix year range
  rtc: hym8563: in .read_alarm set .tm_sec to 0 to signal minute accuracy
  rtc: explicitly set tm_sec = 0 for drivers with minute accurancy
  rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq()
  rtc: s3c: Remove unnecessary call to disable already disabled clock
  rtc: abx80x: use devm_add_action_or_reset()
  rtc: m41t80: use devm_add_action_or_reset()
  rtc: fix a typo and reduce three empty lines to one
  rtc: s35390a: improve two comments in .set_alarm
  ...
Commit
6c84239d595dc6ffe39f0f03dae2f64ed200db95
Parents
d4c06c70 · 6f367788

Merge commit. Changes below are compared with the first parent: d4c06c70.

Changes

105 files changed · +850 −1582

FileStatusAddDelContent
MAINTAINERSmodified+4−0View file
arch/alpha/include/asm/rtc.hdeleted+0−1View before deletion
arch/alpha/kernel/core_marvel.cmodified+0−1View file
arch/alpha/kernel/rtc.cmodified+2−4View file
arch/arm/mach-ep93xx/ts72xx.cmodified+1−1View file
arch/arm/mach-orion5x/ts78xx-setup.cmodified+1−1View file
arch/arm/mach-pxa/cm-x270.cmodified+1−1View file
arch/arm/mach-pxa/cm-x300.cmodified+1−1View file
arch/arm/mach-pxa/em-x270.cmodified+1−1View file
arch/frv/include/asm/mc146818rtc.hdeleted+0−16View before deletion
arch/h8300/include/asm/mc146818rtc.hdeleted+0−9View before deletion
arch/ia64/include/asm/mc146818rtc.hdeleted+0−10View before deletion
arch/m68k/amiga/config.cmodified+0−1View file
arch/m68k/apollo/config.cmodified+0−1View file
arch/m68k/bvme6000/config.cmodified+0−1View file
arch/m68k/hp300/config.cmodified+1−1View file
arch/m68k/include/asm/rtc.hdeleted+0−79View before deletion
arch/m68k/kernel/time.cmodified+46−2View file
arch/m68k/mac/config.cmodified+2−1View file
arch/m68k/mac/misc.cmodified+0−1View file
arch/m68k/mvme147/config.cmodified+0−1View file
arch/m68k/mvme16x/config.cmodified+0−1View file
arch/m68k/q40/config.cmodified+1−1View file
arch/m68k/sun3/config.cmodified+0−1View file
arch/m68k/sun3/intersil.cmodified+1−1View file
arch/m68k/sun3x/time.cmodified+1−1View file
arch/mips/sgi-ip22/ip22-reset.cmodified+1−1View file
arch/mips/sni/time.cmodified+0−1View file
arch/mn10300/Kconfigmodified+3−1View file
arch/mn10300/include/asm/rtc-regs.hmodified+2−2View file
arch/mn10300/include/asm/rtc.hmodified+0−2View file
arch/mn10300/kernel/rtc.cmodified+9−95View file
arch/mn10300/proc-mn103e010/proc-init.cmodified+3−0View file
arch/mn10300/proc-mn2ws0050/proc-init.cmodified+1−0View file
arch/parisc/include/asm/mc146818rtc.hdeleted+0−9View before deletion
arch/parisc/include/asm/rtc.hdeleted+0−131View before deletion
arch/parisc/kernel/time.cmodified+35−1View file
arch/powerpc/include/asm/rtc.hdeleted+0−78View before deletion
arch/powerpc/kernel/time.cmodified+28−1View file
arch/powerpc/platforms/Kconfigmodified+11−0View file
arch/powerpc/platforms/ps3/time.cmodified+1−1View file
arch/sh/include/asm/mc146818rtc.hdeleted+0−7View before deletion
arch/sh/include/asm/rtc.hmodified+0−11View file
arch/sh/kernel/time.cmodified+20−13View file
arch/sparc/include/asm/io_32.hmodified+0−10View file
arch/x86/Kconfigmodified+1−0View file
arch/x86/include/asm/mc146818rtc.hmodified+0−1View file
arch/x86/include/asm/rtc.hdeleted+0−1View before deletion
arch/x86/kernel/hpet.cmodified+1−2View file
arch/x86/kernel/nmi.cmodified+1−0View file
arch/x86/kernel/rtc.cmodified+1−2View file
arch/x86/platform/efi/efi.cmodified+0−1View file
arch/x86/platform/efi/efi_64.cmodified+1−0View file
arch/x86/platform/intel-mid/intel_mid_vrtc.cmodified+1−0View file
drivers/acpi/acpi_cmos_rtc.cmodified+1−1View file
drivers/base/power/trace.cmodified+3−3View file
drivers/char/Kconfigmodified+1−27View file
drivers/char/Makefilemodified+0−1View file
drivers/char/genrtc.cdeleted+0−539View before deletion
drivers/rtc/Kconfigmodified+22−4View file
drivers/rtc/Makefilemodified+2−0View file
drivers/rtc/interface.cmodified+27−5View file
drivers/rtc/rtc-abx80x.cmodified+5−7View file
drivers/rtc/rtc-asm9260.cmodified+0−1View file
drivers/rtc/rtc-at91sam9.cmodified+1−0View file
drivers/rtc/rtc-cmos.cmodified+7−10View file
drivers/rtc/rtc-da9052.cmodified+1−0View file
drivers/rtc/rtc-da9055.cmodified+1−0View file
drivers/rtc/rtc-davinci.cmodified+2−0View file
drivers/rtc/rtc-ds1286.cmodified+1−1View file
drivers/rtc/rtc-ds1305.cmodified+0−7View file
drivers/rtc/rtc-ds1307.cmodified+27−6View file
drivers/rtc/rtc-ds1343.cmodified+0−6View file
drivers/rtc/rtc-ds1685.cmodified+33−20View file
drivers/rtc/rtc-ds2404.cmodified+1−1View file
drivers/rtc/rtc-ds3232.cmodified+0−6View file
drivers/rtc/rtc-efi.cmodified+6−0View file
drivers/rtc/rtc-generic.cmodified+1−35View file
drivers/rtc/rtc-hym8563.cmodified+1−4View file
drivers/rtc/rtc-isl12057.cmodified+1−32View file
drivers/rtc/rtc-m41t80.cmodified+28−6View file
drivers/rtc/rtc-m48t86.cmodified+1−1View file
drivers/rtc/rtc-max6916.cadded+164−0View file
include/asm-generic/rtc.h → drivers/rtc/rtc-mc146818-lib.crenamed+10−59View file
drivers/rtc/rtc-mrst.cmodified+1−9View file
drivers/rtc/rtc-pcf2123.cmodified+2−2View file
drivers/rtc/rtc-pcf85063.cmodified+43−16View file
drivers/rtc/rtc-pcf8563.cmodified+1−4View file
drivers/rtc/rtc-rc5t583.cmodified+1−0View file
drivers/rtc/rtc-rs5c372.cmodified+0−6View file
drivers/rtc/rtc-rv8803.cmodified+133−72View file
drivers/rtc/rtc-rx8010.cmodified+1−7View file
drivers/rtc/rtc-rx8025.cmodified+0−5View file
drivers/rtc/rtc-s35390a.cmodified+119−38View file
drivers/rtc/rtc-s3c.cmodified+2−14View file
drivers/rtc/rtc-sh.cmodified+1−41View file
drivers/rtc/rtc-tegra.cmodified+0−6View file
drivers/rtc/rtc-v3020.cmodified+1−1View file
include/linux/ds17287rtc.hdeleted+0−66View before deletion
include/linux/mc146818rtc.hmodified+5−0View file
include/linux/rtc-ds2404.h → include/linux/platform_data/rtc-ds2404.hrenamed+0−0View file
include/linux/m48t86.h → include/linux/platform_data/rtc-m48t86.hrenamed+0−0View file
include/linux/rtc-v3020.h → include/linux/platform_data/rtc-v3020.hrenamed+0−0View file
include/linux/ds1286.h → include/linux/rtc/ds1286.hrenamed+0−0View file
tools/testing/selftests/timers/rtctest.cmodified+10−3View file

Only the first 600 diff lines are shown. Download the complete patch.

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index efc2031..e9c7527 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9828,10 +9828,14 @@ L: [email protected]
Q: http://patchwork.ozlabs.org/project/rtc-linux/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git
S: Maintained
+F: Documentation/devicetree/bindings/rtc/
F: Documentation/rtc.txt
F: drivers/rtc/
F: include/linux/rtc.h
F: include/uapi/linux/rtc.h
+F: include/linux/rtc/
+F: include/linux/platform_data/rtc-*
+F: tools/testing/selftests/timers/rtctest.c
REALTEK AUDIO CODECS
M: Bard Liao <[email protected]>

arch/alpha/include/asm/rtc.h

View before deletion
diff --git a/arch/alpha/include/asm/rtc.h b/arch/alpha/include/asm/rtc.h
deleted file mode 100644
index f71c3b0..0000000
--- a/arch/alpha/include/asm/rtc.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/rtc.h>

arch/alpha/kernel/core_marvel.c

View file
diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c
index 53dd2f1..d5f0580 100644
--- a/arch/alpha/kernel/core_marvel.c
+++ b/arch/alpha/kernel/core_marvel.c
@@ -24,7 +24,6 @@
#include <asm/gct.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
-#include <asm/rtc.h>
#include <asm/vga.h>
#include "proto.h"

arch/alpha/kernel/rtc.c

View file
diff --git a/arch/alpha/kernel/rtc.c b/arch/alpha/kernel/rtc.c
index f535a3f..ceed68c 100644
--- a/arch/alpha/kernel/rtc.c
+++ b/arch/alpha/kernel/rtc.c
@@ -15,8 +15,6 @@
#include <linux/rtc.h>
#include <linux/platform_device.h>
-#include <asm/rtc.h>
-
#include "proto.h"
@@ -81,7 +79,7 @@ init_rtc_epoch(void)
static int
alpha_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
- __get_rtc_time(tm);
+ mc146818_get_time(tm);
/* Adjust for non-default epochs. It's easier to depend on the
generic __get_rtc_time and adjust the epoch here than create
@@ -112,7 +110,7 @@ alpha_rtc_set_time(struct device *dev, struct rtc_time *tm)
tm = &xtm;
}
- return __set_rtc_time(tm);
+ return mc146818_set_time(tm);
}
static int

arch/arm/mach-ep93xx/ts72xx.c

View file
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 45b81a2..3b39ea3 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -16,7 +16,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/io.h>
-#include <linux/m48t86.h>
+#include <linux/platform_data/rtc-m48t86.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>

arch/arm/mach-orion5x/ts78xx-setup.c

View file
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index 3a58a5d..8d59726 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -16,7 +16,7 @@
#include <linux/platform_device.h>
#include <linux/mv643xx_eth.h>
#include <linux/ata_platform.h>
-#include <linux/m48t86.h>
+#include <linux/platform_data/rtc-m48t86.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/timeriomem-rng.h>

arch/arm/mach-pxa/cm-x270.c

View file
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
index fa5f51d..be4a661 100644
--- a/arch/arm/mach-pxa/cm-x270.c
+++ b/arch/arm/mach-pxa/cm-x270.c
@@ -14,7 +14,7 @@
#include <linux/gpio.h>
#include <linux/delay.h>
-#include <linux/rtc-v3020.h>
+#include <linux/platform_data/rtc-v3020.h>
#include <video/mbxfb.h>
#include <linux/spi/spi.h>

arch/arm/mach-pxa/cm-x300.c

View file
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 5f5ac7c..868448d 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -25,7 +25,7 @@
#include <linux/gpio.h>
#include <linux/dm9000.h>
#include <linux/leds.h>
-#include <linux/rtc-v3020.h>
+#include <linux/platform_data/rtc-v3020.h>
#include <linux/pwm.h>
#include <linux/pwm_backlight.h>

arch/arm/mach-pxa/em-x270.c

View file
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 6e0268d..03354c2 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -14,7 +14,7 @@
#include <linux/delay.h>
#include <linux/dm9000.h>
-#include <linux/rtc-v3020.h>
+#include <linux/platform_data/rtc-v3020.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>

arch/frv/include/asm/mc146818rtc.h

View before deletion
diff --git a/arch/frv/include/asm/mc146818rtc.h b/arch/frv/include/asm/mc146818rtc.h
deleted file mode 100644
index 90dfb7a..0000000
--- a/arch/frv/include/asm/mc146818rtc.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* mc146818rtc.h: RTC defs
- *
- * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells ([email protected])
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#ifndef _ASM_MC146818RTC_H
-#define _ASM_MC146818RTC_H
-
-
-#endif /* _ASM_MC146818RTC_H */

arch/h8300/include/asm/mc146818rtc.h

View before deletion
diff --git a/arch/h8300/include/asm/mc146818rtc.h b/arch/h8300/include/asm/mc146818rtc.h
deleted file mode 100644
index ab9d964..0000000
--- a/arch/h8300/include/asm/mc146818rtc.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Machine dependent access functions for RTC registers.
- */
-#ifndef _H8300_MC146818RTC_H
-#define _H8300_MC146818RTC_H
-
-/* empty include file to satisfy the include in genrtc.c/ide-geometry.c */
-
-#endif /* _H8300_MC146818RTC_H */

arch/ia64/include/asm/mc146818rtc.h

View before deletion
diff --git a/arch/ia64/include/asm/mc146818rtc.h b/arch/ia64/include/asm/mc146818rtc.h
deleted file mode 100644
index 407787a..0000000
--- a/arch/ia64/include/asm/mc146818rtc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _ASM_IA64_MC146818RTC_H
-#define _ASM_IA64_MC146818RTC_H
-
-/*
- * Machine dependent access functions for RTC registers.
- */
-
-/* empty include file to satisfy the include in genrtc.c */
-
-#endif /* _ASM_IA64_MC146818RTC_H */

arch/m68k/amiga/config.c

View file
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index 01693df..ec9cc1f 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -35,7 +35,6 @@
#include <asm/amigahw.h>
#include <asm/amigaints.h>
#include <asm/irq.h>
-#include <asm/rtc.h>
#include <asm/machdep.h>
#include <asm/io.h>

arch/m68k/apollo/config.c

View file
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index 6e62d66..432bc8b 100644
--- a/arch/m68k/apollo/config.c
+++ b/arch/m68k/apollo/config.c
@@ -15,7 +15,6 @@
#include <asm/pgtable.h>
#include <asm/apollohw.h>
#include <asm/irq.h>
-#include <asm/rtc.h>
#include <asm/machdep.h>
u_long sio01_physaddr;

arch/m68k/bvme6000/config.c

View file
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c
index 478623d..611d4d9 100644
--- a/arch/m68k/bvme6000/config.c
+++ b/arch/m68k/bvme6000/config.c
@@ -34,7 +34,6 @@
#include <asm/setup.h>
#include <asm/irq.h>
#include <asm/traps.h>
-#include <asm/rtc.h>
#include <asm/machdep.h>
#include <asm/bvme6000hw.h>

arch/m68k/hp300/config.c

View file
diff --git a/arch/m68k/hp300/config.c b/arch/m68k/hp300/config.c
index a9befe6..7cfab15 100644
--- a/arch/m68k/hp300/config.c
+++ b/arch/m68k/hp300/config.c
@@ -12,6 +12,7 @@
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/console.h>
+#include <linux/rtc.h>
#include <asm/bootinfo.h>
#include <asm/bootinfo-hp300.h>
@@ -20,7 +21,6 @@
#include <asm/blinken.h>
#include <asm/io.h> /* readb() and writeb() */
#include <asm/hp300hw.h>
-#include <asm/rtc.h>
#include "time.h"

arch/m68k/include/asm/rtc.h

View before deletion
diff --git a/arch/m68k/include/asm/rtc.h b/arch/m68k/include/asm/rtc.h
deleted file mode 100644
index a4d08ea..0000000
--- a/arch/m68k/include/asm/rtc.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* include/asm-m68k/rtc.h
- *
- * Copyright Richard Zidlicky
- * implementation details for genrtc/q40rtc driver
- */
-/* permission is hereby granted to copy, modify and redistribute this code
- * in terms of the GNU Library General Public License, Version 2 or later,
- * at your option.
- */
-
-#ifndef _ASM_RTC_H
-#define _ASM_RTC_H
-
-#ifdef __KERNEL__
-
-#include <linux/rtc.h>
-#include <asm/errno.h>
-#include <asm/machdep.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)
-{
- /*
- * Only the values that we read from the RTC are set. We leave
- * tm_wday, tm_yday and tm_isdst untouched. Even though the
- * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
- * by the RTC when initially set to a non-zero value.
- */
- if (mach_hwclk)
- mach_hwclk(0, time);
- return RTC_24H;
-}
-
-static inline int set_rtc_time(struct rtc_time *time)
-{
- if (mach_hwclk)
- return mach_hwclk(1, time);
- return -EINVAL;
-}
-
-static inline unsigned int get_rtc_ss(void)
-{
- if (mach_get_ss)
- return mach_get_ss();
- else{
- struct rtc_time h;
-
- get_rtc_time(&h);
- return h.tm_sec;
- }
-}
-
-static inline int get_rtc_pll(struct rtc_pll_info *pll)
-{
- if (mach_get_rtc_pll)
- return mach_get_rtc_pll(pll);
- else
- return -EINVAL;
-}
-static inline int set_rtc_pll(struct rtc_pll_info *pll)
-{
- if (mach_set_rtc_pll)
- return mach_set_rtc_pll(pll);
- else
- return -EINVAL;
-}
-#endif /* __KERNEL__ */
-
-#endif /* _ASM__RTC_H */

arch/m68k/kernel/time.c

View file
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 3857737..4e5aa2f 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -86,7 +86,49 @@ void read_persistent_clock(struct timespec *ts)
}
}
-#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
+#if defined(CONFIG_ARCH_USES_GETTIMEOFFSET) && IS_ENABLED(CONFIG_RTC_DRV_GENERIC)
+static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm)
+{
+ mach_hwclk(0, tm);
+ return rtc_valid_tm(tm);
+}
+
+static int rtc_generic_set_time(struct device *dev, struct rtc_time *tm)
+{
+ if (mach_hwclk(1, tm) < 0)
+ return -EOPNOTSUPP;
+ return 0;
+}
+
+static int rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
+{
+ struct rtc_pll_info pll;
+ struct rtc_pll_info __user *argp = (void __user *)arg;
+
+ switch (cmd) {
+ case RTC_PLL_GET:
+ if (!mach_get_rtc_pll || mach_get_rtc_pll(&pll))
+ return -EINVAL;
+ return copy_to_user(argp, &pll, sizeof pll) ? -EFAULT : 0;
+
+ case RTC_PLL_SET:
+ if (!mach_set_rtc_pll)
+ return -EINVAL;
+ if (!capable(CAP_SYS_TIME))
+ return -EACCES;
+ if (copy_from_user(&pll, argp, sizeof(pll)))
+ return -EFAULT;
+ return mach_set_rtc_pll(&pll);
+ }
+
+ return -ENOIOCTLCMD;
+}
+
+static const struct rtc_class_ops generic_rtc_ops = {
+ .ioctl = rtc_ioctl,
+ .read_time = rtc_generic_get_time,
+ .set_time = rtc_generic_set_time,
+};
static int __init rtc_init(void)
{
@@ -95,7 +137,9 @@ static int __init rtc_init(void)
if (!mach_hwclk)
return -ENODEV;
- pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
+ pdev = platform_device_register_data(NULL, "rtc-generic", -1,
+ &generic_rtc_ops,
+ sizeof(generic_rtc_ops));
return PTR_ERR_OR_ZERO(pdev);
}

arch/m68k/mac/config.c

View file
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index 689b47d..2f33a33 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -10,6 +10,7 @@
* Miscellaneous linux stuff
*/
+#include <linux/errno.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/mm.h>
@@ -25,6 +26,7 @@
#include <linux/platform_device.h>
#include <linux/adb.h>
#include <linux/cuda.h>
+#include <linux/rtc.h>
#include <asm/setup.h>
#include <asm/bootinfo.h>
@@ -34,7 +36,6 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/pgtable.h>
-#include <asm/rtc.h>
#include <asm/machdep.h>
#include <asm/macintosh.h>

arch/m68k/mac/misc.c

View file
diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c
index 707b61a..0fb54a9 100644
--- a/arch/m68k/mac/misc.c
+++ b/arch/m68k/mac/misc.c
@@ -18,7 +18,6 @@
#include <asm/uaccess.h>
#include <asm/io.h>
-#include <asm/rtc.h>
#include <asm/segment.h>
#include <asm/setup.h>
#include <asm/macintosh.h>

arch/m68k/mvme147/config.c

View file
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index e6a3b56..c11d38d 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -32,7 +32,6 @@
#include <asm/setup.h>
#include <asm/irq.h>
#include <asm/traps.h>
-#include <asm/rtc.h>
#include <asm/machdep.h>
#include <asm/mvme147hw.h>

arch/m68k/mvme16x/config.c

View file
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c
index a53803c..58e2409 100644
--- a/arch/m68k/mvme16x/config.c
+++ b/arch/m68k/mvme16x/config.c
@@ -35,7 +35,6 @@
#include <asm/setup.h>
#include <asm/irq.h>
#include <asm/traps.h>
-#include <asm/rtc.h>
#include <asm/machdep.h>
#include <asm/mvme16xhw.h>

arch/m68k/q40/config.c

View file
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c
index e90fe90..fcb7f05 100644
--- a/arch/m68k/q40/config.c
+++ b/arch/m68k/q40/config.c
@@ -12,6 +12,7 @@
* for more details.
*/
+#include <linux/errno.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/mm.h>
@@ -27,7 +28,6 @@
#include <linux/platform_device.h>
#include <asm/io.h>
-#include <asm/rtc.h>
#include <asm/bootinfo.h>
#include <asm/pgtable.h>
#include <asm/setup.h>

arch/m68k/sun3/config.c

View file
diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c
index 71884bf..3af34fa 100644
--- a/arch/m68k/sun3/config.c
+++ b/arch/m68k/sun3/config.c
@@ -26,7 +26,6 @@
#include <asm/pgalloc.h>
#include <asm/sun3-head.h>
#include <asm/sun3mmu.h>
-#include <asm/rtc.h>
#include <asm/machdep.h>
#include <asm/machines.h>
#include <asm/idprom.h>

arch/m68k/sun3/intersil.c

View file
diff --git a/arch/m68k/sun3/intersil.c b/arch/m68k/sun3/intersil.c
index 889829e..2cd0bcb 100644
--- a/arch/m68k/sun3/intersil.c
+++ b/arch/m68k/sun3/intersil.c
@@ -14,8 +14,8 @@
#include <linux/rtc.h>
#include <asm/errno.h>
-#include <asm/rtc.h>
#include <asm/intersil.h>
+#include <asm/machdep.h>
/* bits to set for start/run of the intersil */

arch/m68k/sun3x/time.c

View file
diff --git a/arch/m68k/sun3x/time.c b/arch/m68k/sun3x/time.c
index c8eb08a..431d3c4 100644
--- a/arch/m68k/sun3x/time.c
+++ b/arch/m68k/sun3x/time.c
@@ -15,10 +15,10 @@
#include <asm/irq.h>
#include <asm/io.h>
+#include <asm/machdep.h>
#include <asm/traps.h>
#include <asm/sun3x.h>
#include <asm/sun3ints.h>
-#include <asm/rtc.h>
#include "time.h"

arch/mips/sgi-ip22/ip22-reset.c

View file
diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c
index 063c2dd..2f45b03 100644
--- a/arch/mips/sgi-ip22/ip22-reset.c
+++ b/arch/mips/sgi-ip22/ip22-reset.c
@@ -7,7 +7,7 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
-#include <linux/ds1286.h>
+#include <linux/rtc/ds1286.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>

arch/mips/sni/time.c

View file
diff --git a/arch/mips/sni/time.c b/arch/mips/sni/time.c
index fb4b352..7ee14f4 100644
--- a/arch/mips/sni/time.c
+++ b/arch/mips/sni/time.c
@@ -8,7 +8,6 @@
#include <asm/sni.h>
#include <asm/time.h>
-#include <asm-generic/rtc.h>
#define SNI_CLOCK_TICK_RATE 3686400
#define SNI_COUNTER2_DIV 64

arch/mn10300/Kconfig

View file
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 9627e81..38e3494 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -236,7 +236,9 @@ source "kernel/Kconfig.hz"
config MN10300_RTC
bool "Using MN10300 RTC"
depends on MN10300_PROC_MN103E010 || MN10300_PROC_MN2WS0050
- select GENERIC_CMOS_UPDATE
+ select RTC_CLASS
+ select RTC_DRV_CMOS
+ select RTC_SYSTOHC
default n
help
This option enables support for the RTC, thus enabling time to be

arch/mn10300/include/asm/rtc-regs.h

View file
diff --git a/arch/mn10300/include/asm/rtc-regs.h b/arch/mn10300/include/asm/rtc-regs.h
index c42deef..c81cace 100644
--- a/arch/mn10300/include/asm/rtc-regs.h
+++ b/arch/mn10300/include/asm/rtc-regs.h
@@ -75,9 +75,9 @@
#define RTC_PORT(x) 0xd8600000
#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
-#define CMOS_READ(addr) __SYSREG(0xd8600000 + (addr), u8)
+#define CMOS_READ(addr) __SYSREG(0xd8600000 + (u32)(addr), u8)
#define CMOS_WRITE(val, addr) \
- do { __SYSREG(0xd8600000 + (addr), u8) = val; } while (0)
+ do { __SYSREG(0xd8600000 + (u32)(addr), u8) = val; } while (0)
#define RTC_IRQ RTIRQ

arch/mn10300/include/asm/rtc.h

View file
diff --git a/arch/mn10300/include/asm/rtc.h b/arch/mn10300/include/asm/rtc.h
index 6c14bb1..07dc876 100644
--- a/arch/mn10300/include/asm/rtc.h
+++ b/arch/mn10300/include/asm/rtc.h
@@ -25,6 +25,4 @@ static inline void calibrate_clock(void)
#endif /* !CONFIG_MN10300_RTC */
-#include <asm-generic/rtc.h>
-
#endif /* _ASM_RTC_H */

arch/mn10300/kernel/rtc.c

View file
diff --git a/arch/mn10300/kernel/rtc.c b/arch/mn10300/kernel/rtc.c
index 48d7058..f81f370 100644
--- a/arch/mn10300/kernel/rtc.c
+++ b/arch/mn10300/kernel/rtc.c
@@ -12,107 +12,19 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/mc146818rtc.h>
-#include <linux/bcd.h>
-#include <linux/timex.h>
+#include <linux/ioport.h>
+#include <linux/platform_device.h>
+

This diff is incomplete. Download the complete patch.

arch/mn10300/proc-mn103e010/proc-init.c

View file

This diff is incomplete. Download the complete patch.

arch/mn10300/proc-mn2ws0050/proc-init.c

View file

This diff is incomplete. Download the complete patch.

arch/parisc/include/asm/mc146818rtc.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/parisc/include/asm/rtc.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/parisc/kernel/time.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/include/asm/rtc.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/powerpc/kernel/time.c

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/platforms/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/powerpc/platforms/ps3/time.c

View file

This diff is incomplete. Download the complete patch.

arch/sh/include/asm/mc146818rtc.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/sh/include/asm/rtc.h

View file

This diff is incomplete. Download the complete patch.

arch/sh/kernel/time.c

View file

This diff is incomplete. Download the complete patch.

arch/sparc/include/asm/io_32.h

View file

This diff is incomplete. Download the complete patch.

arch/x86/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/x86/include/asm/mc146818rtc.h

View file

This diff is incomplete. Download the complete patch.

arch/x86/include/asm/rtc.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/x86/kernel/hpet.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/nmi.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/rtc.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/platform/efi/efi.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/platform/efi/efi_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/platform/intel-mid/intel_mid_vrtc.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpi_cmos_rtc.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/power/trace.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/char/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/char/genrtc.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/rtc/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/interface.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-abx80x.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-asm9260.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-at91sam9.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-cmos.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-da9052.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-da9055.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-davinci.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds1286.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds1305.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds1307.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds1343.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds1685.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds2404.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds3232.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-efi.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-generic.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-hym8563.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-isl12057.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-m41t80.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-m48t86.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-max6916.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-mc146818-lib.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-mrst.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-pcf2123.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-pcf85063.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-pcf8563.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rc5t583.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rs5c372.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rv8803.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rx8010.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rx8025.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-s35390a.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-s3c.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-sh.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-tegra.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-v3020.c

View file

This diff is incomplete. Download the complete patch.

include/linux/ds17287rtc.h

View before deletion

This diff is incomplete. Download the complete patch.

include/linux/mc146818rtc.h

View file

This diff is incomplete. Download the complete patch.

include/linux/platform_data/rtc-ds2404.h

View file

This diff is incomplete. Download the complete patch.

include/linux/platform_data/rtc-m48t86.h

View file

This diff is incomplete. Download the complete patch.

include/linux/platform_data/rtc-v3020.h

View file

This diff is incomplete. Download the complete patch.

include/linux/rtc/ds1286.h

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/timers/rtctest.c

View file

This diff is incomplete. Download the complete patch.