static int thunder_pem_bridge_write(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 val)
{
- - struct gen_pci *pci = bus->sysdata;
- - struct thunder_pem_pci *pem_pci;
+ + struct pci_config_window *cfg = bus->sysdata;
+ + struct thunder_pem_pci *pem_pci = (struct thunder_pem_pci *)cfg->priv;
u64 write_val, read_val;
++ u64 where_aligned = where & ~3ull;
u32 mask = 0;
- - pem_pci = container_of(pci, struct thunder_pem_pci, gen_pci);
if (devfn != 0 || where >= 2048)
return PCIBIOS_DEVICE_NOT_FOUND;