[PATCH v2] introduce runtime loglevel

2013-09-27 Thread Sascha Hauer
With this the verbosity of barebox can be controlled during runtime using the 'loglevel' globalvar. Signed-off-by: Sascha Hauer --- changes since v1: - Make loglevel configurable via Kconfig common/Kconfig | 18 +- common/console_common.c | 27 +++

Re: [PATCH] introduce runtime loglevel

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:06 Fri 27 Sep , Sascha Hauer wrote: > With this the verbosity of barebox can be controlled during runtime > using the 'loglevel' globalvar. > > Signed-off-by: Sascha Hauer > --- > common/console_common.c | 27 +++ > drivers/base/driver.c | 6 +- > include

Re: [PATCH] lib: Fix copy_file when filesize is FILESIZE_MAX

2013-09-27 Thread Sascha Hauer
On Fri, Sep 27, 2013 at 09:33:21AM +0200, Teresa Gámez wrote: > Using tftp command does not work proper when files > have FILESIZE_MAX, as copy_file and show_progress > can not handle it. Check the file size for FILESIZE_MAX > and handle it as file size = 0. > > Signed-off-by: Teresa Gámez Appli

[PATCH] scripts/omap_signGP: add getopt

2013-09-27 Thread Sascha Hauer
Instead of using positional arguments add proper getopt support. This also adds a help text. Signed-off-by: Sascha Hauer --- arch/arm/Makefile | 3 +-- scripts/omap_signGP.c | 59 +-- 2 files changed, 44 insertions(+), 18 deletions(-) diff --

[PATCH] scripts/bareboxenv: Make locally used functions static

2013-09-27 Thread Sascha Hauer
Signed-off-by: Sascha Hauer --- scripts/bareboxenv.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/bareboxenv.c b/scripts/bareboxenv.c index 6d6d55b..f372685 100644 --- a/scripts/bareboxenv.c +++ b/scripts/bareboxenv.c @@ -35,7 +35,7 @@ #define debug(

[PATCH] introduce runtime loglevel

2013-09-27 Thread Sascha Hauer
With this the verbosity of barebox can be controlled during runtime using the 'loglevel' globalvar. Signed-off-by: Sascha Hauer --- common/console_common.c | 27 +++ drivers/base/driver.c | 6 +- include/console.h | 2 ++ include/printk.h| 9 ++-

Re: [PATCH] mci: omap: Fix default value of mci.f_max

2013-09-27 Thread Teresa Gamez
Am 27.09.2013 15:45, schrieb Alexander Aring: On Fri, Sep 27, 2013 at 03:40:38PM +0200, Alexander Aring wrote: Hi, On Fri, Sep 27, 2013 at 03:38:07PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: On 14:13 Fri 27 Sep , Teresa G??mez wrote: Set default value of mci.f_max even when no pdat

Re: [PATCH] mci: omap: Fix default value of mci.f_max

2013-09-27 Thread Alexander Aring
On Fri, Sep 27, 2013 at 03:40:38PM +0200, Alexander Aring wrote: > Hi, > > On Fri, Sep 27, 2013 at 03:38:07PM +0200, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > On 14:13 Fri 27 Sep , Teresa G??mez wrote: > > > Set default value of mci.f_max even when no pdata > > > is available. > > > > >

Re: [PATCH] mci: omap: Fix default value of mci.f_max

2013-09-27 Thread Alexander Aring
Hi, On Fri, Sep 27, 2013 at 03:38:07PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 14:13 Fri 27 Sep , Teresa G??mez wrote: > > Set default value of mci.f_max even when no pdata > > is available. > > > > Signed-off-by: Teresa Gámez > > --- > > drivers/mci/omap_hsmmc.c |4 ++-- >

Re: [PATCH] mci: omap: Fix default value of mci.f_max

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 14:13 Fri 27 Sep , Teresa G??mez wrote: > Set default value of mci.f_max even when no pdata > is available. > > Signed-off-by: Teresa Gámez > --- > drivers/mci/omap_hsmmc.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mci/omap_hsmmc.c b/drivers

Re: [PATCH] mci: omap: Fix default value of mci.f_max

2013-09-27 Thread Alexander Aring
Hi, On Fri, Sep 27, 2013 at 03:29:40PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 14:19 Fri 27 Sep , Alexander Aring wrote: > > Hi, > > > > On Fri, Sep 27, 2013 at 02:13:00PM +0200, Teresa Gámez wrote: > > > Set default value of mci.f_max even when no pdata > > > is available. > > >

