All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] Fix linux-rock booting on rockchip 3288
@ 2015-11-22  7:21 Sjoerd Simons
  2015-11-22  7:21 ` [U-Boot] [PATCH 1/2] Revert "rockchip: Reconfigure the malloc based to point to system memory" Sjoerd Simons
  2015-11-22  7:21 ` [U-Boot] [PATCH 2/2] rockchip: Explicitely set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN Sjoerd Simons
  0 siblings, 2 replies; 8+ messages in thread
From: Sjoerd Simons @ 2015-11-22  7:21 UTC (permalink / raw)
  To: u-boot


Booting on Rockchip 3288 broke in linux-rockchip as the defaults for the
SPL relocation code made the heap start at a negative address (or really
wrap around).

First patch reverts an old relocation workaround from me, which can be
dropped since there is now proper support for relocating in the SPL.
Second patch updates the configuration for RK3288 which fixes booting.


Sjoerd Simons (2):
  Revert "rockchip: Reconfigure the malloc based to point to system
    memory"
  rockchip: Explicitely set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN

 arch/arm/mach-rockchip/board-spl.c | 7 -------
 configs/chromebook_jerry_defconfig | 1 +
 configs/firefly-rk3288_defconfig   | 1 +
 3 files changed, 2 insertions(+), 7 deletions(-)

-- 
2.6.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] Revert "rockchip: Reconfigure the malloc based to point to system memory"
  2015-11-22  7:21 [U-Boot] [PATCH 0/2] Fix linux-rock booting on rockchip 3288 Sjoerd Simons
@ 2015-11-22  7:21 ` Sjoerd Simons
  2015-11-22 16:11   ` Simon Glass
  2015-11-22  7:21 ` [U-Boot] [PATCH 2/2] rockchip: Explicitely set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN Sjoerd Simons
  1 sibling, 1 reply; 8+ messages in thread
From: Sjoerd Simons @ 2015-11-22  7:21 UTC (permalink / raw)
  To: u-boot

This patch was merged shortly before the v2015.10 as a minimal fix for
booting on rockchip. Now that the patch series from Hans to do the
relocation in generic code has been merged it can be dropped.

This reverts commit b1f492ca9e0c090209824ff36456d4f131843190.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---

 arch/arm/mach-rockchip/board-spl.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/arch/arm/mach-rockchip/board-spl.c b/arch/arm/mach-rockchip/board-spl.c
index 28c3949..a241d96 100644
--- a/arch/arm/mach-rockchip/board-spl.c
+++ b/arch/arm/mach-rockchip/board-spl.c
@@ -217,13 +217,6 @@ void board_init_f(ulong dummy)
 		debug("DRAM init failed: %d\n", ret);
 		return;
 	}
-
-	/*
-	 * Now that DRAM is initialized setup base pointer for simple malloc
-	 * into RAM.
-	 */
-	gd->malloc_base = CONFIG_SPL_STACK_R_ADDR;
-	gd->malloc_ptr = 0;
 }
 
 static int setup_led(void)
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/2] rockchip: Explicitely set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN
  2015-11-22  7:21 [U-Boot] [PATCH 0/2] Fix linux-rock booting on rockchip 3288 Sjoerd Simons
  2015-11-22  7:21 ` [U-Boot] [PATCH 1/2] Revert "rockchip: Reconfigure the malloc based to point to system memory" Sjoerd Simons
@ 2015-11-22  7:21 ` Sjoerd Simons
  2015-11-22 16:11   ` Simon Glass
  1 sibling, 1 reply; 8+ messages in thread
From: Sjoerd Simons @ 2015-11-22  7:21 UTC (permalink / raw)
  To: u-boot

Now that u-boot relocates the malloc area in SPL to SDRAM, with the
malloc area sitting below the SPL_STACK_R_ADDR the
SPL_STACK_R_MALLOC_SIMPLE_LEN needs to be set explicitely for
rockchip as its SPL_STACK_R_ADDR (512kb) is smaller then
STACK_R_MALLOC_SIMPLE_LEN (1Mb).

