From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BB13C43381 for ; Mon, 25 Mar 2019 15:29:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CC1C320811 for ; Mon, 25 Mar 2019 15:29:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jHiB1D7i"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=jms.id.au header.i=@jms.id.au header.b="nuc5ieFr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC1C320811 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pdMa0bB5ZwMOyAPJokX8VvcEOlxAju7t/cFLIz3/BXQ=; b=jHiB1D7inPDf4B U2xWiQYRaSu/IunsC5TJjdRxUyfoi9Yi0Ek83L0E/YgBe8GRTPy8/7kYMv7j8ElYfm/GaMRYGFW3e 7QTPWiVl+uRCi/uB6sV8vBUWjiuy3rjCKSA2rCr9s62aC0FX7Vpz3pgp5lir1BxA0Ugpd48AwbJtA FGFx/78KXkMJHXwU9NSwiG6IjgCaFhEbZxt2g+Hb9nvazBLH8L9KuTShHJp0zSqFrhyfaOaLEbueE Uex1JH6uMrocN1kU7DOtNuJXX4gx174PKeBb6sqf7sTAqswe8oDX3o1uBl7B60cPfqhEnkvh8tqti hEPYPs7r3hgV7PDfMx5Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8RWu-0004jI-Rb; Mon, 25 Mar 2019 15:28:52 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8RWl-0004ip-3b for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2019 15:28:51 +0000 Received: by mail-qk1-x741.google.com with SMTP id z13so5563553qki.2 for ; Mon, 25 Mar 2019 08:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oeiQMIQzmV9YNgQLFvTaFrVXnctxXB0fdUThXeh0Ml0=; b=nuc5ieFr8kjfEPdJvI+TWlpLfIiHJG7vwEOdj/5n7f4Y7xpgPQ0I7nEsu4PsEK4U27 xTbgGEPjTB3B9VPHAwgDI6SK7ngShXTLPGK9jtaKGnEKQ3aunqmMV5wm1pFV3bqJCVN2 QYaaIgqmT/VtU5aGC81aWfPvfttMNTPbKQ128= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oeiQMIQzmV9YNgQLFvTaFrVXnctxXB0fdUThXeh0Ml0=; b=n7DhUHYKgEpc6aZalin0/w1dDR4/cSA0TNcsqTR7EKrkJs42hpP6+20IyV8gpyWwz5 QVNYuesaEbXE7Omt0VadoobaiAY2nP1hTcH2PHCYmrwKWSprBufrWaVzGrD3v4NI5kx7 oliog+Tvvtmfx0yzai6Wo9Bd+CE89s2k9z/xsJlu986mKmzpZ9PEIZ6ifvqjMkYEH/KF czuv0nkt9HUBFGOhWajAt4K4OGC/iTqUYzhzh0yXwuNTzCSK3WcfHkgllFnYrTBcZ2Jq p1csnzP/OG9q2O+mY7mJcvVPcH/jAn+Bb7dM6RjnjRpx6qr0S4kzLNV1WAMHPDv9HUYV rPtw== X-Gm-Message-State: APjAAAXYlInE0378lVVmbz4fcQ495a6G7H/F2MZdsx1OMk3s4jnDX9l0 xQz+dQRHcGBOnEukMJMhdDsBCy8oXlc0SrueZHk= X-Google-Smtp-Source: APXvYqzZr3xxgEl1EmaGKtEudVhgXM4D++WMVO6hValyNOKZpqeAVhL4pFQkqCpfQ1AtjuaGo9ciyMkrYQ1w6ia4K3w= X-Received: by 2002:a37:624e:: with SMTP id w75mr19043381qkb.11.1553527719034; Mon, 25 Mar 2019 08:28:39 -0700 (PDT) MIME-Version: 1.0 References: <20190325133159.10653-1-joel@jms.id.au> <20190325133159.10653-3-joel@jms.id.au> <20190325145954.GM30105@piout.net> In-Reply-To: <20190325145954.GM30105@piout.net> From: Joel Stanley Date: Mon, 25 Mar 2019 15:28:26 +0000 Message-ID: Subject: Re: [PATCH v2 2/2] rtc: Add ASPEED RTC driver To: Alexandre Belloni X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190325_082843_299341_D969D3E9 X-CRM114-Status: GOOD ( 12.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Alessandro Zummo , linux-aspeed@lists.ozlabs.org, devicetree , Andrew Jeffery , Rob Herring , Linux ARM , linux-rtc@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 25 Mar 2019 at 14:59, Alexandre Belloni wrote: > > Hi, > > This seems mostly good to me. > > On 26/03/2019 00:01:59+1030, Joel Stanley wrote: > > + dev_dbg(dev, "%s: %4d-%02d-%02d %02d:%02d:%02d\n", __func__, > > + 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, > > + tm->tm_hour, tm->tm_min, tm->tm_sec); > > + > > We now have %ptR, could you use that? I tried this: dev_dbg(dev, "%s: %ptR", __func__, tm); Yes, that appears to do the job. Can you make the change when applying? > > > + rtc->rtc_dev->ops = &aspeed_rtc_ops; > > + rtc->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_1900; > > + rtc->rtc_dev->range_max = 38814989399LL; /* 3199-12-31 23:59:59 */ > > + > > I'm curious how many RTC have been properly designed, could you run > rtc-range? > > https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/rtc-tools.git/tree/rtc-range.c It appears to pass the test: Testing 2000-02-28 23:59:59. OK Testing 2038-01-19 03:14:07. OK Testing 2069-12-31 23:59:59. OK Testing 2099-12-31 23:59:59. OK Testing 2100-02-28 23:59:59. OK Testing 2106-02-07 06:28:15. OK Testing 2262-04-11 23:47:16. OK The qemu model I have for the device failed though. A good test! Are you going to put it in the kernel tree? Cheers, Joel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel