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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-omap1/gpio15xx.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/arm/mach-omap1/gpio15xx.c (Version linux-6.12-rc7) and /arch/sparc/mach-omap1/gpio15xx.c (Version linux-2.6.0)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 
  2 /*                                                
  3  * OMAP15xx specific gpio init                    
  4  *                                                
  5  * Copyright (C) 2010 Texas Instruments Incorp    
  6  *                                                
  7  * Author:                                        
  8  *      Charulatha V <charu@ti.com>               
  9  */                                               
 10                                                   
 11 #include <linux/platform_data/gpio-omap.h>        
 12 #include <linux/soc/ti/omap1-soc.h>               
 13 #include <asm/irq.h>                              
 14                                                   
 15 #include "irqs.h"                                 
 16                                                   
 17 #define OMAP1_MPUIO_VBASE               OMAP1_    
 18 #define OMAP1510_GPIO_BASE              0xFFFC    
 19                                                   
 20 /* gpio1 */                                       
 21 static struct resource omap15xx_mpu_gpio_resou    
 22         {                                         
 23                 .start  = OMAP1_MPUIO_VBASE,      
 24                 .end    = OMAP1_MPUIO_VBASE +     
 25                 .flags  = IORESOURCE_MEM,         
 26         },                                        
 27         {                                         
 28                 .start  = INT_MPUIO,              
 29                 .flags  = IORESOURCE_IRQ,         
 30         },                                        
 31 };                                                
 32                                                   
 33 static struct omap_gpio_reg_offs omap15xx_mpui    
 34         .revision       = USHRT_MAX,              
 35         .direction      = OMAP_MPUIO_IO_CNTL,     
 36         .datain         = OMAP_MPUIO_INPUT_LAT    
 37         .dataout        = OMAP_MPUIO_OUTPUT,      
 38         .irqstatus      = OMAP_MPUIO_GPIO_INT,    
 39         .irqenable      = OMAP_MPUIO_GPIO_MASK    
 40         .irqenable_inv  = true,                   
 41         .irqctrl        = OMAP_MPUIO_GPIO_INT_    
 42 };                                                
 43                                                   
 44 static struct omap_gpio_platform_data omap15xx    
 45         .is_mpuio               = true,           
 46         .bank_width             = 16,             
 47         .bank_stride            = 1,              
 48         .regs                   = &omap15xx_mp    
 49 };                                                
 50                                                   
 51 static struct platform_device omap15xx_mpu_gpi    
 52         .name           = "omap_gpio",            
 53         .id             = 0,                      
 54         .dev            = {                       
 55                 .platform_data = &omap15xx_mpu    
 56         },                                        
 57         .num_resources = ARRAY_SIZE(omap15xx_m    
 58         .resource = omap15xx_mpu_gpio_resource    
 59 };                                                
 60                                                   
 61 /* gpio2 */                                       
 62 static struct resource omap15xx_gpio_resources    
 63         {                                         
 64                 .start  = OMAP1510_GPIO_BASE,     
 65                 .end    = OMAP1510_GPIO_BASE +    
 66                 .flags  = IORESOURCE_MEM,         
 67         },                                        
 68         {                                         
 69                 .start  = INT_GPIO_BANK1,         
 70                 .flags  = IORESOURCE_IRQ,         
 71         },                                        
 72 };                                                
 73                                                   
 74 static struct omap_gpio_reg_offs omap15xx_gpio    
 75         .revision       = USHRT_MAX,              
 76         .direction      = OMAP1510_GPIO_DIR_CO    
 77         .datain         = OMAP1510_GPIO_DATA_I    
 78         .dataout        = OMAP1510_GPIO_DATA_O    
 79         .irqstatus      = OMAP1510_GPIO_INT_ST    
 80         .irqenable      = OMAP1510_GPIO_INT_MA    
 81         .irqenable_inv  = true,                   
 82         .irqctrl        = OMAP1510_GPIO_INT_CO    
 83         .pinctrl        = OMAP1510_GPIO_PIN_CO    
 84 };                                                
 85                                                   
 86 static struct omap_gpio_platform_data omap15xx    
 87         .bank_width             = 16,             
 88         .regs                   = &omap15xx_gp    
 89 };                                                
 90                                                   
 91 static struct platform_device omap15xx_gpio =     
 92         .name           = "omap_gpio",            
 93         .id             = 1,                      
 94         .dev            = {                       
 95                 .platform_data = &omap15xx_gpi    
 96         },                                        
 97         .num_resources = ARRAY_SIZE(omap15xx_g    
 98         .resource = omap15xx_gpio_resources,      
 99 };                                                
100                                                   
101 /*                                                
102  * omap15xx_gpio_init needs to be done before     
103  * machine_init functions access gpio APIs.       
104  * Hence omap15xx_gpio_init is a postcore_init    
105  */                                               
106 static int __init omap15xx_gpio_init(void)        
107 {                                                 
108         if (!cpu_is_omap15xx())                   
109                 return -EINVAL;                   
110                                                   
111         platform_device_register(&omap15xx_mpu    
112         platform_device_register(&omap15xx_gpi    
113                                                   
114         return 0;                                 
115 }                                                 
116 postcore_initcall(omap15xx_gpio_init);            
117                                                   

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