1/* ********************************************************************* 2 * Broadcom Common Firmware Environment (CFE) 3 * 4 * PPCBoot Linux environment File: ppcboot.h 5 * 6 * Defines for passing board information to the Linux kernel 7 * as done by the PPCBoot bootloader. This is an alternative 8 * to using the CFE API. 9 * 10 ********************************************************************* 11 * 12 * Copyright 2004 13 * Broadcom Corporation. All rights reserved. 14 * 15 * This software is furnished under license and may be used and 16 * copied only in accordance with the following terms and 17 * conditions. Subject to these conditions, you may download, 18 * copy, install, use, modify and distribute modified or unmodified 19 * copies of this software in source and/or binary form. No title 20 * or ownership is transferred hereby. 21 * 22 * 1) Any source code used, modified or distributed must reproduce 23 * and retain this copyright notice and list of conditions 24 * as they appear in the source file. 25 * 26 * 2) No right is granted to use any trade name, trademark, or 27 * logo of Broadcom Corporation. The "Broadcom Corporation" 28 * name may not be used to endorse or promote products derived 29 * from this software without the prior written permission of 30 * Broadcom Corporation. 31 * 32 * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR 33 * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED 34 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 35 * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT 36 * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN 37 * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT, 38 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 39 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 40 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 41 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 42 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 43 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF 44 * THE POSSIBILITY OF SUCH DAMAGE. 45 ********************************************************************* */ 46 47 48#ifndef _PPCBOOT_H 49#define _PPCBOOT_H 50 51/* 52 * Board information passed to kernel from PPCBoot 53 */ 54 55typedef void (interrupt_handler_t)(void *); 56 57typedef struct monitor_functions { 58 int (*getc)(void); 59 int (*tstc)(void); 60 void (*putc)(const char c); 61 void (*puts)(const char *s); 62 void (*printf)(const char *fmt, ...); 63 void (*install_hdlr)(int, interrupt_handler_t *, void *); 64 void (*free_hdlr)(int); 65 void *(*malloc)(size_t); 66 void (*free)(void *); 67} mon_fnc_t; 68 69typedef struct bd_info { 70 unsigned long bi_memstart; /* start of DRAM memory */ 71 unsigned long bi_memsize; /* size of DRAM memory in bytes */ 72 unsigned long bi_flashstart; /* start of FLASH memory */ 73 unsigned long bi_flashsize; /* size of FLASH memory */ 74 unsigned long bi_flashoffset; /* reserved area for startup monitor */ 75 unsigned long bi_sramstart; /* start of SRAM memory */ 76 unsigned long bi_sramsize; /* size of SRAM memory */ 77#if defined(CONFIG_8xx) || defined(CONFIG_8260) 78 unsigned long bi_immr_base; /* base of IMMR register */ 79#endif 80 unsigned long bi_bootflags; /* boot / reboot flag (for LynxOS) */ 81 unsigned long bi_ip_addr; /* IP Address */ 82 unsigned char bi_enetaddr[6]; /* Ethernet adress */ 83 unsigned short bi_ethspeed; /* Ethernet speed in Mbps */ 84 unsigned long bi_intfreq; /* Internal Freq, in MHz */ 85 unsigned long bi_busfreq; /* Bus Freq, in MHz */ 86#if defined(CONFIG_8260) 87 unsigned long bi_cpmfreq; /* CPM_CLK Freq, in MHz */ 88 unsigned long bi_brgfreq; /* BRG_CLK Freq, in MHz */ 89 unsigned long bi_sccfreq; /* SCC_CLK Freq, in MHz */ 90 unsigned long bi_vco; /* VCO Out from PLL, in MHz */ 91#endif 92 unsigned long bi_baudrate; /* Console Baudrate */ 93#if defined(CONFIG_405GP) 94 unsigned char bi_s_version[4]; /* Version of this structure */ 95 unsigned char bi_r_version[32]; /* Version of the ROM (IBM) */ 96 unsigned int bi_procfreq; /* CPU (Internal) Freq, in Hz */ 97 unsigned int bi_plb_busfreq; /* PLB Bus speed, in Hz */ 98 unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ 99 unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */ 100#endif 101#if defined(CONFIG_HYMOD) 102 hymod_conf_t bi_hymod_conf; /* hymod configuration information */ 103#endif 104#if defined(CONFIG_EVB64260) 105 /* the board has three onboard ethernet ports */ 106 unsigned char bi_enet1addr[6]; 107 unsigned char bi_enet2addr[6]; 108#endif 109 mon_fnc_t *bi_mon_fnc; /* Pointer to monitor functions */ 110} bd_t; 111 112#endif /* _PPCBOOT_H */ 113