[U-Boot] [PATCH v3 08/28] Introduce generic global_data

Mike Frysinger vapier at gentoo.org
Tue Mar 6 06:01:14 CET 2012


On Thursday 16 February 2012 09:48:55 Simon Glass wrote:
> --- /dev/null
> +++ b/include/asm-generic/global_data.h
> 
> +typedef struct global_data {
> +	bd_t		*bd;
> +	unsigned long	flags;
> +	unsigned long	baudrate;
> +#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
> +	unsigned long	fb_base;	/* Base address of framebuffer mem */
> +#endif
> +#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
> +	unsigned long	post_log_word;  /* Record POST activities */
> +	unsigned long	post_log_res; /* success of POST test */
> +	unsigned long	post_init_f_time;  /* When post_init_f started */
> +#endif
> +	unsigned long	have_console;	/* serial_init() was called */
> +#ifdef CONFIG_PRE_CONSOLE_BUFFER
> +	unsigned long	precon_buf_idx;	/* Pre-Console buffer index */
> +#endif
> +	unsigned long	env_addr;	/* Address  of Environment struct */
> +	unsigned long	env_valid;	/* Checksum of Environment valid? */
> +	/* Here begins ARM-specific things. Needs discussion */

yes, as soon as the "generic" header has soc/arch/board specific cruft, it's 
failed.  some of these fields most likely are unnecessary (either in gd_t or at 
all), so those should get moved/dropped.  for the ones that really truly need 
to be in global data, i don't see the problem with having an soc-specific sub 
field.

it should be:
	include/global_data.h:
	#include <asm/global_data.h>
	typedef struct global_data {
		arch_gd_t arch_gd;
		...

and then the arch can put the stuff that they truly need early in the boot 
sequence into arch_gd_t.

> +/*
> + * Global Data Flags
> + */

i posted a patch to unify this
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120306/189ca1e6/attachment.pgp>


More information about the U-Boot mailing list