xref: /rk3399_rockchip-uboot/arch/sandbox/include/asm/global_data.h (revision eeaec258b751075d48e081d645516dab3240ab96)
1744d9859SSimon Glass /*
2744d9859SSimon Glass  * Copyright (c) 2011 The Chromium OS Authors.
3744d9859SSimon Glass  *
4744d9859SSimon Glass  * (C) Copyright 2002-2010
5744d9859SSimon Glass  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6744d9859SSimon Glass  *
7744d9859SSimon Glass  * See file CREDITS for list of people who contributed to this
8744d9859SSimon Glass  * project.
9744d9859SSimon Glass  *
10744d9859SSimon Glass  * This program is free software; you can redistribute it and/or
11744d9859SSimon Glass  * modify it under the terms of the GNU General Public License as
12744d9859SSimon Glass  * published by the Free Software Foundation; either version 2 of
13744d9859SSimon Glass  * the License, or (at your option) any later version.
14744d9859SSimon Glass  *
15744d9859SSimon Glass  * This program is distributed in the hope that it will be useful,
16744d9859SSimon Glass  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17744d9859SSimon Glass  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18744d9859SSimon Glass  * GNU General Public License for more details.
19744d9859SSimon Glass  *
20744d9859SSimon Glass  * You should have received a copy of the GNU General Public License
21744d9859SSimon Glass  * along with this program; if not, write to the Free Software
22744d9859SSimon Glass  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23744d9859SSimon Glass  * MA 02111-1307 USA
24744d9859SSimon Glass  */
25744d9859SSimon Glass 
26744d9859SSimon Glass #ifndef	__ASM_GBL_DATA_H
27744d9859SSimon Glass #define __ASM_GBL_DATA_H
28744d9859SSimon Glass /*
29744d9859SSimon Glass  * The following data structure is placed in some memory wich is
30744d9859SSimon Glass  * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
31744d9859SSimon Glass  * some locked parts of the data cache) to allow for a minimum set of
32744d9859SSimon Glass  * global variables during system initialization (until we have set
33744d9859SSimon Glass  * up the memory controller so that we can use RAM).
34744d9859SSimon Glass  */
35744d9859SSimon Glass 
36744d9859SSimon Glass typedef	struct global_data {
37744d9859SSimon Glass 	bd_t		*bd;
38744d9859SSimon Glass 	unsigned long	flags;
39*eeaec258SSimon Glass 	unsigned int	baudrate;
40744d9859SSimon Glass 	unsigned long	have_console;	/* serial_init() was called */
41744d9859SSimon Glass 	unsigned long	env_addr;	/* Address  of Environment struct */
42744d9859SSimon Glass 	unsigned long	env_valid;	/* Checksum of Environment valid? */
43744d9859SSimon Glass 	unsigned long	fb_base;	/* base address of frame buffer */
44744d9859SSimon Glass 	u8		*ram_buf;	/* emulated RAM buffer */
45744d9859SSimon Glass 	phys_size_t	ram_size;	/* RAM size */
46f7b2af0aSSimon Glass 	const void	*fdt_blob;	/* Our device tree, NULL if none */
47744d9859SSimon Glass 	void		**jt;		/* jump table */
48744d9859SSimon Glass 	char		env_buf[32];	/* buffer for getenv() before reloc. */
49744d9859SSimon Glass } gd_t;
50744d9859SSimon Glass 
5147fde91fSMike Frysinger #include <asm-generic/global_data_flags.h>
52744d9859SSimon Glass 
53744d9859SSimon Glass #define DECLARE_GLOBAL_DATA_PTR     extern gd_t *gd
54744d9859SSimon Glass 
55744d9859SSimon Glass #endif /* __ASM_GBL_DATA_H */
56