Re: [PATCH] kbuild: add KBUILD_DEFCONFIG

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 04:54:47PM +0900, Masahiro Yamada wrote:
> Hi Jean-Christophe,
> 
> On Tue, 13 Jan 2015 14:53:19 +0800
> Jean-Christophe PLAGNIOL-VILLARD  wrote:
> 
> > 
> > > On Jan 13, 2015, at 2:46 PM, Masahiro Yamada  
> > > wrote:
> > > 
> > > This allows "make ARCH=... defconfig".
> > > 
> > > Fox example, you can type "make defconfig" instead of
> > > "make sandbox_defconfig".
> > > 
> > > Signed-off-by: Masahiro Yamada 
> > > ---
> > > 
> > > arch/arm/Makefile  | 1 +
> > > arch/blackfin/Makefile | 1 +
> > > arch/efi/Makefile  | 2 ++
> > > arch/nios2/Makefile| 2 ++
> > > arch/openrisc/Makefile | 2 ++
> > > arch/sandbox/Makefile  | 1 +
> > > arch/x86/Makefile  | 2 ++
> > > 7 files changed, 11 insertions(+)
> > > 
> > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> > > index f06e2a0..9dd983b 100644
> > > --- a/arch/arm/Makefile
> > > +++ b/arch/arm/Makefile
> > > @@ -1,3 +1,4 @@
> > > +KBUILD_DEFCONFIG := versatilepb_defconfig
> > 
> > no sure we need a default config on arm and some other
> > 
> > I known we use them on the kernel but here it could result in a broken board
> > if use not carefully
> > 
> > for arch that only have 1 defconfig and will only have one maybe
> > 
> 
> Why could it result in a broken board?  (It seems harmless to me.)
> 
> I think it is useful at least for Sandbox and some other arches that
> have only "generic_defconfig".
> 
> It is true that KBUILD_DEFCONFIG is not so useful for ARM.
> If it is not desired for ARM (and Blackfin), we can drop it, of course.

I think it makes sense on EFI, x86 and sandbox. On the other
architectures one must know which board to build, so let's do not
get others the impression that the generic defconfig produces something
useful. This also includes nios2 and openrisc. For these two only
one defconfig exists but I think this is more because these
architectures have very limited usage.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH] kbuild: arm: Do not define "comma" twice

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 03:53:18PM +0900, Masahiro Yamada wrote:
> The definition of "comma" exists in scripts/Kbuild.include.
> We should not double it.
> 
> Note:
> This was already fixed in Linux Kernel too.
> See commit 226422d08c33 of Linux Kernel.
> 
> Signed-off-by: Masahiro Yamada 

Applied, thanks

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH] powerpc: include to avoid dupulicated defines

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 04:02:30PM +0900, Masahiro Yamada wrote:
> Signed-off-by: Masahiro Yamada 
> ---
> 
>  arch/ppc/lib/crtsavres.S | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 0/5] .gitignore fixes

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 04:20:41PM +0900, Masahiro Yamada wrote:
> 
> 
> 
> Borislav Petkov (1):
>   gitignore: add all.config
> 
> Jani Nikula (1):
>   gitignore: Add GNU GLOBAL files to top .gitignore
> 
> Jike Song (1):
>   .gitignore: match ncscope.out
> 
> Masahiro Yamada (2):
>   gitignore: do not ignore .mailmap
>   gitignore: remove bogus ignore patterns
> 
>  .gitignore | 13 +++--
>  1 file changed, 11 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 1/3] defaultenv-2: fix misplace NV dir in env

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 07:21:08AM +0100, Jean-Christophe PLAGNIOL-VILLARD 
wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD 

Applied this one to master

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH v2] kbuild: add KBUILD_DEFCONFIG

2015-01-13 Thread Masahiro Yamada
This allows "make ARCH=... defconfig".

Fox example, you can type "make defconfig" instead of
"make sandbox_defconfig".

Signed-off-by: Masahiro Yamada 
---

Changes in v2:
  - Add it only to sandbox, x86, efi.

 arch/efi/Makefile | 2 ++
 arch/sandbox/Makefile | 1 +
 arch/x86/Makefile | 2 ++
 3 files changed, 5 insertions(+)

