Re: [PATCH v2 0/6] BCM2835 / simple framebuffer support

2013-11-12 Thread Andre Heider
Hi Sascha, On Wed, Nov 06, 2013 at 06:40:49PM +0100, Andre Heider wrote: And yes, it works if I set fb0.enable=1 and fb0.register_simplefb=1, both are 0 per default. Now I wonder who/where those are supposed to get set? Is that a job for the runtime environment? if possible I'd like

Re: [PATCH v2 0/6] BCM2835 / simple framebuffer support

2013-11-06 Thread Andre Heider
Hi Sascha, On Wed, Nov 06, 2013 at 10:46:28AM +0100, Sascha Hauer wrote: Hi Andre, On Tue, Nov 05, 2013 at 12:00:58AM +0100, Andre Heider wrote: This is v2 of my patch set posted on 10/24. It adds framebuffer support for the RPi and provides an additional config knob to set up

[PATCH v2 2/6] gui: convert graphic utils to respect line_length

2013-11-04 Thread Andre Heider
Signed-off-by: Andre Heider a.hei...@gmail.com --- lib/gui/graphic_utils.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c index 95687df..300c525 100644 --- a/lib/gui/graphic_utils.c +++ b/lib/gui/graphic_utils.c

[PATCH v2 5/6] video: add a BCM2835 framebuffer driver

2013-11-04 Thread Andre Heider
Use the mailbox driver to set up a framebuffer based on the firmware configuration. Signed-off-by: Andre Heider a.hei...@gmail.com --- arch/arm/boards/raspberry-pi/rpi.c| 1 + arch/arm/mach-bcm2835/include/mach/core.h | 5 ++ drivers/video/Kconfig | 6

[PATCH v2 4/6] ARM: bcm2835: add missing mbox overscan response field

2013-11-04 Thread Andre Heider
Add the missing right field to struct bcm2835_mbox_tag_overscan. Signed-off-by: Andre Heider a.hei...@gmail.com --- arch/arm/mach-bcm2835/include/mach/mbox.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-bcm2835/include/mach/mbox.h b/arch/arm/mach-bcm2835/include/mach/mbox.h

[PATCH v2 1/6] fb: add a line_length value to struct fb_info

2013-11-04 Thread Andre Heider
Add support for framebuffers with noncontiguous horizontal lines. Video drivers can set this value if the hardware requires it. In case a driver does not set it, the current value of xres * (bpp / 8) is used instead. Signed-off-by: Andre Heider a.hei...@gmail.com --- drivers/video/fb.c | 11

[PATCH v2 3/6] gui: convert the bmp renderer to respect line_length

