xref: /OK3568_Linux_fs/kernel/arch/powerpc/boot/redboot.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef _PPC_REDBOOT_H
3*4882a593Smuzhiyun #define _PPC_REDBOOT_H
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun //=========================================================================
6*4882a593Smuzhiyun // include/asm-ppc/redboot.h
7*4882a593Smuzhiyun //   Copyright (c) 2002, 2003 Gary Thomas (<gary@mlbassoc.com>
8*4882a593Smuzhiyun //   Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun //
11*4882a593Smuzhiyun // Board specific details, as provided by RedBoot
12*4882a593Smuzhiyun //
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun /* A Board Information structure that is given to a program when
15*4882a593Smuzhiyun  * RedBoot starts it up.  Note: not all fields make sense for all
16*4882a593Smuzhiyun  * architectures and it's up to the platform specific code to fill
17*4882a593Smuzhiyun  * in the details.
18*4882a593Smuzhiyun  */
19*4882a593Smuzhiyun typedef struct bd_info {
20*4882a593Smuzhiyun     unsigned int   bi_tag;        /* Should be 0x42444944 "BDID" */
21*4882a593Smuzhiyun     unsigned int   bi_size;       /* Size of this structure */
22*4882a593Smuzhiyun     unsigned int   bi_revision;   /* revision of this structure */
23*4882a593Smuzhiyun     unsigned int   bi_bdate;      /* bootstrap date, i.e. 0x19971106 */
24*4882a593Smuzhiyun     unsigned int   bi_memstart;   /* Memory start address */
25*4882a593Smuzhiyun     unsigned int   bi_memsize;    /* Memory (end) size in bytes */
26*4882a593Smuzhiyun     unsigned int   bi_intfreq;    /* Internal Freq, in Hz */
27*4882a593Smuzhiyun     unsigned int   bi_busfreq;    /* Bus Freq, in Hz */
28*4882a593Smuzhiyun     unsigned int   bi_cpmfreq;    /* CPM Freq, in Hz */
29*4882a593Smuzhiyun     unsigned int   bi_brgfreq;    /* BRG Freq, in Hz */
30*4882a593Smuzhiyun     unsigned int   bi_vco;        /* VCO Out from PLL */
31*4882a593Smuzhiyun     unsigned int   bi_pci_freq;   /* PCI Freq, in Hz */
32*4882a593Smuzhiyun     unsigned int   bi_baudrate;   /* Default console baud rate */
33*4882a593Smuzhiyun     unsigned int   bi_immr;       /* IMMR when called from boot rom */
34*4882a593Smuzhiyun     unsigned char  bi_enetaddr[6];
35*4882a593Smuzhiyun     unsigned int   bi_flashbase;  /* Physical address of FLASH memory */
36*4882a593Smuzhiyun     unsigned int   bi_flashsize;  /* Length of FLASH memory */
37*4882a593Smuzhiyun     int            bi_flashwidth; /* Width (8,16,32,64) */
38*4882a593Smuzhiyun     unsigned char *bi_cmdline;    /* Pointer to command line */
39*4882a593Smuzhiyun     unsigned char  bi_esa[3][6];  /* Ethernet station addresses */
40*4882a593Smuzhiyun     unsigned int   bi_ramdisk_begin, bi_ramdisk_end;
41*4882a593Smuzhiyun     struct {                      /* Information about [main] video screen */
42*4882a593Smuzhiyun         short x_res;              /*   Horizontal resolution in pixels */
43*4882a593Smuzhiyun         short y_res;              /*   Vertical resolution in pixels */
44*4882a593Smuzhiyun         short bpp;                /*   Bits/pixel */
45*4882a593Smuzhiyun         short mode;               /*   Type of pixels (packed, indexed) */
46*4882a593Smuzhiyun         unsigned long fb;         /*   Pointer to frame buffer (pixel) memory */
47*4882a593Smuzhiyun     } bi_video;
48*4882a593Smuzhiyun     void         (*bi_cputc)(char);   /* Write a character to the RedBoot console */
49*4882a593Smuzhiyun     char         (*bi_cgetc)(void);   /* Read a character from the RedBoot console */
50*4882a593Smuzhiyun     int          (*bi_ctstc)(void);   /* Test for input on the RedBoot console */
51*4882a593Smuzhiyun } bd_t;
52*4882a593Smuzhiyun 
53*4882a593Smuzhiyun #define BI_REV 0x0102    /* Version 1.02 */
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun #define bi_pci_busfreq bi_pci_freq
56*4882a593Smuzhiyun #define bi_immr_base   bi_immr
57*4882a593Smuzhiyun #endif
58