diff --git a/arch/efi/Makefile b/arch/efi/Makefile
index 85cb655..b078bd0 100644
--- a/arch/efi/Makefile
+++ b/arch/efi/Makefile
@@ -1,3 +1,5 @@
+KBUILD_DEFCONFIG := efi_defconfig
+
 CFLAGS += -fpic -fshort-wchar -mno-sse -mno-mmx
 
 ifeq ($(CONFIG_X86_32),y)
diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index ed5d3a3..e3fb039 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -1,3 +1,4 @@
+KBUILD_DEFCONFIG := sandbox_defconfig
 
 CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing
 
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index a78fa22..da17d70 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -1,3 +1,5 @@
+KBUILD_DEFCONFIG := generic_defconfig
+
 CPPFLAGS += -D__X86__ -fno-strict-aliasing
 
 board-y := x86_generic
-- 
1.9.1


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 2/6] raspberry-pi: add leds support

2015-01-13 Thread Jean-Christophe PLAGNIOL-VILLARD

> On Jan 13, 2015, at 3:58 PM, Antony Pavlov  wrote:
> 
> On Tue, 13 Jan 2015 07:26:12 +0100
> Jean-Christophe PLAGNIOL-VILLARD  wrote:
> 
> I have planned to switch raspberry pi to device tree support as Linux does.

but as I do not want to build multi binary switch (leds & co) those to DT make 
no sense except if we can
chose the DT at runtime

> 
> IMHO POWER LED is not GPIO controlable, please see these schematics

yes it is does, I have a B+ and it’s controllable

Best Regards,
J.
> 
>   
> http://www.raspberrypi.org/wp-content/uploads/2012/04/Raspberry-Pi-Schematics-R1.0.pdf
>   
> http://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/Raspberry-Pi-B-Plus-V1.2-Schematics.pdf
> 
> 
>> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD 
>> ---
>> arch/arm/boards/raspberry-pi/rpi.c | 55 
>> ++
>> 1 file changed, 55 insertions(+)
>> 
>> diff --git a/arch/arm/boards/raspberry-pi/rpi.c 
>> b/arch/arm/boards/raspberry-pi/rpi.c
>> index ae1e92a..7d866cc 100644
>> --- a/arch/arm/boards/raspberry-pi/rpi.c
>> +++ b/arch/arm/boards/raspberry-pi/rpi.c
>> @@ -21,6 +21,8 @@
>> #include 
>> #include 
>> #include 
>> +#include 
>> +#include 
>> #include 
>> #include 
>> 
>> @@ -87,6 +89,49 @@ static int rpi_register_clkdev(u32 clock_id, const char 
>> *name)
>> }
>> 
>> 
>> +static struct gpio_led leds[] = {
>> +{
>> +.gpio   = -EINVAL,
>> +.led= {
>> +.name = "ACT",
>> +},
>> +}, {
>> +.gpio   = -EINVAL,
>> +.led= {
>> +.name = "PWR",
>> +},
>> +},
>> +};
>> +
>> +static void rpi_add_led(void)
>> +{
>> +int i;
>> +struct gpio_led *l;
>> +
>> +for (i = 0; i < ARRAY_SIZE(leds); i++) {
>> +l = &leds[i];
>> +
>> +if (gpio_is_valid(l->gpio))
>> +led_gpio_register(l);
>> +}
>> +
>> +l = &leds[0];
>> +if (gpio_is_valid(l->gpio))
>> +led_set_trigger(LED_TRIGGER_HEARTBEAT, &l->led);
>> +}
>> +
>> +static void rpi_b_plus_init(void)
>> +{
>> +leds[0].gpio = 47;
>> +leds[1].gpio = 35;
>> +}
>> +
>> +static void rpi_b_init(void)
>> +{
>> +leds[0].gpio = 16;
>> +leds[0].active_low = 1;
>> +}
>> +
>> #define RPI_MODEL(_id, _name, _init) \
>>  [_id] = {   \
>>  .name   = _name,\
>> @@ -160,6 +205,15 @@ unknown_rev:
>>  barebox_set_model("RaspberryPi (BCM2835/ARM1176JZF-S)");
>> }
>> 
>> +static void rpi_model_init(void)
>> +{
>> +rpi_set_usbethaddr();
>> +if (models[rpi_board_rev].init) {
>> +models[rpi_board_rev].init();
>> +rpi_add_led();
>> +}
>> +}
>> +
>> static int rpi_mem_init(void)
>> {
>>  u32 size = 0;
>> @@ -220,6 +274,7 @@ static int rpi_env_init(void)
>> 
>> static int rpi_devices_init(void)
>> {
>> +rpi_model_init();
>>  bcm2835_register_mci();
>>  bcm2835_register_fb();
>>  armlinux_set_architecture(MACH_TYPE_BCM2708);
>> -- 
>> 2.1.3
>> 
>> 
>> ___
>> barebox mailing list
>> barebox@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/barebox
> 
> 
> -- 
> -- 
> Best regards,
>   Antony Pavlov


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH v2] kbuild: add KBUILD_DEFCONFIG

2015-01-13 Thread Jean-Christophe PLAGNIOL-VILLARD

> On Jan 13, 2015, at 4:14 PM, Masahiro Yamada  
> wrote:
> 
> This allows "make ARCH=... defconfig".
> 
> Fox example, you can type "make defconfig" instead of
> "make sandbox_defconfig".
> 
> Signed-off-by: Masahiro Yamada 
Ack
> ---
> 
> Changes in v2:
>  - Add it only to sandbox, x86, efi.
> 
> arch/efi/Makefile | 2 ++
> arch/sandbox/Makefile | 1 +
> arch/x86/Makefile | 2 ++
> 3 files changed, 5 insertions(+)
> 
> diff --git a/arch/efi/Makefile b/arch/efi/Makefile
> index 85cb655..b078bd0 100644
> --- a/arch/efi/Makefile
> +++ b/arch/efi/Makefile
> @@ -1,3 +1,5 @@
> +KBUILD_DEFCONFIG := efi_defconfig
> +
> CFLAGS += -fpic -fshort-wchar -mno-sse -mno-mmx
> 
> ifeq ($(CONFIG_X86_32),y)
> diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
> index ed5d3a3..e3fb039 100644
> --- a/arch/sandbox/Makefile
> +++ b/arch/sandbox/Makefile
> @@ -1,3 +1,4 @@
> +KBUILD_DEFCONFIG := sandbox_defconfig
> 
> CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing
> 
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index a78fa22..da17d70 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -1,3 +1,5 @@
> +KBUILD_DEFCONFIG := generic_defconfig
> +
> CPPFLAGS += -D__X86__ -fno-strict-aliasing
> 
> board-y := x86_generic
> -- 
> 1.9.1
> 
> 
> ___
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH] kbuild: add KBUILD_DEFCONFIG

