xref: /rk3399_rockchip-uboot/arch/sandbox/include/asm/global_data.h (revision 8ee666a76ffe2b63174af477c93ebf389a49d76b)
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
285cb48582SSimon Glass 
295cb48582SSimon Glass /* Architecture-specific global data */
305cb48582SSimon Glass struct arch_global_data {
31*8ee666a7SSimon Glass 	u8		*ram_buf;	/* emulated RAM buffer */
325cb48582SSimon Glass };
335cb48582SSimon Glass 
34744d9859SSimon Glass /*
35744d9859SSimon Glass  * The following data structure is placed in some memory wich is
36744d9859SSimon Glass  * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
37744d9859SSimon Glass  * some locked parts of the data cache) to allow for a minimum set of
38744d9859SSimon Glass  * global variables during system initialization (until we have set
39744d9859SSimon Glass  * up the memory controller so that we can use RAM).
40744d9859SSimon Glass  */
41744d9859SSimon Glass 
42744d9859SSimon Glass typedef	struct global_data {
43744d9859SSimon Glass 	bd_t		*bd;
44744d9859SSimon Glass 	unsigned long	flags;
45eeaec258SSimon Glass 	unsigned int	baudrate;
46744d9859SSimon Glass 	unsigned long	have_console;	/* serial_init() was called */
47744d9859SSimon Glass 	unsigned long	env_addr;	/* Address  of Environment struct */
48744d9859SSimon Glass 	unsigned long	env_valid;	/* Checksum of Environment valid? */
49744d9859SSimon Glass 	unsigned long	fb_base;	/* base address of frame buffer */
50744d9859SSimon Glass 	phys_size_t	ram_size;	/* RAM size */
51f7b2af0aSSimon Glass 	const void	*fdt_blob;	/* Our device tree, NULL if none */
52744d9859SSimon Glass 	void		**jt;		/* jump table */
53744d9859SSimon Glass 	char		env_buf[32];	/* buffer for getenv() before reloc. */
545cb48582SSimon Glass 	struct arch_global_data arch;	/* architecture-specific data */
55744d9859SSimon Glass } gd_t;
56744d9859SSimon Glass 
5747fde91fSMike Frysinger #include <asm-generic/global_data_flags.h>
58744d9859SSimon Glass 
59744d9859SSimon Glass #define DECLARE_GLOBAL_DATA_PTR     extern gd_t *gd
60744d9859SSimon Glass 
61744d9859SSimon Glass #endif /* __ASM_GBL_DATA_H */
62