From e0fa49030a539de6a9ebd8fee53be92771d98a17 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 17 May 2015 23:00:53 +0000 Subject: [PATCH] Fix error messages at boot on systems without an RTC (Closes: #784146) svn path=/dists/sid/linux/; revision=22657 --- debian/changelog | 10 +++++ ...ot-treat-lack-of-rtc-device-as-error.patch | 37 +++++++++++++++++++ ...s-use-function-name-in-the-error-log.patch | 30 +++++++++++++++ ...-xp-openblocks-ax3-4-disable-interna.patch | 34 +++++++++++++++++ debian/patches/series | 3 ++ 5 files changed, 114 insertions(+) create mode 100644 debian/patches/bugfix/all/rtc-hctosys-do-not-treat-lack-of-rtc-device-as-error.patch create mode 100644 debian/patches/bugfix/all/rtc-hctosys-use-function-name-in-the-error-log.patch create mode 100644 debian/patches/bugfix/arm/arm-mvebu-armada-xp-openblocks-ax3-4-disable-interna.patch diff --git a/debian/changelog b/debian/changelog index 70562ed24..b30fe67b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +linux (4.0.2-2) UNRELEASED; urgency=medium + + [ Ben Hutchings ] + * Fix error messages at boot on systems without an RTC (Closes: #784146): + - [armhf] mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC + - rtc: hctosys: do not treat lack of RTC device as error + - rtc: hctosys: use function name in the error log + + -- Ben Hutchings Mon, 18 May 2015 00:00:06 +0100 + linux (4.0.2-1) unstable; urgency=medium * New upstream stable update: diff --git a/debian/patches/bugfix/all/rtc-hctosys-do-not-treat-lack-of-rtc-device-as-error.patch b/debian/patches/bugfix/all/rtc-hctosys-do-not-treat-lack-of-rtc-device-as-error.patch new file mode 100644 index 000000000..5b467c929 --- /dev/null +++ b/debian/patches/bugfix/all/rtc-hctosys-do-not-treat-lack-of-rtc-device-as-error.patch @@ -0,0 +1,37 @@ +From: Floris Bos +Date: Thu, 16 Apr 2015 12:45:12 -0700 +Subject: rtc: hctosys: do not treat lack of RTC device as error +Origin: https://git.kernel.org/linus/aed98b9a1be6fcf1685dfd37f0a3e78e92a21f7d +Bug-Debian: https://bugs.debian.org/784146 + +When using device trees on the ARM platform, it is not certain at compile +time whether or not the system will have a RTC. + +If one enables CONFIG_HCTOSYS just in case the system booted has a RTC, +and it turns out not to be, this will result in a big fat "unable to open +rtc device" error being printed to console, even when "quiet" is set in +the kernel cmdline. + +Fix this by outputting the message with loglevel info instead. + +Signed-off-by: Floris Bos +Cc: Alessandro Zummo +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + drivers/rtc/hctosys.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c +index 6c719f2..fb4251d 100644 +--- a/drivers/rtc/hctosys.c ++++ b/drivers/rtc/hctosys.c +@@ -32,7 +32,7 @@ static int __init rtc_hctosys(void) + struct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE); + + if (rtc == NULL) { +- pr_err("%s: unable to open rtc device (%s)\n", ++ pr_info("%s: unable to open rtc device (%s)\n", + __FILE__, CONFIG_RTC_HCTOSYS_DEVICE); + goto err_open; + } diff --git a/debian/patches/bugfix/all/rtc-hctosys-use-function-name-in-the-error-log.patch b/debian/patches/bugfix/all/rtc-hctosys-use-function-name-in-the-error-log.patch new file mode 100644 index 000000000..5b8c6e94d --- /dev/null +++ b/debian/patches/bugfix/all/rtc-hctosys-use-function-name-in-the-error-log.patch @@ -0,0 +1,30 @@ +From: Aaro Koskinen +Date: Thu, 16 Apr 2015 12:45:54 -0700 +Subject: rtc: hctosys: use function name in the error log +Origin: https://git.kernel.org/linus/521fca18e828cddc94535a1ea5ac33460f1de679 +Bug-Debian: https://bugs.debian.org/784146 + +Use function name in the error log instead of __FILE__. + +Signed-off-by: Aaro Koskinen +Cc: Alexandre Belloni +Cc: Alessandro Zummo +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + drivers/rtc/hctosys.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c +index fb4251d..91fb5f3 100644 +--- a/drivers/rtc/hctosys.c ++++ b/drivers/rtc/hctosys.c +@@ -33,7 +33,7 @@ static int __init rtc_hctosys(void) + + if (rtc == NULL) { + pr_info("%s: unable to open rtc device (%s)\n", +- __FILE__, CONFIG_RTC_HCTOSYS_DEVICE); ++ __func__, CONFIG_RTC_HCTOSYS_DEVICE); + goto err_open; + } + diff --git a/debian/patches/bugfix/arm/arm-mvebu-armada-xp-openblocks-ax3-4-disable-interna.patch b/debian/patches/bugfix/arm/arm-mvebu-armada-xp-openblocks-ax3-4-disable-interna.patch new file mode 100644 index 000000000..ab17e59d6 --- /dev/null +++ b/debian/patches/bugfix/arm/arm-mvebu-armada-xp-openblocks-ax3-4-disable-interna.patch @@ -0,0 +1,34 @@ +From: Gregory CLEMENT +Date: Tue, 14 Apr 2015 11:50:13 +0200 +Subject: ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC +Origin: https://git.kernel.org/linus/750e30d4076ae5e02ad13a376e96c95a2627742c +Bug-Debian: https://bugs.debian.org/784146 + +There is no crystal connected to the internal RTC on the Open Block +AX3. So let's disable it in order to prevent the kernel probing the +driver uselessly. Eventually this patches removes the following +warning message from the boot log: +"rtc-mv d0010300.rtc: internal RTC not ticking" + +Acked-by: Andrew Lunn +Signed-off-by: Gregory CLEMENT +Cc: # v3.8 + +--- + arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +index e3b08fb..990e8a2 100644 +--- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts ++++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +@@ -105,6 +105,10 @@ + }; + + internal-regs { ++ rtc@10300 { ++ /* No crystal connected to the internal RTC */ ++ status = "disabled"; ++ }; + serial@12000 { + status = "okay"; + }; diff --git a/debian/patches/series b/debian/patches/series index 0a6c94320..0e3b5267f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -68,3 +68,6 @@ bugfix/all/ipv4-missing-sk_nulls_node_init-in-ping_unhash.patch bugfix/all/path_openat-fix-double-fput.patch bugfix/all/mnt-fail-collect_mounts-when-applied-to-unmounted-mo.patch bugfix/all/fs_pin-allow-for-the-possibility-that-m_list-or-s_li.patch +bugfix/arm/arm-mvebu-armada-xp-openblocks-ax3-4-disable-interna.patch +bugfix/all/rtc-hctosys-do-not-treat-lack-of-rtc-device-as-error.patch +bugfix/all/rtc-hctosys-use-function-name-in-the-error-log.patch