Re: [U-Boot] Password protection of U-Boot command line

2012-02-11 Thread Frans Meulenbroeks
2012/2/11 Graeme Russ : > Hi Mike, > > On 02/11/2012 07:37 AM, Mike Frysinger wrote: > >> waving your hands around and saying "doing XXX is more secure and therefore >> we >> should do it" is theater.  i'm not against passwords or ASLR or anything else > > Agreed - I've already said as much in the

Re: [U-Boot] Password protection of U-Boot command line

2012-02-10 Thread Frans Meulenbroeks
2012/2/10 Wolfgang Denk : > Dear Frans Meulenbroeks, > > In message > you > wrote: >> Generally speaking there is a use case for a password. > > Of course there is.  The question is if the oot loader is the right > place for it. > >> E.g. if you deliver b

Re: [U-Boot] Password protection of U-Boot command line

2012-02-10 Thread Frans Meulenbroeks
Generally speaking there is a use case for a password. E.g. if you deliver boards/systems with u-boot on it and you do not want customers to enter u-boot (e.g. by accident or because they want to hack the board), but you would allow authorized service personnel to access the board. For this case

[U-Boot] [PATCH] fw_env.h: fix comment

2012-01-05 Thread Frans Meulenbroeks
made description according to implementation (where the config file is the default). Signed-off-by: Frans Meulenbroeks --- tools/env/fw_env.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index 9258c79..cfbe108 100644 --- a

Re: [U-Boot] [PATCH] fw_env.c: use default env values if config file cannot be opened

2012-01-05 Thread Frans Meulenbroeks
2012/1/5 Wolfgang Denk > Dear Frans Meulenbroeks, > > In message <1325098913-29909-1-git-send-email-fransmeulenbro...@gmail.com> > you wrote: > > If the config file cannot be opened currently one gets an error > > even though the build in names/sizes are probably

[U-Boot] [PATCH] fw_env: use vars from the board config

2012-01-02 Thread Frans Meulenbroeks
it is quite odd that fw_printenv/fw_setenv does not use the settings from include/configs but instead redefines things. This patch uses the variables from the config file The edit in fw_env.c is only needed to resolve a name clash Signed-off-by: Frans Meulenbroeks --- Note: this is more

[U-Boot] tools/env/fw_env.h comment/code mismatch

2012-01-02 Thread Frans Meulenbroeks
tools/env/fw_env.h states: /* * To build the utility with the run-time configuration * uncomment the next line. * See included "fw_env.config" sample file * for notes on configuration. */ #define CONFIG_FILE "/etc/fw_env.config" However the define is already uncommented. I see two possib

[U-Boot] [PATCH] fw_env.h: added a few missing defines

2012-01-02 Thread Frans Meulenbroeks
The README file lists 4 defined that were not actually present in the .h file but that were needed to get things working with settings compiled in. They are Added these to the .h file (the values above are the ones from the README file) Signed-off-by: Frans Meulenbroeks --- Noticed this was not

[U-Boot] CONFIG_ENV_SIZE_REDUND

2012-01-02 Thread Frans Meulenbroeks
Hi all, Let me first start off to wish all of you a prosperous 2012. While browsing through the sources I noticed CONFIG_ENV_SIZE_REDUND and I am wondering if it carries any use at all. Why would the redundant env be any different in size than the original one? Seems odd to me. A quick grep thro

[U-Boot] [PATCH] fw_env.c: use default env values if config file cannot be opened

2011-12-28 Thread Frans Meulenbroeks
that the config file open fails get_config returns -2 to signal this; all other errors return -1 Signed-off-by: Frans Meulenbroeks --- tools/env/fw_env.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index

[U-Boot] escape sequence issue

2011-12-02 Thread Frans Meulenbroeks
Hi, I noticed the following (in 2011.03) If I do this on the u-boot cmd line: setenv tst "setexpr.b mode *1000 \& 0xe8" and I do a printenv tst I get: tst=setexpr.b mode *1000 \& 0xe8 Note: one slash. But if I do a printenv without argument I get tst=setexpr.b mode *1000 \\& 0xe8 Note the

