162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _PPC_REDBOOT_H
362306a36Sopenharmony_ci#define _PPC_REDBOOT_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci//=========================================================================
662306a36Sopenharmony_ci// include/asm-ppc/redboot.h
762306a36Sopenharmony_ci//   Copyright (c) 2002, 2003 Gary Thomas (<gary@mlbassoc.com>
862306a36Sopenharmony_ci//   Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci//
1162306a36Sopenharmony_ci// Board specific details, as provided by RedBoot
1262306a36Sopenharmony_ci//
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci/* A Board Information structure that is given to a program when
1562306a36Sopenharmony_ci * RedBoot starts it up.  Note: not all fields make sense for all
1662306a36Sopenharmony_ci * architectures and it's up to the platform specific code to fill
1762306a36Sopenharmony_ci * in the details.
1862306a36Sopenharmony_ci */
1962306a36Sopenharmony_citypedef struct bd_info {
2062306a36Sopenharmony_ci    unsigned int   bi_tag;        /* Should be 0x42444944 "BDID" */
2162306a36Sopenharmony_ci    unsigned int   bi_size;       /* Size of this structure */
2262306a36Sopenharmony_ci    unsigned int   bi_revision;   /* revision of this structure */
2362306a36Sopenharmony_ci    unsigned int   bi_bdate;      /* bootstrap date, i.e. 0x19971106 */
2462306a36Sopenharmony_ci    unsigned int   bi_memstart;   /* Memory start address */
2562306a36Sopenharmony_ci    unsigned int   bi_memsize;    /* Memory (end) size in bytes */
2662306a36Sopenharmony_ci    unsigned int   bi_intfreq;    /* Internal Freq, in Hz */
2762306a36Sopenharmony_ci    unsigned int   bi_busfreq;    /* Bus Freq, in Hz */
2862306a36Sopenharmony_ci    unsigned int   bi_cpmfreq;    /* CPM Freq, in Hz */
2962306a36Sopenharmony_ci    unsigned int   bi_brgfreq;    /* BRG Freq, in Hz */
3062306a36Sopenharmony_ci    unsigned int   bi_vco;        /* VCO Out from PLL */
3162306a36Sopenharmony_ci    unsigned int   bi_pci_freq;   /* PCI Freq, in Hz */
3262306a36Sopenharmony_ci    unsigned int   bi_baudrate;   /* Default console baud rate */
3362306a36Sopenharmony_ci    unsigned int   bi_immr;       /* IMMR when called from boot rom */
3462306a36Sopenharmony_ci    unsigned char  bi_enetaddr[6];
3562306a36Sopenharmony_ci    unsigned int   bi_flashbase;  /* Physical address of FLASH memory */
3662306a36Sopenharmony_ci    unsigned int   bi_flashsize;  /* Length of FLASH memory */
3762306a36Sopenharmony_ci    int            bi_flashwidth; /* Width (8,16,32,64) */
3862306a36Sopenharmony_ci    unsigned char *bi_cmdline;    /* Pointer to command line */
3962306a36Sopenharmony_ci    unsigned char  bi_esa[3][6];  /* Ethernet station addresses */
4062306a36Sopenharmony_ci    unsigned int   bi_ramdisk_begin, bi_ramdisk_end;
4162306a36Sopenharmony_ci    struct {                      /* Information about [main] video screen */
4262306a36Sopenharmony_ci        short x_res;              /*   Horizontal resolution in pixels */
4362306a36Sopenharmony_ci        short y_res;              /*   Vertical resolution in pixels */
4462306a36Sopenharmony_ci        short bpp;                /*   Bits/pixel */
4562306a36Sopenharmony_ci        short mode;               /*   Type of pixels (packed, indexed) */
4662306a36Sopenharmony_ci        unsigned long fb;         /*   Pointer to frame buffer (pixel) memory */
4762306a36Sopenharmony_ci    } bi_video;
4862306a36Sopenharmony_ci    void         (*bi_cputc)(char);   /* Write a character to the RedBoot console */
4962306a36Sopenharmony_ci    char         (*bi_cgetc)(void);   /* Read a character from the RedBoot console */
5062306a36Sopenharmony_ci    int          (*bi_ctstc)(void);   /* Test for input on the RedBoot console */
5162306a36Sopenharmony_ci} bd_t;
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci#define BI_REV 0x0102    /* Version 1.02 */
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci#define bi_pci_busfreq bi_pci_freq
5662306a36Sopenharmony_ci#define bi_immr_base   bi_immr
5762306a36Sopenharmony_ci#endif
58