Thank you for responding Peter,
Raghavendra wrote:
I have a query regarding DMA(Direct Memory Access) for the usb devices.
USB devices never do DMA.
As far as Linux is concerned, how the DMA action being taking place for
USB devices.
It doesn't take place.
As per my understanding, the USB host controller is taking care of
the DMA operations.
That's correct. When an URB is submitted by host software the host
controller asks the device for data, and when data arrives from the
device the host controller writes the data into memory using DMA.
As I understand, the USB host controllers(on x86) are basically PCI
devices and PCI devices are capable of bus mastering, thus performing DMA.
But, if we take the case of a non x86 platform (say ARM), the USB host
controller may or may not be capable of performing DMA. In that case how
far the cases are valid if we try to push the data from the USB device
through DMA
For example, if we take the case of a simple USB mouse
driver(usbmouse.c), it uses DMA to obtain the data. What if this driver
is associated with a host controller which doesn’t have the support for
DMA. What will happen in that scenario?
Is there any mechanism to check that?
But I require a little more insight into it.
I recommend to study chapters 5 and 8 of the USB 2.0 specification:
http://www.usb.org/developers/docs/usb_20_070113.zip
Further more, if it is possible for the USB devices, then can this
support be also extended towards low-end protocols such as I2C or SPI?
Not in the general case. It is possible to develop an I²C or SPI bus
master which is capable of DMA toward the host memory, and to create
a protocol on top of I²C or SPI which allows devices to remote control
the DMA engine in the master, but I'd say that's quite an artificial case.
//Peter
-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html