Skip to contentSkip to conversation

Clean out SPL ready for driver model

PATCH Superseded Simon Glass 3 participants 14 messages Jan 26, 2015 – Feb 26, 2015 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

v2 cover Clean out SPL ready for driver model

This series includes a few more patches aimed at getting rid of gdata, the parallel global_data structure introduced on some ARM boards.

This series relies on this patch:

https://patchwork.ozlabs.org/patch/423789/

Changes in v2:
- Remove gdata definition from ARM spl header file also

Simon Glass (3):
ti: davinci: Remove unnecessary stack and global_data fiddles Revert "Revert "ARM: SPL: do not set gd again""
arm: spl: Avoid setting up a duplicate global data structure

 arch/arm/cpu/arm926ejs/davinci/spl.c |  6 +-----
 arch/arm/include/asm/spl.h           |  2 --
 arch/arm/lib/spl.c                   | 12 ------------
 3 files changed, 1 insertion(+), 19 deletions(-)
Signature · 1 line
2.2.0.rc0.207.ga3a616c
#1 lore raw

PATCH v2 1/3 ti: davinci: Remove unnecessary stack and global_data fiddles

The stack is already set to CONFIG_SPL_STACK immediately before board_init_f() is called, so this should not be needed.

Also global_data has already been set up so we don't want to mess with it.

---

Changes in v2: None

 arch/arm/cpu/arm926ejs/davinci/spl.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/cpu/arm926ejs/davinci/spl.c +1 -5
index 59b304e..f8caf2a 100644
@@ -36,9 +36,6 @@ void putc(char c)
 
 void board_init_f(ulong dummy)
 {
-	/* First, setup our stack pointer. */
-	asm volatile("mov sp, %0\n" : : "r"(CONFIG_SPL_STACK));
-
 	/* Second, perform our low-level init. */
 #ifdef CONFIG_SOC_DM365
 	dm36x_lowlevel_init(0);
@@ -50,8 +47,7 @@ void board_init_f(ulong dummy)
 	/* Third, we clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
-	/* Finally, setup gd and move to the next step. */
-	gd = &gdata;
+	/* Finally, move to the next step. */
 	board_init_r(NULL, 0);
 }
 
Signature · 1 line
2.2.0.rc0.207.ga3a616c
#2 lore raw

PATCH v2 1/3 ti: davinci: Remove unnecessary stack and global_data fiddles

Quoted 10 lines · Simon Glass

The stack is already set to CONFIG_SPL_STACK immediately before board_init_f() is called, so this should not be needed.

Also global_data has already been set up so we don't want to mess with it.

---

Changes in v2: None

We should drop this one in favor of the 2 I posted that fixes some other problems and gets the boards booting too (and as a bonus drops the custom board_init_f() func). :)

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150126/3bda90b1/attachment.pgp>
#3 lore raw

PATCH v2 1/3 ti: davinci: Remove unnecessary stack and global_data fiddles

Hi Tom,

Quoted 8 lines · Tom Rini
Quoted 6 lines · Simon Glass

The stack is already set to CONFIG_SPL_STACK immediately before board_init_f() is called, so this should not be needed.

Also global_data has already been set up so we don't want to mess with it.

Quoted 8 lines
Quoted 4 lines

---

Changes in v2: None

We should drop this one in favor of the 2 I posted that fixes some other problems and gets the boards booting too (and as a bonus drops the custom board_init_f() func). :)

Yes that's fine, thanks. Please go ahead. One way or another we will get rid of gdata.

Regards,
Simon

#4 lore raw

PATCH v2 2/3 Revert "Revert "ARM: SPL: do not set gd again""

In reply to Simon Glass

This reverts commit 1ee30aeed47724eb7c8f145f064b8d03cd294808.

We should now be able to avoid the global_data fiddling that was previously required for some boards. So re-apply this patch that was reverted.

---

Changes in v2: None

 arch/arm/lib/spl.c | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/lib/spl.c +0 -3
index c41850a..7c9afbd 100644
@@ -33,9 +33,6 @@ void __weak board_init_f(ulong dummy)
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
-	/* TODO: Remove settings of the global data pointer here */
-	gd = &gdata;
-
 	board_init_r(NULL, 0);
 }
 
Signature · 1 line
2.2.0.rc0.207.ga3a616c
#5 lore raw

PATCH v2 3/3 arm: spl: Avoid setting up a duplicate global data structure

In reply to Simon Glass

This is already set up in crt0.S. We don't need a new structure and don't really want one in the 'data' section of the image, since it will be empty and crt0.S's changes will be ignored.

---

Changes in v2:
- Remove gdata definition from ARM spl header file also

 arch/arm/include/asm/spl.h | 2 --
 arch/arm/lib/spl.c         | 9 ---------
 2 files changed, 11 deletions(-)