Re: [U-Boot] [PATCH] fw_env.h: added a few missing defines

2011-12-02 Thread Frans Meulenbroeks
2011/12/1 Andreas Bießmann > Dear Frans Meulenbroeks, > > Am 01.12.2011 14:30, schrieb Frans Meulenbroeks: > > The README file lists 4 defined that were not actually present in the .h > > file but that were needed to get things working with settings compiled > in. > &g

[U-Boot] [PATCH] fw_env.h: added a few missing defines

2011-12-01 Thread Frans Meulenbroeks
The README file lists 4 defined that were not actually present in the .h file but that were needed to get things working with settings compiled in. They are Added these to the .h file (the values above are the ones from the README file) Signed-off-by: Frans Meulenbroeks --- tools/env/fw_env.h

[U-Boot] silencing i2c dev?

2010-10-01 Thread Frans Meulenbroeks
If I run i2c dev to set the bus it replies what it did: => i2c dev 0 Setting bus to 0 Other commands do not seem to do that. e.g. mw does not tell it has written a value. Should we make i2c dev silent too? (I'm using this in a script and want to avoid superfluous messages). If desired I can subm

[U-Boot] [PATCH] fw_env_main: updated help for fw_printenv

2010-09-09 Thread Frans Meulenbroeks
mention also that you can do fw_printenv name and fw_printenv -n name Signed-off-by: Frans Meulenbroeks --- tools/env/fw_env_main.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c index 82116b4..ff2924d 100644 --- a

[U-Boot] [RFD] store env size in env area (+ cookie + len)

2010-08-11 Thread Frans Meulenbroeks
I've seen a few times that people get a u-boot with their board and want to use fw_setenv under linux to tweak with environment variables. This requires them to come up with an fw-env.config (if not provided). One of the things that I've seen, that some people have trouble with it is obtaining the

Re: [U-Boot] [PATCH] board/purple/flash.c: removed unneded variable

2010-08-01 Thread Frans Meulenbroeks
2010/8/1 Sergei Shtylyov > Hello. > > > Frans Meulenbroeks wrote: > > removed a variable that was not used >> > > Signed-off-by: Frans Meulenbroeks >> > > [...] > > > diff --git a/board/purple/flash.c b/board/purple/flash.c >> in

[U-Boot] [PATCH] board/purple/flash.c: removed unneded variable

2010-08-01 Thread Frans Meulenbroeks
removed a variable that was not used Signed-off-by: Frans Meulenbroeks --- This supersedes 0001-board-purple-flash.c-removed-unneded-test.patch submitted yesterday board/purple/flash.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/board/purple/flash.c b/board

Re: [U-Boot] [PATCH] board/purple/flash.c: removed unneded test

2010-07-31 Thread Frans Meulenbroeks
2010/7/31 Wolfgang Denk > Dear Frans Meulenbroeks, > > In message <1280585375-1613-1-git-send-email-fransmeulenbro...@gmail.com> > you wrote: > > removed part of a test which tested for a var that did not change > > within the loop and hence was superfluous > &

[U-Boot] [PATCH 2/2] drivers/mmc/fsl_esdhc.c: reordered tests

2010-07-31 Thread Frans Meulenbroeks
27;ve opted for the simplest solution Signed-off-by: Frans Meulenbroeks --- drivers/mmc/fsl_esdhc.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index f982a69..4d04920 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/dr

[U-Boot] [PATCH 1/2] drivers/mmc/fsl_esdhc.c: increase timeout

2010-07-31 Thread Frans Meulenbroeks
13 to 11. Seems to work fine with me (but we could consider forgetting about tuning the value and always write 14 << 16 in the timeout register (the max timeout value). Rmember that this timeout is only used up in case of an error, so it does not delay the normal operation. Signed-of

[U-Boot] [PATCH] board/purple/flash.c: removed unneded test

2010-07-31 Thread Frans Meulenbroeks
removed part of a test which tested for a var that did not change within the loop and hence was superfluous Signed-off-by: Frans Meulenbroeks --- board/purple/flash.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/board/purple/flash.c b/board/purple/flash.c index

[U-Boot] [PATCH 2/2] various cmd_* files: fixed layout a little bit

2010-07-31 Thread Frans Meulenbroeks
Most of the files have U_BOOT_CMD on a separate line, but a few didn't and had the first line on the same line as U_BOOT_CMD. This changes these files by adding a line break and a tab Signed-off-by: Frans Meulenbroeks --- common/cmd_ambapp.c |3 ++- common/cmd_bootldr.c|

[U-Boot] [PATCH 1/2] various cmd_* files: remove the command name from the help message

2010-07-31 Thread Frans Meulenbroeks
removed the command name from the help message as it is already printed. for cmd_mmc also rewrote the message a little bit Signed-off-by: Frans Meulenbroeks --- common/cmd_cramfs.c|4 ++-- common/cmd_dataflash_mmc_mux.c |2 +- common/cmd_mgdisk.c|2 +- common

[U-Boot] funny/faulty message

2010-07-29 Thread Frans Meulenbroeks
Hi, Tried to erase two protected sectors: => erase 0xe800 e803 - Warning: 2 protected sectors will not be erased! done Erased 2 sectors The fault is that it said it erased 2 sectors. The funny part is that it mentioned that the sectors won't be erased. I would expect either that the er

[U-Boot] MPC8536DS SD u-boot issue

2010-07-28 Thread Frans Meulenbroeks
Dear all, I have an issue with u-boot 2010.06 for mpc8536ds and SD card. (actually not sure if it is specific for 2010.06). If I try to access the SD card (a SanDisk 2GB cl2 card), from within u-boot I often get errors. The odd thing is that the errors are not always at the same place. Below is a

Re: [U-Boot] [PATCH] cmd_nand.c: converted to new style subcmd handling

2010-05-04 Thread Frans Meulenbroeks
Was afk for 3.5 weeks, so didn't get to this.Sorry. 2010/4/19 Scott Wood : > On Sun, Apr 04, 2010 at 09:53:16PM +0200, Frans Meulenbroeks wrote: >> converted to new style subcmd handling. >> partly tested on sheevaplug >> read and information commands tested on sheevap

[U-Boot] [PATCH] cmd_nand.c: converted to new style subcmd handling

2010-04-04 Thread Frans Meulenbroeks
converted to new style subcmd handling. partly tested on sheevaplug read and information commands tested on sheevaplug (sorry did not want to nuke my device so I did not want to test things like nand scrub) Signed-off-by: Frans Meulenbroeks --- note that nand biterr has no implementation

[U-Boot] [PATCH] configs/sheevaplug: added a few additional commands

2010-04-04 Thread Frans Meulenbroeks
filesystems (if you want to use these in NAND) This also makes it more similar to openrd client. Side effect of this patch is that the code now needs 3 sectors i.s.o. 2 so an existing env is overwritten Signed-off-by: Frans Meulenbroeks --- Have fun! Frans. --- include/configs/sheevaplug.h | 27

[U-Boot] [PATCH] configs/openrd_base.h: reordered macros

2010-04-04 Thread Frans Meulenbroeks
moved CONFIG_CMD_FAT to filesystem section swappeda CONFIG_CMD_NAND and CONFIG_CMD_MII so they are alpha correct Signed-off-by: Frans Meulenbroeks --- include/configs/openrd_base.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/openrd_base.h b

[U-Boot] [PATCH] config_cmd_all.h: added missing CONFIG_CMD_UBI and CONFIG_CMD_UBIFS

2010-04-04 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- include/config_cmd_all.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h index 058fdf1..1cb7067 100644 --- a/include/config_cmd_all.h +++ b/include/config_cmd_all.h @@ -79,6 +79,8

Re: [U-Boot] Saving environment variables in MMC

2010-03-30 Thread Frans Meulenbroeks
2010/3/30 Nitin Mahajan : > Hello, > > --- On Mon, 29/3/10, Mike Frysinger wrote: > >> From: Mike Frysinger >> Subject: Re: [U-Boot] Saving environment variables in MMC >> To: u-boot@lists.denx.de, nitin...@yahoo.com >> Date: Monday, 29 March, 2010, 11:12 PM >> On Monday 29 March 2010 11:21:22 >>

Re: [U-Boot] i2c pull request (next)

2010-03-29 Thread Frans Meulenbroeks
xt > > are available in the git repository at: > >  git://git.denx.de/u-boot-i2c.git next > > Frans Meulenbroeks (5): >      cmd_i2c.c: declared local functions as static >      cmd_i2c: moved mispositioned comment for i2c md >      cmd_i2c: moved a define to before the fun

Re: [U-Boot] [PATCH] cmd_onenand.c: moved to standard subcommand handling

2010-03-27 Thread Frans Meulenbroeks
Forgot this disclaimer, thought I added it, sry. NOTE: This code is untested as I have no board with onenand support. However, it compiles properly (tested by building opap3_evm, which uses this). The changes I did are purely splitting do_onenand in separate functions and add the subcommand parsin

[U-Boot] [PATCH] cmd_onenand.c: moved to standard subcommand handling

2010-03-27 Thread Frans Meulenbroeks
ure if it is needed, and since I could not test this, left the line for now Signed-off-by: Frans Meulenbroeks --- common/cmd_onenand.c | 307 +++--- 1 files changed, 192 insertions(+), 115 deletions(-) diff --git a/common/cmd_onenand.c b/commo

[U-Boot] [PATCH] cmd_bmp.c: added standard subcommand handling

2010-03-27 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_bmp.c | 81 + 1 files changed, 56 insertions(+), 25 deletions(-) diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c index 74ab24c..583b009 100644 --- a/common/cmd_bmp.c +++ b/common/cmd_bmp.c

Re: [U-Boot] [PATCH 5/5:q i2c: made unused function i2c_mux_add_device static

2010-03-26 Thread Frans Meulenbroeks
Apologies, apparently accidently mangled the command line. (actually there was an unrelated patch inbetween, so edited the subject line after creating the patch, and goofed. Guess you all know now what editor I'm using. Patch does apply. Frans ___ U-Boot

[U-Boot] [PATCH 5/5:q i2c: made unused function i2c_mux_add_device static

2010-03-26 Thread Frans Meulenbroeks
and removed it from the .h file Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c |2 +- include/i2c.h|2 -- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 5588a81..e74f359 100644 --- a/common/cmd_i2c.c +++ b/common

[U-Boot] [PATCH 4/5] cmd_i2c: introduced get_alen helper function

2010-03-26 Thread Frans Meulenbroeks
The code to parse alen appeared 6 times in the function. Factored this out in a small helper function Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 119 + 1 files changed, 47 insertions(+), 72 deletions(-) diff --git a/common

[U-Boot] [PATCH 0/5] i2c patches

2010-03-26 Thread Frans Meulenbroeks
Attached some patches to cleanup i2c as discussed before. There might be some dependencies wrt ordering so please apply in order Tested on MPC8536DS Have fun, Frans. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-b

[U-Boot] [PATCH 3/5] cmd_i2c: moved a define to before the functions

2010-03-26 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index a7672cf..bf7f6d3 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -130,6 +130,8 @@ DECLARE_GLOBAL_DATA_PTR

[U-Boot] [PATCH 2/5] cmd_i2c: moved mispositioned comment for i2c md

2010-03-26 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index b00aafb..a7672cf 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -148,10 +148,6 @@ int __def_i2c_set_bus_speed

[U-Boot] [PATCH 1/5] cmd_i2c.c: declared local functions as static

2010-03-26 Thread Frans Meulenbroeks
Declared all functions that were not called outside the file as static Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index ee9577c..b00aafb 100644

[U-Boot] sheevaplug issue

2010-03-25 Thread Frans Meulenbroeks
I noticed sheevaplug u-boot (build from next head) does boot when loaded to ram using jtag, but does not work when flashed into it. I suspect that there is an issue wrt configuring the address registers. In both cases I used the procedure as given on http://www.plugcomputer.org/plugwiki/index.php/S

[U-Boot] [PATCH] sheevaplug: enabled long help

2010-03-25 Thread Frans Meulenbroeks
long help is more convenient to the user and the room for it is available... Signed-off-by: Frans Meulenbroeks --- include/configs/sheevaplug.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h index fc401a8

[U-Boot] [PATCH] cmd_usb.c: implemented standard subcommand handling

2010-03-25 Thread Frans Meulenbroeks
also added a missing \n in the help messages Signed-off-by: Frans Meulenbroeks --- common/cmd_usb.c | 391 -- 1 files changed, 233 insertions(+), 158 deletions(-) as discussed before on the mailing list tested on sheevaplug diff --git a

[U-Boot] [review request] cmd_bmp.c: added standard subcommand handling

2010-03-24 Thread Frans Meulenbroeks
--- Hi, This is not a formal patch but a review request. Do people feel this patch is desirable and ok? and should I keep it like this, or should I merge do_bmp_info and bmp_info into one func (and similarly for do_bmp_display and bmp_display) and please ignore the superfluous int x = 0, y = 0;

Re: [U-Boot] console_buffer

2010-03-24 Thread Frans Meulenbroeks
a header file, and only to use header files to import functions, but maybe that is a personal thingie). Frans 2010/3/24 Frans Meulenbroeks : > 2010/3/24 Ben Warren : >> Hi Frans, >> >> On 3/24/2010 12:52 PM, Frans Meulenbroeks wrote: >>> >>> yet anothe

[U-Boot] console_buffer

2010-03-24 Thread Frans Meulenbroeks
yet another potential cleanup: I see both: extern char console_buffer[]; and extern char console_buffer[CONFIG_SYS_CBSIZE]; (and in fact console_buffer is declared as: charconsole_buffer[CONFIG_SYS_CBSIZE + 1]; /* console I/O buffer */ so with a +1). Questions: is the first or th

[U-Boot] unneeded exported function i2c_mux_add_device

2010-03-24 Thread Frans Meulenbroeks
Dear list: While grepping some sources I bumped upon i2c_mux_add_device This one is implemented in cmd_i2c.c and exported through i2c.h. However no-one outside cmd_i2c.c is using it: fr...@linux-suse:~/u-boot> grep -r i2c_mux_add_device . ./common/cmd_i2c.c:int i2c_mux_add_device(I2C_MUX_DEVICE *

[U-Boot] RFC: factor out common i2c code

2010-03-22 Thread Frans Meulenbroeks
In cmd_i2c the following snippet of code appears 6 times so it would be a good candidate to factor out into a static helper function: /* * I2C chip address */ chip = simple_strtoul(argv[1], NULL, 16); /* * I2C data address within the chip. This

[U-Boot] preferred style?

2010-03-22 Thread Frans Meulenbroeks
Hi, I've been peeking at optimizing a little bit more in i2c, and I bumped into a stylish question: I see function prototypes like: static int mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]) and also int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv

[U-Boot] [PATCH v3 7/7] cmd_setexpr: allow memory addresses in expressions

2010-02-26 Thread Frans Meulenbroeks
a byte that is obtained by reading data from e.g. i2c. Signed-off-by: Frans Meulenbroeks --- common/cmd_setexpr.c | 29 + 1 files changed, 25 insertions(+), 4 deletions(-) diff --git a/common/cmd_setexpr.c b/common/cmd_setexpr.c index f8b5d4d..86e371b 100644 --- a

Re: [U-Boot] [PATCH 7/7] cmd_setexpr: allow memory addresses and env vars in expressions

2010-02-26 Thread Frans Meulenbroeks
2010/2/26 Detlev Zundel : > Hi Frans, > >> This patch add functionality to use memory addresses and environment >> variables in >> expressions. This increases the power of expressions substantially >> >> It adheres to the standard convemtions: memory addresses can be given in the >> format >> *ad

Re: [U-Boot] [PATCH 5/5] cmd_i2c.c: added i2c read to memory function

2010-02-26 Thread Frans Meulenbroeks
Hi Detlev, Wrt the whitespace: I'll take more care next time. wrt the patch not applying: did you apply the patches 1 to 4 first? I'm especially triggered by the fact that you are applying p1, but this is patch 5. Also your testing tree does not show that the others have been applied (but of cour

[U-Boot] [PATCH] cmd_mmc remove \n

2010-02-25 Thread Frans Meulenbroeks
This patch removed the \n after the help message for mmcinfo. This one resulted in an empty line being displayed after the mmcinfo line when the help command was given. Signed-off-by: Frans Meulenbroeks --- common/cmd_mmc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [U-Boot] [PATCH 7/7] cmd_setexpr: allow memory addresses and env vars in expressions

2010-02-25 Thread Frans Meulenbroeks
Resubmitted the patch (see previous message) as I noticed a \n in the help was missing. Apologies for any inconvenience. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

[U-Boot] setexpr syntax

2010-02-25 Thread Frans Meulenbroeks
Dear all, I noticed setexpr help says: can be &, |, ^, +, -, *, /, % However, when one uses the hush shell additional escapes might be needed. => setexpr tst 3 & f syntax error => setexpr tst 3 | f syntax error This works: => setexpr tst 3 \| f => print tst tst=f Not sure whether we should d

[U-Boot] [PATCH 7/7] cmd_setexpr: allow memory addresses and env vars in expressions

2010-02-25 Thread Frans Meulenbroeks
. environment variables are not processed recursively but can contain both constants and memory addresses. Rationale for this change is that it allows masking off bits from a byte that is obtained by reading data from e.g. i2c. Signed-off-by: Frans Meulenbroeks --- If recursive environment vars is

Re: [U-Boot] [PATCH 7/7] cmd_setexpr: allow memory addresses and env vars in expressions

2010-02-25 Thread Frans Meulenbroeks
btw no idea why this patch became 7/7. I did not use -n in format-patch (but indeed I am 7 patches ahead the first 5 then an unnumbered one (which is independent of the earlier ones) and this one (which is again independent of earlier ones. Ah well, the mysteries of git I assume. Frans __

[U-Boot] [PATCH 7/7] cmd_setexpr: allow memory addresses and env vars in expressions

2010-02-25 Thread Frans Meulenbroeks
. environment variables are not processed recursively but can contain both constants and memory addresses. Rationale for this change is that it allows masking off bits from a byte that is obtained by reading data from e.g. i2c. Signed-off-by: Frans Meulenbroeks --- If recursive environment vars is

[U-Boot] [PATCH] cmd_itest.c: also support environment variables as arguments

2010-02-25 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_itest.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/common/cmd_itest.c b/common/cmd_itest.c index 58c5e7b..78a4082 100644 --- a/common/cmd_itest.c +++ b/common/cmd_itest.c @@ -69,6 +69,10 @@ static long evalexp

[U-Boot] [PATCH 4/5] cmd_i2c.c: sorted commands alphabetically

2010-02-25 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index e54fc20..b51e3f4 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -1302,25 +1302,24 @@ int do_i2c(cmd_tbl_t

[U-Boot] [PATCH 0/5] i2c patches. Again!

2010-02-25 Thread Frans Meulenbroeks
an be refactored; also might implement subcommand handling in a few other files). Have fun, Frans. Frans Meulenbroeks (5): cmd_i2c.c: reduced subaddress length to 3 bytes cmd_bootm.c: made subcommand array static cmd_i2c.c: reworked subcommand handling cmd_i2c.c: sorted commands alphabeti

[U-Boot] [PATCH 2/5] cmd_bootm.c: made subcommand array static

2010-02-25 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_bootm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 23ab0c4..827d542 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -462,7 +462,7 @@ static int

[U-Boot] [PATCH 3/5] cmd_i2c.c: reworked subcommand handling

2010-02-25 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 77 +++-- 1 files changed, 45 insertions(+), 32 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 7531702..e54fc20 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c

[U-Boot] [PATCH 1/5] cmd_i2c.c: reduced subaddress length to 3 bytes

2010-02-25 Thread Frans Meulenbroeks
according to some of the comments the subaddress length is 1 or 2, but we are being prepared for the case it becomes 3. However the code also accepted 4. This repairs this by changing the constand 4 to 3. Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 10 +- 1 files changed

[U-Boot] [PATCH 5/5] cmd_i2c.c: added i2c read to memory function

2010-02-25 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 62 - 1 files changed, 60 insertions(+), 2 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index b51e3f4..9e7143a 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c

[U-Boot] my recent i2c patches

2010-02-24 Thread Frans Meulenbroeks
One word wrt the i2c patches I just mailed. It was my impression that git send-email would include the number in the patch but as can be seen that was not the case. The patches are to be applied in the following order: 0001-cmd_i2c.c-reduced-subaddress-length-to-3-bytes.patch 0002-cmd_bootm.c-made

[U-Boot] [PATCH] cmd_i2c.c: sorted commands alphabetically

2010-02-24 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index e54fc20..1dd4df3 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -1302,13 +1302,14 @@ int do_i2c(cmd_tbl_t

[U-Boot] [PATCH] cmd_bootm.c: made subcommand array static

2010-02-24 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_bootm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 23ab0c4..827d542 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -462,7 +462,7 @@ static int

[U-Boot] [PATCH] cmd_i2c.c: reduced subaddress length to 3 bytes

2010-02-24 Thread Frans Meulenbroeks
according to some of the comments the subaddress length is 1 or 2, but we are being prepared for the case it becomes 3. However the code also accepted 4. This repairs this by changing the constand 4 to 3. Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 10 +- 1 files changed

[U-Boot] [PATCH] cmd_i2c.c: added i2c read to memory function

2010-02-24 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 60 ++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 1dd4df3..552b4e5 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c

[U-Boot] [PATCH] cmd_i2c.c: reworked subcommand handling

2010-02-24 Thread Frans Meulenbroeks
Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 77 +++-- 1 files changed, 45 insertions(+), 32 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 7531702..e54fc20 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c

[U-Boot] setexpr and memory access

2010-02-24 Thread Frans Meulenbroeks
I feel sometimes it could be convenient to use setexpr to use a memory location as argument. The code for that is pretty trivial but the question (and reason for mailing this instead of just submitting the patch) is the syntax of the command. setexpr uses A op B and one of the possibilities for op

[U-Boot] subcmd handling

2010-02-23 Thread Frans Meulenbroeks
It was hinted (iirc by Detlev) that I'd have a stab at subcmd handling (at least for i2c). As example bootm was suggested. I've peeked at the bootm code and the code in command.c. It seems bootm has some internal state engine, that is somewhat less applicable for other commands. My proposal for i2

[U-Boot] [PATCH 2/2] cmd_itest.c: fix pointer dereferencing

2010-02-22 Thread Frans Meulenbroeks
fix pointer dereferencing if the size is .b and .w an 8 or 16 bit access is done. Signed-off-by: Frans Meulenbroeks --- common/cmd_itest.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/cmd_itest.c b/common/cmd_itest.c index 5b301bf..58c5e7b 100644 --- a

[U-Boot] [PATCH 2/2] cmd_itest.c: fix pointer dereferencing

2010-02-20 Thread Frans Meulenbroeks
fix pointer dereferencing if the size is .b and .w an 8 or 16 bit access is done. Signed-off-by: Frans Meulenbroeks --- common/cmd_itest.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/cmd_itest.c b/common/cmd_itest.c index 5b301bf..6e1079c 100644 --- a

[U-Boot] [PATCH] cmd_i2c.c: added command to read to memory

2010-02-20 Thread Frans Meulenbroeks
From: Frans Added a new function i2c read to read to memory. That way it becomes possible to test against a value and use that to influence the boot process. Design decision was to stay close to the i2c md command with respect to command syntax. Signed-off-by: Frans Meulenbroeks --- common

[U-Boot] [PATCH] README.mpc8536ds corrected address

2010-02-20 Thread Frans Meulenbroeks
This patch corrects small mistake in the register list. These registers are 32 bits and this one starts at c not e When using the ...c address I can boot from sd, when using the ...e address I cannot. Signed-off-by: Frans Meulenbroeks --- doc/README.mpc8536ds |2 +- 1 files changed

[U-Boot] [PATCH] fix expression handling in itest

2010-02-19 Thread Frans Meulenbroeks
. >From 93143ca97f1cd10a7ddf04c15e2dc9e1b2f10317 Mon Sep 17 00:00:00 2001 From: Frans Meulenbroeks Date: Fri, 19 Feb 2010 14:50:53 +0100 Subject: [PATCH] cmd_itest.c: fix pointer dereferencing fix pointer dereferencing if the size is .b and .w an 8 or 16 bit access is done. Signed-off-by: Fr

[U-Boot] [PATCH] added i2c read function

2010-02-19 Thread Frans Meulenbroeks
to command syntax. Signed-off-by: Frans Meulenbroeks --- common/cmd_i2c.c | 76 - 1 files changed, 68 insertions(+), 8 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 62cbd33..0100aa9 100644 --- a/common/cmd_i2c.c +++ b/common/c

[U-Boot] small but important doc patch

2010-02-19 Thread Frans Meulenbroeks
Data 4 | | 0xa0-0xa3 | 0x4001 | Config Addr 5 | Signed-off-by: Frans Meulenbroeks ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de

Re: [U-Boot] NAND bad environment block handling

2009-01-11 Thread Frans Meulenbroeks
> > That's a pretty risky setup because it is based on > an incorrect > assumption - on NAND, block become not only bad when being > erased or > written to, but also after a certain number of read > operations is > exceeded. Yes, there is a maximum number of reads per > block on NAND!

Re: [U-Boot] NAND bad environment block handling

2009-01-11 Thread Frans Meulenbroeks
rom: Schlaegl Manfred jun. > Subject: Re: [U-Boot] NAND bad environment block handling > To: fransmeulenbro...@yahoo.com > Cc: u-boot@lists.denx.de > Date: Sunday, January 11, 2009, 12:10 PM > Hi! > Am Donnerstag, den 08.01.2009, 07:19 -0800 schrieb Frans > Meulenbroeks: > >

Re: [U-Boot] NAND bad environment block handling

2009-01-08 Thread Frans Meulenbroeks
for redundant env and potential > bad env blocks */ > . = ALIGN(0x8); > > > Regards > > Sylvain Côté > > -Original Message- > From: u-boot-boun...@lists.denx.de > [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Frans > Meulenbroeks > Sent:

[U-Boot] NAND bad environment block handling

2009-01-08 Thread Frans Meulenbroeks
ld be nice if U-Boot could read the env from the next non-bad block at/after the env address. Has someone experience in this area? Ideas? Suggestions? Thanks alot! Frans Meulenbroeks ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.de

[U-Boot] bootlimit for arm? watchdog?

2008-11-12 Thread Frans Meulenbroeks
Hi, I am looking for a mechanism to reboot into an alternative kernel in case of problems. While reading the doc I stumbled upon the bootlimit feature, with which I probably can do what I need to. However: one problem. My system is an ARM system, and the manual says bootlimit is only for PPC. W