• Home
  • Raw
  • Download

Lines Matching refs:np

20 static const __be32 *read_prop_string(const struct device_node *np,  in read_prop_string()  argument
25 prop = of_get_property(np, prop_name, NULL); in read_prop_string()
31 static const __be32 *read_prop_dword(const struct device_node *np, in read_prop_dword() argument
36 prop = of_get_property(np, prop_name, NULL); in read_prop_dword()
44 static const __be64 *read_prop64_dword(const struct device_node *np, in read_prop64_dword() argument
49 prop = of_get_property(np, prop_name, NULL); in read_prop64_dword()
58 static int read_handle(struct device_node *np, u64 *handle) in read_handle() argument
64 prop = of_get_address(np, 0, &size, NULL); in read_handle()
69 *handle = of_read_number(prop, of_n_addr_cells(np)); in read_handle()
73 static int read_phys_addr(struct device_node *np, char *prop_name, in read_phys_addr() argument
80 naddr = of_n_addr_cells(np); in read_phys_addr()
81 nsize = of_n_size_cells(np); in read_phys_addr()
83 prop = of_get_property(np, prop_name, &len); in read_phys_addr()
144 int cxl_of_read_afu_properties(struct cxl_afu *afu, struct device_node *np) in cxl_of_read_afu_properties() argument
157 prop = of_get_property(np, "compatible", &len); in cxl_of_read_afu_properties()
164 read_prop_string(np, "name"); in cxl_of_read_afu_properties()
167 rc = read_phys_addr(np, "reg", afu); in cxl_of_read_afu_properties()
171 rc = read_phys_addr(np, "assigned-addresses", afu); in cxl_of_read_afu_properties()
181 read_prop_string(np, "ibm,loc-code"); in cxl_of_read_afu_properties()
182 read_prop_string(np, "device_type"); in cxl_of_read_afu_properties()
185 read_prop_dword(np, "ibm,#processes", &afu->max_procs_virtualised); in cxl_of_read_afu_properties()
188 read_prop_dword(np, "ibm,scratchpad-size", &val); in cxl_of_read_afu_properties()
189 read_prop_dword(np, "ibm,programmable", &val); in cxl_of_read_afu_properties()
190 read_prop_string(np, "ibm,phandle"); in cxl_of_read_afu_properties()
194 read_prop_dword(np, "ibm,max-ints-per-process", &afu->guest->max_ints); in cxl_of_read_afu_properties()
197 prop = read_prop_dword(np, "ibm,min-ints-per-process", &afu->pp_irqs); in cxl_of_read_afu_properties()
207 read_prop_dword(np, "ibm,max-ints", &val); in cxl_of_read_afu_properties()
208 read_prop_dword(np, "ibm,vpd-size", &val); in cxl_of_read_afu_properties()
211 read_prop64_dword(np, "ibm,error-buffer-size", &afu->eb_len); in cxl_of_read_afu_properties()
215 read_prop_dword(np, "ibm,config-record-type", &val); in cxl_of_read_afu_properties()
217 read_prop64_dword(np, "ibm,config-record-size", &afu->crs_len); in cxl_of_read_afu_properties()
220 read_prop_dword(np, "ibm,#config-records", &afu->crs_num); in cxl_of_read_afu_properties()
243 read_prop_dword(np, "ibm,function-number", &val); in cxl_of_read_afu_properties()
244 read_prop_dword(np, "ibm,privileged-function", &val); in cxl_of_read_afu_properties()
245 read_prop_dword(np, "vendor-id", &val); in cxl_of_read_afu_properties()
246 read_prop_dword(np, "device-id", &val); in cxl_of_read_afu_properties()
247 read_prop_dword(np, "revision-id", &val); in cxl_of_read_afu_properties()
248 read_prop_dword(np, "class-code", &val); in cxl_of_read_afu_properties()
249 read_prop_dword(np, "subsystem-vendor-id", &val); in cxl_of_read_afu_properties()
250 read_prop_dword(np, "subsystem-id", &val); in cxl_of_read_afu_properties()
257 prop = read_prop_dword(np, "ibm,process-mmio", &val); in cxl_of_read_afu_properties()
264 read_prop_dword(np, "ibm,supports-aur", &val); in cxl_of_read_afu_properties()
265 read_prop_dword(np, "ibm,supports-csrp", &val); in cxl_of_read_afu_properties()
266 read_prop_dword(np, "ibm,supports-prr", &val); in cxl_of_read_afu_properties()
269 prop = read_prop_dword(np, "ibm,function-error-interrupt", &val); in cxl_of_read_afu_properties()
287 static int read_adapter_irq_config(struct cxl *adapter, struct device_node *np) in read_adapter_irq_config() argument
293 ranges = of_get_property(np, "interrupt-ranges", &len); in read_adapter_irq_config()
340 int cxl_of_read_adapter_handle(struct cxl *adapter, struct device_node *np) in cxl_of_read_adapter_handle() argument
342 if (read_handle(np, &adapter->guest->handle)) in cxl_of_read_adapter_handle()
349 int cxl_of_read_adapter_properties(struct cxl *adapter, struct device_node *np) in cxl_of_read_adapter_properties() argument
358 naddr = of_n_addr_cells(np); in cxl_of_read_adapter_properties()
363 read_prop_dword(np, "#address-cells", &val); in cxl_of_read_adapter_properties()
364 read_prop_dword(np, "#size-cells", &val); in cxl_of_read_adapter_properties()
366 prop = of_get_property(np, "compatible", &len); in cxl_of_read_adapter_properties()
373 read_prop_string(np, "name"); in cxl_of_read_adapter_properties()
374 read_prop_string(np, "model"); in cxl_of_read_adapter_properties()
376 prop = of_get_property(np, "reg", NULL); in cxl_of_read_adapter_properties()
383 read_prop_string(np, "ibm,loc-code"); in cxl_of_read_adapter_properties()
386 if ((rc = read_adapter_irq_config(adapter, np))) in cxl_of_read_adapter_properties()
390 read_prop_string(np, "device_type"); in cxl_of_read_adapter_properties()
391 read_prop_string(np, "ibm,phandle"); in cxl_of_read_adapter_properties()
394 prop = read_prop_dword(np, "ibm,caia-version", &val); in cxl_of_read_adapter_properties()
400 prop = read_prop_dword(np, "ibm,psl-revision", &val); in cxl_of_read_adapter_properties()
404 prop = read_prop_string(np, "status"); in cxl_of_read_adapter_properties()
411 prop = read_prop_dword(np, "vendor-id", &val); in cxl_of_read_adapter_properties()
415 prop = read_prop_dword(np, "device-id", &val); in cxl_of_read_adapter_properties()
420 read_prop_dword(np, "ibm,privileged-facility", &val); in cxl_of_read_adapter_properties()
421 read_prop_dword(np, "revision-id", &val); in cxl_of_read_adapter_properties()
422 read_prop_dword(np, "class-code", &val); in cxl_of_read_adapter_properties()
425 prop = read_prop_dword(np, "subsystem-vendor-id", &val); in cxl_of_read_adapter_properties()
429 prop = read_prop_dword(np, "subsystem-id", &val); in cxl_of_read_adapter_properties()
459 struct device_node *np = NULL; in cxl_of_probe() local
467 np = pdev->dev.of_node; in cxl_of_probe()
468 if (np == NULL) in cxl_of_probe()
472 adapter = cxl_guest_init_adapter(np, pdev); in cxl_of_probe()
479 for_each_child_of_node(np, afu_np) { in cxl_of_probe()