From patchwork Thu Sep 28 09:46:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Izard X-Patchwork-Id: 819481 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=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pwm-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MVkWaSzz"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3y2qdq4DW9z9t3v for ; Thu, 28 Sep 2017 19:49:03 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752687AbdI1Jqo (ORCPT ); Thu, 28 Sep 2017 05:46:44 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:46830 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751088AbdI1Jql (ORCPT ); Thu, 28 Sep 2017 05:46:41 -0400 Received: by mail-wm0-f65.google.com with SMTP id m72so1066997wmc.1; Thu, 28 Sep 2017 02:46:40 -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=s7sFXtujvBKg6j9H8X1JD6TeqedU+yb5lcTe2oxyo5I=; b=MVkWaSzzA1Xq8KxI6ziBuCrPrkqOq64gW0uE3LV/4vYdrPLz6ocxpEiAMH8x6eYPkg NexQcYplLKtFz2QC6q/+idfgHIb826R+RVpOZ27C8Z8WfSYZ7qSFDreWhfAPdl29r9N9 +ADcoB62FPN47dylmHrtjzVjrX72qsw9n1v1vUIvqhJUXcExyVtMtePCNlga8HeaqlN+ 41VdmZKFvlQls9v6u2Vto2mNycx8JZ2OUZOF+wleuVShsJ8q6OjZYhQAKxq8+OWt0vJ0 J9BOXeOEc6ZpudOO3AYJPAgo6x9VImbEX5Ii200zDfvJcrSJ0EcftEbOf7M9wKB2uoNl x4sA== 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=s7sFXtujvBKg6j9H8X1JD6TeqedU+yb5lcTe2oxyo5I=; b=n5Zm15pY1eq7Ea4lkAXRDX3ht6XRS51YQd5Lrly7rgfeE209YoJFKZ/YS1/6pONEmF 2LkCcBIJ+7MfBNmuCkJEaK8+7R0QvaPui+2PzaE+Vj7QA+a4XYGhWqjtp5kl+v2dFtaB jHAX5aesjA21xOZ/NL8ALKt4MQK8mH8rAMUQ7fzFbntbz1nA986yv3SmHzdGzzy9BFEt GwDBeAusP3PTl/KpR3LMBBKZxHJHu5pthX13yg6tsc5ePfV0LTYLZxnk3zWHmFOzKwWz +Dx9FzXRlfr3NqJWx4Ho50flauqHmTDcbE2LoI/PwSnt6StgbnuVCwmz/9aKiVSElfxI 5hRw== X-Gm-Message-State: AHPjjUhej6PrX0n+Fzm7g/06cMaXu6GBCS3EtmwkEc0Q0ifbGaWM6vDX h96MHt3wu9+xHByxmgBdk5I= X-Google-Smtp-Source: AOwi7QDL7Jz2dZeTDtLb0roya/g6Qn+47V0ZxKclNV8oUCefteG5aJuhOt7fL06D0kCqvhZHatPDVg== X-Received: by 10.28.212.65 with SMTP id l62mr478184wmg.77.1506591999398; Thu, 28 Sep 2017 02:46:39 -0700 (PDT) Received: from localhost.localdomain (146.187.3.109.rev.sfr.net. [109.3.187.146]) by smtp.gmail.com with ESMTPSA id z10sm3272395wre.6.2017.09.28.02.46.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2017 02:46:38 -0700 (PDT) From: Romain Izard To: Boris Brezillon , Michael Turquette , Stephen Boyd , Lee Jones , Wenyou Yang , Josh Wu , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , Thierry Reding , Richard Genoud , Greg Kroah-Hartman , Jiri Slaby , Alan Stern , Ludovic Desroches , Nicolas Ferre , Alexandre Belloni Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, Romain Izard Subject: [PATCH v4 0/8] Various patches for SAMA5D2 backup mode Date: Thu, 28 Sep 2017 11:46:19 +0200 Message-Id: <20170928094627.31017-1-romain.izard.pro@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org While the core of the backup mode for SAMA5D2 has been integrated in v4.13, it is far from complete. Individual controllers in the chip have drivers that do not support the reset of the registers during suspend, and they need to be adapted to handle it. The first patch uses the clock wakeup code from the prototype backup mode instead of the version integrated in the mainline, as the mainline version is not stable. During a test loop with two-second backup suspend, the mainline version will hang in less than one day, whereas the prototype version has been running the same test for more than a week without hanging. While all these patches are provided in a series, the clock, mtd, usb, pwm and mfd patch do not depend on each other. Changes in v2: * drop the IIO patch duplicating existing code * determine the number of programmable clocks to save dynamically * declare a required local variable in the tty/serial patch Changes in v3: * drop dev_printk changes for PMECC * rework the resume code for PMECC * improve comments on PMC clock handling Changes in v4: * fix a bug in the PMECC resume code Romain Izard (8): clk: at91: pmc: Wait for clocks when resuming clk: at91: pmc: Save SCSR during suspend clk: at91: pmc: Support backup for programmable clocks mtd: nand: atmel: Avoid ECC errors when leaving backup mode ehci-atmel: Power down during suspend is normal pwm: atmel-tcb: Support backup mode atmel_flexcom: Support backup mode tty/serial: atmel: Prevent a warning on suspend drivers/clk/at91/clk-programmable.c | 2 + drivers/clk/at91/pmc.c | 63 ++++++++++++++++++++++++++----- drivers/clk/at91/pmc.h | 2 + drivers/mfd/atmel-flexcom.c | 65 ++++++++++++++++++++++++-------- drivers/mtd/nand/atmel/nand-controller.c | 3 ++ drivers/mtd/nand/atmel/pmecc.c | 17 +++++---- drivers/mtd/nand/atmel/pmecc.h | 1 + drivers/pwm/pwm-atmel-tcb.c | 63 ++++++++++++++++++++++++++++++- drivers/tty/serial/atmel_serial.c | 13 +++++++ drivers/usb/host/ehci-atmel.c | 3 +- 10 files changed, 196 insertions(+), 36 deletions(-)