Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756550AbbKEGQy (ORCPT ); Thu, 5 Nov 2015 01:16:54 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:57629 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752726AbbKEGQw (ORCPT ); Thu, 5 Nov 2015 01:16:52 -0500 Subject: Re: [PATCH v2 2/5] spi: spi-ti-qspi: add mmap mode read support To: Mark Brown References: <1446545174-14193-1-git-send-email-vigneshr@ti.com> <1446545174-14193-3-git-send-email-vigneshr@ti.com> <20151104144112.GJ1717@sirena.org.uk> CC: Tony Lindgren , Michal Suchanek , Russell King , , , , , , From: Vignesh R Message-ID: <563AF429.1000406@ti.com> Date: Thu, 5 Nov 2015 11:46:09 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151104144112.GJ1717@sirena.org.uk> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1228 Lines: 33 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/