2015-01-13 Thread Masahiro Yamada

On Tue, 13 Jan 2015 09:02:58 +0100
Sascha Hauer  wrote:

> On Tue, Jan 13, 2015 at 04:54:47PM +0900, Masahiro Yamada wrote:
> > Hi Jean-Christophe,
> > 
> > On Tue, 13 Jan 2015 14:53:19 +0800
> > Jean-Christophe PLAGNIOL-VILLARD  wrote:
> > 
> > > 
> > > > On Jan 13, 2015, at 2:46 PM, Masahiro Yamada 
> > > >  wrote:
> > > > 
> > > > This allows "make ARCH=... defconfig".
> > > > 
> > > > Fox example, you can type "make defconfig" instead of
> > > > "make sandbox_defconfig".
> > > > 
> > > > Signed-off-by: Masahiro Yamada 
> > > > ---
> > > > 
> > > > arch/arm/Makefile  | 1 +
> > > > arch/blackfin/Makefile | 1 +
> > > > arch/efi/Makefile  | 2 ++
> > > > arch/nios2/Makefile| 2 ++
> > > > arch/openrisc/Makefile | 2 ++
> > > > arch/sandbox/Makefile  | 1 +
> > > > arch/x86/Makefile  | 2 ++
> > > > 7 files changed, 11 insertions(+)
> > > > 
> > > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> > > > index f06e2a0..9dd983b 100644
> > > > --- a/arch/arm/Makefile
> > > > +++ b/arch/arm/Makefile
> > > > @@ -1,3 +1,4 @@
> > > > +KBUILD_DEFCONFIG := versatilepb_defconfig
> > > 
> > > no sure we need a default config on arm and some other
> > > 
> > > I known we use them on the kernel but here it could result in a broken 
> > > board
> > > if use not carefully
> > > 
> > > for arch that only have 1 defconfig and will only have one maybe
> > > 
> > 
> > Why could it result in a broken board?  (It seems harmless to me.)
> > 
> > I think it is useful at least for Sandbox and some other arches that
> > have only "generic_defconfig".
> > 
> > It is true that KBUILD_DEFCONFIG is not so useful for ARM.
> > If it is not desired for ARM (and Blackfin), we can drop it, of course.
> 
> I think it makes sense on EFI, x86 and sandbox. On the other
> architectures one must know which board to build, so let's do not
> get others the impression that the generic defconfig produces something
> useful. This also includes nios2 and openrisc. For these two only
> one defconfig exists but I think this is more because these
> architectures have very limited usage.
> 

