uboot/arch/powerpc/include/asm/global_data.h
<<
>>
Prefs
   1/*
   2 * (C) Copyright 2002-2010
   3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
   4 *
   5 * SPDX-License-Identifier:     GPL-2.0+
   6 */
   7
   8#ifndef __ASM_GBL_DATA_H
   9#define __ASM_GBL_DATA_H
  10
  11#include "config.h"
  12#include "asm/types.h"
  13
  14/* Architecture-specific global data */
  15struct arch_global_data {
  16#if defined(CONFIG_FSL_ESDHC)
  17        u32 sdhc_clk;
  18#endif
  19#if defined(CONFIG_8xx)
  20        unsigned long brg_clk;
  21#endif
  22#if defined(CONFIG_CPM2)
  23        /* There are many clocks on the MPC8260 - see page 9-5 */
  24        unsigned long vco_out;
  25        unsigned long cpm_clk;
  26        unsigned long scc_clk;
  27        unsigned long brg_clk;
  28#endif
  29        /* TODO: sjg@chromium.org: Should these be unslgned long? */
  30#if defined(CONFIG_MPC83xx)
  31        /* There are other clocks in the MPC83XX */
  32        u32 csb_clk;
  33# if defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x) || \
  34        defined(CONFIG_MPC834x) || defined(CONFIG_MPC837x)
  35        u32 tsec1_clk;
  36        u32 tsec2_clk;
  37        u32 usbdr_clk;
  38# elif defined(CONFIG_MPC8309)
  39        u32 usbdr_clk;
  40# endif
  41# if defined(CONFIG_MPC834x)
  42        u32 usbmph_clk;
  43# endif /* CONFIG_MPC834x */
  44# if defined(CONFIG_MPC8315)
  45        u32 tdm_clk;
  46# endif
  47        u32 core_clk;
  48        u32 enc_clk;
  49        u32 lbiu_clk;
  50        u32 lclk_clk;
  51# if defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x) || \
  52        defined(CONFIG_MPC837x)
  53        u32 pciexp1_clk;
  54        u32 pciexp2_clk;
  55# endif
  56# if defined(CONFIG_MPC837x) || defined(CONFIG_MPC8315)
  57        u32 sata_clk;
  58# endif
  59# if defined(CONFIG_MPC8360)
  60        u32 mem_sec_clk;
  61# endif /* CONFIG_MPC8360 */
  62#endif
  63#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
  64        u32 lbc_clk;
  65        void *cpu;
  66#endif /* CONFIG_MPC85xx || CONFIG_MPC86xx */
  67#if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
  68                defined(CONFIG_MPC86xx)
  69        u32 i2c1_clk;
  70        u32 i2c2_clk;
  71#endif
  72#if defined(CONFIG_QE)
  73        u32 qe_clk;
  74        u32 brg_clk;
  75        uint mp_alloc_base;
  76        uint mp_alloc_top;
  77#endif /* CONFIG_QE */
  78#if defined(CONFIG_FSL_LAW)
  79        u32 used_laws;
  80#endif
  81#if defined(CONFIG_E500)
  82        u32 used_tlb_cams[(CONFIG_SYS_NUM_TLBCAMS+31)/32];
  83#endif
  84#if defined(CONFIG_MPC5xxx)
  85        unsigned long ipb_clk;
  86#endif
  87#if defined(CONFIG_MPC512X)
  88        u32 ips_clk;
  89        u32 csb_clk;
  90#endif /* CONFIG_MPC512X */
  91        unsigned long reset_status;     /* reset status register at boot */
  92#if defined(CONFIG_MPC83xx)
  93        unsigned long arbiter_event_attributes;
  94        unsigned long arbiter_event_address;
  95#endif
  96#if defined(CONFIG_SYS_ALLOC_DPRAM) || defined(CONFIG_CPM2)
  97        unsigned int dp_alloc_base;
  98        unsigned int dp_alloc_top;
  99#endif
 100#if defined(CONFIG_4xx)
 101        u32 uart_clk;
 102#endif /* CONFIG_4xx */
 103#if defined(CONFIG_SYS_GT_6426x)
 104        unsigned int mirror_hack[16];
 105#endif
 106#ifdef CONFIG_SYS_FPGA_COUNT
 107        unsigned fpga_state[CONFIG_SYS_FPGA_COUNT];
 108#endif
 109#if defined(CONFIG_WD_MAX_RATE)
 110        unsigned long long wdt_last;    /* trace watch-dog triggering rate */
 111#endif
 112#if defined(CONFIG_LWMON) || defined(CONFIG_LWMON5)
 113        unsigned long kbd_status;
 114#endif
 115};
 116
 117#include <asm-generic/global_data.h>
 118
 119#if 1
 120#define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r2")
 121#else /* We could use plain global data, but the resulting code is bigger */
 122#define XTRN_DECLARE_GLOBAL_DATA_PTR    extern
 123#define DECLARE_GLOBAL_DATA_PTR     XTRN_DECLARE_GLOBAL_DATA_PTR \
 124                                    gd_t *gd
 125#endif
 126
 127#endif /* __ASM_GBL_DATA_H */
 128