From: R, Vignesh <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot RESEND v2 09/10] spi: ti_qspi: Use DMA to read from qspi flash
Date: Mon, 17 Aug 2015 13:52:14 +0530 [thread overview]
Message-ID: <55D199B6.9070901@ti.com> (raw)
In-Reply-To: <CAD6G_RSXf93ixVcQak-not9LL6EJoWysSL-_HLXXchd6cwgRwg@mail.gmail.com>
On 8/17/2015 1:48 PM, Jagan Teki wrote:
> On 17 August 2015 at 13:29, Vignesh R <vigneshr@ti.com> wrote:
>> ti_qspi uses memory map mode for faster read. Enabling DMA will increase
>> read speed by 3x @48MHz on DRA74 EVM.
>>
>> Signed-off-by: Vignesh R <vigneshr@ti.com>
>> Reviewed-by: Jagan Teki <jteki@openedev.com>
>> ---
>> drivers/spi/ti_qspi.c | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
>>
>> diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
>> index 3356c0f072e5..753d68980bd6 100644
>> --- a/drivers/spi/ti_qspi.c
>> +++ b/drivers/spi/ti_qspi.c
>> @@ -13,6 +13,8 @@
>> #include <spi.h>
>> #include <asm/gpio.h>
>> #include <asm/omap_gpio.h>
>> +#include <asm/omap_common.h>
>> +#include <asm/ti-common/ti-edma3.h>
>>
>> /* ti qpsi register bit masks */
>> #define QSPI_TIMEOUT 2000000
>> @@ -347,3 +349,24 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
>>
>> return 0;
>> }
> Please add below comment here, I have asked the same on previous version patch
> this will track us to the work future.
>
> /* TODO: control from sf layer to here through dm-spi */
Oops.. Sorry, I overlooked it.. Will add the comment and send it soon.
Thanks!
>> +#ifdef CONFIG_TI_EDMA3
>> +void spi_flash_copy_mmap(void *data, void *offset, size_t len)
>> +{
>> + unsigned int addr = (unsigned int) (data);
>> + unsigned int edma_slot_num = 1;
>> +
>> + /* Invalidate the area, so no writeback into the RAM races with DMA */
>> + invalidate_dcache_range(addr, addr + roundup(len, ARCH_DMA_MINALIGN));
>> +
>> + /* enable edma3 clocks */
>> + enable_edma3_clocks();
>> +
>> + /* Call edma3 api to do actual DMA transfer */
>> + edma3_transfer(EDMA3_BASE, edma_slot_num, data, offset, len);
>> +
>> + /* disable edma3 clocks */
>> + disable_edma3_clocks();
>> +
>> + *((unsigned int *)offset) += len;
>> +}
>> +#endif
>> --
>> 2.5.0
>
> thanks!
>
next prev parent reply other threads:[~2015-08-17 8:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-17 7:59 [U-Boot] [U-Boot RESEND v2 00/10] Enable edma support for ti-qspi Vignesh R
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 01/10] sf: allocate cache aligned buffers to copy from flash Vignesh R
2015-08-17 17:19 ` Jagan Teki
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 02/10] env: use cache line aligned memory for flash read Vignesh R
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 03/10] ARM: AM43xx: Add support for disabling clocks in uboot Vignesh R
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 04/10] ARM: OMAP5: " Vignesh R
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 05/10] ARM: OMAP5: Add functions to enable and disable EDMA3 clocks Vignesh R
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 06/10] ARM: AM43XX: " Vignesh R
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 07/10] sf: ops: Add spi_flash_copy_mmap function Vignesh R
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 08/10] dma: ti-edma3: Add helper function to support edma3 transfer Vignesh R
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 09/10] spi: ti_qspi: Use DMA to read from qspi flash Vignesh R
2015-08-17 8:18 ` Jagan Teki
2015-08-17 8:22 ` R, Vignesh [this message]
2015-08-17 9:50 ` Vignesh R
2015-08-17 7:59 ` [U-Boot] [U-Boot RESEND v2 10/10] ARM: dra7xx_evm: Enable EDMA3 in SPL to support DMA on qspi Vignesh R
2015-08-17 18:02 ` [U-Boot] [U-Boot RESEND v2 00/10] Enable edma support for ti-qspi Jagan Teki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55D199B6.9070901@ti.com \
--to=vigneshr@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.