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

TOMOYO Linux Cross Reference
Linux/include/linux/rpmb.h

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 /include/linux/rpmb.h (Version linux-6.12-rc7) and /include/linux/rpmb.h (Version linux-5.16.20)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 /*                                                
  3  * Copyright (C) 2015-2019 Intel Corp. All rig    
  4  * Copyright (C) 2021-2022 Linaro Ltd             
  5  */                                               
  6 #ifndef __RPMB_H__                                
  7 #define __RPMB_H__                                
  8                                                   
  9 #include <linux/device.h>                         
 10 #include <linux/types.h>                          
 11                                                   
 12 /**                                               
 13  * enum rpmb_type - type of underlying storage    
 14  *                                                
 15  * @RPMB_TYPE_EMMC  : emmc (JESD84-B50.1)         
 16  * @RPMB_TYPE_UFS   : UFS (JESD220)               
 17  * @RPMB_TYPE_NVME  : NVM Express                 
 18  */                                               
 19 enum rpmb_type {                                  
 20         RPMB_TYPE_EMMC,                           
 21         RPMB_TYPE_UFS,                            
 22         RPMB_TYPE_NVME,                           
 23 };                                                
 24                                                   
 25 /**                                               
 26  * struct rpmb_descr - RPMB description provid    
 27  *                                                
 28  * @type             : block device type          
 29  * @route_frames     : routes frames to and fr    
 30  * @dev_id           : unique device identifie    
 31  * @dev_id_len       : length of unique device    
 32  * @reliable_wr_count: number of sectors that     
 33  * @capacity         : capacity of the device     
 34  *                                                
 35  * @dev_id is intended to be used as input whe    
 36  */                                               
 37 struct rpmb_descr {                               
 38         enum rpmb_type type;                      
 39         int (*route_frames)(struct device *dev    
 40                             u8 *resp, unsigned    
 41         u8 *dev_id;                               
 42         size_t dev_id_len;                        
 43         u16 reliable_wr_count;                    
 44         u16 capacity;                             
 45 };                                                
 46                                                   
 47 /**                                               
 48  * struct rpmb_dev - device which can support     
 49  *                                                
 50  * @dev              : device                     
 51  * @id               : device_id                  
 52  * @list_node        : linked list node           
 53  * @descr            : RPMB description           
 54  */                                               
 55 struct rpmb_dev {                                 
 56         struct device dev;                        
 57         int id;                                   
 58         struct list_head list_node;               
 59         struct rpmb_descr descr;                  
 60 };                                                
 61                                                   
 62 #define to_rpmb_dev(x)          container_of((    
 63                                                   
 64 #if IS_ENABLED(CONFIG_RPMB)                       
 65 struct rpmb_dev *rpmb_dev_get(struct rpmb_dev     
 66 void rpmb_dev_put(struct rpmb_dev *rdev);         
 67 struct rpmb_dev *rpmb_dev_find_device(const vo    
 68                                       const st    
 69                                       int (*ma    
 70                                                   
 71 int rpmb_interface_register(struct class_inter    
 72 void rpmb_interface_unregister(struct class_in    
 73 struct rpmb_dev *rpmb_dev_register(struct devi    
 74                                    struct rpmb    
 75 int rpmb_dev_unregister(struct rpmb_dev *rdev)    
 76                                                   
 77 int rpmb_route_frames(struct rpmb_dev *rdev, u    
 78                       unsigned int req_len, u8    
 79                                                   
 80 #else                                             
 81 static inline struct rpmb_dev *rpmb_dev_get(st    
 82 {                                                 
 83         return NULL;                              
 84 }                                                 
 85                                                   
 86 static inline void rpmb_dev_put(struct rpmb_de    
 87                                                   
 88 static inline struct rpmb_dev *                   
 89 rpmb_dev_find_device(const void *data, const s    
 90                      int (*match)(struct devic    
 91 {                                                 
 92         return NULL;                              
 93 }                                                 
 94                                                   
 95 static inline int rpmb_interface_register(stru    
 96 {                                                 
 97         return -EOPNOTSUPP;                       
 98 }                                                 
 99                                                   
100 static inline void rpmb_interface_unregister(s    
101 {                                                 
102 }                                                 
103                                                   
104 static inline struct rpmb_dev *                   
105 rpmb_dev_register(struct device *dev, struct r    
106 {                                                 
107         return NULL;                              
108 }                                                 
109                                                   
110 static inline int rpmb_dev_unregister(struct r    
111 {                                                 
112         return 0;                                 
113 }                                                 
114                                                   
115 static inline int rpmb_route_frames(struct rpm    
116                                     unsigned i    
117                                     unsigned i    
118 {                                                 
119         return -EOPNOTSUPP;                       
120 }                                                 
121 #endif /* CONFIG_RPMB */                          
122                                                   
123 #endif /* __RPMB_H__ */                           
124                                                   

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