Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1200198
| From | "R, Vignesh" <vigneshr@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read |
| Date | 2015-08-04 20:10 +0200 |
| Message-ID | <pTOP0-1jD-9@gated-at.bofh.it> (permalink) |
| References | <pR8Kd-43p-3@gated-at.bofh.it> <pR8Ke-43p-33@gated-at.bofh.it> <pSq2n-17l-27@gated-at.bofh.it> <pTg0V-PQ-1@gated-at.bofh.it> <pTMNc-6DQ-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 8/4/2015 9:21 PM, Mark Brown wrote: > 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? > TI QSPI controller has two blocks: 1. SPI_CORE: This is generic(normal) spi mode. This can be used to communicate with any SPI devices (serial flashes as well as non-flash devices like touchscreen). 2. SFI_MM_IF(SPI memory mapped interface): The SFI_MM_IF block only allows reading and writing to an SPI flash device only. Used to speed up flash reads. It _cannot_ be used to communicate with non flash devices. Now, the spi_message that ti-qspi receives in transfer_one() callback can be from mtd device(in which case SFI_MM_IF can be used) or from any other non flash SPI device (in which case SFI_MM_IF must not be used instead SPI_CORE is to be used) but there is no way(is there?) to distinguish where spi_message is from. Therefore I introduced flag (use_mmap_mode) to struct spi_message. mtd driver will set flag to true, this helps the ti-qspi driver to determine that the user is flash device and thus can do read via SFI_MM_IF. If this flag is not set then the user is assumed to be non flash SPI driver and will use SPI_CORE block to communicate. On the whole, I just need a way to determine that the user is a flash device in order to switch to memory mapped interface. Regards Vignesh -- 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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/5] Add memory mapped read support for TI QSPI. Vignesh R <vigneshr@ti.com> - 2015-07-28 10:50 +0200
[RFC PATCH 4/5] ARM: dts: DRA7: Add memory map region entries for qspi Vignesh R <vigneshr@ti.com> - 2015-07-28 10:50 +0200
Re: [RFC PATCH 4/5] ARM: dts: DRA7: Add memory map region entries for qspi Vignesh R <vigneshr@ti.com> - 2015-08-03 07:10 +0200
Re: [RFC PATCH 4/5] ARM: dts: DRA7: Add memory map region entries for qspi Mark Brown <broonie@kernel.org> - 2015-08-04 18:00 +0200
Re: [RFC PATCH 4/5] ARM: dts: DRA7: Add memory map region entries for qspi Vignesh R <vigneshr@ti.com> - 2015-08-03 07:10 +0200
Re: [RFC PATCH 4/5] ARM: dts: DRA7: Add memory map region entries for qspi Vignesh R <vigneshr@ti.com> - 2015-08-03 07:20 +0200
[RFC PATCH 2/5] spi: spi-ti-qspi: Add memory mapped read support Vignesh R <vigneshr@ti.com> - 2015-07-28 10:50 +0200
[RFC PATCH 1/5] spi: introduce flag for memory mapped read Vignesh R <vigneshr@ti.com> - 2015-07-28 10:50 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Vignesh R <vigneshr@ti.com> - 2015-08-03 07:00 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Mark Brown <broonie@kernel.org> - 2015-08-04 18:00 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read "R, Vignesh" <vigneshr@ti.com> - 2015-08-04 20:10 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-05 07:30 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Vignesh R <vigneshr@ti.com> - 2015-08-05 07:40 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-05 08:00 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Mark Brown <broonie@kernel.org> - 2015-08-05 14:00 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-05 14:50 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Mark Brown <broonie@kernel.org> - 2015-08-05 14:50 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-05 15:00 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Mark Brown <broonie@kernel.org> - 2015-08-06 11:10 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-06 12:10 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-06 12:30 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Mark Brown <broonie@kernel.org> - 2015-08-06 13:10 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-06 13:10 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Vignesh R <vigneshr@ti.com> - 2015-08-06 14:30 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-06 16:00 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Geert Uytterhoeven <geert@linux-m68k.org> - 2015-08-06 18:20 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-06 20:30 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-06 23:40 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-07 09:40 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Vignesh R <vigneshr@ti.com> - 2015-08-07 10:40 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Martin Sperl <martin@sperl.org> - 2015-08-07 10:30 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-07 12:20 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Vignesh R <vigneshr@ti.com> - 2015-08-12 11:30 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Mark Brown <broonie@kernel.org> - 2015-08-06 18:50 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Mark Brown <broonie@kernel.org> - 2015-08-06 20:30 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Mark Brown <broonie@kernel.org> - 2015-08-06 13:30 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Michal Suchanek <hramrach@gmail.com> - 2015-08-06 13:50 +0200
Re: [RFC PATCH 1/5] spi: introduce flag for memory mapped read Mark Brown <broonie@kernel.org> - 2015-08-06 18:10 +0200
[RFC PATCH 5/5] ARM: dts: AM4372: Add memory map region entries for qspi Vignesh R <vigneshr@ti.com> - 2015-07-28 10:50 +0200
[RFC PATCH 3/5] mtd: devices: m25p80: set flag to request memory mapped read Vignesh R <vigneshr@ti.com> - 2015-07-28 10:50 +0200
csiph-web