On Saturday 05 October 2013 01:36 AM, Jagan Teki wrote:
Please use the commit msg head as "sf: .."
Ok.
On Fri, Oct 4, 2013 at 8:21 PM, Sourav Poddar<sourav.pod...@ti.com>  wrote:
Qspi controller can have a memory mapped port which can be used for
data read. Added support to enable memory mapped port read.

This patch enables the following:
- It enables exchange of memory map address between mtd and qspi
through the introduction of "memory_map" flag.
- Add support to communicate to the driver that memory mapped
  transfer is to be started through introduction of new flags like
"SPI_XFER_MEM_MAP" and "SPI_XFER_MEM_MAP_END".

This will enable the spi controller to do memory mapped configurations
if required.

Signed-off-by: Sourav Poddar<sourav.pod...@ti.com>
---
  drivers/mtd/spi/sf_ops.c   |    2 ++
  drivers/mtd/spi/sf_probe.c |    1 +
  include/spi.h              |    3 +++
  3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c
index c009af5..bee4128 100644
--- a/drivers/mtd/spi/sf_ops.c
+++ b/drivers/mtd/spi/sf_ops.c
@@ -269,7 +269,9 @@ int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 
offset,

         /* Handle memory-mapped SPI */
         if (flash->memory_map) {
+               spi_xfer(flash->spi, 0, NULL, NULL, SPI_XFER_MEM_MAP);
                 memcpy(data, flash->memory_map + offset, len);
+               spi_xfer(flash->spi, 0, NULL, NULL, SPI_XFER_MEM_MAP);
Is it correct, can you check it once.
where is SPI_XFER_MEM_MAP_END used?
It will be used in the driver. check 4/6 patch of this series.
Looks like you have used mem-map for only reads is it? if so where is
SPI_XFER_BEGIN is using?
Yes, only memory mapped read is supported.

Ideally, we dont need BEGIN flag for memory mapped cases. I have explained a bit
more on your similar comment on patch 4/6.
Please use _MMAP instead of _MEM_MAP for simple naming convention.

OK.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to