Using the same value as SYS_MALLOC_F_LEN (8kb) is enough to load u-boot
from SD card.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

---

 configs/chromebook_jerry_defconfig | 1 +
 configs/firefly-rk3288_defconfig   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index e07a6e4..7424e09 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_ROCKCHIP_RK3288=y
 CONFIG_TARGET_CHROMEBOOK_JERRY=y
 CONFIG_SPL_STACK_R_ADDR=0x80000
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="rk3288-jerry"
 CONFIG_SPL_STACK_R=y
 # CONFIG_CMD_IMLS is not set
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 6f42377..09e48b9 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -4,6 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_ROCKCHIP_RK3288=y
 CONFIG_TARGET_FIREFLY_RK3288=y
 CONFIG_SPL_STACK_R_ADDR=0x80000
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="rk3288-firefly"
 CONFIG_SPL_STACK_R=y
 # CONFIG_CMD_IMLS is not set
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/2] rockchip: Explicitely set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN
  2015-11-22  7:21 ` [U-Boot] [PATCH 2/2] rockchip: Explicitely set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN Sjoerd Simons
@ 2015-11-22 16:11   ` Simon Glass
  2015-11-23  9:50     ` Sjoerd Simons
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2015-11-22 16:11 UTC (permalink / raw)
  To: u-boot

On 22 November 2015 at 00:21, Sjoerd Simons
<sjoerd.simons@collabora.co.uk> wrote:
> Now that u-boot relocates the malloc area in SPL to SDRAM, with the
> malloc area sitting below the SPL_STACK_R_ADDR the
> SPL_STACK_R_MALLOC_SIMPLE_LEN needs to be set explicitely for
> rockchip as its SPL_STACK_R_ADDR (512kb) is smaller then
> STACK_R_MALLOC_SIMPLE_LEN (1Mb).
>
> Using the same value as SYS_MALLOC_F_LEN (8kb) is enough to load u-boot
> from SD card.
>
> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
>
> ---
>
>  configs/chromebook_jerry_defconfig | 1 +
>  configs/firefly-rk3288_defconfig   | 1 +
>  2 files changed, 2 insertions(+)

Explicitly (I can fix when applying if you like)

Acked-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] Revert "rockchip: Reconfigure the malloc based to point to system memory"
  2015-11-22  7:21 ` [U-Boot] [PATCH 1/2] Revert "rockchip: Reconfigure the malloc based to point to system memory" Sjoerd Simons
@ 2015-11-22 16:11   ` Simon Glass
  2015-11-27  3:35     ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2015-11-22 16:11 UTC (permalink / raw)
  To: u-boot

On 22 November 2015 at 00:21, Sjoerd Simons
<sjoerd.simons@collabora.co.uk> wrote:
> This patch was merged shortly before the v2015.10 as a minimal fix for
> booting on rockchip. Now that the patch series from Hans to do the
> relocation in generic code has been merged it can be dropped.
>
> This reverts commit b1f492ca9e0c090209824ff36456d4f131843190.
>
> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> ---
>
>  arch/arm/mach-rockchip/board-spl.c | 7 -------
>  1 file changed, 7 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/2] rockchip: Explicitely set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN
  2015-11-22 16:11   ` Simon Glass
