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

TOMOYO Linux Cross Reference
Linux/arch/sh/drivers/pci/ops-dreamcast.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/sh/drivers/pci/ops-dreamcast.c (Version linux-6.12-rc7) and /arch/i386/drivers/pci/ops-dreamcast.c (Version linux-4.19.323)


  1 // SPDX-License-Identifier: GPL-2.0                 1 
  2 /*                                                
  3  * PCI operations for the Sega Dreamcast          
  4  *                                                
  5  * Copyright (C) 2001, 2002  M. R. Brown          
  6  * Copyright (C) 2002, 2003  Paul Mundt           
  7  */                                               
  8                                                   
  9 #include <linux/sched.h>                          
 10 #include <linux/kernel.h>                         
 11 #include <linux/param.h>                          
 12 #include <linux/interrupt.h>                      
 13 #include <linux/init.h>                           
 14 #include <linux/irq.h>                            
 15 #include <linux/pci.h>                            
 16 #include <linux/module.h>                         
 17 #include <linux/io.h>                             
 18 #include <mach/pci.h>                             
 19                                                   
 20 /*                                                
 21  * The !gapspci_config_access case really shou    
 22  * someone implicitly messes around with the l    
 23  * only support a single device anyways, and i    
 24  * wouldn't make it terribly far through the P    
 25  *                                                
 26  * Also, we could very easily support both Typ    
 27  * here, but since it doesn't seem that there     
 28  * existence, we don't bother.                    
 29  *                                                
 30  * I suppose if someone actually gets around t    
 31  * the BBA and hanging some more devices off o    
 32  * something to take into consideration. Howev    
 33  * and the general lack of activity by DC hard    
 34  * likely to happen anytime soon.                 
 35  */                                               
 36 static int gapspci_config_access(unsigned char    
 37 {                                                 
 38         return (bus == 0) && (devfn == 0);        
 39 }                                                 
 40                                                   
 41 /*                                                
 42  * We can also actually read and write in b/w/    
 43  * was at least done right, and we don't have     
 44  * shifting that we do on the 7751! Small wond    
 45  */                                               
 46 static int gapspci_read(struct pci_bus *bus, u    
 47 {                                                 
 48         *val = 0xffffffff;                        
 49                                                   
 50         if (!gapspci_config_access(bus->number    
 51                 return PCIBIOS_DEVICE_NOT_FOUN    
 52                                                   
 53         switch (size) {                           
 54         case 1: *val = inb(GAPSPCI_BBA_CONFIG+    
 55         case 2: *val = inw(GAPSPCI_BBA_CONFIG+    
 56         case 4: *val = inl(GAPSPCI_BBA_CONFIG+    
 57         }                                         
 58                                                   
 59         return PCIBIOS_SUCCESSFUL;                
 60 }                                                 
 61                                                   
 62 static int gapspci_write(struct pci_bus *bus,     
 63 {                                                 
 64         if (!gapspci_config_access(bus->number    
 65                 return PCIBIOS_DEVICE_NOT_FOUN    
 66                                                   
 67         switch (size) {                           
 68         case 1: outb(( u8)val, GAPSPCI_BBA_CON    
 69         case 2: outw((u16)val, GAPSPCI_BBA_CON    
 70         case 4: outl((u32)val, GAPSPCI_BBA_CON    
 71         }                                         
 72                                                   
 73         return PCIBIOS_SUCCESSFUL;                
 74 }                                                 
 75                                                   
 76 struct pci_ops gapspci_pci_ops = {                
 77         .read   = gapspci_read,                   
 78         .write  = gapspci_write,                  
 79 };                                                
 80                                                   

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