Skip to content

Remove use of gdata for global_data

Albert ARIBAUD u-boot 1 version New

Get series with b4
b4 am 20150119074831.4b7ff5dd@lilith

Versions newest first

  1. v1 Latest0 of 9 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 9 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchAlbert ARIBAUD
SeriesA-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/9] Remove use of gdata for global_data

Hello Simon,

Quoted 14 lines · Simon Glass

Some ARM boards use global_data in SPL before it set up by crt0.S. To achieve this they use a separate global_data variable called gdata which resides in the data section. The one set up by crt0.S is generally ignored.

This prevents crt0.S from setting up things like the early malloc() pool. It therefore prevents driver model from being used in SPL.

However gdata really isn't needed. In fact lowlevel_init() is called just before board_init_f() so, for SPL at least, there is no point in doing anything before board_init_f(). The one slightly messy area is that SPL may want to move the stack from SRAM to SDRAM at some point. But this should be done at the end of board_init_f() (or before board_init_r() is called) and is not a reason to init DRAM before board_init_f().

Quoted 6 lines

It isn't that difficult to get rid of gdata. This series builds on Tom Rini's recent series for omap3, and extends it to the other offenders: imx, sunxi and zynq.

I have tested so far only on sunxi. This series is available at u-boot-dm branch 'gd-working'.

Overall series:

Amicalement,

Signature · 1 line
Albert.