@ 2015-11-23  9:50     ` Sjoerd Simons
  2015-11-27  3:35       ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Sjoerd Simons @ 2015-11-23  9:50 UTC (permalink / raw)
  To: u-boot

On Sun, 2015-11-22 at 09:11 -0700, Simon Glass wrote:
> On 22 November 2015 at 00:21, Sjoerd Simons
> <sjoerd.simons@collabora.co.uk> wrote:
> > Now that u-boot relocates the malloc area in SPL to SDRAM, with the
> > malloc area sitting below the SPL_STACK_R_ADDR the
> > SPL_STACK_R_MALLOC_SIMPLE_LEN needs to be set explicitely for
> > rockchip as its SPL_STACK_R_ADDR (512kb) is smaller then
> > STACK_R_MALLOC_SIMPLE_LEN (1Mb).
> > 
> > Using the same value as SYS_MALLOC_F_LEN (8kb) is enough to load u-
> > boot
> > from SD card.
> > 
> > Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> > 
> > ---
> > 
> > ?configs/chromebook_jerry_defconfig | 1 +
> > ?configs/firefly-rk3288_defconfig???| 1 +
> > ?2 files changed, 2 insertions(+)
> 
> Explicitly (I can fix when applying if you like)
> 
> Acked-by: Simon Glass <sjg@chromium.org>

Yes please, saves doing another round :) Thanks!

-- 
Sjoerd Simons
Collabora Ltd.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/2] rockchip: Explicitely set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN
  2015-11-23  9:50     ` Sjoerd Simons
@ 2015-11-27  3:35       ` Simon Glass
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2015-11-27  3:35 UTC (permalink / raw)
  To: u-boot

On 23 November 2015 at 01:50, Sjoerd Simons
<sjoerd.simons@collabora.co.uk> wrote:
> On Sun, 2015-11-22 at 09:11 -0700, Simon Glass wrote:
>> On 22 November 2015 at 00:21, Sjoerd Simons
>> <sjoerd.simons@collabora.co.uk> wrote:
>> > Now that u-boot relocates the malloc area in SPL to SDRAM, with the
>> > malloc area sitting below the SPL_STACK_R_ADDR the
>> > SPL_STACK_R_MALLOC_SIMPLE_LEN needs to be set explicitely for
>> > rockchip as its SPL_STACK_R_ADDR (512kb) is smaller then
>> > STACK_R_MALLOC_SIMPLE_LEN (1Mb).
>> >
>> > Using the same value as SYS_MALLOC_F_LEN (8kb) is enough to load u-
>> > boot
>> > from SD card.
>> >
>> > Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
>> >
>> > ---
>> >
>> >  configs/chromebook_jerry_defconfig | 1 +
>> >  configs/firefly-rk3288_defconfig   | 1 +
>> >  2 files changed, 2 insertions(+)
>>
>> Explicitly (I can fix when applying if you like)
>>
>> Acked-by: Simon Glass <sjg@chromium.org>
>
> Yes please, saves doing another round :) Thanks!
>
> --
> Sjoerd Simons
> Collabora Ltd.

Applied to u-boot-rockchip, thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] Revert "rockchip: Reconfigure the malloc based to point to system memory"
  2015-11-22 16:11   ` Simon Glass
@ 2015-11-27  3:35     ` Simon Glass
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2015-11-27  3:35 UTC (permalink / raw)
  To: u-boot

On 22 November 2015 at 08:11, Simon Glass <sjg@chromium.org> wrote:
> On 22 November 2015 at 00:21, Sjoerd Simons
> <sjoerd.simons@collabora.co.uk> wrote:
>> This patch was merged shortly before the v2015.10 as a minimal fix for
>> booting on rockchip. Now that the patch series from Hans to do the
>> relocation in generic code has been merged it can be dropped.
>>
>> This reverts commit b1f492ca9e0c090209824ff36456d4f131843190.
>>
>> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
>> ---
>>
>>  arch/arm/mach-rockchip/board-spl.c | 7 -------
>>  1 file changed, 7 deletions(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-rockchip, thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-27  3:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-22  7:21 [U-Boot] [PATCH 0/2] Fix linux-rock booting on rockchip 3288 Sjoerd Simons
2015-11-22  7:21 ` [U-Boot] [PATCH 1/2] Revert "rockchip: Reconfigure the malloc based to point to system memory" Sjoerd Simons
2015-11-22 16:11   ` Simon Glass
2015-11-27  3:35     ` Simon Glass
2015-11-22  7:21 ` [U-Boot] [PATCH 2/2] rockchip: Explicitely set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN Sjoerd Simons
2015-11-22 16:11   ` Simon Glass
2015-11-23  9:50     ` Sjoerd Simons
2015-11-27  3:35       ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.