All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	geert@linux-m68k.org, deller@gmx.de, benh@kernel.crashing.org,
	mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com,
	linux-alpha@vger.kernel.org, a.zummo@towertech.it,
	linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org,
	linux-m68k@lists.linux-m68k.org, rtc-linux@googlegroups.com,
	linux-arch@vger.kernel.org
Subject: [PATCH v3 03/16] char/genrtc: x86: remove remnants of asm/rtc.h
Date: Wed, 27 Apr 2016 22:34:17 +0000	[thread overview]
Message-ID: <1461796470-1291527-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1461796470-1291527-1-git-send-email-arnd@arndb.de>

Commit 3195ef59cb42 ("x86: Do full rtc synchronization with ntp") had
the side-effect of unconditionally enabling the RTC_LIB symbol on x86,
which in turn disables the selection of the CONFIG_RTC and
CONFIG_GEN_RTC drivers that contain a two older implementations of
the CONFIG_RTC_DRV_CMOS driver.

This removes x86 from the list for genrtc, and changes all references
to the asm/rtc.h header to instead point to the interfaces
from linux/mc146818rtc.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/include/asm/rtc.h   | 1 -
 arch/x86/kernel/hpet.c       | 3 +--
 arch/x86/kernel/rtc.c        | 3 +--
 arch/x86/platform/efi/efi.c  | 1 -
 drivers/acpi/acpi_cmos_rtc.c | 2 +-
 drivers/base/power/trace.c   | 6 +++---
 drivers/char/Kconfig         | 2 +-
 drivers/rtc/rtc-mrst.c       | 2 +-
 8 files changed, 8 insertions(+), 12 deletions(-)
 delete mode 100644 arch/x86/include/asm/rtc.h

diff --git a/arch/x86/include/asm/rtc.h b/arch/x86/include/asm/rtc.h
deleted file mode 100644
index f71c3b0ed360..000000000000
--- a/arch/x86/include/asm/rtc.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/rtc.h>
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index f112af7aa62e..357900aad62c 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -1020,7 +1020,6 @@ void hpet_disable(void)
  */
 #include <linux/mc146818rtc.h>
 #include <linux/rtc.h>
-#include <asm/rtc.h>
 
 #define DEFAULT_RTC_INT_FREQ	64
 #define DEFAULT_RTC_SHIFT	6
@@ -1244,7 +1243,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
 	memset(&curr_time, 0, sizeof(struct rtc_time));
 
 	if (hpet_rtc_flags & (RTC_UIE | RTC_AIE))
