From patchwork Wed Mar 21 02:40:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 888508 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="h8eZtqOe"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 405Yvj3x96z9s1S for ; Wed, 21 Mar 2018 13:41:03 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id CA9FAC21DF9; Wed, 21 Mar 2018 02:41:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E8A6FC21D56; Wed, 21 Mar 2018 02:40:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E035CC21D56; Wed, 21 Mar 2018 02:40:55 +0000 (UTC) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by lists.denx.de (Postfix) with ESMTPS id 4860EC21C29 for ; Wed, 21 Mar 2018 02:40:55 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id a16so1456684pfn.9 for ; Tue, 20 Mar 2018 19:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dw3+4IFikSPCV448sdCreuq3n+Pm+1o2eoOVAzlLoCk=; b=h8eZtqOe2dgpJ8kpOZLPgH7vS0NZnDmyN37ptEI77NCFe578bej/0k9fyfFKOqMZJ2 Zv6Spyy4hLeYhHpPpWcNGZz622k61cLiZw3vv/yQL5mPBWwopuPpKvqXtkekp1bu7HD4 0/+dXL6oM4KnqKNUtM6jmtVevqfnxI0ZqXifzubbSQOS1AMpAltKUR8WlcJ1zyqDDiSh peDexZXeQSWkjAiqrKKMwjiCv8mJROeX1uLwbb9ACcpNB/ComKq2cbatB/e9TcS5DAHt GvyttWv/iTCz92iEHp1PZWrMg4nA/o4c7Jm+BWC/UtxyKvAlMBlxFAfr4l4sFpwoJHXt EA+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dw3+4IFikSPCV448sdCreuq3n+Pm+1o2eoOVAzlLoCk=; b=WaTACoXN1fxx4Ez7sgvyI+g2Jjl5WnlVKKxjNEnxnmAJ045Cu4knSeM6vIGnsID3JP 1lPsRE76zw0Ksnde8BzN32u0fe4TUtono/BYI+gjXxQ9Vdm/aP2dYzb5RBInTyKG/7XL 5RRucC0WVgay6RY7dLL4q4Jipc2ejt7mmYGTmUyJzsW87ZOzYRCGtGYBr1gsTCvQcwWz BfQjLEDRpwnTptOtgOmKEff+oAPRHeoe5D+Cx08SuPRBXwf2+GAE1SyoLrpM64EUCKNv sblBPMUXcMMYkr0KyKFeNZJa/znwkm/h94CJXx5mfGUIhV0MIuxX0KhV0PRAkCmMoPXz 0Yiw== X-Gm-Message-State: AElRT7HvWp93CcfE/p+Ti/u6unsam5xLsqHxBCPN6tJ726lAQ3M5yZxs uEogmLv5XGH61q9iG8yFxuJ36Rvb X-Google-Smtp-Source: AG47ELs9lc9CCSP/hrHIA+jzzSyeyrXYY3SxMKwe1NrNSeQs0pQRznRLjbRUMilRIhyrj0bYcApRvA== X-Received: by 10.101.86.141 with SMTP id v13mr6842789pgs.353.1521600053217; Tue, 20 Mar 2018 19:40:53 -0700 (PDT) Received: from chrisp-dl.ws.atlnz.lc ([2001:df5:b000:22:3a2c:4aff:fe70:2b02]) by smtp.gmail.com with ESMTPSA id h10sm5187829pgf.19.2018.03.20.19.40.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Mar 2018 19:40:52 -0700 (PDT) From: Chris Packham To: u-boot@lists.denx.de Date: Wed, 21 Mar 2018 15:40:32 +1300 Message-Id: <20180321024037.26393-1-judge.packham@gmail.com> X-Mailer: git-send-email 2.16.2 Cc: Marek Vasut , Chris Packham Subject: [U-Boot] [PATCH v1 0/5] rtc: remove redundant code in rtc_reset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Someone at $dayjob pointed out some inconsistent behaviour between the ds1307 and the ds1337 rtc drivers for an old version of u-boot. Basically with ds1307 "date reset" changed the time whereas for the ds1337 it did not. I was about to send a patch to add code to ds1337 when I noticed Marek's commit 1a1fa2406689 ("rtc: Set valid date after reset"). This meant that newer versions of u-boot did indeed have consistent behaviour for "date reset" regardless of the rtc driver but now there were a handful of drivers that had redundant code to do something that is now handled in the generic layers. This series removes the now redundant code from the affected drivers. I've compile tested these changes but I only have access to hardware with ds1307/ds1337 (or variants thereof) so I haven't been able to test the last 4 patches on actual hardware. Chris Packham (5): rtc: ds1307: remove redundant code in rtc_reset rtc: ds1374: remove redundant code in rtc_reset rtc: mx27rtc: remove redundant code in rtc_reset rtc: rs5c372: remove redundant code in rtc_reset rtc: rx8025: remove redundant code in rtc_reset drivers/rtc/ds1307.c | 33 --------------------------------- drivers/rtc/ds1374.c | 15 --------------- drivers/rtc/mx27rtc.c | 6 +----- drivers/rtc/rs5c372.c | 24 +----------------------- drivers/rtc/rx8025.c | 18 +----------------- 5 files changed, 3 insertions(+), 93 deletions(-)