[U-Boot] [PATCH v2 4/4] updates for DFU and atmel usba udc

Marcel Janssen korgull at home.nl
Tue Feb 15 20:20:58 CET 2011


On Tuesday, February 15, 2011 07:43:34 pm Remy Bohmer wrote:
> Hi,
> 
> 2011/2/13 Marcel Janssen <korgull at home.nl>:
> > From: Marcel <korgull at home.nl>
> > 
> > Signed-off-by: Marcel <korgull at home.nl>
> > ---
> >  arch/arm/cpu/arm926ejs/at91/led.c   |  119
> > +++++++++++++++++++++++++++++++++-
> 
> Why is this part if this patch?
> It does not seem to be related to USB stuff. Please make it a seperate
> patch.

I optionally use the LED's in DFU mode so that there's interaction while 
upgrading the board. You might believe the host could handle this, but I like 
the device to indicate activity as well.
Somehow I couldn't get it working without changing led.c I think, but I may 
have missed something.

> >  common/Makefile                     |    1 +
> >  common/update_dfu.c                 |    2 -
> >  drivers/usb/gadget/atmel_usba_udc.c |    8 +-
> >  drivers/usb/gadget/usbdfu.c         |   14 +++--
> >  5 files changed, 128 insertions(+), 16 deletions(-)
> > 
> > diff --git a/arch/arm/cpu/arm926ejs/at91/led.c
> > b/arch/arm/cpu/arm926ejs/at91/led.c index 0a315c4..0638a2e 100644
> > --- a/arch/arm/cpu/arm926ejs/at91/led.c
> > +++ b/arch/arm/cpu/arm926ejs/at91/led.c
> > @@ -28,38 +28,149 @@
> >  #include <asm/arch/gpio.h>
> >  #include <asm/arch/io.h>
> > 
> > +static unsigned int saved_state[4] = {STATUS_LED_OFF, STATUS_LED_OFF,
> > +               STATUS_LED_OFF, STATUS_LED_OFF};
> > +
> > +void coloured_LED_init(void)
> > +{
> > +       /* Enable clock */
> > +       at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9G45_ID_PIODE);
> 
> at91_sys_write is deprecated, please use register access by struct

Already noticed that.

> Why is modification of the generic at91 led code required? It is not clear.
> 
> Please, only make a patch series with only USB-DFU stuff in it, drop
> the add-board code from this series. The board code is not acceptable
> for mainstream since it does not follow the new
> u-boot-atmel->rework110202 tree style of adding at91 boards. It will
> take you a huge amount of effort to make it suitable.
> Further, both parts of the patch series are not related and you are
> now creating a link between the Atmel tree and the USB tree, which
> makes it even more difficult.

I'm actually busy fixing the board code for u-boot-atmel->rework110202

Most of it is working so I hope I can create the patches as you like them.

best regards,
Marcel













More information about the U-Boot mailing list