Some musb Blackfin porting issues
Dear David and Tony:
I almost imported the musb stack to our Blackfin tree. But there are some code highly coupled with ARM Linux architecture. Please give me some idea about following issues:
1. Clock framework is not available in Blackfin Linux arch currently. Is it possible to skip it?
2. Registers layout in musb-regs.h is different with BF54x processor. I plan to write a musb-bf54x.h to replace the whole definition in musb-regs.h. Is that possible or do it conflict with current musb design?
in musb-regs.h:
---
#ifdef CONFIG_BF54x
#include "musb-bf54x.h"
#else
..... /* original code from musb-regs.h */
#endif
--
Thanks a lot
- Bryan Wu
Quoted 8 lines · Bryan Wu
Dear David and Tony:
I almost imported the musb stack to our Blackfin tree. But there are some code highly coupled with ARM Linux architecture. Please give me some idea about following issues:
1. Clock framework is not available in Blackfin Linux arch currently. Is it possible to skip it?
Yes, you can have custom clock enable/disable functions, see tusb_set_clock() in arch/arm/mach-omap2/board-n800-usb.c.
Quoted 4 lines
2. Registers layout in
musb-regs.his different with BF54x processor. I plan to write amusb-bf54x.hto replace the whole definition inmusb-regs.h. Is that possible or do it conflict with current musb design?
Quoted 8 lines
in
musb-regs.h:
---
#ifdefCONFIG_BF54x
#include "musb-bf54x.h"
#else
..... /* original code frommusb-regs.h*/
#endif
--
I guess that's the way to go for now to get things working. Dave?
Tony
Quoted 9 lines
Quoted 6 lines
I almost imported the musb stack to our Blackfin tree. But there are some code highly coupled with ARM Linux architecture. Please give me some idea about following issues:
1. Clock framework is not available in Blackfin Linux arch currently. Is it possible to skip it?
Yes, you can have custom clock enable/disable functions, see
tusb_set_clock()inarch/arm/mach-omap2/board-n800-usb.c.
One minor issue would then be needing stub implementations of the clk_*() functions so the driver can link. The same issue comes up on x86 builds, which would be good to allow as part of routine build tests.
Maybe you can just provide a set of inlined NOP clock stubs in the musb code that would be included as needed. I'd suggest you avoid trying to solve that general cross-arch problem, at least initially.
Quoted 13 lines
Quoted 4 lines
2. Registers layout in
musb-regs.his different with BF54x processor. I plan to write amusb-bf54x.hto replace the whole definition inmusb-regs.h. Is that possible or do it conflict with current musb design?Quoted 8 lines
in
musb-regs.h:
---
#ifdefCONFIG_BF54x
#include "musb-bf54x.h"
#else
..... /* original code frommusb-regs.h*/
#endif
--
Quoted 1 line
I guess that's the way to go for now to get things working. Dave?
Something like that, sure. But I'd like it better if it were more like two different #include files, one for Blackfin and one for the standard register layouts (matching Mentor specs).
Are those registers the same widths? If the differences go beyond just addressing, I'd forsee trouble ahead.
- Dave