Re: [PATCH] mci: omap: Fix default value of mci.f_max

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 14:19 Fri 27 Sep , Alexander Aring wrote: > Hi, > > On Fri, Sep 27, 2013 at 02:13:00PM +0200, Teresa Gámez wrote: > > Set default value of mci.f_max even when no pdata > > is available. > > > > Signed-off-by: Teresa Gámez > > --- > > drivers/mci/omap_hsmmc.c |4 ++-- > > 1 files chan

Re: [PATCH] mci: omap: Fix default value of mci.f_max

2013-09-27 Thread Alexander Aring
Hi, On Fri, Sep 27, 2013 at 02:13:00PM +0200, Teresa Gámez wrote: > Set default value of mci.f_max even when no pdata > is available. > > Signed-off-by: Teresa Gámez > --- > drivers/mci/omap_hsmmc.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mci/om

[PATCH] mci: omap: Fix default value of mci.f_max

2013-09-27 Thread Teresa Gámez
Set default value of mci.f_max even when no pdata is available. Signed-off-by: Teresa Gámez --- drivers/mci/omap_hsmmc.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c index a2cd3fe..f63697f 100644 --- a/drivers/mci

Re: [PATCH 4/8] console: introduce startup and shutdown

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:09 Fri 27 Sep , Sascha Hauer wrote: > On Fri, Sep 27, 2013 at 11:03:57AM +0200, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > On 10:55 Fri 27 Sep , Sascha Hauer wrote: > > > On Fri, Sep 27, 2013 at 09:14:14AM +0200, Jean-Christophe > > > PLAGNIOL-VILLARD wrote: > > > > so enable the

Re: [PATCH 4/8] console: introduce startup and shutdown

2013-09-27 Thread Sascha Hauer
On Fri, Sep 27, 2013 at 11:03:57AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 10:55 Fri 27 Sep , Sascha Hauer wrote: > > On Fri, Sep 27, 2013 at 09:14:14AM +0200, Jean-Christophe PLAGNIOL-VILLARD > > wrote: > > > so enable the uart only if used > > > so linux can detect the right one

Re: [PATCH 3/8] console: factorise function to get the console by name

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On Sep 27, 2013, at 5:05 PM, Sascha Hauer wrote: > On Fri, Sep 27, 2013 at 10:58:47AM +0200, Jean-Christophe PLAGNIOL-VILLARD > wrote: >> On 10:50 Fri 27 Sep , Sascha Hauer wrote: >>> On Fri, Sep 27, 2013 at 09:14:13AM +0200, Jean-Christophe PLAGNIOL-VILLARD >>> wrote: rename it to co

[PATCH 9/9] console: console_get_by_name pass flags

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
this will allow to get console by name and specific feature we use CONSOLE_STDIN to check input support and CONSOLE_STDOUT for output support at driver level this will also allow to use non active console for loadxy as example Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- missing patch in

Re: [PATCH 3/8] console: factorise function to get the console by name

2013-09-27 Thread Sascha Hauer
On Fri, Sep 27, 2013 at 10:58:47AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 10:50 Fri 27 Sep , Sascha Hauer wrote: > > On Fri, Sep 27, 2013 at 09:14:13AM +0200, Jean-Christophe PLAGNIOL-VILLARD > > wrote: > > > rename it to console_get_by_name > > > > > > +struct console_device *c

Re: [PATCH 4/8] console: introduce startup and shutdown

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:55 Fri 27 Sep , Sascha Hauer wrote: > On Fri, Sep 27, 2013 at 09:14:14AM +0200, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > so enable the uart only if used > > so linux can detect the right one enable if it want > > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > > --- > > com

Re: [PATCH] arm: Update mach-types

2013-09-27 Thread Sascha Hauer
On Fri, Sep 27, 2013 at 09:34:29AM +0200, Teresa Gámez wrote: > Signed-off-by: Teresa Gámez > --- > arch/arm/tools/mach-types | 585 > - > 1 files changed, 580 insertions(+), 5 deletions(-) Applied, thanks You are not booting boards without devicetr

