1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2013 Google, Inc
11 #include <linux/libfdt.h>
15 void dm_warn(const char *fmt, ...)
25 int list_count_items(struct list_head *head)
27 struct list_head *node;
30 list_for_each(node, head)
36 #if !CONFIG_IS_ENABLED(OF_PLATDATA)
37 int pci_get_devfn(struct udevice *dev)
39 struct fdt_pci_addr addr;
42 /* Extract the devfn from fdt_pci_addr */
43 ret = ofnode_read_pci_addr(dev_ofnode(dev), FDT_PCI_SPACE_CONFIG,
50 return addr.phys_hi & 0xff00;