Lines Matching refs:pdev

46 static void pci_pm_runtime_get(struct rt_pci_device *pdev, rt_ubase_t *out_flags)  in pci_pm_runtime_get()  argument
48 *out_flags = pdev->pm_enabled; in pci_pm_runtime_get()
50 if (!pdev->pm_enabled) in pci_pm_runtime_get()
52 rt_pci_pme_active(pdev, RT_TRUE); in pci_pm_runtime_get()
56 static void pci_pm_runtime_put(struct rt_pci_device *pdev, rt_ubase_t *flags) in pci_pm_runtime_put() argument
60 rt_pci_pme_active(pdev, RT_FALSE); in pci_pm_runtime_put()
70 struct rt_pci_device *pdev = dentry->data; in pci_read() local
72 pci_pm_runtime_get(pdev, &pm_flags); in pci_read()
78 rt_pci_read_config_u8(pdev, pos, &val); in pci_read()
90 rt_pci_read_config_u16(pdev, pos, &val); in pci_read()
104 rt_pci_read_config_u32(pdev, pos, &val); in pci_read()
118 rt_pci_read_config_u16(pdev, pos, &val); in pci_read()
132 rt_pci_read_config_u8(pdev, pos, &val); in pci_read()
138 pci_pm_runtime_put(pdev, &pm_flags); in pci_read()
151 struct rt_pci_device *pdev = dentry->data; in pci_write() local
153 pci_pm_runtime_get(pdev, &pm_flags); in pci_write()
160 rt_pci_write_config_u8(pdev, pos, val); in pci_write()
172 rt_pci_write_config_u16(pdev, pos, rt_le16_to_cpu(val)); in pci_write()
184 rt_pci_write_config_u32(pdev, pos, rt_le32_to_cpu(val)); in pci_write()
196 rt_pci_write_config_u16(pdev, pos, rt_le16_to_cpu(val)); in pci_write()
208 rt_pci_write_config_u8(pdev, pos, val); in pci_write()
213 pci_pm_runtime_put(pdev, &pm_flags); in pci_write()
223 struct rt_pci_device *pdev = dentry->data; in pci_lseek() local
235 offset += pdev->cfg_size; in pci_lseek()
242 if (offset <= (off_t)pdev->cfg_size) in pci_lseek()
257 void pci_procfs_attach(struct rt_pci_device *pdev) in pci_procfs_attach() argument
267 name = rt_dm_dev_get_name(&pdev->parent); in pci_procfs_attach()
268 dentry = proc_create_data(name, 0644, pci_proc_dentry, &pci_fops, pdev); in pci_procfs_attach()
278 void pci_procfs_detach(struct rt_pci_device *pdev) in pci_procfs_detach() argument
285 proc_remove_dentry(rt_dm_dev_get_name(&pdev->parent), pci_proc_dentry); in pci_procfs_detach()
292 struct rt_pci_device *pdev; in pci_single_show() local
298 pdev = rt_container_of(dev, struct rt_pci_device, parent); in pci_single_show()
301 pdev->bus->number, in pci_single_show()
302 pdev->devfn, in pci_single_show()
303 pdev->vendor, in pci_single_show()
304 pdev->device, in pci_single_show()
305 pdev->irq); in pci_single_show()
310 dfs_seq_printf(seq, "\t%16llx", (rt_uint64_t)pdev->resource[bar].base); in pci_single_show()
312 dfs_seq_printf(seq, "\t%16llx", (rt_uint64_t)pdev->rom.base); in pci_single_show()
317 dfs_seq_printf(seq, "\t%16llx", (rt_uint64_t)pdev->resource[bar].size); in pci_single_show()
319 dfs_seq_printf(seq, "\t%16llx", (rt_uint64_t)pdev->rom.size); in pci_single_show()