From patchwork Tue Aug 8 09:00:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 9887159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7782560384 for ; Tue, 8 Aug 2017 09:01:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A189284AA for ; Tue, 8 Aug 2017 09:01:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EFF6287DA; Tue, 8 Aug 2017 09:01:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9EAC287EC for ; Tue, 8 Aug 2017 09:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752464AbdHHJA3 (ORCPT ); Tue, 8 Aug 2017 05:00:29 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:37981 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752411AbdHHJAF (ORCPT ); Tue, 8 Aug 2017 05:00:05 -0400 Received: by mail-yw0-f193.google.com with SMTP id p68so1938765ywg.5 for ; Tue, 08 Aug 2017 02:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=KnHW1CGMG9L8yQtUaoS+P7o7Xyz01iHvSVawL5bTbno=; b=AbpTvIEEfaBiO5KQxxpHd5CY+ciRVWdpvYlnOZuzX+8wivU4U+omVOayBTl/sRNN65 JADbSKI3J1gEfZAjz9lZQ19uGneXnDU3J8nqr305Xtjl+Tuo/UCxvyfrGD5Ri51v89KN h9hIH6mzFZjFoz34s2ZIdHE+QSBVI1yOFdOq3wI8/lB5EKGS1wt9gmfoRapILTEaur3Z GuSjBIGR0WISa23I3j6KqLCXD/lsyEtgf/oR06aSLPwV6EBwgZdTawlGlxglswrFcGAs fqfo+cMwD/cvGnK/yIiLPVTpH0JlHQu+lQU3jEU1Wpo0kAZm/uDYvIbcskHq08qJ4oty tu6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=KnHW1CGMG9L8yQtUaoS+P7o7Xyz01iHvSVawL5bTbno=; b=KU+0iTlPurKQQ17FkLtFqUujfw49CJ+m99sLnVJO60cb4KHrhfp0Wh8VBQJIFpJIe0 8gN3u0c7zUaLKZ/T3EDfv2n8lzLqer1U3gIEB7og1koFeLJpGw7cYjbq2Z5gLRStWwp3 xBwy9Wh7e+5VfutaY6l5H8pZ1UsvEmLQqN/6mRq4eGY0T0bDLMn51PfVh2vWgLaLwIGB 4RsZHUinV77xyUD0U9QklBqhF1M5n5l5VspJEbafz0DDDRhACHDGhaSwkEshidTNqNYi 8G9OHkm/uhpcYii0yDeoQC3szx4w0JNBW63cE/iXCGN5JiTNVKXZW4VeUTxI1fFGH+li UcfA== X-Gm-Message-State: AHYfb5hh4tcJLvAd/prYdraR5vbsKIuYBnpknO5QWQEOURegSrd+dTZd 1YnaR38xsCxXlJBH X-Received: by 10.223.153.106 with SMTP id x97mr2221057wrb.32.1502182804596; Tue, 08 Aug 2017 02:00:04 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id 77sm1028464wmt.39.2017.08.08.02.00.03 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 08 Aug 2017 02:00:04 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu Cc: Shubhrajyoti Datta , Mark Brown , linux-spi@vger.kernel.org Subject: [PATCH] spi: cadence: Add support for context loss Date: Tue, 8 Aug 2017 11:00:03 +0200 Message-Id: <41f50cff7fd229448eb725f9d8ee97ec497457b2.1502182800.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shubhrajyoti Datta Context could be lost across the suspend and resume. Reinit the driver to tide over. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek --- drivers/spi/spi-cadence.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c index 5e02f9b91688..5c9516ae4942 100644 --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c @@ -704,7 +704,9 @@ static int __maybe_unused cdns_spi_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct spi_master *master = platform_get_drvdata(pdev); + struct cdns_spi *xspi = spi_master_get_devdata(master); + cdns_spi_init_hw(xspi); return spi_master_resume(master); }