diff mbox

[U-Boot,RFC] powerpc: re-add bi_ip_addr to bd_t struct

Message ID 1346612940-8580-1-git-send-email-agust@denx.de
State Accepted
Commit e5ab702a6c458ad2eb041692aed3db114b5846e1
Headers show

Commit Message

Anatolij Gustschin Sept. 2, 2012, 7:09 p.m. UTC
Since commit 50a47d0523e8efebe912bef539a77ffd42116451
(net: punt bd->bi_ip_addr) booting old 2.4.x ppc kernels
is broken due to changed offsets of the fields in struct bd_t.
Offsets of the fields after removed bi_ip_addr are wrong,
causing wrong bus clocks and console baudrate configurations
and various other issues. Re-add the bi_ip_addr field to preserve
backward compatibility with older ppc kernels. Setting bi_ip_addr
in board.c is not really needed, grepping in the 2.4 linux tree
shows that bi_ip_addr is not accessed there. Adding bi_ip_addr
to struct bd_t for other arches isn't needed it seems. bd_t is
not used by other arches in the 2.4 linux tree.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 arch/powerpc/include/asm/u-boot.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Wolfgang Denk Sept. 2, 2012, 8:35 p.m. UTC | #1
Dear Anatolij Gustschin,

In message <1346612940-8580-1-git-send-email-agust@denx.de> you wrote:
> Since commit 50a47d0523e8efebe912bef539a77ffd42116451
> (net: punt bd->bi_ip_addr) booting old 2.4.x ppc kernels
> is broken due to changed offsets of the fields in struct bd_t.
> Offsets of the fields after removed bi_ip_addr are wrong,
> causing wrong bus clocks and console baudrate configurations
> and various other issues. Re-add the bi_ip_addr field to preserve
> backward compatibility with older ppc kernels. Setting bi_ip_addr
> in board.c is not really needed, grepping in the 2.4 linux tree
> shows that bi_ip_addr is not accessed there. Adding bi_ip_addr
> to struct bd_t for other arches isn't needed it seems. bd_t is
> not used by other arches in the 2.4 linux tree.
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  arch/powerpc/include/asm/u-boot.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Acked-by: Wolfgang Denk <wd@denx.de>

Good catch, thanks!  I'll pick this up right now...


Best regards,

Wolfgang Denk
Wolfgang Denk Sept. 2, 2012, 8:56 p.m. UTC | #2
Dear Anatolij Gustschin,

In message <1346612940-8580-1-git-send-email-agust@denx.de> you wrote:
> Since commit 50a47d0523e8efebe912bef539a77ffd42116451
> (net: punt bd->bi_ip_addr) booting old 2.4.x ppc kernels
> is broken due to changed offsets of the fields in struct bd_t.
> Offsets of the fields after removed bi_ip_addr are wrong,
> causing wrong bus clocks and console baudrate configurations
> and various other issues. Re-add the bi_ip_addr field to preserve
> backward compatibility with older ppc kernels. Setting bi_ip_addr
> in board.c is not really needed, grepping in the 2.4 linux tree
> shows that bi_ip_addr is not accessed there. Adding bi_ip_addr
> to struct bd_t for other arches isn't needed it seems. bd_t is
> not used by other arches in the 2.4 linux tree.
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  arch/powerpc/include/asm/u-boot.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/u-boot.h b/arch/powerpc/include/asm/u-boot.h
index 1552054..b2fa2b5 100644
--- a/arch/powerpc/include/asm/u-boot.h
+++ b/arch/powerpc/include/asm/u-boot.h
@@ -63,6 +63,7 @@  typedef struct bd_info {
 	unsigned long   bi_vcofreq;     /* VCO Freq, in MHz */
 #endif
 	unsigned long	bi_bootflags;	/* boot / reboot flag (Unused) */
+	unsigned long	bi_ip_addr;	/* IP Address */
 	unsigned char	bi_enetaddr[6];	/* OLD: see README.enetaddr */
 	unsigned short	bi_ethspeed;	/* Ethernet speed in Mbps */
 	unsigned long	bi_intfreq;	/* Internal Freq, in MHz */