Re: [PATCH 3/8] console: factorise function to get the console by name

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:50 Fri 27 Sep , Sascha Hauer wrote: > On Fri, Sep 27, 2013 at 09:14:13AM +0200, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > rename it to console_get_by_name > > > > +struct console_device *console_get_by_name(const char *cname) > > +{ > > + struct console_device *cdev; > > + const

Re: [PATCH 4/8] console: introduce startup and shutdown

2013-09-27 Thread Sascha Hauer
On Fri, Sep 27, 2013 at 09:14:14AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > so enable the uart only if used > so linux can detect the right one enable if it want > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > common/console.c| 6 ++ > common/console_common.c |

Re: [PATCH 3/8] console: factorise function to get the console by name

2013-09-27 Thread Sascha Hauer
On Fri, Sep 27, 2013 at 09:14:13AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > rename it to console_get_by_name > > +struct console_device *console_get_by_name(const char *cname) > +{ > + struct console_device *cdev; > + const char *target; > + > + for_each_console(cdev) { > +

[PATCH 1/1] omap: xload: switch to generic bootstrap

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- .../configs/am335x_beaglebone_mlo_small_defconfig | 2 + arch/arm/configs/archosg9_xload_defconfig | 2 + arch/arm/configs/omap3530_beagle_xload_defconfig | 3 + arch/arm/configs/panda_xload_defconfig | 2 + arch/

Re: [PATCH 2/8] console: factorise function to get the first enabled console

2013-09-27 Thread Sascha Hauer
On Fri, Sep 27, 2013 at 09:14:12AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > +/** > + * @brief returns current used console device > + * > + * @return console device which is registered with CONSOLE_STDIN and > + * CONSOLE_STDOUT > + */ > +struct console_device *console_get_first_current(vo

Re: [PATCH 1/1 v2] fs: add uimagefs

2013-09-27 Thread Sascha Hauer
On Wed, Sep 25, 2013 at 12:49:44PM +0200, Alexander Aring wrote: > Hi Christophe, > > +/* > > + * Copyright (c) 2013 Jean-Chritstophe PLAGNIOL-VILLARD > > > > + * > > s/Jean-Chritstophe/Jean-Christophe/ > > same issue which Sascha already mentioned on the bpkfs patch. Fixed that while applying

Re: [PATCH 2/4] ARM: OMAP: register OMAP specific barebox bootm handler

2013-09-27 Thread Sascha Hauer
On Fri, Sep 27, 2013 at 10:25:37AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 09:17 Fri 27 Sep , Sascha Hauer wrote: > > The OMAP ROM code passes the boot information via r0 to the > > bootloader. Add an OMAP specific barebox handler to pass this > > information to the next stage. Thi

Re: [PATCH 2/4] ARM: OMAP: register OMAP specific barebox bootm handler

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 09:17 Fri 27 Sep , Sascha Hauer wrote: > The OMAP ROM code passes the boot information via r0 to the > bootloader. Add an OMAP specific barebox handler to pass this > information to the next stage. This allows us to chainload > bootloaders without loosing the information where we booted from

Re: [PATCH 1/1] command: add read command

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:15 Fri 27 Sep , Sascha Hauer wrote: > On Thu, Sep 26, 2013 at 07:45:56AM +0200, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > +static int do_read(int argc, char *argv[]) > > +{ > > + int opt; > > + int cont = 0; > > + int ret = -EINVAL; > > + char *var; > > + char *buf = xzallo

Re: [PATCH 1/1] command: add read command

2013-09-27 Thread Sascha Hauer
On Thu, Sep 26, 2013 at 07:45:56AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > +static int do_read(int argc, char *argv[]) > +{ > + int opt; > + int cont = 0; > + int ret = -EINVAL; > + char *var; > + char *buf = xzalloc(2049); > + char *filename = NULL; > + > + if

Re: Wrong barebox_image_size value

2013-09-27 Thread Sascha Hauer
Hi Rostislav, On Thu, Sep 26, 2013 at 10:30:29PM +0200, Rostislav Lisovy wrote: > Dear barebox developers and users; > I am compiling barebox for freescale-imx53-smd board. My issue is, > that the image does not contain the correct size record. > The "bootloader size" needed by the flashing tool i

[PATCH] arm: Update mach-types

2013-09-27 Thread Teresa Gámez
Signed-off-by: Teresa Gámez --- arch/arm/tools/mach-types | 585 - 1 files changed, 580 insertions(+), 5 deletions(-) diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 325513f..01bc7aa 100644 --- a/arch/arm/tools/mach-types +++

[PATCH] lib: Fix copy_file when filesize is FILESIZE_MAX

2013-09-27 Thread Teresa Gámez
Using tftp command does not work proper when files have FILESIZE_MAX, as copy_file and show_progress can not handle it. Check the file size for FILESIZE_MAX and handle it as file size = 0. Signed-off-by: Teresa Gámez --- lib/copy_file.c |8 ++-- lib/show_progress.c |5 +++-- 2 fi

[PATCH 2/4] ARM: OMAP: register OMAP specific barebox bootm handler

2013-09-27 Thread Sascha Hauer
The OMAP ROM code passes the boot information via r0 to the bootloader. Add an OMAP specific barebox handler to pass this information to the next stage. This allows us to chainload bootloaders without loosing the information where we booted from. Signed-off-by: Sascha Hauer --- arch/arm/mach-oma

[PATCH 4/4] i2c: omap: remove unncessary printf

2013-09-27 Thread Sascha Hauer
A printf in the driver should be dev_* and contain useful information. Both is not the case, remove it. Signed-off-by: Sascha Hauer --- drivers/i2c/busses/i2c-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c

OMAP patches

2013-09-27 Thread Sascha Hauer
Some OMAP patches Sascha Sascha Hauer (4): ARM: OMAP: Add missing include ARM: OMAP: register OMAP specific barebox bootm handler ARM: OMAP: unconditionally use /boot/barebox.env i2c: omap: remove unncessary

[PATCH 1/4] ARM: OMAP: Add missing include

2013-09-27 Thread Sascha Hauer
Include mach/generic.h where omap_set_bootmmc_devname is declared. Change the argument of omap_set_bootmmc_devname to const char * to fix the resulting conflicting prototypes. Signed-off-by: Sascha Hauer --- arch/arm/mach-omap/omap_generic.c | 8 +--- 1 file changed, 5 insertions(+), 3 delet

[PATCH 3/4] ARM: OMAP: unconditionally use /boot/barebox.env

2013-09-27 Thread Sascha Hauer
The startup process falls back to /dev/defaultenv automatically, no need to decide here. Signed-off-by: Sascha Hauer --- arch/arm/mach-omap/omap_generic.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm/mach-omap/omap_generic.c b/arch/arm/mach-omap/omap_generic.

[PATCH 1/8] console_simple: fix: set f_active

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
so generic code can check if the console is enabled and now we can use loadb & loadxy Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- common/console_simple.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/console_simple.c b/common/console_simple.c index e1d4c85..6cb72bb 100644

[PATCH 4/8] console: introduce startup and shutdown

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
so enable the uart only if used so linux can detect the right one enable if it want Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- common/console.c| 6 ++ common/console_common.c | 36 common/console_simple.c | 3 +++ include/console.h

[PATCH 7/8] serial: amba-pl011: add start and shutdown support

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/serial/amba-pl011.c | 45 + 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index fc7723e..5a8e633 100644 --- a/drivers

[PATCH 6/8] animeo_ip: update to use console_open/close for rs485 crossed detection

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/boards/animeo_ip/init.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c index 2fee1ff..e6d2745 100644 --- a/arch/arm/boards/animeo_ip/init.c

[PATCH 2/8] console: factorise function to get the first enabled console

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
rename it to console_get_first_current Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/ppc/mach-mpc85xx/fdt.c | 4 +--- commands/loadb.c| 22 +- commands/loadxy.c | 24 ++-- common/console_common.c | 21 +

[PATCH 8/8] serial: atmel: add start and shutdown support

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/serial/atmel.c | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/drivers/serial/atmel.c b/drivers/serial/atmel.c index c2a5d33..10eb2e7 100644 --- a/drivers/serial/atmel.c +++

[PATCH 5/8] loadbxy: use console_open/close

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
so we can use non startup console Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- commands/loadxy.c | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/commands/loadxy.c b/commands/loadxy.c index fe1b5f5..33f923d 100644 --- a/commands/loadxy.c +++ b

[PATCH 3/8] console: factorise function to get the console by name

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
rename it to console_get_by_name Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- commands/loadxy.c | 26 ++ common/console_common.c | 17 + include/console.h | 1 + 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/commands/

[PATCH 0/8] more serial cleanup

2013-09-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi, Today we have a wired implemntation of the console which mix serial and others. Today on serial we init and start the port at probe time. Which is wrong as we need to start the port only if used by barebox. So linux (on at91 as example) may use for uncompress o