[U-Boot] [PATCH v2 0/4] DFU implementation for Atmel SAM9G45

Marcel Janssen korgull at home.nl
Sun Feb 13 22:52:09 CET 2011


From: Marcel <korgull at 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

-- 
1.7.3.4



More information about the U-Boot mailing list