From: hydra Date: Sun, 22 Oct 2000 01:46:14 +0000 (+0000) Subject: Add changes necessary to boot with the 2.4.0-test2 version of Linux, X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f59f1ab435e2e99d6b7f0f4ecf1b13c76eddfeee;p=users%2Frw%2Fppcboot.git Add changes necessary to boot with the 2.4.0-test2 version of Linux, which uses an "extended" board_info (bd_t) structure. It needs a few items that are not available in the standard ppcboot bd_t. In the future, this new structure type may become the "standard". --- diff --git a/common/board.c b/common/board.c index 7019951..2c84bcd 100644 --- a/common/board.c +++ b/common/board.c @@ -170,6 +170,10 @@ board_init_f (ulong bootflag) * Save local variables to board info struct */ +#ifdef EXTBDINFO + strcpy(bd->bi_s_version, "1.1"); + strcpy(bd->bi_r_version, PPCBOOT_VERSION); +#endif bd->bi_memstart = CFG_SDRAM_BASE; /* start of DRAM memory */ bd->bi_memsize = dram_size; /* size of DRAM memory in bytes */ bd->bi_flashstart = CFG_FLASH_BASE; /* start of FLASH memory */ @@ -202,6 +206,11 @@ board_init_f (ulong bootflag) bd->bi_intfreq = clock_mhz; /* Internal Freq, in MHz */ bd->bi_busfreq = get_bus_freq(clock_mhz); /* Bus Freq, in MHz */ bd->bi_baudrate = baudrate; /* Console Baudrate */ +#ifdef EXTBDINFO + bd->bi_procfreq = cpu_speed * 1000000; /* Processor Speed, In Hz */ + bd->bi_plb_busfreq = bd->bi_busfreq; + bd->bi_pci_busfreq = bd->bi_busfreq; +#endif /* Function pointers must be added after code relocation */ #if 0 diff --git a/include/config_CPCI405.h b/include/config_CPCI405.h index c9d8a6b..56e37da 100644 --- a/include/config_CPCI405.h +++ b/include/config_CPCI405.h @@ -103,6 +103,7 @@ #define CFG_BAUDRATE_DEFAULT CONFIG_BAUDRATE /* default baudrate */ #define CFG_TFTP_LOADADDR 0x100000 /* default load address */ +#define EXTBDINFO 1 /* To use extended board_into (bd_t) */ /*----------------------------------------------------------------------- * Start addresses for the final memory configuration diff --git a/include/ppcboot.h b/include/ppcboot.h index 7fab839..ca5afa6 100644 --- a/include/ppcboot.h +++ b/include/ppcboot.h @@ -65,6 +65,10 @@ typedef struct monitor_functions { * ppcboot starts it up. */ typedef struct bd_info { +#ifdef EXTBDINFO + unsigned char bi_s_version[4]; /* Version of this structure */ + unsigned char bi_r_version[30]; /* Version of the ROM (IBM) */ +#endif unsigned long bi_memstart; /* start of DRAM memory */ unsigned long bi_memsize; /* size of DRAM memory in bytes */ unsigned long bi_flashstart; /* start of FLASH memory */ @@ -80,7 +84,14 @@ typedef struct bd_info { unsigned char bi_enetaddr[6]; /* Ethernet adress */ unsigned char bi_reserved[2]; /* -- just for alignment -- */ unsigned long bi_intfreq; /* Internal Freq, in MHz */ +#ifdef EXTBDINFO + unsigned int bi_procfreq; /* CPU (Internal) Freq, in Hz */ +#endif unsigned long bi_busfreq; /* Bus Freq, in MHz */ +#ifdef EXTBDINFO + unsigned int bi_plb_busfreq; /* PLB Bus speed, in Hz */ + unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ +#endif unsigned long bi_baudrate; /* Console Baudrate */ mon_fnc_t bi_mon_fnc; /* Addresses of monitor functions */ } bd_t;