-		get_rtc_time(&curr_time);
+		mc146818_set_time(&curr_time);
 
 	if (hpet_rtc_flags & RTC_UIE &&
 	    curr_time.tm_sec != hpet_prev_update_sec) {
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index eceaa082ec3f..79c6311cd912 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -13,7 +13,6 @@
 #include <asm/x86_init.h>
 #include <asm/time.h>
 #include <asm/intel-mid.h>
-#include <asm/rtc.h>
 #include <asm/setup.h>
 
 #ifdef CONFIG_X86_32
@@ -47,7 +46,7 @@ int mach_set_rtc_mmss(const struct timespec *now)
 
 	rtc_time_to_tm(nowtime, &tm);
 	if (!rtc_valid_tm(&tm)) {
-		retval = set_rtc_time(&tm);
+		retval = mc146818_set_time(&tm);
 		if (retval)
 			printk(KERN_ERR "%s: RTC write failed with error %d\n",
 			       __func__, retval);
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 994a7df84a7b..13b216f71191 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -51,7 +51,6 @@
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 #include <asm/x86_init.h>
-#include <asm/rtc.h>
 #include <asm/uv/uv.h>
 
 #define EFI_DEBUG
diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c
index 81dc75033f15..0980a133916f 100644
--- a/drivers/acpi/acpi_cmos_rtc.c
+++ b/drivers/acpi/acpi_cmos_rtc.c
@@ -14,7 +14,7 @@
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <asm-generic/rtc.h>
+#include <linux/mc146818rtc.h>
 
 #include "internal.h"
 
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
index a6975795e7f3..efec10b49d59 100644
--- a/drivers/base/power/trace.c
+++ b/drivers/base/power/trace.c
@@ -11,7 +11,7 @@
 #include <linux/export.h>
 #include <linux/rtc.h>
 
-#include <asm/rtc.h>
+#include <linux/mc146818rtc.h>
 
 #include "power.h"
 
@@ -103,7 +103,7 @@ static int set_magic_time(unsigned int user, unsigned int file, unsigned int dev
 	n /= 24;
 	time.tm_min = (n % 20) * 3;
 	n /= 20;
-	set_rtc_time(&time);
+	mc146818_set_time(&time);
 	return n ? -1 : 0;
 }
 
@@ -112,7 +112,7 @@ static unsigned int read_magic_time(void)
 	struct rtc_time time;
 	unsigned int val;
 
-	get_rtc_time(&time);
+	mc146818_get_time(&time);
 	pr_info("RTC time: %2d:%02d:%02d, date: %02d/%02d/%02d\n",
 		time.tm_hour, time.tm_min, time.tm_sec,
 		time.tm_mon + 1, time.tm_mday, time.tm_year % 100);
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index ca397384dc15..9bdb629fbaae 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -328,7 +328,7 @@ config JS_RTC
 config GEN_RTC
 	tristate "Generic /dev/rtc emulation"
 	depends on RTC!=y
-	depends on ALPHA || M68K || MN10300 || PARISC || PPC || X86
+	depends on ALPHA || M68K || MN10300 || 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
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 548ea6f6f384..bb8ac7c5e217 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -32,11 +32,11 @@
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/kernel.h>
+#include <linux/mc146818rtc.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/sfi.h>
 
-#include <asm-generic/rtc.h>
 #include <asm/intel_scu_ipc.h>
 #include <asm/intel-mid.h>
 #include <asm/intel_mid_vrtc.h>
-- 
2.7.0


WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	geert@linux-m68k.org, deller@gmx.de, benh@kernel.crashing.org,
	mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com,
	linux-alpha@vger.kernel.org, a.zummo@towertech.it,
	linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org,
	linux-m68k@lists.linux-m68k.org, rtc-linux@googlegroups.com,
	linux-arch@vger.kernel.org
Subject: [PATCH v3 03/16] char/genrtc: x86: remove remnants of asm/rtc.h
Date: Thu, 28 Apr 2016 00:34:17 +0200	[thread overview]
Message-ID: <1461796470-1291527-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1461796470-1291527-1-git-send-email-arnd@arndb.de>

Commit 3195ef59cb42 ("x86: Do full rtc synchronization with ntp") had
the side-effect of unconditionally enabling the RTC_LIB symbol on x86,
which in turn disables the selection of the CONFIG_RTC and
CONFIG_GEN_RTC drivers that contain a two older implementations of
the CONFIG_RTC_DRV_CMOS driver.

This removes x86 from the list for genrtc, and changes all references
to the asm/rtc.h header to instead point to the interfaces
from linux/mc146818rtc.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/include/asm/rtc.h   | 1 -
 arch/x86/kernel/hpet.c       | 3 +--
 arch/x86/kernel/rtc.c        | 3 +--
 arch/x86/platform/efi/efi.c  | 1 -
 drivers/acpi/acpi_cmos_rtc.c | 2 +-
 drivers/base/power/trace.c   | 6 +++---
 drivers/char/Kconfig         | 2 +-
 drivers/rtc/rtc-mrst.c       | 2 +-
 8 files changed, 8 insertions(+), 12 deletions(-)
 delete mode 100644 arch/x86/include/asm/rtc.h

diff --git a/arch/x86/include/asm/rtc.h b/arch/x86/include/asm/rtc.h
deleted file mode 100644
index f71c3b0ed360..000000000000
--- a/arch/x86/include/asm/rtc.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/rtc.h>
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index f112af7aa62e..357900aad62c 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -1020,7 +1020,6 @@ void hpet_disable(void)
  */
 #include <linux/mc146818rtc.h>
 #include <linux/rtc.h>
-#include <asm/rtc.h>
 
 #define DEFAULT_RTC_INT_FREQ	64
 #define DEFAULT_RTC_SHIFT	6
@@ -1244,7 +1243,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
 	memset(&curr_time, 0, sizeof(struct rtc_time));
 
 	if (hpet_rtc_flags & (RTC_UIE | RTC_AIE))
-		get_rtc_time(&curr_time);
+		mc146818_set_time(&curr_time);
 
 	if (hpet_rtc_flags & RTC_UIE &&
 	    curr_time.tm_sec != hpet_prev_update_sec) {
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index eceaa082ec3f..79c6311cd912 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -13,7 +13,6 @@
 #include <asm/x86_init.h>
 #include <asm/time.h>
 #include <asm/intel-mid.h>
-#include <asm/rtc.h>
 #include <asm/setup.h>
 
 #ifdef CONFIG_X86_32
@@ -47,7 +46,7 @@ int mach_set_rtc_mmss(const struct timespec *now)
 
 	rtc_time_to_tm(nowtime, &tm);
 	if (!rtc_valid_tm(&tm)) {
-		retval = set_rtc_time(&tm);
+		retval = mc146818_set_time(&tm);
 		if (retval)
 			printk(KERN_ERR "%s: RTC write failed with error %d\n",
 			       __func__, retval);
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 994a7df84a7b..13b216f71191 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -51,7 +51,6 @@
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 #include <asm/x86_init.h>
-#include <asm/rtc.h>
 #include <asm/uv/uv.h>
 
 #define EFI_DEBUG
diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c
index 81dc75033f15..0980a133916f 100644
--- a/drivers/acpi/acpi_cmos_rtc.c
+++ b/drivers/acpi/acpi_cmos_rtc.c
@@ -14,7 +14,7 @@
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <asm-generic/rtc.h>
+#include <linux/mc146818rtc.h>
 
 #include "internal.h"
 
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
index a6975795e7f3..efec10b49d59 100644
--- a/drivers/base/power/trace.c
+++ b/drivers/base/power/trace.c
@@ -11,7 +11,7 @@
 #include <linux/export.h>
 #include <linux/rtc.h>
 
-#include <asm/rtc.h>
+#include <linux/mc146818rtc.h>
 
 #include "power.h"
 
@@ -103,7 +103,7 @@ static int set_magic_time(unsigned int user, unsigned int file, unsigned int dev
 	n /= 24;
 	time.tm_min = (n % 20) * 3;
 	n /= 20;
-	set_rtc_time(&time);
+	mc146818_set_time(&time);
 	return n ? -1 : 0;
 }
 
@@ -112,7 +112,7 @@ static unsigned int read_magic_time(void)
 	struct rtc_time time;
 	unsigned int val;
 
-	get_rtc_time(&time);
+	mc146818_get_time(&time);
 	pr_info("RTC time: %2d:%02d:%02d, date: %02d/%02d/%02d\n",
 		time.tm_hour, time.tm_min, time.tm_sec,
 		time.tm_mon + 1, time.tm_mday, time.tm_year % 100);
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index ca397384dc15..9bdb629fbaae 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -328,7 +328,7 @@ config JS_RTC
 config GEN_RTC
 	tristate "Generic /dev/rtc emulation"
 	depends on RTC!=y
-	depends on ALPHA || M68K || MN10300 || PARISC || PPC || X86
+	depends on ALPHA || M68K || MN10300 || 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
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 548ea6f6f384..bb8ac7c5e217 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -32,11 +32,11 @@
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/kernel.h>
+#include <linux/mc146818rtc.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/sfi.h>
 
-#include <asm-generic/rtc.h>
 #include <asm/intel_scu_ipc.h>
 #include <asm/intel-mid.h>
 #include <asm/intel_mid_vrtc.h>
-- 
2.7.0

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	geert@linux-m68k.org, deller@gmx.de, benh@kernel.crashing.org,
	mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com,
	linux-alpha@vger.kernel.org, a.zummo@towertech.it,
	linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org,
	linux-m68k@vger.kernel.org, rtc-linux@googlegroups.com,
	linux-arch@vger.kernel.org
Subject: [PATCH v3 03/16] char/genrtc: x86: remove remnants of asm/rtc.h
Date: Thu, 28 Apr 2016 00:34:17 +0200	[thread overview]
Message-ID: <1461796470-1291527-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1461796470-1291527-1-git-send-email-arnd@arndb.de>

Commit 3195ef59cb42 ("x86: Do full rtc synchronization with ntp") had
the side-effect of unconditionally enabling the RTC_LIB symbol on x86,
which in turn disables the selection of the CONFIG_RTC and
CONFIG_GEN_RTC drivers that contain a two older implementations of
the CONFIG_RTC_DRV_CMOS driver.

This removes x86 from the list for genrtc, and changes all references
to the asm/rtc.h header to instead point to the interfaces
from linux/mc146818rtc.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/include/asm/rtc.h   | 1 -
 arch/x86/kernel/hpet.c       | 3 +--
 arch/x86/kernel/rtc.c        | 3 +--
 arch/x86/platform/efi/efi.c  | 1 -
 drivers/acpi/acpi_cmos_rtc.c | 2 +-
 drivers/base/power/trace.c   | 6 +++---
 drivers/char/Kconfig         | 2 +-
 drivers/rtc/rtc-mrst.c       | 2 +-
 8 files changed, 8 insertions(+), 12 deletions(-)
 delete mode 100644 arch/x86/include/asm/rtc.h

diff --git a/arch/x86/include/asm/rtc.h b/arch/x86/include/asm/rtc.h
deleted file mode 100644
index f71c3b0ed360..000000000000
--- a/arch/x86/include/asm/rtc.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/rtc.h>
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index f112af7aa62e..357900aad62c 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -1020,7 +1020,6 @@ void hpet_disable(void)
  */
 #include <linux/mc146818rtc.h>
 #include <linux/rtc.h>
-#include <asm/rtc.h>
 
 #define DEFAULT_RTC_INT_FREQ	64
 #define DEFAULT_RTC_SHIFT	6
@@ -1244,7 +1243,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
 	memset(&curr_time, 0, sizeof(struct rtc_time));
 
 	if (hpet_rtc_flags & (RTC_UIE | RTC_AIE))
-		get_rtc_time(&curr_time);
+		mc146818_set_time(&curr_time);
 
 	if (hpet_rtc_flags & RTC_UIE &&
 	    curr_time.tm_sec != hpet_prev_update_sec) {
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index eceaa082ec3f..79c6311cd912 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -13,7 +13,6 @@
 #include <asm/x86_init.h>
 #include <asm/time.h>
 #include <asm/intel-mid.h>
-#include <asm/rtc.h>
 #include <asm/setup.h>
 
 #ifdef CONFIG_X86_32
@@ -47,7 +46,7 @@ int mach_set_rtc_mmss(const struct timespec *now)
 
 	rtc_time_to_tm(nowtime, &tm);
 	if (!rtc_valid_tm(&tm)) {
-		retval = set_rtc_time(&tm);
+		retval = mc146818_set_time(&tm);
 		if (retval)
 			printk(KERN_ERR "%s: RTC write failed with error %d\n",
 			       __func__, retval);
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 994a7df84a7b..13b216f71191 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -51,7 +51,6 @@
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 #include <asm/x86_init.h>
-#include <asm/rtc.h>
 #include <asm/uv/uv.h>
 
 #define EFI_DEBUG
diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c
index 81dc75033f15..0980a133916f 100644
--- a/drivers/acpi/acpi_cmos_rtc.c
+++ b/drivers/acpi/acpi_cmos_rtc.c
@@ -14,7 +14,7 @@
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <asm-generic/rtc.h>
+#include <linux/mc146818rtc.h>
 
 #include "internal.h"
 
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
index a6975795e7f3..efec10b49d59 100644
--- a/drivers/base/power/trace.c
+++ b/drivers/base/power/trace.c
@@ -11,7 +11,7 @@
 #include <linux/export.h>
 #include <linux/rtc.h>
 
-#include <asm/rtc.h>
+#include <linux/mc146818rtc.h>
 
 #include "power.h"
 
@@ -103,7 +103,7 @@ static int set_magic_time(unsigned int user, unsigned int file, unsigned int dev
 	n /= 24;
 	time.tm_min = (n % 20) * 3;
 	n /= 20;
-	set_rtc_time(&time);
+	mc146818_set_time(&time);
 	return n ? -1 : 0;
 }
 
@@ -112,7 +112,7 @@ static unsigned int read_magic_time(void)
 	struct rtc_time time;
 	unsigned int val;
 
-	get_rtc_time(&time);
+	mc146818_get_time(&time);
 	pr_info("RTC time: %2d:%02d:%02d, date: %02d/%02d/%02d\n",
 		time.tm_hour, time.tm_min, time.tm_sec,
 		time.tm_mon + 1, time.tm_mday, time.tm_year % 100);
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index ca397384dc15..9bdb629fbaae 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -328,7 +328,7 @@ config JS_RTC
 config GEN_RTC
 	tristate "Generic /dev/rtc emulation"
 	depends on RTC!=y
-	depends on ALPHA || M68K || MN10300 || PARISC || PPC || X86
+	depends on ALPHA || M68K || MN10300 || 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
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 548ea6f6f384..bb8ac7c5e217 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -32,11 +32,11 @@
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/kernel.h>
+#include <linux/mc146818rtc.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/sfi.h>
 
-#include <asm-generic/rtc.h>
 #include <asm/intel_scu_ipc.h>
 #include <asm/intel-mid.h>
 #include <asm/intel_mid_vrtc.h>
-- 
2.7.0

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	geert@linux-m68k.org, deller@gmx.de, benh@kernel.crashing.org,
	mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com,
	linux-alpha@vger.kernel.org, a.zummo@towertech.it,
	linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org,
	linux-m68k@lists.linux-m68k.org, rtc-linux@googlegroups.com,
	linux-arch@vger.kernel.org
Subject: [rtc-linux] [PATCH v3 03/16] char/genrtc: x86: remove remnants of asm/rtc.h
Date: Thu, 28 Apr 2016 00:34:17 +0200	[thread overview]
Message-ID: <1461796470-1291527-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1461796470-1291527-1-git-send-email-arnd@arndb.de>

Commit 3195ef59cb42 ("x86: Do full rtc synchronization with ntp") had
the side-effect of unconditionally enabling the RTC_LIB symbol on x86,
which in turn disables the selection of the CONFIG_RTC and
CONFIG_GEN_RTC drivers that contain a two older implementations of
the CONFIG_RTC_DRV_CMOS driver.

This removes x86 from the list for genrtc, and changes all references
to the asm/rtc.h header to instead point to the interfaces
from linux/mc146818rtc.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/include/asm/rtc.h   | 1 -
 arch/x86/kernel/hpet.c       | 3 +--
 arch/x86/kernel/rtc.c        | 3 +--
 arch/x86/platform/efi/efi.c  | 1 -
 drivers/acpi/acpi_cmos_rtc.c | 2 +-
 drivers/base/power/trace.c   | 6 +++---
 drivers/char/Kconfig         | 2 +-
 drivers/rtc/rtc-mrst.c       | 2 +-
 8 files changed, 8 insertions(+), 12 deletions(-)
 delete mode 100644 arch/x86/include/asm/rtc.h

diff --git a/arch/x86/include/asm/rtc.h b/arch/x86/include/asm/rtc.h
deleted file mode 100644
index f71c3b0ed360..000000000000
--- a/arch/x86/include/asm/rtc.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/rtc.h>
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index f112af7aa62e..357900aad62c 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -1020,7 +1020,6 @@ void hpet_disable(void)
  */
 #include <linux/mc146818rtc.h>
 #include <linux/rtc.h>
-#include <asm/rtc.h>
 
 #define DEFAULT_RTC_INT_FREQ	64
 #define DEFAULT_RTC_SHIFT	6
@@ -1244,7 +1243,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
 	memset(&curr_time, 0, sizeof(struct rtc_time));
 
 	if (hpet_rtc_flags & (RTC_UIE | RTC_AIE))
-		get_rtc_time(&curr_time);
+		mc146818_set_time(&curr_time);
 
 	if (hpet_rtc_flags & RTC_UIE &&
 	    curr_time.tm_sec != hpet_prev_update_sec) {
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index eceaa082ec3f..79c6311cd912 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -13,7 +13,6 @@
 #include <asm/x86_init.h>
 #include <asm/time.h>
 #include <asm/intel-mid.h>
-#include <asm/rtc.h>
 #include <asm/setup.h>
 
 #ifdef CONFIG_X86_32
@@ -47,7 +46,7 @@ int mach_set_rtc_mmss(const struct timespec *now)
 
 	rtc_time_to_tm(nowtime, &tm);
 	if (!rtc_valid_tm(&tm)) {
-		retval = set_rtc_time(&tm);
+		retval = mc146818_set_time(&tm);
 		if (retval)
 			printk(KERN_ERR "%s: RTC write failed with error %d\n",
 			       __func__, retval);
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 994a7df84a7b..13b216f71191 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -51,7 +51,6 @@
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 #include <asm/x86_init.h>
-#include <asm/rtc.h>
 #include <asm/uv/uv.h>
 
 #define EFI_DEBUG
diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c
index 81dc75033f15..0980a133916f 100644
--- a/drivers/acpi/acpi_cmos_rtc.c
+++ b/drivers/acpi/acpi_cmos_rtc.c
@@ -14,7 +14,7 @@
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <asm-generic/rtc.h>
+#include <linux/mc146818rtc.h>
 
 #include "internal.h"
 
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
index a6975795e7f3..efec10b49d59 100644
--- a/drivers/base/power/trace.c
+++ b/drivers/base/power/trace.c
@@ -11,7 +11,7 @@
 #include <linux/export.h>
 #include <linux/rtc.h>
 
-#include <asm/rtc.h>
+#include <linux/mc146818rtc.h>
 
 #include "power.h"
 
@@ -103,7 +103,7 @@ static int set_magic_time(unsigned int user, unsigned int file, unsigned int dev
 	n /= 24;
 	time.tm_min = (n % 20) * 3;
 	n /= 20;
-	set_rtc_time(&time);
+	mc146818_set_time(&time);
 	return n ? -1 : 0;
 }
 
@@ -112,7 +112,7 @@ static unsigned int read_magic_time(void)
 	struct rtc_time time;
 	unsigned int val;
 
-	get_rtc_time(&time);
+	mc146818_get_time(&time);
 	pr_info("RTC time: %2d:%02d:%02d, date: %02d/%02d/%02d\n",
 		time.tm_hour, time.tm_min, time.tm_sec,
 		time.tm_mon + 1, time.tm_mday, time.tm_year % 100);
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index ca397384dc15..9bdb629fbaae 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -328,7 +328,7 @@ config JS_RTC
 config GEN_RTC
 	tristate "Generic /dev/rtc emulation"
 	depends on RTC!=y
-	depends on ALPHA || M68K || MN10300 || PARISC || PPC || X86
+	depends on ALPHA || M68K || MN10300 || 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
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 548ea6f6f384..bb8ac7c5e217 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -32,11 +32,11 @@
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/kernel.h>
+#include <linux/mc146818rtc.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/sfi.h>
 
-#include <asm-generic/rtc.h>
 #include <asm/intel_scu_ipc.h>
 #include <asm/intel-mid.h>
 #include <asm/intel_mid_vrtc.h>
-- 
2.7.0

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2016-04-27 22:34 UTC|newest]

Thread overview: 144+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27 22:34 [PATCH v3 00/16] genrtc removal Arnd Bergmann
2016-04-27 22:34 ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 01/16] rtc: cmos: remove empty asm/mc146818rtc.h files Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 02/16] rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 03/16] char/genrtc: x86: remove remnants of asm/rtc.h Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann [this message]
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 04/16] rtc: sh: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 23:21   ` Rich Felker
2016-04-27 23:21     ` [rtc-linux] " Rich Felker
2016-04-27 23:21     ` Rich Felker
2016-04-27 23:21     ` Rich Felker
2016-04-28  7:21     ` Geert Uytterhoeven
2016-04-28  7:21     ` Geert Uytterhoeven
2016-04-28  7:21       ` [rtc-linux] " Geert Uytterhoeven
2016-04-28  7:21       ` Geert Uytterhoeven
2016-04-28  7:21       ` Geert Uytterhoeven
2016-04-28  9:08     ` Arnd Bergmann
2016-04-28  9:08       ` [rtc-linux] " Arnd Bergmann
2016-04-28  9:08       ` Arnd Bergmann
2016-04-28  9:08       ` Arnd Bergmann
2016-04-28  9:38       ` Arnd Bergmann
2016-04-28  9:38       ` Arnd Bergmann
2016-04-28  9:38         ` [rtc-linux] " Arnd Bergmann
2016-04-28  9:38         ` Arnd Bergmann
2016-04-28  9:38         ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 05/16] char/genrtc: remove alpha support Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 06/16] char/genrtc: remove mn10300 support Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 07/16] rtc: parisc: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 08/16] char/genrtc: remove parisc support Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 09/16] rtc: m68k: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 23:04   ` Arnd Bergmann
2016-04-27 23:04     ` [rtc-linux] " Arnd Bergmann
2016-04-27 23:04     ` Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 10/16] rtc: m68k: provide ioctl for q40 Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 11/16] char/genrtc: remove m68k support Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 12/16] rtc: powerpc: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-05-03  4:05   ` Michael Ellerman
2016-05-03  4:05     ` Michael Ellerman
2016-05-03  4:05     ` [rtc-linux] " Michael Ellerman
2016-05-03  4:05     ` Michael Ellerman
2016-05-03  4:05     ` Michael Ellerman
2016-05-03 10:29     ` Arnd Bergmann
2016-05-03 10:29       ` [rtc-linux] " Arnd Bergmann
2016-05-03 10:29       ` Arnd Bergmann
2016-05-03 10:29       ` Arnd Bergmann
2016-05-03 10:29     ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 13/16] char/genrtc: remove powerpc support Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-28  7:25   ` Geert Uytterhoeven
2016-04-28  7:25     ` [rtc-linux] " Geert Uytterhoeven
2016-04-28  7:25     ` Geert Uytterhoeven
2016-04-28  7:25     ` Geert Uytterhoeven
2016-04-28  9:39     ` Arnd Bergmann
2016-04-28  9:39       ` [rtc-linux] " Arnd Bergmann
2016-04-28  9:39       ` Arnd Bergmann
2016-04-28  9:39       ` Arnd Bergmann
2016-04-28  9:39     ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 14/16] rtc: generic: remove get_rtc_time/set_rtc_time wrappers Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 15/16] char/genrtc: remove asm-generic/rtc.h from mips Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 16/16] char/genrtc: remove the rest of the driver Arnd Bergmann
2016-04-27 22:34   ` [rtc-linux] " Arnd Bergmann
2016-04-27 22:34   ` Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-28  7:48 ` [PATCH v3 00/16] genrtc removal Geert Uytterhoeven
2016-04-28  7:48   ` [rtc-linux] " Geert Uytterhoeven
2016-04-28  7:48   ` Geert Uytterhoeven
2016-04-28  7:48   ` Geert Uytterhoeven
2016-05-02  8:45   ` Geert Uytterhoeven
2016-05-02  8:45     ` Geert Uytterhoeven
2016-05-02  8:45     ` Geert Uytterhoeven
2016-05-02  8:45     ` [rtc-linux] " Geert Uytterhoeven
2016-05-02  8:45     ` Geert Uytterhoeven
2016-05-02  8:45     ` Geert Uytterhoeven
2016-04-28  7:48 ` Geert Uytterhoeven
2016-05-03  7:24 ` Alexandre Belloni
2016-05-03  7:24   ` [rtc-linux] " Alexandre Belloni
2016-05-03  7:24   ` Alexandre Belloni
2016-05-03  7:24   ` Alexandre Belloni
2016-05-03 10:05   ` Arnd Bergmann
2016-05-03 10:05     ` [rtc-linux] " Arnd Bergmann
2016-05-03 10:05     ` Arnd Bergmann
2016-05-03 10:05     ` Arnd Bergmann
2016-05-29 23:37     ` Alexandre Belloni
2016-05-29 23:37     ` Alexandre Belloni
2016-05-29 23:37       ` Alexandre Belloni
2016-05-29 23:37       ` [rtc-linux] " Alexandre Belloni
2016-05-29 23:37       ` Alexandre Belloni
2016-05-29 23:37       ` Alexandre Belloni
2016-05-03 10:05   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461796470-1291527-4-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=benh@kernel.crashing.org \
    --cc=dalias@libc.org \
    --cc=deller@gmx.de \
    --cc=dhowells@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=rtc-linux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.