@@ -2201,15 +2201,15 @@ int of_find_last_cache_level(unsigned int cpu)
2201
2201
}
2202
2202
2203
2203
/**
2204
- * of_map_rid - Translate a requester ID through a downstream mapping.
2204
+ * of_map_id - Translate an ID through a downstream mapping.
2205
2205
* @np: root complex device node.
2206
- * @rid : device requester ID to map.
2206
+ * @id : device ID to map.
2207
2207
* @map_name: property name of the map to use.
2208
2208
* @map_mask_name: optional property name of the mask to use.
2209
2209
* @target: optional pointer to a target device node.
2210
2210
* @id_out: optional pointer to receive the translated ID.
2211
2211
*
2212
- * Given a device requester ID, look up the appropriate implementation-defined
2212
+ * Given a device ID, look up the appropriate implementation-defined
2213
2213
* platform ID and/or the target device which receives transactions on that
2214
2214
* ID, as per the "iommu-map" and "msi-map" bindings. Either of @target or
2215
2215
* @id_out may be NULL if only the other is required. If @target points to
@@ -2219,11 +2219,11 @@ int of_find_last_cache_level(unsigned int cpu)
2219
2219
*
2220
2220
* Return: 0 on success or a standard error code on failure.
2221
2221
*/
2222
- int of_map_rid (struct device_node * np , u32 rid ,
2222
+ int of_map_id (struct device_node * np , u32 id ,
2223
2223
const char * map_name , const char * map_mask_name ,
2224
2224
struct device_node * * target , u32 * id_out )
2225
2225
{
2226
- u32 map_mask , masked_rid ;
2226
+ u32 map_mask , masked_id ;
2227
2227
int map_len ;
2228
2228
const __be32 * map = NULL ;
2229
2229
@@ -2235,7 +2235,7 @@ int of_map_rid(struct device_node *np, u32 rid,
2235
2235
if (target )
2236
2236
return - ENODEV ;
2237
2237
/* Otherwise, no map implies no translation */
2238
- * id_out = rid ;
2238
+ * id_out = id ;
2239
2239
return 0 ;
2240
2240
}
2241
2241
@@ -2255,22 +2255,22 @@ int of_map_rid(struct device_node *np, u32 rid,
2255
2255
if (map_mask_name )
2256
2256
of_property_read_u32 (np , map_mask_name , & map_mask );
2257
2257
2258
- masked_rid = map_mask & rid ;
2258
+ masked_id = map_mask & id ;
2259
2259
for ( ; map_len > 0 ; map_len -= 4 * sizeof (* map ), map += 4 ) {
2260
2260
struct device_node * phandle_node ;
2261
- u32 rid_base = be32_to_cpup (map + 0 );
2261
+ u32 id_base = be32_to_cpup (map + 0 );
2262
2262
u32 phandle = be32_to_cpup (map + 1 );
2263
2263
u32 out_base = be32_to_cpup (map + 2 );
2264
- u32 rid_len = be32_to_cpup (map + 3 );
2264
+ u32 id_len = be32_to_cpup (map + 3 );
2265
2265
2266
- if (rid_base & ~map_mask ) {
2267
- pr_err ("%pOF: Invalid %s translation - %s-mask (0x%x) ignores rid -base (0x%x)\n" ,
2266
+ if (id_base & ~map_mask ) {
2267
+ pr_err ("%pOF: Invalid %s translation - %s-mask (0x%x) ignores id -base (0x%x)\n" ,
2268
2268
np , map_name , map_name ,
2269
- map_mask , rid_base );
2269
+ map_mask , id_base );
2270
2270
return - EFAULT ;
2271
2271
}
2272
2272
2273
- if (masked_rid < rid_base || masked_rid >= rid_base + rid_len )
2273
+ if (masked_id < id_base || masked_id >= id_base + id_len )
2274
2274
continue ;
2275
2275
2276
2276
phandle_node = of_find_node_by_phandle (phandle );
@@ -2288,20 +2288,20 @@ int of_map_rid(struct device_node *np, u32 rid,
2288
2288
}
2289
2289
2290
2290
if (id_out )
2291
- * id_out = masked_rid - rid_base + out_base ;
2291
+ * id_out = masked_id - id_base + out_base ;
2292
2292
2293
- pr_debug ("%pOF: %s, using mask %08x, rid -base: %08x, out-base: %08x, length: %08x, rid : %08x -> %08x\n" ,
2294
- np , map_name , map_mask , rid_base , out_base ,
2295
- rid_len , rid , masked_rid - rid_base + out_base );
2293
+ pr_debug ("%pOF: %s, using mask %08x, id -base: %08x, out-base: %08x, length: %08x, id : %08x -> %08x\n" ,
2294
+ np , map_name , map_mask , id_base , out_base ,
2295
+ id_len , id , masked_id - id_base + out_base );
2296
2296
return 0 ;
2297
2297
}
2298
2298
2299
- pr_info ("%pOF: no %s translation for rid 0x%x on %pOF\n" , np , map_name ,
2300
- rid , target && * target ? * target : NULL );
2299
+ pr_info ("%pOF: no %s translation for id 0x%x on %pOF\n" , np , map_name ,
2300
+ id , target && * target ? * target : NULL );
2301
2301
2302
2302
/* Bypasses translation */
2303
2303
if (id_out )
2304
- * id_out = rid ;
2304
+ * id_out = id ;
2305
2305
return 0 ;
2306
2306
}
2307
- EXPORT_SYMBOL_GPL (of_map_rid );
2307
+ EXPORT_SYMBOL_GPL (of_map_id );
0 commit comments