2013-11-04 Thread Andre Heider
Signed-off-by: Andre Heider a.hei...@gmail.com --- lib/gui/bmp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/gui/bmp.c b/lib/gui/bmp.c index 6bf8cd0..dcf3095 100644 --- a/lib/gui/bmp.c +++ b/lib/gui/bmp.c @@ -78,8 +78,8 @@ static int bmp_renderer(struct screen

[PATCH v2 0/6] BCM2835 / simple framebuffer support

2013-11-04 Thread Andre Heider
for the kernel is based on the active barebox framebuffer Andre Heider (6): fb: add a line_length value to struct fb_info gui: convert graphic utils to respect line_length gui: convert the bmp renderer to respect line_length ARM: bcm2835: add missing mbox overscan response field video

Re: [PATCH 1/6] fb: add a stride value to struct fb_info

2013-10-25 Thread Andre Heider
On Fri, Oct 25, 2013 at 12:58:27PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: On 22:23 Thu 24 Oct , Andre Heider wrote: Add support for framebuffers with noncontiguous horizontal lines. Video drivers can set this value if the hardware requires it. In case a driver does not set

[PATCH 0/6] simple framebuffer driver with RPi support

2013-10-24 Thread Andre Heider
. Patch 5 just adds a missing field on a fb related mbox response. Thanks, Andre Andre Heider (6): fb: add a stride value to struct fb_info gui: convert graphic utils to respect the stride value gui: convert the bmp renderer to respect the stride value video: add a simple framebuffer driver

[PATCH 2/6] gui: convert graphic utils to respect the stride value

2013-10-24 Thread Andre Heider
Signed-off-by: Andre Heider a.hei...@gmail.com --- lib/gui/graphic_utils.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c index 95687df..9d80fe4 100644 --- a/lib/gui/graphic_utils.c +++ b/lib/gui/graphic_utils.c

[PATCH 5/6] ARM: bcm2835: add missing mbox overscan response field

2013-10-24 Thread Andre Heider
Add the missing right field to struct bcm2835_mbox_tag_overscan. Signed-off-by: Andre Heider a.hei...@gmail.com --- arch/arm/mach-bcm2835/include/mach/mbox.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-bcm2835/include/mach/mbox.h b/arch/arm/mach-bcm2835/include/mach/mbox.h

[PATCH 4/6] video: add a simple framebuffer driver

2013-10-24 Thread Andre Heider
function call. Doing so provides a framebuffer driver for barebox and a configuration of the corresponding kernel driver through device tree. Signed-off-by: Andre Heider a.hei...@gmail.com --- drivers/video/Kconfig| 12 +++ drivers/video/Makefile | 1 + drivers/video/simplefb.c | 224

[PATCH 6/6] ARM: rpi: add support for simplefb

2013-10-24 Thread Andre Heider
Setup a framebuffer using the mailbox driver and register it as simplefb. Signed-off-by: Andre Heider a.hei...@gmail.com --- arch/arm/boards/raspberry-pi/rpi.c | 84 ++ 1 file changed, 84 insertions(+) diff --git a/arch/arm/boards/raspberry-pi/rpi.c b/arch

[PATCH 3/6] gui: convert the bmp renderer to respect the stride value

2013-10-24 Thread Andre Heider
Signed-off-by: Andre Heider a.hei...@gmail.com --- lib/gui/bmp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/gui/bmp.c b/lib/gui/bmp.c index 6bf8cd0..bb4de12 100644 --- a/lib/gui/bmp.c +++ b/lib/gui/bmp.c @@ -78,8 +78,8 @@ static int bmp_renderer(struct screen

[PATCH 1/6] fb: add a stride value to struct fb_info

2013-10-24 Thread Andre Heider
Add support for framebuffers with noncontiguous horizontal lines. Video drivers can set this value if the hardware requires it. In case a driver does not set it, the current value of xres * (bpp / 8) is used instead. Signed-off-by: Andre Heider a.hei...@gmail.com --- drivers/video/fb.c | 11

Re: [PATCH 00/10] RPi mailbox support

2013-10-22 Thread Andre Heider
On Tue, Oct 22, 2013 at 03:34:05PM +0200, Sascha Hauer wrote: On Sat, Oct 19, 2013 at 02:18:41PM +0200, Andre Heider wrote: This adds a bcm2835 mailbox driver for the RPi to talk to the on-SoC VideoCore. See [1] for a description. This patchset uses it to get two properties, the eMMC

Re: [PATCH 00/10] RPi mailbox support

2013-10-21 Thread Andre Heider
On Mon, Oct 21, 2013 at 10:46:21AM +0200, Sascha Hauer wrote: Hi Andre, On Sat, Oct 19, 2013 at 02:18:41PM +0200, Andre Heider wrote: This adds a bcm2835 mailbox driver for the RPi to talk to the on-SoC VideoCore. See [1] for a description. This patchset uses it to get two properties

[PATCH 01/10] ARM: cache: restore cache functions from the PBL

2013-10-19 Thread Andre Heider
When using CONFIG_MMU_EARLY combined with CONFIG_PBL_IMAGE, the barebox setup reuses the MMU setup from the PBL, but doesn't setup the cache functions. Set these up to guarantee proper early cache handing before mmu_initcall(). Signed-off-by: Andre Heider a.hei...@gmail.com --- arch/arm/cpu

[PATCH 02/10] ARM: cache: do not crash when the MMU isn't yet setup

2013-10-19 Thread Andre Heider
mailbox driver is such a case; it requires cache handling once the MMU is fully set up and yet the RPi setup needs to use the driver to get the memory size before mem_initcall() and hence mmu_initcall(). Fix this by checking the cache_fns pointer before dereferencing it. Signed-off-by: Andre Heider

[PATCH 03/10] common: add a macro to align an array on the stack

2013-10-19 Thread Andre Heider
The macro can be used for temporary stack buffers which need to meet a minimum alignment requirement. This will be used by bcm2835 mailbox users, where all buffers need to be aligned. Signed-off-by: Andre Heider a.hei...@gmail.com --- include/common.h | 11 +++ 1 file changed, 11

[PATCH 06/10] ARM: bcm2835: register the clocksource device earlier

2013-10-19 Thread Andre Heider
RPi's mailbox driver is used early and it needs clock functions to handle timeouts. Register the driver straight after its clkdev. Signed-off-by: Andre Heider a.hei...@gmail.com --- arch/arm/mach-bcm2835/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach

[PATCH 10/10] ARM: rpi: use the proper ARM memory size

2013-10-19 Thread Andre Heider
Use the mailbox driver to query the size. This properly takes the firmware's VideoCore/ARM memory split into account. Linux can now be booted with more than 128 MiB. Signed-off-by: Andre Heider a.hei...@gmail.com --- arch/arm/boards/raspberry-pi/rpi.c | 35 +-- 1

[PATCH 04/10] ARM: bcm2835: cleanup clock registering

2013-10-19 Thread Andre Heider
Sync exposed names while at it. Signed-off-by: Andre Heider a.hei...@gmail.com --- arch/arm/mach-bcm2835/core.c | 31 +++ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/arch/arm/mach-bcm2835/core.c b/arch/arm/mach-bcm2835/core.c index 906e434..6835960

[PATCH 05/10] ARM: bcm2835: register the clocksource driver earlier

2013-10-19 Thread Andre Heider
RPi's mailbox driver is used early and it needs clock functions to handle timeouts. Promote to a core_initcall(). Signed-off-by: Andre Heider a.hei...@gmail.com --- drivers/clocksource/bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/bcm2835.c b

[PATCH 08/10] ARM: rpi: register a clkdev for the eMMC clock

2013-10-19 Thread Andre Heider
Use the mailbox driver to query the clock frequency and create a clkdev for the bcm2835_mci driver. Signed-off-by: Andre Heider a.hei...@gmail.com --- arch/arm/boards/raspberry-pi/rpi.c | 40 ++ 1 file changed, 40 insertions(+) diff --git a/arch/arm/boards

[PATCH 09/10] mci: bcm2835: use the registered device clkdev

2013-10-19 Thread Andre Heider
Switch from local mailbox code to using the newly created clock device. Signed-off-by: Andre Heider a.hei...@gmail.com --- drivers/mci/mci-bcm2835.c | 93 ++- drivers/mci/mci-bcm2835.h | 48 2 files changed, 19 insertions

Re: [PATCH] ARM: rpi: fix reading of the EMMC clock for CONFIG_MMU

2013-10-16 Thread Andre Heider
On Wed, Oct 16, 2013 at 09:32:09AM +0200, Lucas Stach wrote: Am Dienstag, den 15.10.2013, 19:38 +0200 schrieb Andre Heider: Add explicit flushing to prevent the 50MHz fallback. Uh, this is pretty ugly. We certainly don't want all those explicit invalidates/flushes in the driver code. Isn't

Re: [PATCH] ARM: rpi: add SD card environment support

2013-10-15 Thread Andre Heider
Hi, On Tue, Oct 15, 2013 at 12:50:14PM +0200, Sascha Hauer wrote: Similar to the OMAP boards mount the SD card to /boot and expect the environment as /boot/barebox.env Signed-off-by: Sascha Hauer s.ha...@pengutronix.de --- arch/arm/boards/raspberry-pi/rpi.c | 33

Re: [PATCH] ARM: rpi: add SD card environment support

2013-10-15 Thread Andre Heider
On Tue, Oct 15, 2013 at 02:53:12PM +0200, Sascha Hauer wrote: On Tue, Oct 15, 2013 at 01:54:50PM +0200, Andre Heider wrote: Hi, +static int rpi_env_init(void) +{ + struct stat s; + const char *diskdev = /dev/disk0.0; + int ret; + + device_detect_by_name(mci0

[PATCH] ARM: rpi: fix reading of the EMMC clock for CONFIG_MMU

2013-10-15 Thread Andre Heider
Add explicit flushing to prevent the 50MHz fallback. Signed-off-by: Andre Heider a.hei...@gmail.com --- drivers/mci/mci-bcm2835.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c index a0c364d..2ffdeec 100644

Re: [PATCH 2/2] ARM: rpi: Update defconfig

2013-10-15 Thread Andre Heider
On Tue, Oct 15, 2013 at 11:00:40AM +0200, Sascha Hauer wrote: Enable MMU, stack dumps and a lot of other features Signed-off-by: Sascha Hauer s.ha...@pengutronix.de --- arch/arm/configs/rpi_defconfig | 45 -- 1 file changed, 35 insertions(+), 10

Re: raspberry pi mmc issue

2013-10-15 Thread Andre Heider
Hi, On Tue, Oct 15, 2013 at 08:31:11PM +0200, Alexander Aring wrote: Hi Sascha, On Tue, Oct 15, 2013 at 02:23:32PM +0200, Sascha Hauer wrote: The only thing I realize here is that my 3.6.4 kernel fails to access the SD card when barebox has accessed it before: [3.623861] mmc0: SD