arch/arm/include/asm/spl.h +0 -2
index 8acd7cd..e5dbab0 100644
@@ -33,6 +33,4 @@ enum {
 /* Linker symbols. */
 extern char __bss_start[], __bss_end[];
 
-extern gd_t gdata;
-
 #endif
arch/arm/lib/spl.c +0 -9
index 7c9afbd..6361a62 100644
@@ -13,15 +13,6 @@
 #include <image.h>
 #include <linux/compiler.h>
 
-/* Pointer to as well as the global data structure for SPL */
-DECLARE_GLOBAL_DATA_PTR;
-
-/*
- * WARNING: This is going away very soon. Don't use it and don't submit
- * pafches that rely on it. The global_data area is set up in crt0.S.
- */
-gd_t gdata __attribute__ ((section(".data")));
-
 /*
  * In the context of SPL, board_init_f must ensure that any clocks/etc for
  * DDR are enabled, ensure that the stack pointer is valid, clear the BSS
Signature · 1 line
2.2.0.rc0.207.ga3a616c
#6 lore raw

v2 cover Clean out SPL ready for driver model

In reply to Simon Glass

Hello Simon,

I'm a bit (read: almost completely) lost re all the gdata removal stuff; seems like there is/was this series, and there is the 9-patch series too, and possibly others... Right now, what patch( seri)es should be applied exactly?

Amicalement,

Signature · 1 line
Albert.
#7 lore raw

v2 cover Clean out SPL ready for driver model

Hi Albert,

Quoted 6 lines · Albert ARIBAUD

Hello Simon,

I'm a bit (read: almost completely) lost re all the gdata removal stuff; seems like there is/was this series, and there is the 9-patch series too, and possibly others... Right now, what patch( seri)es should be applied exactly?

I picked up everything I thought was relevant and sent a v4 series starting here:

http://patchwork.ozlabs.org/patch/438581/

The cover letter is here:

http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/211429

So that is all now.

Regards,
Simon

#8 lore raw

v2 cover Clean out SPL ready for driver model

Hi Albert,

Quoted 13 lines · Simon Glass

Hi Albert,

Quoted 6 lines · Albert ARIBAUD

Hello Simon,

I'm a bit (read: almost completely) lost re all the gdata removal stuff; seems like there is/was this series, and there is the 9-patch series too, and possibly others... Right now, what patch( seri)es should be applied exactly?

I picked up everything I thought was relevant and sent a v4 series starting here:

Quoted 7 lines

http://patchwork.ozlabs.org/patch/438581/

The cover letter is here:

http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/211429

So that is all now.

It does need a rebase due to the mach-tegra file move, but the conflict is trivial. Just in case, I have updated u-boo-dm/spl-working with a rebased version. Let me know if I should send v5.

Regards,
Simon

#9 lore raw

v2 cover Clean out SPL ready for driver model

Hello Simon,

Quoted 20 lines · Simon Glass

Hi Albert,

Quoted 17 lines · Simon Glass

Hi Albert,

Quoted 6 lines · Albert ARIBAUD

Hello Simon,

I'm a bit (read: almost completely) lost re all the gdata removal stuff; seems like there is/was this series, and there is the 9-patch series too, and possibly others... Right now, what patch( seri)es should be applied exactly?

I picked up everything I thought was relevant and sent a v4 series starting here:

http://patchwork.ozlabs.org/patch/438581/

The cover letter is here:

Quoted 7 lines
Quoted 3 lines

http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/211429

So that is all now.

It does need a rebase due to the mach-tegra file move, but the conflict is trivial. Just in case, I have updated u-boo-dm/spl-working with a rebased version. Let me know if I should send v5.

No need for a v5 just for the mach-* move IMO. I'll look at v4.

Quoted 2 lines

Regards,
Simon

Amicalement,

Signature · 1 line
Albert.
#10 lore raw

v2 cover Clean out SPL ready for driver model

Hello Albert,

Quoted 26 lines · Albert ARIBAUD

Hello Simon,

Quoted 22 lines · Simon Glass

Hi Albert,

Quoted 19 lines · Simon Glass

Hi Albert,

Quoted 6 lines · Albert ARIBAUD

Hello Simon,

I'm a bit (read: almost completely) lost re all the gdata removal stuff; seems like there is/was this series, and there is the 9-patch series too, and possibly others... Right now, what patch( seri)es should be applied exactly?

I picked up everything I thought was relevant and sent a v4 series starting here:

http://patchwork.ozlabs.org/patch/438581/

The cover letter is here:

http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/211429

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

So that is all now.

It does need a rebase due to the mach-tegra file move, but the conflict is trivial. Just in case, I have updated u-boo-dm/spl-working with a rebased version. Let me know if I should send v5.

No need for a v5 just for the mach-* move IMO. I'll look at v4.

V4 seems not to apply properly on u-boot[-arm]/master ATM. I'll give a try at u-boot-dm/spl-working.

Amicalement,

Signature · 1 line
Albert.
#11 lore raw

v2 cover Clean out SPL ready for driver model

Hi Albert,

Quoted 32 lines · Albert ARIBAUD

Hello Albert,

Quoted 28 lines · Albert ARIBAUD

Hello Simon,

Quoted 24 lines · Simon Glass

Hi Albert,

Quoted 20 lines · Simon Glass

Hi Albert,

Quoted 6 lines · Albert ARIBAUD

Hello Simon,

I'm a bit (read: almost completely) lost re all the gdata removal stuff; seems like there is/was this series, and there is the 9-patch series too, and possibly others... Right now, what patch( seri)es should be applied exactly?

I picked up everything I thought was relevant and sent a v4 series starting here:

http://patchwork.ozlabs.org/patch/438581/

The cover letter is here:

http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/211429

So that is all now.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

It does need a rebase due to the mach-tegra file move, but the conflict is trivial. Just in case, I have updated u-boo-dm/spl-working with a rebased version. Let me know if I should send v5.

No need for a v5 just for the mach-* move IMO. I'll look at v4.

V4 seems not to apply properly on u-boot[-arm]/master ATM. I'll give a try at u-boot-dm/spl-working.

OK, I used mainline and also I rebased so git may have tidied something up. I can resend if you like.

Regards,
Simon

#12 lore raw

v2 cover Clean out SPL ready for driver model

Hello Simon,

Quoted 39 lines · Simon Glass

Hi Albert,

Quoted 36 lines · Albert ARIBAUD

Hello Albert,

Quoted 32 lines · Albert ARIBAUD

Hello Simon,

Quoted 27 lines · Simon Glass

Hi Albert,

Quoted 13 lines · Simon Glass

Hi Albert,

Quoted 6 lines · Albert ARIBAUD

Hello Simon,

I'm a bit (read: almost completely) lost re all the gdata removal stuff; seems like there is/was this series, and there is the 9-patch series too, and possibly others... Right now, what patch( seri)es should be applied exactly?

I picked up everything I thought was relevant and sent a v4 series starting here:

Quoted 7 lines

http://patchwork.ozlabs.org/patch/438581/

The cover letter is here:

http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/211429

So that is all now.

It does need a rebase due to the mach-tegra file move, but the conflict is trivial. Just in case, I have updated u-boo-dm/spl-working with a rebased version. Let me know if I should send v5.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

No need for a v5 just for the mach-* move IMO. I'll look at v4.

V4 seems not to apply properly on u-boot[-arm]/master ATM. I'll give a try at u-boot-dm/spl-working.

OK, I used mainline and also I rebased so git may have tidied something up. I can resend if you like.

Well, if you can re-send rebase over current u-boot[-arm]/master, that would be nice. :)

Quoted 2 lines

Regards,
Simon

Amicalement,

Signature · 1 line
Albert.
#13 lore raw

v2 cover Clean out SPL ready for driver model

Hi Albert,

Quoted 45 lines · Albert ARIBAUD

Hello Simon,

Quoted 41 lines · Simon Glass

Hi Albert,

Quoted 38 lines · Albert ARIBAUD

Hello Albert,

Quoted 33 lines · Albert ARIBAUD

Hello Simon,

Quoted 20 lines · Simon Glass

Hi Albert,

Quoted 17 lines · Simon Glass

Hi Albert,

Quoted 6 lines · Albert ARIBAUD

Hello Simon,

I'm a bit (read: almost completely) lost re all the gdata removal stuff; seems like there is/was this series, and there is the 9-patch series too, and possibly others... Right now, what patch( seri)es should be applied exactly?

I picked up everything I thought was relevant and sent a v4 series starting here:

http://patchwork.ozlabs.org/patch/438581/

The cover letter is here:

Quoted 7 lines
Quoted 3 lines

http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/211429

So that is all now.

It does need a rebase due to the mach-tegra file move, but the conflict is trivial. Just in case, I have updated u-boo-dm/spl-working with a rebased version. Let me know if I should send v5.

No need for a v5 just for the mach-* move IMO. I'll look at v4.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

V4 seems not to apply properly on u-boot[-arm]/master ATM. I'll give a try at u-boot-dm/spl-working.

OK, I used mainline and also I rebased so git may have tidied something up. I can resend if you like.

Well, if you can re-send rebase over current u-boot[-arm]/master, that would be nice. :)

But that doesn't include Masahiro's SPL config change, so it doesn't build.

Can you either resync to mainline, or I can apply via the driver model tree if you add your Ack.

I will send v5 just so that it is clean.

Regards,
Simon