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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-ep93xx/edb93xx.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-ep93xx/edb93xx.c (Version linux-6.11.5) and /arch/sparc64/mach-ep93xx/edb93xx.c (Version linux-4.12.14)


  1 // SPDX-License-Identifier: GPL-2.0-or-later        1 
  2 /*                                                
  3  * arch/arm/mach-ep93xx/edb93xx.c                 
  4  * Cirrus Logic EDB93xx Development Board supp    
  5  *                                                
  6  * EDB93XX, EDB9301, EDB9307A                     
  7  * Copyright (C) 2008-2009 H Hartley Sweeten <    
  8  *                                                
  9  * EDB9302                                        
 10  * Copyright (C) 2006 George Kashperko <george    
 11  *                                                
 12  * EDB9302A, EDB9315, EDB9315A                    
 13  * Copyright (C) 2006 Lennert Buytenhek <buyte    
 14  *                                                
 15  * EDB9307                                        
 16  * Copyright (C) 2007 Herbert Valerio Riedel <    
 17  *                                                
 18  * EDB9312                                        
 19  * Copyright (C) 2006 Infosys Technologies Lim    
 20  *                    Toufeeq Hussain <toufeeq    
 21  */                                               
 22                                                   
 23 #include <linux/kernel.h>                         
 24 #include <linux/init.h>                           
 25 #include <linux/platform_device.h>                
 26 #include <linux/i2c.h>                            
 27 #include <linux/spi/spi.h>                        
 28 #include <linux/gpio/machine.h>                   
 29                                                   
 30 #include <sound/cs4271.h>                         
 31                                                   
 32 #include "hardware.h"                             
 33 #include <linux/platform_data/video-ep93xx.h>     
 34 #include <linux/platform_data/spi-ep93xx.h>       
 35 #include "gpio-ep93xx.h"                          
 36                                                   
 37 #include <asm/mach-types.h>                       
 38 #include <asm/mach/arch.h>                        
 39                                                   
 40 #include "soc.h"                                  
 41                                                   
 42 static void __init edb93xx_register_flash(void    
 43 {                                                 
 44         if (machine_is_edb9307() || machine_is    
 45             machine_is_edb9315()) {               
 46                 ep93xx_register_flash(4, EP93X    
 47         } else {                                  
 48                 ep93xx_register_flash(2, EP93X    
 49         }                                         
 50 }                                                 
 51                                                   
 52 static struct ep93xx_eth_data __initdata edb93    
 53         .phy_id         = 1,                      
 54 };                                                
 55                                                   
 56                                                   
 57 /*********************************************    
 58  * EDB93xx i2c peripheral handling                
 59  *********************************************    
 60                                                   
 61 static struct i2c_board_info __initdata edb93x    
 62         {                                         
 63                 I2C_BOARD_INFO("isl1208", 0x6f    
 64         },                                        
 65 };                                                
 66                                                   
 67 static struct i2c_board_info __initdata edb93x    
 68         {                                         
 69                 I2C_BOARD_INFO("ds1337", 0x68)    
 70         },                                        
 71 };                                                
 72                                                   
 73 static void __init edb93xx_register_i2c(void)     
 74 {                                                 
 75         if (machine_is_edb9302a() || machine_i    
 76             machine_is_edb9315a()) {              
 77                 ep93xx_register_i2c(edb93xxa_i    
 78                                     ARRAY_SIZE    
 79         } else if (machine_is_edb9302() || mac    
 80                 || machine_is_edb9312() || mac    
 81                 ep93xx_register_i2c(edb93xx_i2    
 82                                     ARRAY_SIZE    
 83         }                                         
 84 }                                                 
 85                                                   
 86                                                   
 87 /*********************************************    
 88  * EDB93xx SPI peripheral handling                
 89  *********************************************    
 90 static struct cs4271_platform_data edb93xx_cs4    
 91         /* Intentionally left blank */            
 92 };                                                
 93                                                   
 94 static struct spi_board_info edb93xx_spi_board    
 95         {                                         
 96                 .modalias               = "cs4    
 97                 .platform_data          = &edb    
 98                 .max_speed_hz           = 6000    
 99                 .bus_num                = 0,      
100                 .chip_select            = 0,      
101                 .mode                   = SPI_    
102         },                                        
103 };                                                
104                                                   
105 static struct gpiod_lookup_table edb93xx_spi_c    
106         .dev_id = "spi0",                         
107         .table = {                                
108                 GPIO_LOOKUP("A", 6, "cs", GPIO    
109                 { },                              
110         },                                        
111 };                                                
112                                                   
113 static struct ep93xx_spi_info edb93xx_spi_info    
114         /* Intentionally left blank */            
115 };                                                
116                                                   
117 static struct gpiod_lookup_table edb93xx_cs427    
118         .dev_id = "spi0.0", /* CS0 on SPI0 */     
119         .table = {                                
120                 GPIO_LOOKUP("A", 1, "reset", G    
121                 { },                              
122         },                                        
123 };                                                
124                                                   
125 static struct gpiod_lookup_table edb93xx_cs427    
126         .dev_id = "spi0.0", /* CS0 on SPI0 */     
127         .table = {                                
128                 GPIO_LOOKUP("H", 2, "reset", G    
129                 { },                              
130         },                                        
131 };                                                
132                                                   
133 static struct gpiod_lookup_table edb93xx_cs427    
134         .dev_id = "spi0.0", /* CS0 on SPI0 */     
135         .table = {                                
136                 GPIO_LOOKUP("B", 6, "reset", G    
137                 { },                              
138         },                                        
139 };                                                
140                                                   
141 static void __init edb93xx_register_spi(void)     
142 {                                                 
143         if (machine_is_edb9301() || machine_is    
144                 gpiod_add_lookup_table(&edb93x    
145         else if (machine_is_edb9302a() || mach    
146                 gpiod_add_lookup_table(&edb93x    
147         else if (machine_is_edb9315a())           
148                 gpiod_add_lookup_table(&edb93x    
149                                                   
150         gpiod_add_lookup_table(&edb93xx_spi_cs    
151         ep93xx_register_spi(&edb93xx_spi_info,    
152                             ARRAY_SIZE(edb93xx    
153 }                                                 
154                                                   
155                                                   
156 /*********************************************    
157  * EDB93xx I2S                                    
158  *********************************************    
159 static struct platform_device edb93xx_audio_de    
160         .name           = "edb93xx-audio",        
161         .id             = -1,                     
162 };                                                
163                                                   
164 static int __init edb93xx_has_audio(void)         
165 {                                                 
166         return (machine_is_edb9301() || machin    
167                 machine_is_edb9302a() || machi    
168                 machine_is_edb9315a());           
169 }                                                 
170                                                   
171 static void __init edb93xx_register_i2s(void)     
172 {                                                 
173         if (edb93xx_has_audio()) {                
174                 ep93xx_register_i2s();            
175                 platform_device_register(&edb9    
176         }                                         
177 }                                                 
178                                                   
179                                                   
180 /*********************************************    
181  * EDB93xx pwm                                    
182  *********************************************    
183 static void __init edb93xx_register_pwm(void)     
184 {                                                 
185         if (machine_is_edb9301() ||               
186             machine_is_edb9302() || machine_is    
187                 /* EP9301 and EP9302 only have    
188                 ep93xx_register_pwm(0, 1);        
189         } else if (machine_is_edb9307() || mac    
190                 /* EP9307 only has pwm.0 (PWMO    
191                 ep93xx_register_pwm(1, 0);        
192         } else {                                  
193                 /* EP9312 and EP9315 have both    
194                 ep93xx_register_pwm(1, 1);        
195         }                                         
196 }                                                 
197                                                   
198                                                   
199 /*********************************************    
200  * EDB93xx framebuffer                            
201  *********************************************    
202 static struct ep93xxfb_mach_info __initdata ed    
203         .flags          = 0,                      
204 };                                                
205                                                   
206 static int __init edb93xx_has_fb(void)            
207 {                                                 
208         /* These platforms have an ep93xx with    
209         return machine_is_edb9307() || machine    
210                machine_is_edb9312() || machine    
211                machine_is_edb9315a();             
212 }                                                 
213                                                   
214 static void __init edb93xx_register_fb(void)      
215 {                                                 
216         if (!edb93xx_has_fb())                    
217                 return;                           
218                                                   
219         if (machine_is_edb9307a() || machine_i    
220                 edb93xxfb_info.flags |= EP93XX    
221         else                                      
222                 edb93xxfb_info.flags |= EP93XX    
223                                                   
224         ep93xx_register_fb(&edb93xxfb_info);      
225 }                                                 
226                                                   
227                                                   
228 /*********************************************    
229  * EDB93xx IDE                                    
230  *********************************************    
231 static int __init edb93xx_has_ide(void)           
232 {                                                 
233         /*                                        
234          * Although EDB9312 and EDB9315 do hav    
235          * INTRQ line wired as pull-up, which     
236          * problematic.                           
237          */                                       
238         return machine_is_edb9312() || machine    
239                machine_is_edb9315a();             
240 }                                                 
241                                                   
242 static void __init edb93xx_register_ide(void)     
243 {                                                 
244         if (!edb93xx_has_ide())                   
245                 return;                           
246                                                   
247         ep93xx_register_ide();                    
248 }                                                 
249                                                   
250                                                   
251 static void __init edb93xx_init_machine(void)     
252 {                                                 
253         ep93xx_init_devices();                    
254         edb93xx_register_flash();                 
255         ep93xx_register_eth(&edb93xx_eth_data,    
256         edb93xx_register_i2c();                   
257         edb93xx_register_spi();                   
258         edb93xx_register_i2s();                   
259         edb93xx_register_pwm();                   
260         edb93xx_register_fb();                    
261         edb93xx_register_ide();                   
262         ep93xx_register_adc();                    
263 }                                                 
264                                                   
265                                                   
266 #ifdef CONFIG_MACH_EDB9301                        
267 MACHINE_START(EDB9301, "Cirrus Logic EDB9301 E    
268         /* Maintainer: H Hartley Sweeten <hswe    
269         .atag_offset    = 0x100,                  
270         .nr_irqs        = NR_EP93XX_IRQS,         
271         .map_io         = ep93xx_map_io,          
272         .init_irq       = ep93xx_init_irq,        
273         .init_time      = ep93xx_timer_init,      
274         .init_machine   = edb93xx_init_machine    
275         .restart        = ep93xx_restart,         
276 MACHINE_END                                       
277 #endif                                            
278                                                   
279 #ifdef CONFIG_MACH_EDB9302                        
280 MACHINE_START(EDB9302, "Cirrus Logic EDB9302 E    
281         /* Maintainer: George Kashperko <georg    
282         .atag_offset    = 0x100,                  
283         .nr_irqs        = NR_EP93XX_IRQS,         
284         .map_io         = ep93xx_map_io,          
285         .init_irq       = ep93xx_init_irq,        
286         .init_time      = ep93xx_timer_init,      
287         .init_machine   = edb93xx_init_machine    
288         .restart        = ep93xx_restart,         
289 MACHINE_END                                       
290 #endif                                            
291                                                   
292 #ifdef CONFIG_MACH_EDB9302A                       
293 MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A    
294         /* Maintainer: Lennert Buytenhek <buyt    
295         .atag_offset    = 0x100,                  
296         .nr_irqs        = NR_EP93XX_IRQS,         
297         .map_io         = ep93xx_map_io,          
298         .init_irq       = ep93xx_init_irq,        
299         .init_time      = ep93xx_timer_init,      
300         .init_machine   = edb93xx_init_machine    
301         .restart        = ep93xx_restart,         
302 MACHINE_END                                       
303 #endif                                            
304                                                   
305 #ifdef CONFIG_MACH_EDB9307                        
306 MACHINE_START(EDB9307, "Cirrus Logic EDB9307 E    
307         /* Maintainer: Herbert Valerio Riedel     
308         .atag_offset    = 0x100,                  
309         .nr_irqs        = NR_EP93XX_IRQS,         
310         .map_io         = ep93xx_map_io,          
311         .init_irq       = ep93xx_init_irq,        
312         .init_time      = ep93xx_timer_init,      
313         .init_machine   = edb93xx_init_machine    
314         .restart        = ep93xx_restart,         
315 MACHINE_END                                       
316 #endif                                            
317                                                   
318 #ifdef CONFIG_MACH_EDB9307A                       
319 MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A    
320         /* Maintainer: H Hartley Sweeten <hswe    
321         .atag_offset    = 0x100,                  
322         .nr_irqs        = NR_EP93XX_IRQS,         
323         .map_io         = ep93xx_map_io,          
324         .init_irq       = ep93xx_init_irq,        
325         .init_time      = ep93xx_timer_init,      
326         .init_machine   = edb93xx_init_machine    
327         .restart        = ep93xx_restart,         
328 MACHINE_END                                       
329 #endif                                            
330                                                   
331 #ifdef CONFIG_MACH_EDB9312                        
332 MACHINE_START(EDB9312, "Cirrus Logic EDB9312 E    
333         /* Maintainer: Toufeeq Hussain <toufee    
334         .atag_offset    = 0x100,                  
335         .nr_irqs        = NR_EP93XX_IRQS,         
336         .map_io         = ep93xx_map_io,          
337         .init_irq       = ep93xx_init_irq,        
338         .init_time      = ep93xx_timer_init,      
339         .init_machine   = edb93xx_init_machine    
340         .restart        = ep93xx_restart,         
341 MACHINE_END                                       
342 #endif                                            
343                                                   
344 #ifdef CONFIG_MACH_EDB9315                        
345 MACHINE_START(EDB9315, "Cirrus Logic EDB9315 E    
346         /* Maintainer: Lennert Buytenhek <buyt    
347         .atag_offset    = 0x100,                  
348         .nr_irqs        = NR_EP93XX_IRQS,         
349         .map_io         = ep93xx_map_io,          
350         .init_irq       = ep93xx_init_irq,        
351         .init_time      = ep93xx_timer_init,      
352         .init_machine   = edb93xx_init_machine    
353         .restart        = ep93xx_restart,         
354 MACHINE_END                                       
355 #endif                                            
356                                                   
357 #ifdef CONFIG_MACH_EDB9315A                       
358 MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A    
359         /* Maintainer: Lennert Buytenhek <buyt    
360         .atag_offset    = 0x100,                  
361         .nr_irqs        = NR_EP93XX_IRQS,         
362         .map_io         = ep93xx_map_io,          
363         .init_irq       = ep93xx_init_irq,        
364         .init_time      = ep93xx_timer_init,      
365         .init_machine   = edb93xx_init_machine    
366         .restart        = ep93xx_restart,         
367 MACHINE_END                                       
368 #endif                                            
369                                                   

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