Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262955

Re: [PATCH v2 2/5] spi: spi-ti-qspi: add mmap mode read support

From Vignesh R <vigneshr@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/5] spi: spi-ti-qspi: add mmap mode read support
Date 2015-11-05 07:20 +0100
Message-ID <qrm3U-2Ut-5@gated-at.bofh.it> (permalink)
References <qqGHo-1jJ-7@gated-at.bofh.it> <qqGHo-1jJ-5@gated-at.bofh.it> <qr7xU-1HX-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 11/04/2015 08:11 PM, Mark Brown wrote:
> On Tue, Nov 03, 2015 at 03:36:11PM +0530, Vignesh R wrote:
> 
>> +	ti_qspi_enable_memory_map(spi);
>> +	ti_qspi_setup_mmap_read(spi, read_opcode, addr_width,
>> +				dummy_bytes);
>> +	memcpy_fromio(buf, qspi->mmap_base + from, len);
>> +	*retlen = len;
>> +	ti_qspi_disable_memory_map(spi);
> 
> We'll be constantly enabling and disabling memory mapping with this.
> I'm not sure that's a meaningful cost given that it doesn't actually
> remap anything but rather just switches hardware modes, we can always
> optimise it later if it is.
> 

Hmm, I will move the ti_qspi_disable_memory_map() call to
ti_qspi_start_transfer_one(), so that mmap mode is disabled only when
normal SPI bus transfer is requested. Further, "mmap_enabled" status
flag can be used to determine whether mode switch is required or not.
This should help to overcome enabling and disabling memory mapping
between successive mmap read requests.

-- 
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 | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 2/5] spi: spi-ti-qspi: add mmap mode read support Vignesh R <vigneshr@ti.com> - 2015-11-03 11:10 +0100
  Re: [PATCH v2 2/5] spi: spi-ti-qspi: add mmap mode read support Mark Brown <broonie@kernel.org> - 2015-11-04 15:50 +0100
    Re: [PATCH v2 2/5] spi: spi-ti-qspi: add mmap mode read support Vignesh R <vigneshr@ti.com> - 2015-11-05 07:20 +0100

csiph-web