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

TOMOYO Linux Cross Reference
Linux/arch/mips/bcm63xx/prom.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/mips/bcm63xx/prom.c (Architecture mips) and /arch/alpha/bcm63xx/prom.c (Architecture alpha)


  1 /*                                                  1 
  2  * This file is subject to the terms and condi    
  3  * License.  See the file "COPYING" in the mai    
  4  * for more details.                              
  5  *                                                
  6  * Copyright (C) 2008 Maxime Bizon <mbizon@fre    
  7  */                                               
  8                                                   
  9 #include <linux/init.h>                           
 10 #include <linux/memblock.h>                       
 11 #include <linux/smp.h>                            
 12 #include <asm/bootinfo.h>                         
 13 #include <asm/bmips.h>                            
 14 #include <asm/smp-ops.h>                          
 15 #include <asm/mipsregs.h>                         
 16 #include <bcm63xx_board.h>                        
 17 #include <bcm63xx_cpu.h>                          
 18 #include <bcm63xx_io.h>                           
 19 #include <bcm63xx_regs.h>                         
 20                                                   
 21 void __init prom_init(void)                       
 22 {                                                 
 23         u32 reg, mask;                            
 24                                                   
 25         /* Cache CBR addr before CPU/DMA setup    
 26         bmips_cbr_addr = BMIPS_GET_CBR();         
 27                                                   
 28         bcm63xx_cpu_init();                       
 29                                                   
 30         /* stop any running watchdog */           
 31         bcm_wdt_writel(WDT_STOP_1, WDT_CTL_REG    
 32         bcm_wdt_writel(WDT_STOP_2, WDT_CTL_REG    
 33                                                   
 34         /* disable all hardware blocks clock f    
 35         if (BCMCPU_IS_3368())                     
 36                 mask = CKCTL_3368_ALL_SAFE_EN;    
 37         else if (BCMCPU_IS_6328())                
 38                 mask = CKCTL_6328_ALL_SAFE_EN;    
 39         else if (BCMCPU_IS_6338())                
 40                 mask = CKCTL_6338_ALL_SAFE_EN;    
 41         else if (BCMCPU_IS_6345())                
 42                 mask = CKCTL_6345_ALL_SAFE_EN;    
 43         else if (BCMCPU_IS_6348())                
 44                 mask = CKCTL_6348_ALL_SAFE_EN;    
 45         else if (BCMCPU_IS_6358())                
 46                 mask = CKCTL_6358_ALL_SAFE_EN;    
 47         else if (BCMCPU_IS_6362())                
 48                 mask = CKCTL_6362_ALL_SAFE_EN;    
 49         else if (BCMCPU_IS_6368())                
 50                 mask = CKCTL_6368_ALL_SAFE_EN;    
 51         else                                      
 52                 mask = 0;                         
 53                                                   
 54         reg = bcm_perf_readl(PERF_CKCTL_REG);     
 55         reg &= ~mask;                             
 56         bcm_perf_writel(reg, PERF_CKCTL_REG);     
 57                                                   
 58         /* do low level board init */             
 59         board_prom_init();                        
 60                                                   
 61         /* set up SMP */                          
 62         if (!register_bmips_smp_ops()) {          
 63                 /*                                
 64                  * BCM6328 might not have its     
 65                  * and BCM6358 need special ha    
 66                  * disable SMP for now.           
 67                  */                               
 68                 if (BCMCPU_IS_6328()) {           
 69                         reg = bcm_readl(BCM_63    
 70                                         OTP_US    
 71                                                   
 72                         if (reg & OTP_6328_REG    
 73                                 bmips_smp_enab    
 74                 } else if (BCMCPU_IS_3368() ||    
 75                         bmips_smp_enabled = 0;    
 76                 }                                 
 77                                                   
 78                 if (!bmips_smp_enabled)           
 79                         return;                   
 80                                                   
 81                 /*                                
 82                  * The bootloader has set up t    
 83                  * 0xa000_0200.                   
 84                  * This conflicts with the spe    
 85                  * The bootloader has also set    
 86                  * IPI interrupt.                 
 87                  * Here we will start up CPU1     
 88                  * reconfigure itself then go     
 89                  */                               
 90                 memcpy((void *)0xa0000200, bmi    
 91                 __sync();                         
 92                 set_c0_cause(C_SW0);              
 93                 cpumask_set_cpu(1, &bmips_boot    
 94                                                   
 95                 /*                                
 96                  * FIXME: we really should hav    
 97                  */                               
 98         }                                         
 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