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

TOMOYO Linux Cross Reference
Linux/arch/mips/include/asm/machine.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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/include/asm/machine.h (Architecture ppc) and /arch/i386/include/asm-i386/machine.h (Architecture i386)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 
  2 /*                                                
  3  * Copyright (C) 2016 Imagination Technologies    
  4  * Author: Paul Burton <paul.burton@mips.com>     
  5  */                                               
  6                                                   
  7 #ifndef __MIPS_ASM_MACHINE_H__                    
  8 #define __MIPS_ASM_MACHINE_H__                    
  9                                                   
 10 #include <linux/libfdt.h>                         
 11 #include <linux/of.h>                             
 12                                                   
 13 struct mips_machine {                             
 14         const struct of_device_id *matches;       
 15         const void *fdt;                          
 16         bool (*detect)(void);                     
 17         const void *(*fixup_fdt)(const void *f    
 18         unsigned int (*measure_hpt_freq)(void)    
 19 };                                                
 20                                                   
 21 extern long __mips_machines_start;                
 22 extern long __mips_machines_end;                  
 23                                                   
 24 #define MIPS_MACHINE(name)                        
 25         static const struct mips_machine __mip    
 26                 __used __section(".mips.machin    
 27                                                   
 28 #define for_each_mips_machine(mach)               
 29         for ((mach) = (struct mips_machine *)&    
 30              (mach) < (struct mips_machine *)&    
 31              (mach)++)                            
 32                                                   
 33 /**                                               
 34  * mips_machine_is_compatible() - check if a m    
 35  * @mach: the machine struct to check             
 36  * @fdt: the FDT to check for compatibility wi    
 37  *                                                
 38  * Check whether the given machine @mach is co    
 39  * device tree @fdt, based upon the compatibil    
 40  *                                                
 41  * Return: the device id matched if any, else     
 42  */                                               
 43 static inline const struct of_device_id *         
 44 mips_machine_is_compatible(const struct mips_m    
 45 {                                                 
 46         const struct of_device_id *match;         
 47                                                   
 48         if (!mach->matches)                       
 49                 return NULL;                      
 50                                                   
 51         for (match = mach->matches; match->com    
 52                 if (fdt_node_check_compatible(    
 53                         return match;             
 54         }                                         
 55                                                   
 56         return NULL;                              
 57 }                                                 
 58                                                   
 59 /**                                               
 60  * struct mips_fdt_fixup - Describe a fixup to    
 61  * @apply: applies the fixup to @fdt, returns     
 62  * @description: a short description of the fi    
 63  *                                                
 64  * Describes a fixup applied to an FDT blob by    
 65  * @description field provides a short descrip    
 66  * use in error messages if the @apply functio    
 67  */                                               
 68 struct mips_fdt_fixup {                           
 69         int (*apply)(void *fdt);                  
 70         const char *description;                  
 71 };                                                
 72                                                   
 73 /**                                               
 74  * apply_mips_fdt_fixups() - apply fixups to a    
 75  * @fdt_out: buffer in which to place the fixe    
 76  * @fdt_out_size: the size of the @fdt_out buf    
 77  * @fdt_in: the FDT blob                          
 78  * @fixups: pointer to an array of fixups to b    
 79  *                                                
 80  * Loop through the array of fixups pointed to    
 81  * function on each until either one returns a    
 82  * the list as indicated by an entry with a NU    
 83  *                                                
 84  * Return: zero on success, else -errno           
 85  */                                               
 86 extern int __init apply_mips_fdt_fixups(void *    
 87                                         const     
 88                                         const     
 89                                                   
 90 #endif /* __MIPS_ASM_MACHINE_H__ */               
 91                                                   

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