1/* 2 * PROM interface routines. 3 */ 4#include <linux/config.h> 5#include <linux/init.h> 6#include <linux/string.h> 7#include <linux/ctype.h> 8#include <linux/kernel.h> 9#include <linux/mm.h> 10#include <linux/bootmem.h> 11#include <linux/ioport.h> 12#include <asm/bootinfo.h> 13#include <asm/lasat/lasat.h> 14#include <asm/cpu.h> 15 16#include "at93c.h" 17#include <asm/lasat/eeprom.h> 18 19char arcs_cmdline[CL_SIZE]; 20 21static struct at93c_defs at93c_defs[N_MACHTYPES] = { 22 {(void *)AT93C_REG_100, (void *)AT93C_RDATA_REG_100, AT93C_RDATA_SHIFT_100, 23 AT93C_WDATA_SHIFT_100, AT93C_CS_M_100, AT93C_CLK_M_100}, 24 {(void *)AT93C_REG_200, (void *)AT93C_RDATA_REG_200, AT93C_RDATA_SHIFT_200, 25 AT93C_WDATA_SHIFT_200, AT93C_CS_M_200, AT93C_CLK_M_200}, 26}; 27 28void __init prom_init(int argc, char **argv, char **envp, int *prom_vec) 29{ 30 if (mips_cpu.cputype == CPU_R5000) 31 mips_machtype = MACH_LASAT_200; 32 else 33 mips_machtype = MACH_LASAT_100; 34 35 at93c = &at93c_defs[mips_machtype]; 36 37 lasat_init_board_info(); /* Read info from EEPROM */ 38 39 mips_machgroup = MACH_GROUP_LASAT; 40 41 /* Get the command line */ 42 if (argc>0) { 43 strncpy(arcs_cmdline, argv[0], CL_SIZE-1); 44 arcs_cmdline[CL_SIZE-1] = '\0'; 45 } 46 47 /* Set the I/O base address */ 48 set_io_port_base(KSEG1); 49 50 /* Set memory regions */ 51 ioport_resource.start = 0; /* Should be KSEGx ??? */ 52 ioport_resource.end = 0xffffffff; /* Should be ??? */ 53} 54 55void prom_free_prom_memory(void) 56{ 57} 58 59void prom_printf(const char * fmt, ...) 60{ 61 return; 62} 63 64const char *get_system_type(void) 65{ 66 return lasat_board_info.li_bmstr; 67} 68