Lines Matching refs:pem_pci
33 struct thunder_pem_pci *pem_pci = (struct thunder_pem_pci *)cfg->priv; in thunder_pem_bridge_read() local
46 writeq(read_val, pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_read()
47 read_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_read()
75 writeq(0x70, pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_read()
76 tmp_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_read()
104 read_val = pem_pci->ea_entry[0]; in thunder_pem_bridge_read()
107 read_val = pem_pci->ea_entry[1]; in thunder_pem_bridge_read()
110 read_val = pem_pci->ea_entry[2]; in thunder_pem_bridge_read()
210 struct thunder_pem_pci *pem_pci = (struct thunder_pem_pci *)cfg->priv; in thunder_pem_bridge_write() local
227 writeq(where_aligned, pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_write()
228 read_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_write()
236 writeq(where_aligned, pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_write()
237 read_val = readq(pem_pci->pem_reg_base + PEM_CFG_RD); in thunder_pem_bridge_write()
275 writeq(write_val, pem_pci->pem_reg_base + PEM_CFG_WR); in thunder_pem_bridge_write()
301 struct thunder_pem_pci *pem_pci; in thunder_pem_init() local
304 pem_pci = devm_kzalloc(dev, sizeof(*pem_pci), GFP_KERNEL); in thunder_pem_init()
305 if (!pem_pci) in thunder_pem_init()
308 pem_pci->pem_reg_base = devm_ioremap(dev, res_pem->start, 0x10000); in thunder_pem_init()
309 if (!pem_pci->pem_reg_base) in thunder_pem_init()
319 pem_pci->ea_entry[0] = lower_32_bits(bar4_start) | 2; in thunder_pem_init()
320 pem_pci->ea_entry[1] = lower_32_bits(res_pem->end - bar4_start) & ~3u; in thunder_pem_init()
321 pem_pci->ea_entry[2] = upper_32_bits(bar4_start); in thunder_pem_init()
323 cfg->priv = pem_pci; in thunder_pem_init()