How to configure "mcu_2_shp" and "shp_2_mcu" generic scripts on Linux for SDMA transfers?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure "mcu_2_shp" and "shp_2_mcu" generic scripts on Linux for SDMA transfers?

931 Views
amanmehta
Contributor I

By reading reference manual I understand that I can use SDMA for eCSPI communication with one of the SPI devices, which further suggests that "mcu_2_shp" and "shp_2_mcu" are the generic scripts to do transfers. I am using Linux kernel 3.14, Please provide guidance to how to configure these scripts (i.e. providing source/destination addresses and other required things)?

Also, I am inclined to write a loadable module for this configuration. Please suggest if any further way around is there. 

Labels (2)
0 Kudos
Reply
2 Replies

776 Views
igorpadykov
NXP Employee
NXP Employee

Hi Aman

for sdma usage one can look at SDK examples

Github SDK
https://github.com/backenklee/swp-report/tree/master/iMX6_Platform_SDK

unfortunately sdma scripts provided in nxp linux bsps are not documented, may be useful to check

Freescale i.MX SDMA tutorial (part I) 


Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

776 Views
amanmehta
Contributor I

Thank you for your reply igorpadykov‌ these examples were helpful to understand the implementation.

Being very new to all this implementation details it took some time for me to go through all this. I understand that Freescale has given driver for SDMA engine(imx-sdma.c) and also for SPI subsystem(spi-imx.c). Further digging down tells me that while probing the spi_imx_probe call in spi-imx.c fails with " dma setup error,use pio instead" kmesg log the reason behind this message is failure in spi_imx_sdma_init function while calling dma_request_slave_channel() which is function of dmaengine.c. I am using the SPI devices using spidev.c(which i assume is protocol driver) Looking forward for in this for you help.

Also, while going through SPI subsystem I understand that (please correct me if I am wrong) SPI subsystem comprises of two drivers controller and protocol driver.In current implementation what is what among spi-imx.c and spidev.c and for better understanding if you could shed some light on how these two are interlinked will be very helpful.

0 Kudos
Reply