Hi, I hope this one gets through correctly.
I know it's know what optimal as it should apply to the current 'work' but I had some issues doing that and no time to find out what the issue is. If possible, please apply to cdc-at91 If not, than I will be reviewing it in a couple of months I guess. The code I send is compiling in cdc-at91 branch and working well for my board and should work as well for at91_udc boards I think. If anyone likes to help out on this, please go ahead ! btw, thanks again to all people who already helped. I perhaps have a few hours left this week to work on this, but no more than that. I hope for someone to take over from me at this point. Best regards, Marcel > From: Marcel <korg...@home.nl> > > These patches apply to u-boot-usb, cdc-at91 branch. > They contain a working implementation of USB DFU. > Most is documented in README.dfu. > > A little background on the implementation : > The controller code (atmel_usba_udc) should also work with the gadget > ethernet driver. I tested it a couple of weeks ago to be fully functional. > However, haven't used this driver since, as I focussed on getting DFU to > work. > > I included some verdor specific command in the DFU code. This is purely > ment as an example where to add such code. However, it is a usefull > example so I left it in the code. > Further, my original code relies on the use of the GPBR to write to from > Linux. This code has not been included in the patches yet because of lack > of time. I can however send it in later this week perhaps. It's basic > purpose is just to reboot from Linux and let u-boot know what to do (wait > for a DFU download). U-boot than read the GPBR register and acts depending > on it's value, meaning either wait for TFTP action or DFU action. > > The patches have been checked by checkpatch and produce a few warnings > (so do some other files already in git). I currently don't have the time > to fix them, but hope someone else can work on this. If not, I will pick > up on this in a couple of weeks/months. Sorry guys, did my best to fix them > all, but some slipped. > > This week I'm still available for comments on the above mail address. > After that I can't use the above email for the next couple of weeks/months > and also won't be reading the mailing list. If anyone needs my help, please > see below for my email address. > > I'm very sorry if I didn't comply to all suggested changes. I tried, but > time is my biggest enemy in this. I rather post something that works for me > than post nothing as I may not be able to post for the next couple of > months. Since the cdc-at91 brach is not mainstream, I guess it would be ok > to apply these patches so that they can be used and fixed by anyone who > likes it. > > Unfortunately some last minute fixed in the last patch, but this shoudn't > be a big issue I think. I did work off-tree for my impementation which > caused this. > > The current patches have been checked to compile and work for my board. > > Best regards, > Marcel (marcel_dot_janssen_at_admesy_dot_nl) > > > Marcel (4): > Add Atmel USBA UDC > USB DFU driver added > Add In-Circuit sam9g45_oem board > updates for DFU and atmel usba udc > > arch/arm/cpu/arm926ejs/at91/led.c | 119 +++- > board/in-circuit/icnova/Makefile | 50 + > board/in-circuit/icnova/icnova_sam9g45.c | 242 +++++ > boards.cfg | 1 + > common/Makefile | 1 + > common/update_dfu.c | 87 ++ > doc/README.dfu | 129 +++ > drivers/usb/gadget/Makefile | 10 + > drivers/usb/gadget/atmel_usba_udc.c | 1438 > ++++++++++++++++++++++++++++++ drivers/usb/gadget/usbdfu.c | > 1338 +++++++++++++++++++++++++++ include/configs/icnova_sam9g45.h > | 253 ++++++ > include/usb/atmel_usba_udc.h | 398 +++++++++ > include/usb_dfu.h | 128 +++ > include/usb_dfu_descriptors.h | 100 ++ > 14 files changed, 4290 insertions(+), 4 deletions(-) > create mode 100644 board/in-circuit/icnova/Makefile > create mode 100644 board/in-circuit/icnova/icnova_sam9g45.c > create mode 100644 common/update_dfu.c > create mode 100644 doc/README.dfu > create mode 100644 drivers/usb/gadget/atmel_usba_udc.c > create mode 100644 drivers/usb/gadget/usbdfu.c > create mode 100644 include/configs/icnova_sam9g45.h > create mode 100644 include/usb/atmel_usba_udc.h > create mode 100644 include/usb_dfu.h > create mode 100644 include/usb_dfu_descriptors.h _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot