Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp812237imm; Fri, 15 Jun 2018 06:42:58 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKv4wv8a2zskBq8Y9cFZu3Tab7zUJJDm+J+XSgZYzFhTKFgUDTa13Zc8Fnp6xawVGVDvEbj X-Received: by 2002:a17:902:280b:: with SMTP id e11-v6mr2130514plb.298.1529070178370; Fri, 15 Jun 2018 06:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529070178; cv=none; d=google.com; s=arc-20160816; b=QHgSQEXTyM6StjctRFcVR9SeMRQGimVyfXSkPXxFAVLqBI6DRIR6RgrikPvMj0ZxC3 UVhVFoE7audv8YgNc1kgUyg9ohcXJwvtw0ZpizgTP1S+nCsIIQGyyKPu3bmmr/qaUeg1 CmVXg/HpF7PhKTg9dox1dMLS0MhpAcJPahkNp9NYHFEJohnhjy7P+SZvjwOxFypTLKiF 78X3u2NW61MEO1GMwt8ZStCV9dRCIfrlYn4Ww72LNF/z++HBVEOXoSIcXJxRVomtWKwS GI+UtbPQsMIlqBqlpAq65oY7OU+RwLjwzT8Ai4cM2sGFVfJxkeVUELI1pUB8GTIdPVev 9sRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=CRx7A7tPXCt7rjHmUY5gRA9qdSLSYZd1T/rmu9n/NW4=; b=FOXffJuddC0Qb9+jNHVgvFV7nWS9ZCR1lBRmb1uoJEXjnJzp2EDJKHcHhKGOp9edWx +1vEn1zEB6vQICTDMH+1MO7joofYx9z4eJFZiNWJ8mK7We9b/6Gug5PtHDZ3HY2VU+73 uH0QcO+6JMhxezlLwy1YRXdcGhDB767yLyTJu9I4T5TYtvERo25D+M0Ku/NQORPlpT8V YeuRD9zm0DkVNgHyZB8th75jaQMDj1jGQZ/CRbc4tI8PBzqs09UVUFGqUuW1VX+K3dmO Kuf9NlU+cEziMMu7LYYtMG7NvBkSZN7LARk3bL8kIYALSRt7G3BBH66nzyzKWdhCzXFW Vuxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=Qeiis6Y6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b65-v6si5872987pfj.2.2018.06.15.06.42.43; Fri, 15 Jun 2018 06:42:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=Qeiis6Y6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965640AbeFONmR (ORCPT + 99 others); Fri, 15 Jun 2018 09:42:17 -0400 Received: from mail-ve1eur01on0051.outbound.protection.outlook.com ([104.47.1.51]:58496 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S936144AbeFONmP (ORCPT ); Fri, 15 Jun 2018 09:42:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CRx7A7tPXCt7rjHmUY5gRA9qdSLSYZd1T/rmu9n/NW4=; b=Qeiis6Y6zEXWZllvYDHolHPNFcAYwx/RrUTHcVIkpxsdb9L8QPgv+0Ag5hD7h7drbsybXoD56KaTTZxa0ccJVN9YCckWX5oCalRN7AX4wsgIwCdamS0H3xPIODlRg2YtK98lWvbq0dzE1Jpi4XxJEnkMU5ifC38YBayoHzNOKN4= Received: from DB6PR0402MB2838.eurprd04.prod.outlook.com (10.172.247.10) by DB6PR0402MB2805.eurprd04.prod.outlook.com (10.172.246.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Fri, 15 Jun 2018 13:42:12 +0000 Received: from DB6PR0402MB2838.eurprd04.prod.outlook.com ([fe80::49a5:1040:801d:2b97]) by DB6PR0402MB2838.eurprd04.prod.outlook.com ([fe80::49a5:1040:801d:2b97%2]) with mapi id 15.20.0863.016; Fri, 15 Jun 2018 13:42:12 +0000 From: Yogesh Narayan Gaur To: Boris Brezillon CC: "richard@nod.at" , Prabhakar Kushwaha , Han Xu , "linux-kernel@vger.kernel.org" , "linux-spi@vger.kernel.org" , "marek.vasut@gmail.com" , Frieder Schrempf , "broonie@kernel.org" , "linux-mtd@lists.infradead.org" , "miquel.raynal@bootlin.com" , Fabio Estevam , David Wolfe , "computersforpeace@gmail.com" , "dwmw2@infradead.org" Subject: RE: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller Thread-Topic: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller Thread-Index: AQHT+BiB2hXNm2lXyUydyOG4FdlBjqRWHnBAgABANgCABEvZ8IAAFd0AgAAehWCAAAtnAIAAAPSwgAFUQ+CAAAoIAIAAGBOggAT9CYCAAATqYA== Date: Fri, 15 Jun 2018 13:42:12 +0000 Message-ID: References: <1527686082-15142-1-git-send-email-frieder.schrempf@exceet.de> <1527686082-15142-4-git-send-email-frieder.schrempf@exceet.de> <20180608145130.09f979f9@bbrezillon> <20180611094616.5c8f82cf@bbrezillon> <20180611121618.40f4b609@bbrezillon> <20180612091328.67734adb@bbrezillon> <20180615145019.734f23a9@bbrezillon> In-Reply-To: <20180615145019.734f23a9@bbrezillon> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yogeshnarayan.gaur@nxp.com; x-originating-ip: [14.142.187.166] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0402MB2805;7:8jgFo/HqSg4YJBYQ386fTggEeG6g9fMv2FqhHHeU6alXXhf0pGup1S3F8xhRIsyFYvS5QzIvdsdZiAppXv/B175DJCWo/NtVKsP58FNsQ38mFxLPd1uzCBv3ZYFjywjf2UmqqTbiItqLh15qls3YuORMiXNw3Pp4+SQA1ffVQgn37f1CSTxxfouMYIUHW09nU8HeEJEkGNurxs2Sfc5kmdZ5VmiEbR9s5pfiqTwRhsyCXOETFYS+xtYpfP2VlJnL x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 801e234d-77e5-429b-d60e-08d5d2c5cc9c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(711020)(2017052603328)(7153060)(7193020);SRVR:DB6PR0402MB2805; x-ms-traffictypediagnostic: DB6PR0402MB2805: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197)(85827821059158)(258649278758335); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:DB6PR0402MB2805;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0402MB2805; x-forefront-prvs: 0704670F76 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(346002)(39380400002)(366004)(39860400002)(13464003)(189003)(199004)(81166006)(8676002)(81156014)(8936002)(102836004)(14454004)(9686003)(2900100001)(55236004)(74316002)(53546011)(6506007)(476003)(25786009)(53936002)(39060400002)(2906002)(305945005)(5250100002)(486006)(7736002)(7416002)(105586002)(106356001)(55016002)(186003)(6246003)(478600001)(6116002)(3846002)(229853002)(6916009)(6436002)(26005)(5660300001)(68736007)(3660700001)(33656002)(7696005)(86362001)(97736004)(4326008)(76176011)(11346002)(66066001)(93886005)(446003)(99286004)(54906003)(3280700002)(316002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0402MB2805;H:DB6PR0402MB2838.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: eKO2098O8SCvhrH5eJYqtMqKpIBNBMcwqFk5FABNArsO8Ept6rdhLvRfdjIBvvYcz+waEdt/TDR3aiPOc4ThgGBx3Ph6hTRsM9JMjIw+9y2erNkemrF0DNcoJsiptxRcUamk4sL9xv5ULSvwBIuJgGUlw97vOwDjCckFDyk27rj3fqmW+jxe7i8oQ1DLPmFG spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 801e234d-77e5-429b-d60e-08d5d2c5cc9c X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jun 2018 13:42:12.4763 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2805 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, I am still debugging the issue. With some analysis, able to check that proper values are not being written = for QUADSPI_SFA2AD/ QUADSPI_SFB1AD/ QUADSPI_SFB2AD register. In current code, value of map_addr are being assigned to these register. map_addr =3D q->memmap_phy + 2 * q->devtype_data->ahb_buf_size; qspi_writel(q, map_addr, q->iobase + QUADSPI_SFA1AD + (i * 4)); But instead of "q->devtype_data->ahb_buf_size" it should be flash size.=20 For my case flash size is 0x4000000 and with this hard coded value I am abl= e to perform Write and Erase operation. One more change, I have to do is adding the flash_size when writing the bas= e_address in SFAR register for case when "mem->spi->chip_select =3D=3D 1" qspi_writel(q, q->memmap_phy + 0x4000000, base + QUADSPI_SFAR); Thus, there should be mechanism or the entry in structure where we can have= the information of the size of the connected slave device. With both of above hardcoded changes, I am able to perform Write and Erase = operation on my second flash device but still facing issue in Read operatio= n, debugging in progress for that. -- Regards Yogesh Gaur -----Original Message----- From: Boris Brezillon [mailto:boris.brezillon@bootlin.com]=20 Sent: Friday, June 15, 2018 6:20 PM To: Yogesh Narayan Gaur Cc: richard@nod.at; Prabhakar Kushwaha ; Han Xu= ; linux-kernel@vger.kernel.org; linux-spi@vger.kernel.org;= marek.vasut@gmail.com; Frieder Schrempf ; broo= nie@kernel.org; linux-mtd@lists.infradead.org; miquel.raynal@bootlin.com; F= abio Estevam ; David Wolfe ; co= mputersforpeace@gmail.com; dwmw2@infradead.org Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI = controller On Tue, 12 Jun 2018 08:51:25 +0000 Yogesh Narayan Gaur wrote: >=20 > I am working on lsxxx platform. With further debugging, I found that my e= rase operation for second flash device is not working properly. > Need to have debugging for this in Frieder Patch. Did you find the problem? Could it be a wrong "reg =3D <>" definition in yo= ur DT (Frieder changed the CS numbering scheme in the new driver)?