From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.bootlin.com ([62.4.15.54]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMshL-0000SL-28 for linux-mtd@lists.infradead.org; Wed, 14 Nov 2018 10:47:04 +0000 Date: Wed, 14 Nov 2018 11:46:51 +0100 From: Boris Brezillon To: Yogesh Narayan Gaur Cc: Schrempf Frieder , "linux-mtd@lists.infradead.org" , "linux-spi@vger.kernel.org" , Marek Vasut , Mark Brown , Han Xu , "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "richard@nod.at" , "miquel.raynal@bootlin.com" , David Wolfe , Fabio Estevam , Prabhakar Kushwaha , "shawnguo@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 3/9] spi: Add a driver for the Freescale/NXP QuadSPI controller Message-ID: <20181114114651.6f995fc8@bbrezillon> In-Reply-To: References: <1542116782-13118-1-git-send-email-frieder.schrempf@kontron.de> <1542116782-13118-4-git-send-email-frieder.schrempf@kontron.de> <65577d13-b17d-8f69-313c-01d23240d1d9@kontron.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 14 Nov 2018 10:43:00 +0000 Yogesh Narayan Gaur wrote: > Hi Frieder, > > [..] > > > > > > Ok, I will have a look at what could make the chip selection fail in > > > case of AHB read. > > > > Could you try with this change applied: > > > > @@ -503,7 +503,7 @@ static void fsl_qspi_select_mem(struct fsl_qspi *q, struct > > spi_device *spi) > > map_addr = q->memmap_phy; > > else > > map_addr = q->memmap_phy + > > - 2 * q->devtype_data->ahb_buf_size; > > + q->devtype_data->ahb_buf_size; > > > > qspi_writel(q, map_addr, q->iobase + QUADSPI_SFA1AD + > > (i * 4)); > > } > > > > I have tried above change and also have done few more changes but still AHB read for CS1 is falling. Have plugged a scope on the CS1 line, to make sure it's properly asserted when the memory is accessed? > > I guess we need to implement dynamic memory mapping [1] for AHB Read as was being done in previous driver implementation. > Would try this and update you. Sorry but I don't see why it would solve the problem we have here, but if it does, I'd like to have a clear explanation ;-).