Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6517161imu; Wed, 14 Nov 2018 02:48:43 -0800 (PST) X-Google-Smtp-Source: AJdET5fULERGSs5wZgcRBIA2LVoKOt5JIu1LtnnJnWzjMyUCDnIB+BDowmi3r1z9xuT4Ejlc7p8u X-Received: by 2002:a63:1848:: with SMTP id 8mr1256180pgy.81.1542192523155; Wed, 14 Nov 2018 02:48:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542192523; cv=none; d=google.com; s=arc-20160816; b=HHI88hXsk1NvfbT/4TEx1k5rNVaTOikCyb65aNR7Zn6G9XKHtvnEYXoN5qbGLGpwjJ r9sknZpiKpYpzQm5xB98HQK5j7kHEETK2dWUZm1/UhTlp8yj+JufIMETQbEjstlXNuut fWuoKBUQyBrBlYGHAhr27XCNdmGtSzfZnrE7v1CJb4ht0bTvNZkAcO+AOSvalgyr6Pzr mYNQSNh3vkkd8I752SA2uI4kCW7QOUIJGASmO6uJme6LOvdysTbUA2Z+nTnIF2VooAxO Aux5WGhMsS+chZITnSXOMIK0y8ijDmz2okgWyCwxKQAbJvHcgw2K82EPyzgd9nVmnU3u YGAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=PCWWkB/DdK1kfM26clf3hwHuihkRj7xkJ658bI0v06M=; b=FqTQ6eLpfQJzadVoqpgXuNkbF4DYum4QHVRgKyKh5YUqM+wHS9+kn++odWWjFdCxlt WjHH6X9JmzAwTGYH8kd98ofpXnWLo13fAXaCI4RW4l74HSED3W5MkV0i1M8XAzwA0Wno oGFuhSeagt0Mo/msWWmwa2U6Bjhx+sJ9sPItDphMfo5+pVl0mhXFMJXOyAXomSa4aWmN FVKyVApqQT5SPZE9Ros4IbOQiHLyzMh5SzyPnCCzHV10Pmu7Mrlhkp7O8Te15xnrXT1v EeSV9UWdzKuj8Kn9sH/F7njaBCUqUEdhFf0k0ebinJWwbofx22O2H9WzO4Q8JebX4lIQ lIPw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1si23440456pgk.495.2018.11.14.02.48.28; Wed, 14 Nov 2018 02:48:43 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732129AbeKNUth (ORCPT + 99 others); Wed, 14 Nov 2018 15:49:37 -0500 Received: from mail.bootlin.com ([62.4.15.54]:59866 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727816AbeKNUth (ORCPT ); Wed, 14 Nov 2018 15:49:37 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id B0FFC20731; Wed, 14 Nov 2018 11:46:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 Received: from bbrezillon (aaubervilliers-681-1-30-49.w90-88.abo.wanadoo.fr [90.88.15.49]) by mail.bootlin.com (Postfix) with ESMTPSA id 53181206A1; Wed, 14 Nov 2018 11:46:52 +0100 (CET) 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> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ;-).