Message ID | 1393610017-19329-2-git-send-email-p.marczak@samsung.com |
---|---|
State | Accepted |
Delegated to: | Minkyu Kang |
Headers | show |
Hi Heiko, > Thanks to this multiple call of function dfu_config_entities() > gives continuous dfu alt numbering until call dfu_free_entities(). > > This allows to store dfu entities in multiple variables. Could you test this patch on your boards, which are using DFU? Thanks in advance. > > Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> > Acked-by: Łukasz Majewski <l.majewski@samsung.com> > --- > drivers/dfu/dfu.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c > index 07011e9..56e69fd 100644 > --- a/drivers/dfu/dfu.c > +++ b/drivers/dfu/dfu.c > @@ -19,6 +19,7 @@ > static bool dfu_reset_request; > static LIST_HEAD(dfu_list); > static int dfu_alt_num; > +static int alt_num_cnt; > > bool dfu_reset(void) > { > @@ -377,6 +378,8 @@ void dfu_free_entities(void) > if (t) > free(t); > INIT_LIST_HEAD(&dfu_list); > + > + alt_num_cnt = 0; > } > > int dfu_config_entities(char *env, char *interface, int num) > @@ -394,11 +397,12 @@ int dfu_config_entities(char *env, char > *interface, int num) for (i = 0; i < dfu_alt_num; i++) { > > s = strsep(&env, ";"); > - ret = dfu_fill_entity(&dfu[i], s, i, interface, num); > + ret = dfu_fill_entity(&dfu[i], s, alt_num_cnt, > interface, num); if (ret) > return -1; > > list_add_tail(&dfu[i].list, &dfu_list); > + alt_num_cnt++; > } > > return 0;
Hello Lukasz, Am 04.03.2014 12:33, schrieb Lukasz Majewski: > Hi Heiko, > >> Thanks to this multiple call of function dfu_config_entities() >> gives continuous dfu alt numbering until call dfu_free_entities(). >> >> This allows to store dfu entities in multiple variables. > > Could you test this patch on your boards, which are using DFU? Of course, but not before next week ... bye, Heiko
Hi Heiko, > Hello Lukasz, > > Am 04.03.2014 12:33, schrieb Lukasz Majewski: > > Hi Heiko, > > > >> Thanks to this multiple call of function dfu_config_entities() > >> gives continuous dfu alt numbering until call dfu_free_entities(). > >> > >> This allows to store dfu entities in multiple variables. > > > > Could you test this patch on your boards, which are using DFU? > > Of course, but not before next week ... Ok. Thanks. :-) > > bye, > Heiko
Hello Lukasz, Am 04.03.2014 12:33, schrieb Lukasz Majewski: > Hi Heiko, > >> Thanks to this multiple call of function dfu_config_entities() >> gives continuous dfu alt numbering until call dfu_free_entities(). >> >> This allows to store dfu entities in multiple variables. > > Could you test this patch on your boards, which are using DFU? Done on the dxr2 board. All works as before. > Thanks in advance. > >> >> Signed-off-by: Przemyslaw Marczak<p.marczak@samsung.com> >> Acked-by: Łukasz Majewski<l.majewski@samsung.com> >> --- >> drivers/dfu/dfu.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) Tested on the dxr2 board. Tested-by: Heiko Schocher <hs@denx.de> bye, Heiko
Hi Heiko, > Am 04.03.2014 12:33, schrieb Lukasz Majewski: > > Hi Heiko, > > > >> Thanks to this multiple call of function dfu_config_entities() > >> gives continuous dfu alt numbering until call dfu_free_entities(). > >> > >> This allows to store dfu entities in multiple variables. > > > > Could you test this patch on your boards, which are using DFU? > > Done on the dxr2 board. All works as before. Thanks a lot.
Hi Tom, > Hello Lukasz, > > Am 04.03.2014 12:33, schrieb Lukasz Majewski: > > Hi Heiko, > > > >> Thanks to this multiple call of function dfu_config_entities() > >> gives continuous dfu alt numbering until call dfu_free_entities(). > >> > >> This allows to store dfu entities in multiple variables. > > > > Could you test this patch on your boards, which are using DFU? > > Done on the dxr2 board. All works as before. Tom, could you apply this patch as a fix before v2014.04 is released? http://patchwork.ozlabs.org/patch/325309/ > > > Thanks in advance. > > > >> > >> Signed-off-by: Przemyslaw Marczak<p.marczak@samsung.com> > >> Acked-by: Łukasz Majewski<l.majewski@samsung.com> > >> --- > >> drivers/dfu/dfu.c | 6 +++++- > >> 1 file changed, 5 insertions(+), 1 deletion(-) > > Tested on the dxr2 board. > > Tested-by: Heiko Schocher <hs@denx.de> > > bye, > Heiko
On 12/03/14 17:00, Lukasz Majewski wrote: > Hi Tom, > >> Hello Lukasz, >> >> Am 04.03.2014 12:33, schrieb Lukasz Majewski: >>> Hi Heiko, >>> >>>> Thanks to this multiple call of function dfu_config_entities() >>>> gives continuous dfu alt numbering until call dfu_free_entities(). >>>> >>>> This allows to store dfu entities in multiple variables. >>> >>> Could you test this patch on your boards, which are using DFU? >> >> Done on the dxr2 board. All works as before. > > Tom, could you apply this patch as a fix before v2014.04 is released? > > http://patchwork.ozlabs.org/patch/325309/ > >> >>> Thanks in advance. >>> >>>> >>>> Signed-off-by: Przemyslaw Marczak<p.marczak@samsung.com> >>>> Acked-by: Łukasz Majewski<l.majewski@samsung.com> >>>> --- >>>> drivers/dfu/dfu.c | 6 +++++- >>>> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> Tested on the dxr2 board. >> >> Tested-by: Heiko Schocher <hs@denx.de> >> >> bye, >> Heiko > > > applied to u-boot-samsung. Thanks, Minkyu Kang.
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index 07011e9..56e69fd 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -19,6 +19,7 @@ static bool dfu_reset_request; static LIST_HEAD(dfu_list); static int dfu_alt_num; +static int alt_num_cnt; bool dfu_reset(void) { @@ -377,6 +378,8 @@ void dfu_free_entities(void) if (t) free(t); INIT_LIST_HEAD(&dfu_list); + + alt_num_cnt = 0; } int dfu_config_entities(char *env, char *interface, int num) @@ -394,11 +397,12 @@ int dfu_config_entities(char *env, char *interface, int num) for (i = 0; i < dfu_alt_num; i++) { s = strsep(&env, ";"); - ret = dfu_fill_entity(&dfu[i], s, i, interface, num); + ret = dfu_fill_entity(&dfu[i], s, alt_num_cnt, interface, num); if (ret) return -1; list_add_tail(&dfu[i].list, &dfu_list); + alt_num_cnt++; } return 0;