MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ofw_pci_devfn

Function ofw_pci_devfn

components/drivers/pci/ofw.c:531–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531static rt_int32_t ofw_pci_devfn(struct rt_ofw_node *np)
532{
533 rt_int32_t res;
534 rt_uint32_t reg[5];
535
536 res = rt_ofw_prop_read_u32_array_index(np, "reg", 0, RT_ARRAY_SIZE(reg), reg);
537
538 return res > 0 ? ((reg[0] >> 8) & 0xff) : res;
539}
540
541static struct rt_ofw_node *ofw_find_device(struct rt_ofw_node *np, rt_uint32_t devfn)
542{

Callers 1

ofw_find_deviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected