aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-05 22:34:43 -0500
committerTom Rini <trini@konsulko.com>2021-01-05 22:34:43 -0500
commitb11f634b1c1be6ab419758c6596c673445e5ac70 (patch)
tree2329e1ff53c6c543e01d84b7901c53621ad8b7f9 /drivers/pci
parent720620e6916ba40b9a173bb07706d2c73f3c23e7 (diff)
parent970349a96dac3ad46c33851b1a773bfe3f1d4b33 (diff)
downloadu-boot-b11f634b1c1be6ab419758c6596c673445e5ac70.zip
u-boot-b11f634b1c1be6ab419758c6596c673445e5ac70.tar.gz
u-boot-b11f634b1c1be6ab419758c6596c673445e5ac70.tar.bz2
Merge tag 'dm-pull-5jan21' of git://git.denx.de/u-boot-dm into nextWIP/05Jan2021-next
Driver model: make some udevice fields private Driver model: Rename U_BOOT_DEVICE et al. dtoc: Tidy up and add more tests ns16550 code clean-up x86 and sandbox minor fixes for of-platdata dtoc prepration for adding build-time instantiation
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-emul-uclass.c4
-rw-r--r--drivers/pci/pci-uclass.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c
index 756d8ad..a0b8afb 100644
--- a/drivers/pci/pci-emul-uclass.c
+++ b/drivers/pci/pci-emul-uclass.c
@@ -82,7 +82,7 @@ uint sandbox_pci_read_bar(u32 barval, int type, uint size)
static int sandbox_pci_emul_post_probe(struct udevice *dev)
{
- struct sandbox_pci_emul_priv *priv = dev->uclass->priv;
+ struct sandbox_pci_emul_priv *priv = uclass_get_priv(dev->uclass);
priv->dev_count++;
sandbox_set_enable_pci_map(true);
@@ -92,7 +92,7 @@ static int sandbox_pci_emul_post_probe(struct udevice *dev)
static int sandbox_pci_emul_pre_remove(struct udevice *dev)
{
- struct sandbox_pci_emul_priv *priv = dev->uclass->priv;
+ struct sandbox_pci_emul_priv *priv = uclass_get_priv(dev->uclass);
priv->dev_count--;
sandbox_set_enable_pci_map(priv->dev_count > 0);
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 914217d..4cdd06b 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -524,7 +524,7 @@ static void set_vga_bridge_bits(struct udevice *dev)
int pci_auto_config_devices(struct udevice *bus)
{
- struct pci_controller *hose = bus->uclass_priv;
+ struct pci_controller *hose = dev_get_uclass_priv(bus);
struct pci_child_plat *pplat;
unsigned int sub_bus;
struct udevice *dev;
@@ -540,7 +540,7 @@ int pci_auto_config_devices(struct udevice *bus)
int ret;
debug("%s: device %s\n", __func__, dev->name);
- if (dev_of_valid(dev) &&
+ if (dev_has_ofnode(dev) &&
dev_read_bool(dev, "pci,no-autoconfig"))
continue;
ret = dm_pciauto_config_device(dev);
@@ -1007,7 +1007,7 @@ static int pci_uclass_pre_probe(struct udevice *bus)
debug("%s, bus=%d/%s, parent=%s\n", __func__, dev_seq(bus), bus->name,
bus->parent->name);
- hose = bus->uclass_priv;
+ hose = dev_get_uclass_priv(bus);
/*
* Set the sequence number, if device_bind() doesn't. We want control
@@ -1019,7 +1019,7 @@ static int pci_uclass_pre_probe(struct udevice *bus)
ret = uclass_get(UCLASS_PCI, &uc);
if (ret)
return ret;
- bus->sqq = uclass_find_next_free_seq(uc);
+ bus->seq_ = uclass_find_next_free_seq(uc);
}
/* For bridges, use the top-level PCI controller */
@@ -1036,7 +1036,7 @@ static int pci_uclass_pre_probe(struct udevice *bus)
hose->bus = bus;
hose->first_busno = dev_seq(bus);
hose->last_busno = dev_seq(bus);
- if (dev_of_valid(bus)) {
+ if (dev_has_ofnode(bus)) {
hose->skip_auto_config_until_reloc =
dev_read_bool(bus,
"u-boot,skip-auto-config-until-reloc");
@@ -1091,7 +1091,7 @@ static int pci_uclass_child_post_bind(struct udevice *dev)
{
struct pci_child_plat *pplat;
- if (!dev_of_valid(dev))
+ if (!dev_has_ofnode(dev))
return 0;
pplat = dev_get_parent_plat(dev);
@@ -1109,7 +1109,7 @@ static int pci_bridge_read_config(const struct udevice *bus, pci_dev_t bdf,
uint offset, ulong *valuep,
enum pci_size_t size)
{
- struct pci_controller *hose = bus->uclass_priv;
+ struct pci_controller *hose = dev_get_uclass_priv(bus);
return pci_bus_read_config(hose->ctlr, bdf, offset, valuep, size);
}
@@ -1118,7 +1118,7 @@ static int pci_bridge_write_config(struct udevice *bus, pci_dev_t bdf,
uint offset, ulong value,
enum pci_size_t size)
{
- struct pci_controller *hose = bus->uclass_priv;
+ struct pci_controller *hose = dev_get_uclass_priv(bus);
return pci_bus_write_config(hose->ctlr, bdf, offset, value, size);
}