Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4849645imm; Tue, 19 Jun 2018 00:31:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLCdm/pPpy7ZOjuCw9BL7n2+eE3f2KT171y6BZBA/HXqc/5ut3ptzrjSdQRBqbBPY/ClhM9 X-Received: by 2002:a65:5246:: with SMTP id q6-v6mr13742858pgp.152.1529393476703; Tue, 19 Jun 2018 00:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529393476; cv=none; d=google.com; s=arc-20160816; b=Yu6K4ptE3TdHh4/Zba1mLUVGZZpf6w+9F8HW83bHIcH4DhA3HD3noalqI8aopgXTH/ 2snbXn/F0ZTpFe1FdxOhQ2BDt02KrTYXyaHO65g8z8HQrTxwLeSGMXL0pmOIaK9HVIeU Gg5gS8E9E35z7xtF8BcGF71d0QBn5zpwS7RgfKbD+UhuwwqtfL96kCK6tJDdWtqNd/b4 7vDLyGn9PdZw9wyXEK4CXtqR0nZpwJLJdq6+bd+ucmXCWmRu+1Ix0Si3wWBZ/GO/l2/4 d+qkBoGco+hoH6tIIwoNm3U98iJXtWHJDJA3LbbFVQpB9zZ86qJrULQw2m2FvDh8IBGl H3fA== 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 :arc-authentication-results; bh=82NQreA0juQYj27S6Z5E4UMt+tGpSX/zOZbrdJitem8=; b=f0cSCmulCpv0t7bxsIX9kgqABTq8f6qNjhYIvcsmUv/ANxncK9ThuUFUZ7ZmOXn18D I7Ty9aJZuJM/kb/s7Z5BzQAFTAiAd3ma7HrSFg+YjHB6BznwhY8ApsZVAT5gMe5fS8XN 5bmhqvvKr2hG2u/cCvIc/xYXXKiXNe8vJgspn0HDsj34oWa1/buMACJ7rr0HKWISl5uT S9gw/mkNKmcvW+My840fdvWCmhpfDsxXmqff/0A/RUOKRbUFngc7mgnD1w5NO5/DGwbk UpsfhYIYMbsdb9Pb2WxhTQyyCrz/n+p9LOu4XQGrCbTFiP5JtHe3trl5z/UGGuHANNx/ oaCg== 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 u1-v6si17387626plj.386.2018.06.19.00.31.02; Tue, 19 Jun 2018 00:31:16 -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; 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 S1756338AbeFSH2r (ORCPT + 99 others); Tue, 19 Jun 2018 03:28:47 -0400 Received: from mail.bootlin.com ([62.4.15.54]:60165 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755868AbeFSH2p (ORCPT ); Tue, 19 Jun 2018 03:28:45 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id C66E120862; Tue, 19 Jun 2018 09:28:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-50-153.w90-88.abo.wanadoo.fr [90.88.168.153]) by mail.bootlin.com (Postfix) with ESMTPSA id 5C62220850; Tue, 19 Jun 2018 09:28:33 +0200 (CEST) Date: Tue, 19 Jun 2018 09:28:32 +0200 From: Boris Brezillon To: Yogesh Narayan Gaur , "marek.vasut@gmail.com" , Frieder Schrempf , "broonie@kernel.org" Cc: Fabio Estevam , David Wolfe , "dwmw2@infradead.org" , "richard@nod.at" , Prabhakar Kushwaha , Han Xu , "linux-kernel@vger.kernel.org" , "linux-spi@vger.kernel.org" , "linux-mtd@lists.infradead.org" , "miquel.raynal@bootlin.com" , "computersforpeace@gmail.com" Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller Message-ID: <20180619092832.3b6c8f22@bbrezillon> In-Reply-To: References: <1527686082-15142-1-git-send-email-frieder.schrempf@exceet.de> <20180611094616.5c8f82cf@bbrezillon> <20180611121618.40f4b609@bbrezillon> <20180612091328.67734adb@bbrezillon> <20180615145019.734f23a9@bbrezillon> <20180615155541.4f43e9bb@bbrezillon> <20180618211536.0bf44f55@bbrezillon> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; 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 Hi Yogesh, Could you please use a mailer that is quoting things correctly. I have a hard time differentiating your replies from mine. On Tue, 19 Jun 2018 07:10:37 +0000 Yogesh Narayan Gaur wrote: > Let us take below layout of memory address space map. > QuadSPI Controller can access range from 0x2000_0000 - 0x2FFF_FFFF i.e. 256 MB address space reserved and it is having 4 slave devices connected. > These slave devices[of size 64MB, 64MB, 32MB and 64MB ] are connected at below address > 0x2000_0000, 0x2400_0000, 0x2A00_0000, 0x2C00_0000 > i.e. there is gap of 32MB from 0x2800_0000 to 0x29FF_FFFF. Okay, I'm fine with pre-reserving 32MB per chip select. > > As per my understanding of the controller, flash XX top address, register should have below values: > QUADSPI_SFA1AD - 0x0 > QUADSPI_SFA2AD - 0x400_0000 > QUADSPI_SFB1AD - 0xA00_0000 > QUADSPI_SFB2AD - 0xC00_0000 > And Register QUADSPI_SFAR should point to the range for the flash in which operation is happening. Wait, I thought it was supposed to be an absolute address, not one relative to the 0x20000000 offset. > > Please check Table10-32, page 1657, in [1] for more details on flash address assignment. Yes, I still don't see where it says that having one of the range with a zero size is forbidden, or anything mentioning a required alignment. > > But say if I assign address to register QUADSPI_SFA2AD as "0 + 2 * ->ahb_buf_size" then this address value is not correct as per the value range explained in above mentioned table. Why? If the SFA1AD is set to zero, that should not, right?