2002-10-21 17:04:47 +00:00
|
|
|
/*
|
2010-07-24 18:22:02 +00:00
|
|
|
* (C) Copyright 2002-2010
|
2002-10-21 17:04:47 +00:00
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*
|
|
|
|
* See file CREDITS for list of people who contributed to this
|
|
|
|
* project.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_GBL_DATA_H
|
|
|
|
#define __ASM_GBL_DATA_H
|
|
|
|
/*
|
2011-07-14 22:09:28 +00:00
|
|
|
* The following data structure is placed in some memory which is
|
2002-10-21 17:04:47 +00:00
|
|
|
* available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
|
|
|
|
* some locked parts of the data cache) to allow for a minimum set of
|
|
|
|
* global variables during system initialization (until we have set
|
|
|
|
* up the memory controller so that we can use RAM).
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct global_data {
|
|
|
|
bd_t *bd;
|
|
|
|
unsigned long flags;
|
|
|
|
unsigned long baudrate;
|
|
|
|
unsigned long have_console; /* serial_init() was called */
|
2011-09-01 00:48:27 +00:00
|
|
|
#ifdef CONFIG_PRE_CONSOLE_BUFFER
|
|
|
|
unsigned long precon_buf_idx; /* Pre-Console buffer index */
|
|
|
|
#endif
|
2002-10-21 17:04:47 +00:00
|
|
|
unsigned long env_addr; /* Address of Environment struct */
|
|
|
|
unsigned long env_valid; /* Checksum of Environment valid? */
|
|
|
|
unsigned long fb_base; /* base address of frame buffer */
|
2010-02-05 14:11:27 +00:00
|
|
|
#ifdef CONFIG_FSL_ESDHC
|
|
|
|
unsigned long sdhc_clk;
|
2010-09-17 11:10:39 +00:00
|
|
|
#endif
|
2010-10-05 14:54:35 +00:00
|
|
|
#ifdef CONFIG_AT91FAMILY
|
|
|
|
/* "static data" needed by at91's clock.c */
|
|
|
|
unsigned long cpu_clk_rate_hz;
|
|
|
|
unsigned long main_clk_rate_hz;
|
|
|
|
unsigned long mck_rate_hz;
|
|
|
|
unsigned long plla_rate_hz;
|
|
|
|
unsigned long pllb_rate_hz;
|
|
|
|
unsigned long at91_pllb_usb_init;
|
2010-12-01 12:16:52 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_ARM
|
|
|
|
/* "static data" needed by most of timer.c on ARM platforms */
|
2010-10-05 14:54:35 +00:00
|
|
|
unsigned long timer_rate_hz;
|
|
|
|
unsigned long tbl;
|
|
|
|
unsigned long tbu;
|
|
|
|
unsigned long long timer_reset_value;
|
2010-11-30 09:45:06 +00:00
|
|
|
unsigned long lastinc;
|
2011-05-22 22:00:00 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_IXP425
|
|
|
|
unsigned long timestamp;
|
2010-10-05 14:54:35 +00:00
|
|
|
#endif
|
2010-09-17 11:10:39 +00:00
|
|
|
unsigned long relocaddr; /* Start address of U-Boot in RAM */
|
|
|
|
phys_size_t ram_size; /* RAM size */
|
|
|
|
unsigned long mon_len; /* monitor len */
|
|
|
|
unsigned long irq_sp; /* irq stack pointer */
|
|
|
|
unsigned long start_addr_sp; /* start_addr_stackpointer */
|
|
|
|
unsigned long reloc_off;
|
2011-06-16 23:30:48 +00:00
|
|
|
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
|
2010-09-17 11:10:39 +00:00
|
|
|
unsigned long tlb_addr;
|
2002-10-21 17:04:47 +00:00
|
|
|
#endif
|
2011-10-15 05:48:20 +00:00
|
|
|
const void *fdt_blob; /* Our device tree, NULL if none */
|
2003-07-24 23:38:38 +00:00
|
|
|
void **jt; /* jump table */
|
2010-07-24 18:22:02 +00:00
|
|
|
char env_buf[32]; /* buffer for getenv() before reloc. */
|
2011-09-02 04:59:03 +00:00
|
|
|
#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
|
|
|
|
unsigned long post_log_word; /* Record POST activities */
|
2011-08-03 02:37:01 +00:00
|
|
|
unsigned long post_log_res; /* success of POST test */
|
2011-09-02 04:59:03 +00:00
|
|
|
unsigned long post_init_f_time; /* When post_init_f started */
|
|
|
|
#endif
|
2002-10-21 17:04:47 +00:00
|
|
|
} gd_t;
|
|
|
|
|
2012-03-18 14:31:24 +00:00
|
|
|
#include <asm-generic/global_data_flags.h>
|
2002-10-21 17:04:47 +00:00
|
|
|
|
2006-03-06 23:22:36 +00:00
|
|
|
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r8")
|
2002-10-21 17:04:47 +00:00
|
|
|
|
|
|
|
#endif /* __ASM_GBL_DATA_H */
|