Lines Matching refs:pem_pci
31 struct thunder_pem_pci *pem_pci = (struct thunder_pem_pci *)cfg->priv; in thunder_pem_bridge_read() local
44 writeq(read_val, pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_read()
45 read_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_read()
73 writeq(0x70, pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_read()
74 tmp_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_read()
102 read_val = pem_pci->ea_entry[0]; in thunder_pem_bridge_read()
105 read_val = pem_pci->ea_entry[1]; in thunder_pem_bridge_read()
108 read_val = pem_pci->ea_entry[2]; in thunder_pem_bridge_read()
208 struct thunder_pem_pci *pem_pci = (struct thunder_pem_pci *)cfg->priv; in thunder_pem_bridge_write() local
225 writeq(where_aligned, pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_write()
226 read_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_write()
234 writeq(where_aligned, pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_write()
235 read_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_write()
273 writeq(write_val, pem_pci->pem_reg_base + PEM_CFG_WR); in thunder_pem_bridge_write()
299 struct thunder_pem_pci *pem_pci; in thunder_pem_init() local
302 pem_pci = devm_kzalloc(dev, sizeof(*pem_pci), GFP_KERNEL); in thunder_pem_init()
303 if (!pem_pci) in thunder_pem_init()
306 pem_pci->pem_reg_base = devm_ioremap(dev, res_pem->start, 0x10000); in thunder_pem_init()
307 if (!pem_pci->pem_reg_base) in thunder_pem_init()
317 pem_pci->ea_entry[0] = (u32)bar4_start | 2; in thunder_pem_init()
318 pem_pci->ea_entry[1] = (u32)(res_pem->end - bar4_start) & ~3u; in thunder_pem_init()
319 pem_pci->ea_entry[2] = (u32)(bar4_start >> 32); in thunder_pem_init()
321 cfg->priv = pem_pci; in thunder_pem_init()