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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-spear/spear13xx.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/arm/mach-spear/spear13xx.c (Version linux-6.11.5) and /arch/m68k/mach-spear/spear13xx.c (Version linux-5.14.21)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 
  2 /*                                                
  3  * arch/arm/mach-spear13xx/spear13xx.c            
  4  *                                                
  5  * SPEAr13XX machines common source file          
  6  *                                                
  7  * Copyright (C) 2012 ST Microelectronics         
  8  * Viresh Kumar <vireshk@kernel.org>              
  9  */                                               
 10                                                   
 11 #define pr_fmt(fmt) "SPEAr13xx: " fmt             
 12                                                   
 13 #include <linux/amba/pl022.h>                     
 14 #include <linux/clk.h>                            
 15 #include <linux/clk/spear.h>                      
 16 #include <linux/clocksource.h>                    
 17 #include <linux/err.h>                            
 18 #include <linux/of.h>                             
 19 #include <asm/hardware/cache-l2x0.h>              
 20 #include <asm/mach/map.h>                         
 21 #include "spear.h"                                
 22 #include "generic.h"                              
 23                                                   
 24 void __init spear13xx_l2x0_init(void)             
 25 {                                                 
 26         /*                                        
 27          * 512KB (64KB/way), 8-way associativi    
 28          *                                        
 29          * FIXME: 9th bit, of Auxiliary Contro    
 30          * for some spear13xx devices for stab    
 31          *                                        
 32          * Enable Early BRESP, L2 prefetch for    
 33          * write alloc and 'Full line of zero'    
 34          *                                        
 35          */                                       
 36         if (!IS_ENABLED(CONFIG_CACHE_L2X0))       
 37                 return;                           
 38                                                   
 39         writel_relaxed(0x06, VA_L2CC_BASE + L3    
 40                                                   
 41         /*                                        
 42          * Program following latencies in orde    
 43          * SPEAr1340 work at 600 MHz              
 44          */                                       
 45         writel_relaxed(0x221, VA_L2CC_BASE + L    
 46         writel_relaxed(0x441, VA_L2CC_BASE + L    
 47         l2x0_init(VA_L2CC_BASE, 0x30a00001, 0x    
 48 }                                                 
 49                                                   
 50 /*                                                
 51  * Following will create 16MB static virtual/p    
 52  * PHYSICAL             VIRTUAL                   
 53  * 0xB3000000           0xF9000000                
 54  * 0xE0000000           0xFD000000                
 55  * 0xEC000000           0xFC000000                
 56  * 0xED000000           0xFB000000                
 57  */                                               
 58 static struct map_desc spear13xx_io_desc[] __i    
 59         {                                         
 60                 .virtual        = (unsigned lo    
 61                 .pfn            = __phys_to_pf    
 62                 .length         = SZ_16M,         
 63                 .type           = MT_DEVICE       
 64         }, {                                      
 65                 .virtual        = (unsigned lo    
 66                 .pfn            = __phys_to_pf    
 67                 .length         = SZ_16M,         
 68                 .type           = MT_DEVICE       
 69         }, {                                      
 70                 .virtual        = (unsigned lo    
 71                 .pfn            = __phys_to_pf    
 72                 .length         = SZ_16M,         
 73                 .type           = MT_DEVICE       
 74         }, {                                      
 75                 .virtual        = (unsigned lo    
 76                 .pfn            = __phys_to_pf    
 77                 .length         = SZ_4K,          
 78                 .type           = MT_DEVICE       
 79         },                                        
 80 };                                                
 81                                                   
 82 /* This will create static memory mapping for     
 83 void __init spear13xx_map_io(void)                
 84 {                                                 
 85         iotable_init(spear13xx_io_desc, ARRAY_    
 86 }                                                 
 87                                                   
 88 static void __init spear13xx_clk_init(void)       
 89 {                                                 
 90         if (of_machine_is_compatible("st,spear    
 91                 spear1310_clk_init(VA_MISC_BAS    
 92         else if (of_machine_is_compatible("st,    
 93                 spear1340_clk_init(VA_MISC_BAS    
 94         else                                      
 95                 pr_err("%s: Unknown machine\n"    
 96 }                                                 
 97                                                   
 98 void __init spear13xx_timer_init(void)            
 99 {                                                 
100         char pclk_name[] = "osc_24m_clk";         
101         struct clk *gpt_clk, *pclk;               
102                                                   
103         spear13xx_clk_init();                     
104                                                   
105         /* get the system timer clock */          
106         gpt_clk = clk_get_sys("gpt0", NULL);      
107         if (IS_ERR(gpt_clk)) {                    
108                 pr_err("%s:couldn't get clk fo    
109                 BUG();                            
110         }                                         
111                                                   
112         /* get the suitable parent clock for t    
113         pclk = clk_get(NULL, pclk_name);          
114         if (IS_ERR(pclk)) {                       
115                 pr_err("%s:couldn't get %s as     
116                                 pclk_name);       
117                 BUG();                            
118         }                                         
119                                                   
120         clk_set_parent(gpt_clk, pclk);            
121         clk_put(gpt_clk);                         
122         clk_put(pclk);                            
123                                                   
124         spear_setup_of_timer();                   
125         timer_probe();                            
126 }                                                 
127                                                   

~ [ 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