Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752803AbbHDPwV (ORCPT ); Tue, 4 Aug 2015 11:52:21 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:54509 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752541AbbHDPwS (ORCPT ); Tue, 4 Aug 2015 11:52:18 -0400 Date: Tue, 4 Aug 2015 16:51:48 +0100 From: Mark Brown To: Vignesh R Cc: David Woodhouse , Brian Norris , Tony Lindgren , Russell King , Huang Shijie , linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org Message-ID: <20150804155148.GR20873@sirena.org.uk> References: <1438072876-16338-1-git-send-email-vigneshr@ti.com> <1438072876-16338-2-git-send-email-vigneshr@ti.com> <20150731181745.GM20873@sirena.org.uk> <55BEF4AF.5090704@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zYaYz6F2svGt3wno" Content-Disposition: inline In-Reply-To: <55BEF4AF.5090704@ti.com> X-Cookie: Please take note: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2392 Lines: 52 --zYaYz6F2svGt3wno Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Aug 03, 2015 at 10:27:19AM +0530, Vignesh R wrote: > @use_mmap_mode: Some SPI controller chips are optimized for interacting > with serial flash memories. These chips have memory mapped interface, > through which entire serial flash memory slave can be read/written as if > though they are physical memories (like RAM). Using this interface, > flash can be accessed using memcpy() function and the spi controller > hardware will take care of communicating with serial flash over SPI. > Setting this flag will indicate the SPI controller driver that the > spi_message is from mtd layer to read from/write to flash. The SPI > master driver can then appropriately switch the controller to memory > mapped interface to read from/write to flash, based on this flag (See > drivers/spi/spi-ti-qspi.c for example). > NOTE: If the SPI controller chip lacks memory mapped interface, then the > driver will ignore this flag and use normal SPI protocol to read > from/write to flash. Communication with non-flash SPI devices is not > possible using the memory mapped interface. I still can't tell from the above what this interface is supposed to do. It sounds like the use of memory mapped mode is supposed to be transparent to users, it should just affect how the controller interacts with the hardware, but if that's the case why do we need to expose it to users at all? Shouldn't the driver just use memory mapped mode if it's faster? --zYaYz6F2svGt3wno Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVwN+UAAoJECTWi3JdVIfQYvEH/AxbIEh4Z3wk0/fRXRwuE2N6 M8CdBC7sVqTzidzqFY1PyXOc8tHIxlYHUEEG9Fx/yC1oOW0NJNVV+8FOJj4HVC0N unGPXMEH/PaBAZYAeaiGYUZg7sGzUVcAX2QqA594NJpcaG5stX/0wrcshiTBofEc 0ebxHQy9WAxvOUGhB0DJDn4m/j34+42krz+O2OI7nGMm2p/0G1r1EobuHejHCEyQ i8cpQbdngVQYIUrhLtiGUSYppfC0qB70Nw97H0WXEaIuF9zQ4CtIsJpnAlCMKznw BLF0obMgtKkOHqA9TyzrosVBzOb+EYjHkSQyWRs/tt/r+qwh+Qt8i06sq4gaQ7o= =VgSn -----END PGP SIGNATURE----- --zYaYz6F2svGt3wno-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/