OK, I have posted v2 where only EFI, x86 and sandbox is changed.

Best Regards
Masahiro Yamada



___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 2/3] defaultenv-2: introduce /env/rc.d

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 07:21:09AM +0100, Jean-Christophe PLAGNIOL-VILLARD 
wrote:
> as we now will use symlink on /env/rc.d to specify init order
> 
> the script will be store in /env/init
> 
> so any board can overwrite them or add script that need to run before a
> default one

Boards can overwrite scripts without links. Numbering the files seems
good because it makes the execution order more predictable and easier to
put a script between two other scripts.

But why links? On Linux PCs this allows to separate distribution
provided scripts from their actual (site specific) execution. Also
the same scripts can be executed from different runlevels.
On barebox I see no good reason for links. There is only one runlevel
in barebox and if I don't want to execute a script I can just remove it.

Sascha


-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 2/3] defaultenv-2: introduce /env/rc.d

2015-01-13 Thread Jean-Christophe PLAGNIOL-VILLARD

> On Jan 13, 2015, at 4:25 PM, Sascha Hauer  wrote:
> 
> On Tue, Jan 13, 2015 at 07:21:09AM +0100, Jean-Christophe PLAGNIOL-VILLARD 
> wrote:
>> as we now will use symlink on /env/rc.d to specify init order
>> 
>> the script will be store in /env/init
>> 
>> so any board can overwrite them or add script that need to run before a
>> default one
> 
> Boards can overwrite scripts without links. Numbering the files seems
> good because it makes the execution order more predictable and easier to
> put a script between two other scripts.
> 
> But why links? On Linux PCs this allows to separate distribution
> provided scripts from their actual (site specific) execution. Also
> the same scripts can be executed from different runlevels.
> On barebox I see no good reason for links. There is only one runlevel
> in barebox and if I don't want to execute a script I can just remove it.
> 

Runtime change

I’ve a board where I need to change the init order based on the board revision

so the symlink allow this

and this will allow also to have the same script at different order based on 
the board
requirement.

Best Regards,
J.

> Sascha
> 
> 
> -- 
> Pengutronix e.K.   | |
> Industrial Linux Solutions | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
> Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 2/3] defaultenv-2: introduce /env/rc.d

2015-01-13 Thread Jan Lübbe
Hi Jean-Christophe,

On Tue, 2015-01-13 at 16:29 +0800, Jean-Christophe PLAGNIOL-VILLARD wrote:
> and this will allow also to have the same script at different order
> based on the board requirement.

So without links you should be able to use 'mv' instead of 'ln'.

If this doesn't work for your case, could you describe it in a bit more
detail?

Regards,
Jan
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |



___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 2/3] defaultenv-2: introduce /env/rc.d

2015-01-13 Thread Jean-Christophe PLAGNIOL-VILLARD

> On Jan 13, 2015, at 5:12 PM, Jan Lübbe  wrote:
> 
> Hi Jean-Christophe,
> 
> On Tue, 2015-01-13 at 16:29 +0800, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> and this will allow also to have the same script at different order
>> based on the board requirement.
> 
> So without links you should be able to use 'mv' instead of 'ln'.
> 
> If this doesn't work for your case, could you describe it in a bit more
> detail?

yes you could do this but this make updates difficult

the links you can drop/remove them all and recreate them at runtime

it’s predictable

secondly I’m preparing a second patch series to add shutdown sequence

but in this case the shutdown is not necessary the same as init

so symlink give us flexibility

Best Regards,
J.

> 
> Regards,
> Jan
> -- 
> Pengutronix e.K.   | |
> Industrial Linux Solutions | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
> Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
> 
> 


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH] gitignore: remove obsolete link method for arch specification

