| 529 | } |
| 530 | |
| 531 | static 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 | |
| 541 | static struct rt_ofw_node *ofw_find_device(struct rt_ofw_node *np, rt_uint32_t devfn) |
| 542 | { |