From patchwork Fri Jun 28 15:30:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 11022673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9600C76 for ; Fri, 28 Jun 2019 15:30:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C1A6286AD for ; Fri, 28 Jun 2019 15:30:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7003828721; Fri, 28 Jun 2019 15:30:37 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 CADFC286AD for ; Fri, 28 Jun 2019 15:30:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726730AbfF1Pag (ORCPT ); Fri, 28 Jun 2019 11:30:36 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:62730 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbfF1Pag (ORCPT ); Fri, 28 Jun 2019 11:30:36 -0400 Received-SPF: Pass (esa6.microchip.iphmx.com: domain of Tudor.Ambarus@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Tudor.Ambarus@microchip.com"; x-sender="Tudor.Ambarus@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa6.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Tudor.Ambarus@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa6.microchip.iphmx.com; spf=Pass smtp.mailfrom=Tudor.Ambarus@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com X-IronPort-AV: E=Sophos;i="5.63,428,1557212400"; d="scan'208";a="36285096" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Jun 2019 08:30:34 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.87.152) by chn-vm-ex01.mchp-main.com (10.10.87.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 28 Jun 2019 08:30:33 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 28 Jun 2019 08:30:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=PG2M+vp0rs1DvLBPpN0cSMz+K+qmyAgVdkC2n04U+CHk7BcuQ4Wk1aVqweNqAdaClhHvQ37bFx4ApKW4c9fd4quNjah2nuSGTlxzxoRA0u1BGfIiVRah1iIdGUtQgUoAnHRD/u6mTRG+WgVY4gw5sU26rmxH/Nm81MIEGqxcif0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/45dqXfh1vQABaTObJenkRoAnxkBWxTCOIA67xQx3ns=; b=BgargPMG+yAbLRHAQk6q7ro8xcd0HYU0ep1zwyqJRQ5dhKuB5zB0B4HQNBKiHBQQH+TQi8SpWVVmQp820GNDF2D5mY6NoOnVqF5kJMzryUysJeypXG8FEzdnKT6sNqWoIPlY6KYzg/dR7zss3C0IHjwQ6DZ+dt+56kWk/Z72B4c= ARC-Authentication-Results: i=1; test.office365.com 1;spf=none;dmarc=none;dkim=none;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/45dqXfh1vQABaTObJenkRoAnxkBWxTCOIA67xQx3ns=; b=TMZcMvL1ZOsjdFGI6/a5E+4vWzt5m2bcInYamtonFUvuF8OBWy0mpzqU5C8kdRkHeoUjUYaAlr+i0eJJItlGHG9wDSuEuHqI1F6Xa1WKBgNfwEIc/JRMB1uPOkkIcDV5tP4haBpbmbdjX3XzgbxX0fQWyFUx1+Cea/lsnfHW4zA= Received: from BN6PR11MB1842.namprd11.prod.outlook.com (10.175.98.146) by BN6PR11MB1729.namprd11.prod.outlook.com (10.175.98.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Fri, 28 Jun 2019 15:30:32 +0000 Received: from BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::ed4c:cf24:e5c0:43ab]) by BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::ed4c:cf24:e5c0:43ab%2]) with mapi id 15.20.2032.019; Fri, 28 Jun 2019 15:30:32 +0000 From: To: , CC: , , , , , , Subject: [PATCH 1/2] spi: atmel-quadspi: void return type for atmel_qspi_init() Thread-Topic: [PATCH 1/2] spi: atmel-quadspi: void return type for atmel_qspi_init() Thread-Index: AQHVLcZsK/H2PQ5w102qkDFDfm9aoQ== Date: Fri, 28 Jun 2019 15:30:32 +0000 Message-ID: <20190628153009.7571-2-tudor.ambarus@microchip.com> References: <20190628153009.7571-1-tudor.ambarus@microchip.com> In-Reply-To: <20190628153009.7571-1-tudor.ambarus@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0601CA0042.eurprd06.prod.outlook.com (2603:10a6:800:1e::52) To BN6PR11MB1842.namprd11.prod.outlook.com (2603:10b6:404:101::18) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.9.5 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 73f3b9ee-0574-451f-12ca-08d6fbdd8ee3 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:BN6PR11MB1729; x-ms-traffictypediagnostic: BN6PR11MB1729: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:655; x-forefront-prvs: 00826B6158 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(136003)(346002)(39860400002)(396003)(376002)(199004)(189003)(256004)(86362001)(14454004)(81156014)(6486002)(6512007)(25786009)(8936002)(6436002)(5660300002)(66066001)(107886003)(4326008)(478600001)(14444005)(54906003)(1076003)(71200400001)(305945005)(7736002)(81166006)(72206003)(71190400001)(6506007)(2616005)(11346002)(386003)(486006)(316002)(76176011)(8676002)(110136005)(2501003)(476003)(6116002)(26005)(186003)(2906002)(446003)(53936002)(68736007)(36756003)(66556008)(73956011)(66446008)(66476007)(64756008)(66946007)(3846002)(50226002)(99286004)(52116002)(102836004);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR11MB1729;H:BN6PR11MB1842.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: i+lYBVDDe3dDVDBcFVNGdGDJhRq3uj/hT3TuXWXohS3BmPN1Mk2FKFZkGHLvruEhBMjdFvTlg/qb4T2PdG6GM2I4/pTrhb7BrDnwmTb8Cs9D3enZ+un+9D9R4yvaFuiSvRhwO55KXhZ9AaA3e2jBQywDCLWn1CV0aTC7Zad2dbVNgzNk91qyY83Xa+gXBH1463lVHvL1VG3y+J+D5iDW+SBQ/T1SZePITN+pm0lWu/coaL9WFOeoUWTk/sZC4Ad6wPoEkoKUwMtbPhJG+9xna0oLBlM/pVRJj28FD8DhTq4wcUBFfqlvaGm/sbJGcMfvw4X91X0mlSBs39V1yEBPh+T6jtTZFMJ4RJTDboktONfBv5Qse5mLt39fSb9EpJ1tsBSJFzuBMDRt8c5WOVJ7di4pWPIJmJKAqfnpTEqM1HI= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 73f3b9ee-0574-451f-12ca-08d6fbdd8ee3 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2019 15:30:32.5716 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tudor.ambarus@microchip.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1729 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: Tudor Ambarus commit 2d30ac5ed633 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver") removed the error path from atmel_qspi_init(), but not changed the function's return type. Set void return type for atmel_qspi_init(). Signed-off-by: Tudor Ambarus --- drivers/spi/atmel-quadspi.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index 9f24d5f0b431..32eb7447c31a 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -405,7 +405,7 @@ static int atmel_qspi_setup(struct spi_device *spi) return 0; } -static int atmel_qspi_init(struct atmel_qspi *aq) +static void atmel_qspi_init(struct atmel_qspi *aq) { /* Reset the QSPI controller */ writel_relaxed(QSPI_CR_SWRST, aq->regs + QSPI_CR); @@ -416,8 +416,6 @@ static int atmel_qspi_init(struct atmel_qspi *aq) /* Enable the QSPI controller */ writel_relaxed(QSPI_CR_QSPIEN, aq->regs + QSPI_CR); - - return 0; } static irqreturn_t atmel_qspi_interrupt(int irq, void *dev_id) @@ -536,9 +534,7 @@ static int atmel_qspi_probe(struct platform_device *pdev) if (err) goto disable_qspick; - err = atmel_qspi_init(aq); - if (err) - goto disable_qspick; + atmel_qspi_init(aq); err = spi_register_controller(ctrl); if (err) @@ -587,7 +583,8 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev) clk_prepare_enable(aq->pclk); clk_prepare_enable(aq->qspick); - return atmel_qspi_init(aq); + atmel_qspi_init(aq); + return 0; } static SIMPLE_DEV_PM_OPS(atmel_qspi_pm_ops, atmel_qspi_suspend, From patchwork Fri Jun 28 15:30:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 11022677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6ED371575 for ; Fri, 28 Jun 2019 15:30:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FBE5286AD for ; Fri, 28 Jun 2019 15:30:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53D282870B; Fri, 28 Jun 2019 15:30:39 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 DB2AB286AD for ; Fri, 28 Jun 2019 15:30:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbfF1Pai (ORCPT ); Fri, 28 Jun 2019 11:30:38 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:31576 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726741AbfF1Pai (ORCPT ); Fri, 28 Jun 2019 11:30:38 -0400 Received-SPF: Pass (esa4.microchip.iphmx.com: domain of Tudor.Ambarus@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Tudor.Ambarus@microchip.com"; x-sender="Tudor.Ambarus@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa4.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Tudor.Ambarus@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa4.microchip.iphmx.com; spf=Pass smtp.mailfrom=Tudor.Ambarus@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com X-IronPort-AV: E=Sophos;i="5.63,428,1557212400"; d="scan'208";a="38750021" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Jun 2019 08:30:37 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.87.152) by chn-vm-ex01.mchp-main.com (10.10.87.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 28 Jun 2019 08:30:35 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 28 Jun 2019 08:30:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=itvHme4yM5ydo9CNjOZkdDcIVvoTx1qojlRiVjwZv9d7548aHnBSUIJktv/Dxr8ybTbH/QHO55t9/acSpha1sdvY3El39ZZUu2e0bi8ySgLNQsIL5HbAk2dyDfNXpz9WV24S5EEbBoi4VeKjSqj6Ur/oQQsM29DXHbAtCoCBTLY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I6YLtt0Uu0akTgRx4a9atbJYgPk6spKklLVk9TmbylE=; b=aMtKeYQwP1yUfRe+p8p3aXCG5uL8IbAqFtTueWslr/zRfJaY+4O9+NQOTD6yy+Nvo0ZhXcLow8WYCMstiNi7mikFt5QZ3FABuV5YPmjskllZ1aakhZpjh7bCjrqCV5qj+x5PZ8uVAxd1s27bz1rI63PnAkpCGXXvq6t0PheVdBI= ARC-Authentication-Results: i=1; test.office365.com 1;spf=none;dmarc=none;dkim=none;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I6YLtt0Uu0akTgRx4a9atbJYgPk6spKklLVk9TmbylE=; b=XSNMONdcfA+Gg45bRYYQRwZkb3RLnIPwZFLsILBnliF7/o/hiIN/SgrWkLV0sveW6ZZhU5xDOqP5CEzv/J9z2BUSgv0yFd4CiWButP7G+F3hVKkmzNWjsVm4u+NvH+29qFigaBTQQ/fTUs0Lj2iVOk1dDZBrRrtOkiWjU1KekS4= Received: from BN6PR11MB1842.namprd11.prod.outlook.com (10.175.98.146) by BN6PR11MB1729.namprd11.prod.outlook.com (10.175.98.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Fri, 28 Jun 2019 15:30:34 +0000 Received: from BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::ed4c:cf24:e5c0:43ab]) by BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::ed4c:cf24:e5c0:43ab%2]) with mapi id 15.20.2032.019; Fri, 28 Jun 2019 15:30:34 +0000 From: To: , CC: , , , , , , Subject: [PATCH 2/2] spi: atmel-quadspi: fix resume call Thread-Topic: [PATCH 2/2] spi: atmel-quadspi: fix resume call Thread-Index: AQHVLcZtwFeJQVFybkSJWy1t1PvRtw== Date: Fri, 28 Jun 2019 15:30:34 +0000 Message-ID: <20190628153009.7571-3-tudor.ambarus@microchip.com> References: <20190628153009.7571-1-tudor.ambarus@microchip.com> In-Reply-To: <20190628153009.7571-1-tudor.ambarus@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0601CA0042.eurprd06.prod.outlook.com (2603:10a6:800:1e::52) To BN6PR11MB1842.namprd11.prod.outlook.com (2603:10b6:404:101::18) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.9.5 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: aa72afd5-fc24-4c88-dd1e-08d6fbdd8ff8 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:BN6PR11MB1729; x-ms-traffictypediagnostic: BN6PR11MB1729: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 00826B6158 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(136003)(346002)(39860400002)(396003)(376002)(199004)(189003)(256004)(86362001)(14454004)(81156014)(6486002)(6512007)(25786009)(8936002)(6436002)(5660300002)(66066001)(107886003)(4326008)(478600001)(14444005)(54906003)(1076003)(71200400001)(305945005)(7736002)(81166006)(72206003)(71190400001)(6506007)(2616005)(11346002)(386003)(486006)(316002)(76176011)(8676002)(110136005)(2501003)(476003)(6116002)(26005)(186003)(2906002)(446003)(53936002)(68736007)(36756003)(66556008)(73956011)(66446008)(66476007)(64756008)(66946007)(3846002)(50226002)(99286004)(52116002)(102836004);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR11MB1729;H:BN6PR11MB1842.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: W5qlCSviEiMJYRlDGK3IH5Cwe/7/1XXRfKgphKiBSbdLyJ3yv9BwTAlpCi9i+ZvwDOnNpu4ytxOL+t52GFm9FGzzSh6C2A3Tnq/lc9U9P3AmSAcfD9s6YWUnLVepLuG5meVf+vGOiFVaIpvt32bWDXcMJwzsMUfYMHUFZijJGpFAFZSmCDSo4FG0m4sCM2Y0pkg+31doiDu6TMEG7N6HFY5HX/bpbPUNOHtZEm7TTtcP7RP3xYn9S5s4DZC3miSciKlQ37258lhw3h/jg6CGDW7UyBHKOxvLcMIg3hHPLi6XtgM+ko3djTNta8aMYs37bX2mtpNXpt2stq0p3/pxYFrl0kWBFVd86FcNY97o6U78yQvKadvyuNKWiqH/a6/iOQvHRorQHnwA9GUsOiAGmUZxTEwyTL/JTKLZdQgITks= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: aa72afd5-fc24-4c88-dd1e-08d6fbdd8ff8 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2019 15:30:34.3871 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tudor.ambarus@microchip.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1729 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: Tudor Ambarus When waking up from the Suspend-to-RAM state, the following error was seen: m25p80 spi2.0: flash operation timed out The flash remained in an undefined state, returning 0xFFs. Fix it by setting the Serial Clock Baud Rate, as it was set before the conversion to SPIMEM. Tested with sama5d2_xplained and mx25l25673g spi-nor in Backup + Self-Refresh and Suspend modes. Fixes: 0e6aae08e9ae ("spi: Add QuadSPI driver for Atmel SAMA5D2") Reported-by: Mark Deneen Signed-off-by: Tudor Ambarus --- drivers/spi/atmel-quadspi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index 32eb7447c31a..6a7d7b553d95 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -151,6 +151,7 @@ struct atmel_qspi { const struct atmel_qspi_caps *caps; u32 pending; u32 mr; + u32 scr; struct completion cmd_completion; }; @@ -382,7 +383,7 @@ static int atmel_qspi_setup(struct spi_device *spi) struct spi_controller *ctrl = spi->master; struct atmel_qspi *aq = spi_controller_get_devdata(ctrl); unsigned long src_rate; - u32 scr, scbr; + u32 scbr; if (ctrl->busy) return -EBUSY; @@ -399,8 +400,8 @@ static int atmel_qspi_setup(struct spi_device *spi) if (scbr > 0) scbr--; - scr = QSPI_SCR_SCBR(scbr); - writel_relaxed(scr, aq->regs + QSPI_SCR); + aq->scr = QSPI_SCR_SCBR(scbr); + writel_relaxed(aq->scr, aq->regs + QSPI_SCR); return 0; } @@ -584,6 +585,9 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev) clk_prepare_enable(aq->qspick); atmel_qspi_init(aq); + + writel_relaxed(aq->scr, aq->regs + QSPI_SCR); + return 0; }