160484Sobrien/* SPDX-License-Identifier: GPL-2.0 */
260484Sobrien#ifndef _PPC_REDBOOT_H
3218822Sdim#define _PPC_REDBOOT_H
460484Sobrien
5218822Sdim//=========================================================================
660484Sobrien// include/asm-ppc/redboot.h
760484Sobrien//   Copyright (c) 2002, 2003 Gary Thomas (<gary@mlbassoc.com>
8130561Sobrien//   Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
9130561Sobrien
10130561Sobrien//
1160484Sobrien// Board specific details, as provided by RedBoot
12130561Sobrien//
13130561Sobrien
14130561Sobrien/* A Board Information structure that is given to a program when
15130561Sobrien * RedBoot starts it up.  Note: not all fields make sense for all
16130561Sobrien * architectures and it's up to the platform specific code to fill
17130561Sobrien * in the details.
18130561Sobrien */
19130561Sobrientypedef struct bd_info {
20130561Sobrien    unsigned int   bi_tag;        /* Should be 0x42444944 "BDID" */
21130561Sobrien    unsigned int   bi_size;       /* Size of this structure */
22218822Sdim    unsigned int   bi_revision;   /* revision of this structure */
23130561Sobrien    unsigned int   bi_bdate;      /* bootstrap date, i.e. 0x19971106 */
24130561Sobrien    unsigned int   bi_memstart;   /* Memory start address */
25218822Sdim    unsigned int   bi_memsize;    /* Memory (end) size in bytes */
26130561Sobrien    unsigned int   bi_intfreq;    /* Internal Freq, in Hz */
27130561Sobrien    unsigned int   bi_busfreq;    /* Bus Freq, in Hz */
28130561Sobrien    unsigned int   bi_cpmfreq;    /* CPM Freq, in Hz */
29130561Sobrien    unsigned int   bi_brgfreq;    /* BRG Freq, in Hz */
30130561Sobrien    unsigned int   bi_vco;        /* VCO Out from PLL */
31130561Sobrien    unsigned int   bi_pci_freq;   /* PCI Freq, in Hz */
32130561Sobrien    unsigned int   bi_baudrate;   /* Default console baud rate */
33130561Sobrien    unsigned int   bi_immr;       /* IMMR when called from boot rom */
34130561Sobrien    unsigned char  bi_enetaddr[6];
35130561Sobrien    unsigned int   bi_flashbase;  /* Physical address of FLASH memory */
36130561Sobrien    unsigned int   bi_flashsize;  /* Length of FLASH memory */
37130561Sobrien    int            bi_flashwidth; /* Width (8,16,32,64) */
38130561Sobrien    unsigned char *bi_cmdline;    /* Pointer to command line */
39130561Sobrien    unsigned char  bi_esa[3][6];  /* Ethernet station addresses */
40130561Sobrien    unsigned int   bi_ramdisk_begin, bi_ramdisk_end;
41130561Sobrien    struct {                      /* Information about [main] video screen */
42130561Sobrien        short x_res;              /*   Horizontal resolution in pixels */
43130561Sobrien        short y_res;              /*   Vertical resolution in pixels */
44218822Sdim        short bpp;                /*   Bits/pixel */
45130561Sobrien        short mode;               /*   Type of pixels (packed, indexed) */
46130561Sobrien        unsigned long fb;         /*   Pointer to frame buffer (pixel) memory */
47130561Sobrien    } bi_video;
48130561Sobrien    void         (*bi_cputc)(char);   /* Write a character to the RedBoot console */
49130561Sobrien    char         (*bi_cgetc)(void);   /* Read a character from the RedBoot console */
50130561Sobrien    int          (*bi_ctstc)(void);   /* Test for input on the RedBoot console */
51130561Sobrien} bd_t;
52130561Sobrien
53130561Sobrien#define BI_REV 0x0102    /* Version 1.02 */
54130561Sobrien
55130561Sobrien#define bi_pci_busfreq bi_pci_freq
56130561Sobrien#define bi_immr_base   bi_immr
57130561Sobrien#endif
58130561Sobrien