Re: [U-Boot] SPI flash writing

2012-03-14 Thread Gerlando Falauto
2012 14:25:07 Gerlando Falauto wrote: 2) an out-of-boundary-check againts the flash size so at least a warning is issued when you use too big a size value i'm not sure about this. if you want to do size checking, then enable the hush shell and do it in a script. Is there a programatic way

Re: [U-Boot] SPI flash writing

2012-03-14 Thread Gerlando Falauto
On 03/14/2012 03:18 AM, Simon Glass wrote: Hi Gerlando, On Tue, Mar 13, 2012 at 11:25 AM, Gerlando Falauto gerlando.fala...@keymile.com wrote: Hi everyone, [I took the liberty to Cc: Mike and Simon as they have provided patches in the area] I struggled for a while trying to update

[U-Boot] SPI flash writing

2012-03-13 Thread Gerlando Falauto
Hi everyone, [I took the liberty to Cc: Mike and Simon as they have provided patches in the area] I struggled for a while trying to update a Kirkwood-based board to the latest u-boot (with Keymile's patches). As it turned out, our update procedure: sf probe 0;sf erase 0 5;sf write

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-12 Thread Gerlando Falauto
On 12/07/2011 11:02 PM, Simon Glass wrote: [...] /* - * Set a new environment variable, - * or replace or delete an existing one. + * Performs consistency checking before setting, replacing, + * or deleting an environment variable, then (if successful) + * apply the changes to internals so to

Re: [U-Boot] [PATCH v2 2/3] env: check and apply changes on delete/destroy

2011-12-12 Thread Gerlando Falauto
On 12/07/2011 11:02 PM, Simon Glass wrote: diff --git a/include/search.h b/include/search.h index 2a59e03..7ad4261 100644 --- a/include/search.h +++ b/include/search.h @@ -142,7 +142,8 @@ int hcreate_r(size_t nel, struct hsearch_data *htab) * be freed and the local static variable can be

Re: [U-Boot] [PATCH v2 3/3] env: make env default selective, check and apply

2011-12-12 Thread Gerlando Falauto
On 12/07/2011 11:02 PM, Simon Glass wrote: Hi Gerlando, [...] diff --git a/include/environment.h b/include/environment.h index 3a3e6b8..8f0d4db 100644 --- a/include/environment.h +++ b/include/environment.h @@ -190,6 +190,11 @@ void env_crc_update(void); /* [re]set to the default

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-12 Thread Gerlando Falauto
On 12/12/2011 01:18 PM, Wolfgang Denk wrote: Dear Gerlando Falauto, I think it's easier to read it the original way, and it should not make any difference as far as code size is concerned. The Coding Style makes an explicit exception regarding the line length for user visible strings: 83

Re: [U-Boot] [PATCH v2 2/3] env: check and apply changes on delete/destroy

2011-12-12 Thread Gerlando Falauto
On 12/12/2011 02:08 PM, Wolfgang Denk wrote: Dear Gerlando Falauto, In message4ee5ca4a.8050...@keymile.com you wrote: You could just use 'apply_cb apply' for that param I think. Absolutely. I introduced the typedef at a later stage and forgot to update it there too. Good catch, thanks

[U-Boot] [PATCH v2 0/3] env: handle special variables and selective env default

2011-12-07 Thread Gerlando Falauto
) - changed env_check_apply so not to display warnings in case of H_FORCE flag being set Changes from v0 - checkpatch cleanup - removed himport_ex() - removed warning for serial_assign() - env import NOT implemented here Gerlando Falauto (3): env: unify logic to check and apply changes env: check

[U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-07 Thread Gerlando Falauto
means ALL) o apply callback function to check whether a variable can be overwritten, and possibly immediately apply the changes; when NULL, no check is performed. Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c | 174

[U-Boot] [PATCH v2 2/3] env: check and apply changes on delete/destroy

2011-12-07 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c |2 +- include/search.h|6 -- lib/hashtable.c | 18 -- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index a31d413

[U-Boot] [PATCH v2 3/3] env: make env default selective, check and apply

2011-12-07 Thread Gerlando Falauto
Changes in the syntax (user API) for env default: -f: override write-once variables -a: all (resetting the whole env is NOT the default behavior) Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- README |2 ++ common/cmd_nvedit.c | 43

[U-Boot] [PATCH v1 0/5] env: handle special variables and selective env default

2011-11-18 Thread Gerlando Falauto
NOT implemented here Gerlando Falauto (5): serial: cosmetic checkpatch compliance serial: constify serial_assign() env: unify logic to check and apply changes env: check and apply changes on delete/destroy env: make env default selective, check and apply README |2

[U-Boot] [PATCH v1 2/5] serial: constify serial_assign()

2011-11-18 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/serial.c |2 +- include/serial.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/serial.c b/common/serial.c index 03bbb19..75cc1bb 100644 --- a/common/serial.c +++ b/common/serial.c

[U-Boot] [PATCH v1 1/5] serial: cosmetic checkpatch compliance

2011-11-18 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/serial.c | 51 +-- include/serial.h | 19 ++- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/common/serial.c b/common/serial.c index

[U-Boot] [PATCH v1 4/5] env: check and apply changes on delete/destroy

2011-11-18 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c |2 +- include/search.h|6 -- lib/hashtable.c | 18 -- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index d6ea25d

[U-Boot] [PATCH v1 3/5] env: unify logic to check and apply changes

2011-11-18 Thread Gerlando Falauto
means ALL) o apply callback function to check whether a variable can be overwritten, and possibly immediately apply the changes; when NULL, no check is performed. Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c | 163

[U-Boot] [PATCH v1 5/5] env: make env default selective, check and apply

2011-11-18 Thread Gerlando Falauto
Changes in the syntax (user API) for env default: -f: override write-once variables -a: all (resetting the whole env is NOT the default behavior) Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- NOTE: Since the impact in code size is really negligible, I would rather

Re: [U-Boot] [PATCH] env: allow to export only selected variables

2011-11-17 Thread Gerlando Falauto
... funny, huh? Best, Gerlando Falauto ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] [PATCH] env: allow to export only selected variables

2011-11-17 Thread Gerlando Falauto
, - char **resp, size_t size) + char **resp, size_t size, + int argc, char * const argv[]) { ENTRY *list[htab-size]; char *res, *p; What happened to please indent with TABs only? Have I missed something, perhaps? Thank you, Gerlando Falauto

Re: [U-Boot] checkpatch compliance

2011-11-17 Thread Gerlando Falauto
On 10/08/2011 12:28 AM, Joe Hershberger wrote: Hi Wolfgang, I'm attempting to make the files I touched in several recent patch-series chechkpatch.pl compliant. I've hit several cases which fail and probably shouldn't. For each of these cases, should the warning / error just be ignored or

Re: [U-Boot] checkpatch compliance

2011-11-17 Thread Gerlando Falauto
On 11/17/2011 09:54 PM, Wolfgang Denk wrote: Dear Gerlando Falauto, In message4ec56a2e.2000...@keymile.com you wrote: What is wrong with something like: ERROR: do not initialise statics to 0 or NULL #35: FILE: serial.c:32: +static struct serial_device *serial_devices = NULL; Why? Why

Re: [U-Boot] [PATCH v0 0/4] env: reworking + default/import individual vars

2011-11-08 Thread Gerlando Falauto
On 11/06/2011 11:15 PM, Wolfgang Denk wrote: Dear Gerlando Falauto, In message1319647072-17504-1-git-send-email-gerlando.fala...@keymile.com you wrote: This is a resubmission (after removing remove checkpatch errors) of http://lists.denx.de/pipermail/u-boot/2011-September/102875.html

Re: [U-Boot] Continuation line alignment

2011-11-08 Thread Gerlando Falauto
. Is using tabs on the right of text forbidden/not recommended for some reason? Thanks! Gerlando Falauto ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] [PATCH v0 0/4] env: reworking + default/import individual vars

2011-11-08 Thread Gerlando Falauto
On 11/08/2011 12:46 PM, Wolfgang Denk wrote: Dear Gerlando Falauto, In message4eb8f762.1030...@keymile.com you wrote: I tested env import with and without -n. Same for env default. Also tested special variables. For me, env import is broken now. I am not able to see how it's

Re: [U-Boot] [PATCH v0 1/4] Groundwork for generalization of env interface

2011-11-07 Thread Gerlando Falauto
On 11/07/2011 11:05 PM, Wolfgang Denk wrote: Dear Gerlando Falauto, In message4eb84859.6000...@keymile.com you wrote: -int _do_env_set (int flag, int argc, char * const argv[]) +int env_check_apply(const char *name, const char *oldval, +const char *newval, int flag

Re: [U-Boot] Continuation line alignment

2011-11-07 Thread Gerlando Falauto
On 11/08/2011 12:02 AM, Scott Wood wrote: On 11/07/2011 04:05 PM, Wolfgang Denk wrote: Dear Gerlando Falauto, In message4eb84859.6000...@keymile.com you wrote: -int _do_env_set (int flag, int argc, char * const argv[]) +int env_check_apply(const char *name, const char *oldval

[U-Boot] [PATCH v0 0/4] env: reworking + default/import individual vars

2011-10-26 Thread Gerlando Falauto
deleting variables. Not quite sure whether this makes sense or not. PATCH 3: Add the code for setting individual variables to default PATCH 4: Impolement importing of individual variables (also taking into account -f for forcing). Gerlando Falauto (4): Groundwork for generalization of env

[U-Boot] [PATCH v0 1/4] Groundwork for generalization of env interface

2011-10-26 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c | 152 +++-- common/env_common.c | 15 - include/environment.h |7 ++ include/search.h | 13 lib/hashtable.c | 50 5

[U-Boot] [PATCH v0 2/4] env: check and apply changes on delete/destroy

2011-10-26 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c |2 +- include/search.h|6 -- lib/hashtable.c | 18 -- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 10b9552

[U-Boot] [PATCH v0 4/4] env: implement env import -n var[, var...]

2011-10-26 Thread Gerlando Falauto
Implemented selective importing of variables in env import Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c | 35 ++- 1 files changed, 30 insertions(+), 5 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c

[U-Boot] [PATCH v0 3/4] env: implement selective env default

2011-10-26 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- README |2 ++ common/cmd_nvedit.c | 42 -- common/env_common.c | 14 ++ include/config_cmd_all.h |1 + include/environment.h|5

[U-Boot] [PATCH RFC 3/4] env: implement selective env default

2011-09-30 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- README |2 ++ common/cmd_nvedit.c | 38 -- common/env_common.c | 13 + include/config_cmd_all.h |1 + include/environment.h|5 + 5

[U-Boot] [PATCH RFC 4/4] env: implement env import -n var[, var...]

2011-09-30 Thread Gerlando Falauto
Implemented selective importing of variables in env import Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c | 31 ++- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index

[U-Boot] [PATCH RFC 0/4] Reworking of env

2011-09-30 Thread Gerlando Falauto
variables === PATCH 4 === Here I implemented the code for importing individual variables (and also taking into account -f for forcing). Thank you for your patience, Gerlando Falauto Gerlando Falauto (4): Groundwork for generalization of env interface env: check and apply changes

[U-Boot] [PATCH RFC 2/4] env: check and apply changes on delete/destroy

2011-09-30 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c |2 +- include/search.h|6 -- lib/hashtable.c | 19 +-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index

[U-Boot] [PATCH RFC 1/4] Groundwork for generalization of env interface

2011-09-30 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com --- common/cmd_nvedit.c | 150 ++--- common/env_common.c | 15 - include/environment.h |2 + include/search.h | 13 lib/hashtable.c | 48 5

Re: [U-Boot] [PATCH 1/2] env: set individual variables to default

2011-09-29 Thread Gerlando Falauto
On 09/28/2011 11:08 PM, Wolfgang Denk wrote: Dear Gerlando Falauto, In message4e82e6ca.9030...@keymile.com you wrote: env import -n name[,..] [other_flags] addr [size] ? Uhm, wouldn't that make the syntax completely unrelated to all other commands, leading to confusion? How about

Re: [U-Boot] [PATCH 1/2] env: set individual variables to default

2011-09-28 Thread Gerlando Falauto
the names of such variables and their properties from a variable, etc. ... there is plenty of ideas someone could pick up... OK, one step at a time. But it's definitely worth knowing your thoughts before starting. Thank you for sharing them! Best, Gerlando Falauto

Re: [U-Boot] [PATCH 1/2] env: set individual variables to default

2011-09-23 Thread Gerlando Falauto
be necessary). Thank you, Gerlando Falauto ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

[U-Boot] [PATCH 0/2] implement set individual variables to default

2011-09-22 Thread Gerlando Falauto
was posted and the inputs were taken into account: http://lists.denx.de/pipermail/u-boot/2011-September/100635.html Gerlando Falauto (2): env: set individual variables to default km/common: enable env default for all keymile boards README |2 + common/cmd_nvedit.c

[U-Boot] [PATCH 1/2] env: set individual variables to default

2011-09-22 Thread Gerlando Falauto
not defined in the default environemnt will be unset. Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com Signed-off-by: Holger Brunck holger.bru...@keymile.com --- README |2 + common/cmd_nvedit.c | 22 +++-- common/env_common.c | 109

[U-Boot] [PATCH 2/2] km/common: enable env default for all keymile boards

2011-09-22 Thread Gerlando Falauto
Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com Signed-off-by: Holger Brunck holger.bru...@keymile.com --- include/configs/km/keymile-common.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile

[U-Boot] [PATCH RFC] env: add command to set individual variables to default

2011-09-08 Thread Gerlando Falauto
, the code could obviously be much smaller and simpler. Signed-off-by: Gerlando Falauto gerlando.fala...@keymile.com Signed-off-by: Holger Brunck holger.bru...@keymile.com cc: Wolfgang Denk w...@denx.de --- common/cmd_nvedit.c | 12 +- common/env_common.c | 106

<    1   2