~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/sgi-ip32/ip32-setup.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/mips/sgi-ip32/ip32-setup.c (Version linux-6.12-rc7) and /arch/i386/sgi-ip32/ip32-setup.c (Version linux-5.13.19)


  1 /*                                                  1 
  2  * IP32 basic setup                               
  3  *                                                
  4  * This file is subject to the terms and condi    
  5  * License.  See the file "COPYING" in the mai    
  6  * for more details.                              
  7  *                                                
  8  * Copyright (C) 2000 Harald Koerfgen             
  9  * Copyright (C) 2002, 2003, 2005 Ilya A. Voly    
 10  * Copyright (C) 2006 Ralf Baechle <ralf@linux    
 11  */                                               
 12 #include <linux/console.h>                        
 13 #include <linux/init.h>                           
 14 #include <linux/interrupt.h>                      
 15 #include <linux/param.h>                          
 16 #include <linux/sched.h>                          
 17                                                   
 18 #include <asm/bootinfo.h>                         
 19 #include <asm/mipsregs.h>                         
 20 #include <asm/mmu_context.h>                      
 21 #include <asm/sgialib.h>                          
 22 #include <asm/time.h>                             
 23 #include <asm/traps.h>                            
 24 #include <asm/io.h>                               
 25 #include <asm/ip32/crime.h>                       
 26 #include <asm/ip32/mace.h>                        
 27 #include <asm/ip32/ip32_ints.h>                   
 28                                                   
 29 #include "ip32-common.h"                          
 30                                                   
 31 #ifdef CONFIG_SGI_O2MACE_ETH                      
 32 /*                                                
 33  * This is taken care of in here 'cause they s    
 34  * problematic                                    
 35  */                                               
 36 extern char o2meth_eaddr[8];                      
 37 static inline unsigned char str2hexnum(unsigne    
 38 {                                                 
 39         if (c >= '' && c <= '9')                  
 40                 return c - '';                    
 41         if (c >= 'a' && c <= 'f')                 
 42                 return c - 'a' + 10;              
 43         return 0; /* foo */                       
 44 }                                                 
 45                                                   
 46 static inline void str2eaddr(unsigned char *ea    
 47 {                                                 
 48         int i;                                    
 49                                                   
 50         for (i = 0; i < 6; i++) {                 
 51                 unsigned char num;                
 52                                                   
 53                 if(*str == ':')                   
 54                         str++;                    
 55                 num = str2hexnum(*str++) << 4;    
 56                 num |= (str2hexnum(*str++));      
 57                 ea[i] = num;                      
 58         }                                         
 59 }                                                 
 60 #endif                                            
 61                                                   
 62 /* An arbitrary time; this can be decreased if    
 63 #define WAIT_MS 10                                
 64                                                   
 65 void __init plat_time_init(void)                  
 66 {                                                 
 67         printk(KERN_INFO "Calibrating system t    
 68         write_c0_count(0);                        
 69         crime->timer = 0;                         
 70         while (crime->timer < CRIME_MASTER_FRE    
 71         mips_hpt_frequency = read_c0_count() *    
 72         printk("%d MHz CPU detected\n", mips_h    
 73 }                                                 
 74                                                   
 75 void __init plat_mem_setup(void)                  
 76 {                                                 
 77         board_be_init = ip32_be_init;             
 78                                                   
 79 #ifdef CONFIG_SGI_O2MACE_ETH                      
 80         {                                         
 81                 char *mac = ArcGetEnvironmentV    
 82                 str2eaddr(o2meth_eaddr, mac);     
 83         }                                         
 84 #endif                                            
 85                                                   
 86 #if defined(CONFIG_SERIAL_CORE_CONSOLE)           
 87         {                                         
 88                 char* con = ArcGetEnvironmentV    
 89                 if (con && *con == 'd') {         
 90                         static char options[8]    
 91                         char *baud = ArcGetEnv    
 92                         if (baud)                 
 93                                 strcpy(options    
 94                         add_preferred_console(    
 95                                                   
 96                 }                                 
 97         }                                         
 98 #endif                                            
 99 }                                                 
100                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php