2015-01-13 Thread Masahiro Yamada
The cross_arch and cross_compile links method is obsolete and not
available any more, so we remove it from the .gitignore.

Signed-off-by: Masahiro Yamada 
---

 .gitignore | 2 --
 1 file changed, 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 74d24ea..0456bfd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,8 +31,6 @@
 #
 tags
 TAGS
-cross_arch
-cross_compile
 barebox
 barebox.S
 barebox.bin
-- 
1.9.1


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH] ARM: include some headers from barebox-arm.h

2015-01-13 Thread Masahiro Yamada
ENTRY_FUNCTION() references __barebox_arm_head(),
so  should be included from barebox-arm.h
to avoid implicit declaration warning/error.

ENTRY_FUNCTION() uses __naked, so  should also be
included.

Signed-off-by: Masahiro Yamada 
---

 arch/arm/include/asm/barebox-arm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/barebox-arm.h 
b/arch/arm/include/asm/barebox-arm.h
index 9ad07cb..dbc8aaa 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -29,6 +29,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 /* cpu/.../cpu.c */
 intcleanup_before_linux(void);
-- 
1.9.1


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 2/6] raspberry-pi: add leds support

2015-01-13 Thread Antony Pavlov
On Tue, 13 Jan 2015 16:15:45 +0800
Jean-Christophe PLAGNIOL-VILLARD  wrote:

> 
> > On Jan 13, 2015, at 3:58 PM, Antony Pavlov  wrote:
> > 
> > On Tue, 13 Jan 2015 07:26:12 +0100
> > Jean-Christophe PLAGNIOL-VILLARD  wrote:
> > 
> > I have planned to switch raspberry pi to device tree support as Linux does.
> 
> but as I do not want to build multi binary switch (leds & co) those to DT 
> make no sense except if we can
> chose the DT at runtime
> 
> > 
> > IMHO POWER LED is not GPIO controlable, please see these schematics
> 
> yes it is does, I have a B+ and it’s controllable

I'll check your series on my B+ in a few days.


