From patchwork Mon Jun 8 16:52:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 6566951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 08A269F2F4 for ; Mon, 8 Jun 2015 16:55:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C48D2204CF for ; Mon, 8 Jun 2015 16:55:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86E37204C9 for ; Mon, 8 Jun 2015 16:55:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z20IQ-00048B-TF; Mon, 08 Jun 2015 16:53:10 +0000 Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z20IL-00043e-Hy for linux-arm-kernel@lists.infradead.org; Mon, 08 Jun 2015 16:53:07 +0000 Received: by oigz2 with SMTP id z2so34086002oig.1 for ; Mon, 08 Jun 2015 09:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=04R0ULdlygvn86tpqPOCbApZTe5yDveEcMB/UbaFIwk=; b=Fx72UMcnLVJfwgC4ao9QDdxPZcK9pcM8Xu3PgERUBeyPAV+ypNjlrIA4xBwqZfJm9A 5PQXT+3AgYapfdz1ASza89UHpdX0a+R+ZdrOaTgjd1ka+GGcuaFZvihT3Y+z8QfkDn34 vlr/fDtBsc6h+foDpVmcEYva2MrZUR7LL+aMdLioZmwoc4VpiPbpkrNgjOV1oD4VPQLt XlCv0ZRU89Ki2vvIs8xvN/5ul/J5PDpiCWzPfZ4VXljs7J2rl7sC+bmzmnnVuvnub6c3 cmp8L/vRytDMTasLS71d/o5dJ6fOgPce6AkGIcIhzLQpr4ZUcpurX/ymosWu2QgtNooB 3HSg== X-Received: by 10.182.47.225 with SMTP id g1mr15190755obn.82.1433782363577; Mon, 08 Jun 2015 09:52:43 -0700 (PDT) Received: from [192.168.1.89] (72-48-98-129.dyn.grandenetworks.net. [72.48.98.129]) by mx.google.com with ESMTPSA id g2sm2115692obf.28.2015.06.08.09.52.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2015 09:52:42 -0700 (PDT) Message-ID: <5575C85A.6010802@gmail.com> Date: Mon, 08 Jun 2015 11:52:42 -0500 From: Rob Herring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Robert Jarzmik Subject: Re: [PATCH v4 0/6] SA1100/PXA RTC clean-up References: <1431529350-4597-1-git-send-email-robh@kernel.org> <87pp62jdpj.fsf@belgarion.home> <877fs5k9ps.fsf@belgarion.home> <871thq54c7.fsf@belgarion.home> <87wpzg4ji2.fsf@belgarion.home> In-Reply-To: <87wpzg4ji2.fsf@belgarion.home> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150608_095305_714102_E91959C6 X-CRM114-Status: GOOD ( 24.23 ) X-Spam-Score: -0.6 (/) Cc: Alessandro Zummo , Russell King , Arnd Bergmann , rtc-linux@googlegroups.com, Haojian Zhuang , Alexandre Belloni , Eric Miao , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sat, Jun 6, 2015 at 4:25 PM, Robert Jarzmik wrote: > Rob Herring writes: > >>>>> - you explain in the commit message that from a userland perspective, nothing >>>>> changes, except that the RTC IP will change, and any dependency on a >>>> >>>> The IP does not change here. rtc0 is still going to be the SA1100 RTC >>>> being registered first. The only change will be the addition of rtc1. >>> For boards which were only using rtc-pxa.c (as mioa701 for example), they relied >>> on the fact that rtc0 == pxa_rtc. Their time is stored in PXA IP. Therefore, >>> each of their hwclock will end up on sa1100-rtc instead of pxa-rtc. >>> >>> So for these boards, ie. for all boards where only rtc-pxa.c was used, the IP >>> addressed changes from a casual userspace perspective. >> >> Okay, so this is the case where the time will be wrong. >> >> I could remove the select of the sa1100-rtc and do an empty function >> for sa1100_rtc_init. This would preserve current behavior. > Please don't. I only ask for a sentence in the commit message. > >>>>> bootloader fidling with RTC should be considered as a source of regression. >>>> >>>> I'm not sure that I follow. >>> Let's talk about how a double boot windows + linux box works. >>> The bootloader ensures that : >>> - sa1100-rtc holds the number of seconds since the OS start (think jiffies) >>> - pxa-rtc holds the wall clock time >>> >>> Upon each reboot, sa1100-rtc is checked to see how much time has passed. If an >>> "oustanding number" is detected, for example 10 years, the firmware resets the >>> data partition. >>> >>> Now think what will happen when this change will be commited, upon the first >>> reboot after the linux kernel has change sa1100-rtc time. >> >> That would be bad. But on these platforms, the kernel has been using >> both RTCs right? Presumably on platforms only using 1 of the RTCs, the >> bootloader does not touch the RTCs. > No, the kernel has been using only pxa-rtc. The sa1100-rtc is not used, and yet > it accounts the passed time in it. > > On platforms where all the OSes use only 1 RTC, the bootloader only touches one > RTC, that's correct. Or said differently : the bootloader touches the union of > all the RTCs the OSes it launches do touch. Sorry, I'm being dense here, but I'm not any less confused as to which scenarios you think have an issue. Rather than go around again on this, perhaps you can just provide the warning for the commit text. Here's what I have. Rob 8<------------------------------------------------------------------- From e43db14b27486faef8d8e74e4aa555aba7f31a0e Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 1 Jun 2015 07:53:01 -0500 Subject: [PATCH] ARM: config: Switch PXA27x platforms to use PXA RTC driver With the SA1100 and PXA RTC drivers be mutually exclusive and no longer sharing hardware, PXA27x/PXA3xx platforms must use the PXA RTC driver as the SA1100 platform device is no longer registered. This change should be transparent to userspace, but the first reboot after the switch will have the wrong time. Signed-off-by: Rob Herring Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Sergey Lapin Cc: Russell King --- arch/arm/configs/cm_x2xx_defconfig | 2 +- arch/arm/configs/em_x270_defconfig | 2 +- arch/arm/configs/magician_defconfig | 2 +- arch/arm/configs/palmz72_defconfig | 2 +- arch/arm/configs/pcm027_defconfig | 2 +- arch/arm/configs/trizeps4_defconfig | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/configs/cm_x2xx_defconfig b/arch/arm/configs/cm_x2xx_defconfig index dc01c04..3b32d5f 100644 --- a/arch/arm/configs/cm_x2xx_defconfig +++ b/arch/arm/configs/cm_x2xx_defconfig @@ -157,7 +157,7 @@ CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_V3020=y -CONFIG_RTC_DRV_SA1100=y +CONFIG_RTC_DRV_PXA=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y CONFIG_INOTIFY=y diff --git a/arch/arm/configs/em_x270_defconfig b/arch/arm/configs/em_x270_defconfig index 4560c9c..8e10df7 100644 --- a/arch/arm/configs/em_x270_defconfig +++ b/arch/arm/configs/em_x270_defconfig @@ -157,7 +157,7 @@ CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_V3020=y -CONFIG_RTC_DRV_SA1100=y +CONFIG_RTC_DRV_PXA=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y CONFIG_INOTIFY=y diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig index 557dd29..a5b4920 100644 --- a/arch/arm/configs/magician_defconfig +++ b/arch/arm/configs/magician_defconfig @@ -150,7 +150,7 @@ CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_BACKLIGHT=y CONFIG_RTC_CLASS=y CONFIG_RTC_DEBUG=y -CONFIG_RTC_DRV_SA1100=y +CONFIG_RTC_DRV_PXA=y CONFIG_EXT2_FS=y CONFIG_INOTIFY=y CONFIG_MSDOS_FS=m diff --git a/arch/arm/configs/palmz72_defconfig b/arch/arm/configs/palmz72_defconfig index 4baa83c..83c135e 100644 --- a/arch/arm/configs/palmz72_defconfig +++ b/arch/arm/configs/palmz72_defconfig @@ -67,7 +67,7 @@ CONFIG_MMC=y CONFIG_MMC_DEBUG=y CONFIG_MMC_PXA=y CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_SA1100=y +CONFIG_RTC_DRV_PXA=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_DNOTIFY is not set diff --git a/arch/arm/configs/pcm027_defconfig b/arch/arm/configs/pcm027_defconfig index 0a847d0..b5624e3 100644 --- a/arch/arm/configs/pcm027_defconfig +++ b/arch/arm/configs/pcm027_defconfig @@ -82,7 +82,7 @@ CONFIG_MMC=y CONFIG_MMC_PXA=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_SA1100=m +CONFIG_RTC_DRV_PXA=m CONFIG_EXT2_FS=m CONFIG_EXT3_FS=m # CONFIG_DNOTIFY is not set diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig index 932ee4e..4bc8700 100644 --- a/arch/arm/configs/trizeps4_defconfig +++ b/arch/arm/configs/trizeps4_defconfig @@ -177,7 +177,7 @@ CONFIG_NEW_LEDS=y CONFIG_RTC_CLASS=y # CONFIG_RTC_HCTOSYS is not set CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_SA1100=y +CONFIG_RTC_DRV_PXA=y CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y