MUSB: CPPI 4.1 DMA driver (take 4)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Quoted 14 lines
-----Original Message-----
From: Sergei Shtylyov [mailto:sshtylyov at ru.mvista.com]
Sent: Wednesday, October 28, 2009 8:24 PM
To: Gupta, Ajay Kumar
Cc: linux-usb at vger.kernel.org; davinci-linux-open- source at linux.davincidsp.com; stanley.miao; Hilman, Kevin; david- b at pacbell.net; Subbrathnam, Swaminathan; linux-arm- kernel at lists.infradead.org
Subject: Re: [PATCH RFC 1/2] MUSB: CPPI 4.1 DMA driver (take 4)Hello.
Gupta, Ajay Kumar wrote:
Quoted 7 lines
Quoted 3 lines
Sergei,
Is there any other update to this patch ?
The last was take 5 from August 21th:
Thanks, I will check this one.
Quoted 11 lines
Quoted 2 lines
We have some patches on top of your base version.
Interesting...
Quoted 2 lines
Kevin and David,
There is another TI platform AM3517 which also has same CPPI41 DMA. Soeven this platform has to use same CPPI41 files but there is an issue on using cppi4.1 core engine (
cppi41.cfile atarch/arm/mach-XXX).Are you going to push the AM3517 support upstream?
Currently AM3517 base port patches are being submitted. Once they are done, and cppi4.1 core dependency is cleared then I plan to submit patches on top of your latest version (take 5).
-Ajay
Quoted 9 lines
Quoted 2 lines
Can we move this cppi41 core part to some
arch/arm/commonplace so thatboth da8xx and Am3517 can use it ? Or is there any other option ?
Adding linux-arm-kernel list to the loop as well...
Quoted 1 line
-Ajay
WBR, Sergei
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Quoted 27 lines
-----Original Message-----
From: linux-usb-owner at vger.kernel.org [mailto:linux-usb- owner at vger.kernel.org] On Behalf Of Gupta, Ajay Kumar
Sent: Wednesday, October 28, 2009 8:48 PM
To: Sergei Shtylyov
Cc: linux-usb at vger.kernel.org; davinci-linux-open- source at linux.davincidsp.com; stanley.miao; Hilman, Kevin; david- b at pacbell.net; Subbrathnam, Swaminathan; linux-arm- kernel at lists.infradead.org
Subject: RE: [PATCH RFC 1/2] MUSB: CPPI 4.1 DMA driver (take 4)Quoted 16 lines
-----Original Message-----
From: Sergei Shtylyov [mailto:sshtylyov at ru.mvista.com]
Sent: Wednesday, October 28, 2009 8:24 PM
To: Gupta, Ajay Kumar
Cc: linux-usb at vger.kernel.org; davinci-linux-open- source at linux.davincidsp.com; stanley.miao; Hilman, Kevin; david- b at pacbell.net; Subbrathnam, Swaminathan; linux-arm- kernel at lists.infradead.org
Subject: Re: [PATCH RFC 1/2] MUSB: CPPI 4.1 DMA driver (take 4)Hello.
Quoted 1 line · Ajay Kumar
Sergei,
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Is there any other update to this patch ?
The last was take 5 from August 21th:
Thanks, I will check this one.
Sergei,
How about cppi41 core? I could see only one post on that while searching davinci list. Did it get merged to any tree?
Is there any updated patch on cppi4.1 core also?
Quoted 17 lines
Quoted 4 lines
Quoted 3 lines
We have some patches on top of your base version.
Quoted 8 lines
Interesting...
Quoted 2 lines
Kevin and David,
There is another TI platform AM3517 which also has same CPPI41 DMA. Soeven this platform has to use same CPPI41 files but there is an issue on using cppi4.1 core engine (
cppi41.cfile atarch/arm/mach-XXX).Are you going to push the AM3517 support upstream?
Currently AM3517 base port patches are being submitted. Once they are done, and cppi4.1 core dependency is cleared then I plan to submit patches on top of your latest version (take 5).
Quoted 7 lines
-Ajay
Quoted 1 line
Can we move this cppi41 core part to some
arch/arm/commonplace so that both da8xx and Am3517 can use it ? Or is there any other option ?Quoted 2 lines
Adding linux-arm-kernel list to the loop as well...
Any comment on this?
Another option is to create arch/arm/ti-common to place all TI platform's common software, such as CPPI4.1 used both in DA8xx and AM3517.
-Ajay
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
-Ajay
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Quoted 1 line · Ajay Kumar
Is there any updated patch on cppi4.1 core also?
Is there _any_ cppi4.1 core patch anywhere? Not according to google.
Quoted 2 lines
Another option is to create
arch/arm/ti-commonto place all TI platform's common software, such as CPPI4.1 used both in DA8xx and AM3517.
No thanks. I really don't see why we should allow TI to have yet more directories scattered throughout the tree that are out of place with existing conventions.
And what is this CPPI thing anyway?
http://acronyms.thefreedictionary.com/CPPI
"Communications Port Programming Interface" seems to be about the best applicable one from that list!
If it's a USB DMA device (from the patches I can find, that seems to be the case) then why can't it live in drivers/usb or drivers/dma ?
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Quoted 4 lines · Ajay Kumar
Quoted 1 line
Is there any updated patch on cppi4.1 core also?
Is there _any_ cppi4.1 core patch anywhere? Not according to google.
Russell,
Here is the latest version of cppi4.1 core.
http://patchwork.kernel.org/patch/46698/
Quoted 8 lines
Quoted 1 line
Another option is to create
arch/arm/ti-commonto place all TIplatform's
Quoted 1 line
common software, such as CPPI4.1 used both in DA8xx and AM3517.
No thanks. I really don't see why we should allow TI to have yet more directories scattered throughout the tree that are out of place with existing conventions.
Quoted 6 lines
And what is this CPPI thing anyway?
http://acronyms.thefreedictionary.com/CPPI
"Communications Port Programming Interface" seems to be about the best applicable one from that list!
Yes, this is the correct one.
Quoted 2 lines
If it's a USB DMA device (from the patches I can find, that seems to be the case) then why can't it live in
drivers/usbordrivers/dma?
CPPI4.1 DMA engine can be used either by USB or by Ethernet interface though currently only USB is using it but in future even Ethernet devices may use it.
Infact, there is a TI platform (not in mainline), where both USB and Ethernet interface is using CPPI4.1 DMA.
Regards,
Ajay
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Quoted 28 lines · Ajay Kumar
Quoted 4 lines · Ajay Kumar
Quoted 1 line
Is there any updated patch on cppi4.1 core also?
Is there _any_ cppi4.1 core patch anywhere? Not according to google.
Russell,
Here is the latest version of cppi4.1 core.
http://patchwork.kernel.org/patch/46698/Quoted 8 lines
Quoted 1 line
Another option is to create
arch/arm/ti-commonto place all TIplatform's
Quoted 1 line
common software, such as CPPI4.1 used both in DA8xx and AM3517.
No thanks. I really don't see why we should allow TI to have yet more directories scattered throughout the tree that are out of place with existing conventions.
Quoted 6 lines
And what is this CPPI thing anyway?
http://acronyms.thefreedictionary.com/CPPI
"Communications Port Programming Interface" seems to be about the best applicable one from that list!
Yes, this is the correct one.
Quoted 7 lines
Quoted 2 lines
If it's a USB DMA device (from the patches I can find, that seems to be the case) then why can't it live in
drivers/usbordrivers/dma?CPPI4.1 DMA engine can be used either by USB or by Ethernet interface though currently only USB is using it but in future even Ethernet devices may use it.
Infact, there is a TI platform (not in mainline), where both USB and Ethernet interface is using CPPI4.1 DMA.
you might want to provide support for it via drivers/dma and for the musb stuff, you just add the wrappers musb uses. See how tusb6010_omap.c uses OMAP's system dma which is also used by any other driver which requests a dma channel.
Signature · 1 line
balbi
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
If it's a USB DMA device (from the patches I can find, that seems to
be
Quoted 3 lines
Quoted 1 line
the case) then why can't it live in
drivers/usbordrivers/dma?CPPI4.1 DMA engine can be used either by USB or by Ethernet interface
though
Quoted 1 line
currently only USB is using it but in future even Ethernet devices may
use it.
Quoted 1 line
Quoted 7 lines
Quoted 1 line
Infact, there is a TI platform (not in mainline), where both USB and
Ethernet interface is using CPPI4.1 DMA.
you might want to provide support for it via
drivers/dmaand for the musb stuff, you just add the wrappers musb uses. See howtusb6010_omap.cuses OMAP's system dma which is also used by any other driver which requests a dma channel.
Sounds good.
So if we want to move CPPI4.1 DMA core to drivers/dma then it has to follow standard set of DMA APIs (right?), which I afraid, may not be done in current implementation.
Regards,
Ajay
Quoted 2 lines
--
balbi
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Quoted 18 lines · Ajay Kumar
Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
If it's a USB DMA device (from the patches I can find, that seems to
be
Quoted 3 lines
Quoted 1 line
the case) then why can't it live in
drivers/usbordrivers/dma?CPPI4.1 DMA engine can be used either by USB or by Ethernet interface
though
Quoted 1 line
currently only USB is using it but in future even Ethernet devices may
use it.
Quoted 1 line
Quoted 7 lines
Quoted 1 line
Infact, there is a TI platform (not in mainline), where both USB and
Ethernet interface is using CPPI4.1 DMA.
you might want to provide support for it via
drivers/dmaand for the musb stuff, you just add the wrappers musb uses. See howtusb6010_omap.cuses OMAP's system dma which is also used by any other driver which requests a dma channel.
Quoted 4 lines
Sounds good.
So if we want to move CPPI4.1 DMA core to
drivers/dmathen it has to follow standard set of DMA APIs (right?), which I afraid, may not be done in current implementation.
yes, if it's not done right now, it has to be done.
Signature · 1 line
balbi
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
In reply to Gupta, Ajay KumarQuoted 9 lines · Ajay Kumar
Quoted 4 lines · Ajay Kumar
Quoted 1 line
Is there any updated patch on cppi4.1 core also?
Is there _any_ cppi4.1 core patch anywhere? Not according to google.
Russell,
Here is the latest version of cppi4.1 core.
http://patchwork.kernel.org/patch/46698/
A few points come up about this.
1. alloc_queue() - this is a find_next_zero_bit loop coupled with a check for the excluded bitmap.
end = start + count;
do {
bit = find_next_zero_bit(allocated, end, start);
if (bit >= end)
return -ENOSPC;
start = bit + 1;
} while (test_bit(bit, excluded));
__set_bit(bit, allocated);
return bit;Note that 'allocated' and 'excluded' both need to be arrays of unsigned long.
2. alloc_queue() again - it looks to me like the existing implementation is racy - who ensures that we don't have two people searching and allocating the same bit? A solution to that without adding locking would be:
end = start + count;
do {
bit = find_next_zero_bit(allocated, end, start);
if (bit >= end)
return -ENOSPC;
start = bit + 1;
} while (test_bit(bit, excluded) || test_and_set_bit(bit, allocated));
return bit;3. linking_ram - cppi41_queue_mgr_init() seems to be the only user. I don't see why linking_ram would be necessary.
4. debugging printks via pr_debug() please (and define DEBUG at the top of the file to enable debugging.)
Quoted 5 lines
Quoted 2 lines
If it's a USB DMA device (from the patches I can find, that seems to be the case) then why can't it live in
drivers/usbordrivers/dma?CPPI4.1 DMA engine can be used either by USB or by Ethernet interface though currently only USB is using it but in future even Ethernet devices may use it.
drivers/dma does seem to be the right place for this.
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Quoted 38 lines
Quoted 2 lines
Here is the latest version of cppi4.1 core.
http://patchwork.kernel.org/patch/46698/A few points come up about this.
1.
alloc_queue()- this is afind_next_zero_bitloop coupled with a check for the excluded bitmap.end = start + count; do { bit = find_next_zero_bit(allocated, end, start); if (bit >= end) return -ENOSPC; start = bit + 1; } while (test_bit(bit, excluded)); __set_bit(bit, allocated); return bit;Note that 'allocated' and 'excluded' both need to be arrays of unsigned long.
2.
alloc_queue()again - it looks to me like the existing implementation is racy - who ensures that we don't have two people searching and allocating the same bit? A solution to that without adding locking would be:end = start + count; do { bit = find_next_zero_bit(allocated, end, start); if (bit >= end) return -ENOSPC; start = bit + 1; } while (test_bit(bit, excluded) || test_and_set_bit(bit, allocated)); return bit;
Quoted 5 lines
3.
linking_ram-cppi41_queue_mgr_init()seems to be the only user. I don't see whylinking_ramwould be necessary.4. debugging printks via
pr_debug()please (and define DEBUG at the top of the file to enable debugging.)
Thanks for the review and valuable comments.
As we have to change the current implementation in accordance with standard DMA APIs, we will take above comments and post it in next RFC.
Regards,
Ajay
Quoted 10 lines
Quoted 1 line
Quoted 1 line
If it's a USB DMA device (from the patches I can find, that seems to
be
Quoted 3 lines
Quoted 1 line
the case) then why can't it live in
drivers/usbordrivers/dma?CPPI4.1 DMA engine can be used either by USB or by Ethernet interface
though
Quoted 1 line
currently only USB is using it but in future even Ethernet devices may
use it.
drivers/dmadoes seem to be the right place for this.
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Quoted 11 lines
Quoted 4 lines
3.
linking_ram-cppi41_queue_mgr_init()seems to be the only user. I don't see whylinking_ramwould be necessary.4. debugging printks via
pr_debug()please (and define DEBUG at the topof
Quoted 1 line
the file to enable debugging.)
Thanks for the review and valuable comments.
As we have to change the current implementation in accordance with standard DMA APIs, we will take above comments and post it in next RFC.
Sergei,
Any comment on this?
Regards,
Ajay
Quoted 15 lines
Quoted 10 lines
Quoted 1 line
Quoted 1 line
If it's a USB DMA device (from the patches I can find, that seems to
be
Quoted 3 lines
Quoted 1 line
the case) then why can't it live in
drivers/usbordrivers/dma?CPPI4.1 DMA engine can be used either by USB or by Ethernet interface
though
Quoted 1 line
currently only USB is using it but in future even Ethernet devices may
use it.
drivers/dmadoes seem to be the right place for this._______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source at linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
A message that is not in the archive (sent off-list or not yet received): [email protected]
RFC PATCH 1/2 MUSB: CPPI 4.1 DMA driver (take 4)
Sergei,
Another option is to have the cppi-generic code reside in the musb directory itself. We do not have other peripherals such as Ethernet using cppi4.1 infrastructure in the near future. Given this I think it will be better to locate this code in the "drivers/usb/musb" directory itself and decide on any relocation later if the need arises (which I feel is remote).
regards
swami
________________________________________
From: Sergei Shtylyov [sshtylyov at ru.mvista.com]
Sent: Friday, November 27, 2009 1:00 AM
To: Russell King - ARM Linux
Cc: Gupta, Ajay Kumar; Hilman, Kevin; davinci-linux-open-source at linux.davincidsp.com; linux-usb at vger.kernel.org; david-b at pacbell.net; stanley.miao; Subbrathnam, Swaminathan; linux-arm-kernel at lists.infradead.org; dan.j.williams at intel.com; maciej.sosnowski at intel.com
Subject: Re: [PATCH RFC 1/2] MUSB: CPPI 4.1 DMA driver (take 4)
Hello.
Quoted 8 lines · Russell King - ARM Linux
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Is there any updated patch on cppi4.1 core also?
Is there _any_ cppi4.1 core patch anywhere? Not according to google.
Russell,
Here is the latest version of cppi4.1 core.
http://patchwork.kernel.org/patch/46698/
[...]
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
If it's a USB DMA device (from the patches I can find, that seems to be the case) then why can't it live in
drivers/usbordrivers/dma?CPPI4.1 DMA engine can be used either by USB or by Ethernet interface though currently only USB is using it but in future even Ethernet devices may use it.
drivers/dmadoes seem to be the right place for this.
Russell, it makes me wonder why drivers/dma/ seemed the right place to
you, just because of the name? :-)
After spending some time on studying the infrastructure there I came to
conclusion that this is not the right place because all the controllers supported there have features like memory-to-memory transfers or even RAID function offloading -- which CPPI 4.1 totally lacks (it's there purely to serve the peripherals).
Adding drivers/dma/ people to this discussion in hopes they can correct
me (or support me :-)...
WBR, Sergei