> >   
> > http://www.raspberrypi.org/wp-content/uploads/2012/04/Raspberry-Pi-Schematics-R1.0.pdf
> >   
> > http://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/Raspberry-Pi-B-Plus-V1.2-Schematics.pdf
> > 
> > 
> >> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD 
> >> ---
> >> arch/arm/boards/raspberry-pi/rpi.c | 55 
> >> ++
> >> 1 file changed, 55 insertions(+)
> >> 
> >> diff --git a/arch/arm/boards/raspberry-pi/rpi.c 
> >> b/arch/arm/boards/raspberry-pi/rpi.c
> >> index ae1e92a..7d866cc 100644
> >> --- a/arch/arm/boards/raspberry-pi/rpi.c
> >> +++ b/arch/arm/boards/raspberry-pi/rpi.c
> >> @@ -21,6 +21,8 @@
> >> #include 
> >> #include 
> >> #include 
> >> +#include 
> >> +#include 
> >> #include 
> >> #include 
> >> 
> >> @@ -87,6 +89,49 @@ static int rpi_register_clkdev(u32 clock_id, const char 
> >> *name)
> >> }
> >> 
> >> 
> >> +static struct gpio_led leds[] = {
> >> +  {
> >> +  .gpio   = -EINVAL,
> >> +  .led= {
> >> +  .name = "ACT",
> >> +  },
> >> +  }, {
> >> +  .gpio   = -EINVAL,
> >> +  .led= {
> >> +  .name = "PWR",
> >> +  },
> >> +  },
> >> +};
> >> +
> >> +static void rpi_add_led(void)
> >> +{
> >> +  int i;
> >> +  struct gpio_led *l;
> >> +
> >> +  for (i = 0; i < ARRAY_SIZE(leds); i++) {
> >> +  l = &leds[i];
> >> +
> >> +  if (gpio_is_valid(l->gpio))
> >> +  led_gpio_register(l);
> >> +  }
> >> +
> >> +  l = &leds[0];
> >> +  if (gpio_is_valid(l->gpio))
> >> +  led_set_trigger(LED_TRIGGER_HEARTBEAT, &l->led);
> >> +}
> >> +
> >> +static void rpi_b_plus_init(void)
> >> +{
> >> +  leds[0].gpio = 47;
> >> +  leds[1].gpio = 35;
> >> +}
> >> +
> >> +static void rpi_b_init(void)
> >> +{
> >> +  leds[0].gpio = 16;
> >> +  leds[0].active_low = 1;
> >> +}
> >> +
> >> #define RPI_MODEL(_id, _name, _init)   \
> >>[_id] = {   \
> >>.name   = _name,\
> >> @@ -160,6 +205,15 @@ unknown_rev:
> >>barebox_set_model("RaspberryPi (BCM2835/ARM1176JZF-S)");
> >> }
> >> 
> >> +static void rpi_model_init(void)
> >> +{
> >> +  rpi_set_usbethaddr();
> >> +  if (models[rpi_board_rev].init) {
> >> +  models[rpi_board_rev].init();
> >> +  rpi_add_led();
> >> +  }
> >> +}
> >> +
> >> static int rpi_mem_init(void)
> >> {
> >>u32 size = 0;
> >> @@ -220,6 +274,7 @@ static int rpi_env_init(void)
> >> 
> >> static int rpi_devices_init(void)
> >> {
> >> +  rpi_model_init();
> >>bcm2835_register_mci();
> >>bcm2835_register_fb();
> >>armlinux_set_architecture(MACH_TYPE_BCM2708);
> >> -- 
> >> 2.1.3
> >> 
> >> 
> >> ___
> >> barebox mailing list
> >> barebox@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/barebox
> > 
> > 
> > -- 
> > -- 
> > Best regards,
> >   Antony Pavlov
> 


-- 
-- 
Best regards,
  Antony Pavlov

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH v2] kbuild: add KBUILD_DEFCONFIG

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 05:14:36PM +0900, Masahiro Yamada wrote:
> This allows "make ARCH=... defconfig".
> 
> Fox example, you can type "make defconfig" instead of
> "make sandbox_defconfig".
> 
> Signed-off-by: Masahiro Yamada 

Applied, thanks

Sascha


-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH] ARM: include some headers from barebox-arm.h

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 06:36:54PM +0900, Masahiro Yamada wrote:
> ENTRY_FUNCTION() references __barebox_arm_head(),
> so  should be included from barebox-arm.h
> to avoid implicit declaration warning/error.
> 
> ENTRY_FUNCTION() uses __naked, so  should also be
> included.
> 
> Signed-off-by: Masahiro Yamada 

Applied, thanks

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 0/6 v2] raspberry-pi: updates

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 07:31:28AM +0100, Jean-Christophe PLAGNIOL-VILLARD 
wrote:
> Hi,
> 
>   v2:
> 
>   send correct leds patch
> 
>   The following patch serie prepare the raspberry for USB support
> 
> The following changes since commit 9cd14d260aa22ae089f81a07be2c0e5dea2ffc94:
> 
>   Merge branch 'for-next/pbl-console' (2015-01-09 17:38:27 +0100)
> 
> are available in the git repository at:
> 
>   git://git.jcrosoft.org/barebox.git delivery/rpi
> 
> for you to fetch changes up to 70d2d564af770d99c0e8a4fbfa314e6d55d58629:
> 
>   regulator: add bcm2835 driver (2015-01-11 19:04:06 +0800)

Applied, thanks

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 2/6] raspberry-pi: add leds support

2015-01-13 Thread Sascha Hauer
On Tue, Jan 13, 2015 at 01:11:38PM +0300, Antony Pavlov wrote:
> On Tue, 13 Jan 2015 16:15:45 +0800
> Jean-Christophe PLAGNIOL-VILLARD  wrote:
> 
> > 
> > > On Jan 13, 2015, at 3:58 PM, Antony Pavlov  
> > > wrote:
> > > 
> > > On Tue, 13 Jan 2015 07:26:12 +0100
> > > Jean-Christophe PLAGNIOL-VILLARD  wrote:
> > > 
> > > I have planned to switch raspberry pi to device tree support as Linux 
> > > does.
> > 
> > but as I do not want to build multi binary switch (leds & co) those to DT 
> > make no sense except if we can
> > chose the DT at runtime
> > 
> > > 
> > > IMHO POWER LED is not GPIO controlable, please see these schematics
> > 
> > yes it is does, I have a B+ and it’s controllable
> 
> I'll check your series on my B+ in a few days.

I merged this series for now, let me know when there are fixups
necessary.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox