Home
last modified time | relevance | path

Searched refs:hpriv (Results 1 – 20 of 20) sorted by relevance

/linux/drivers/usb/renesas_usbhs/
H A Dmod_host.c109 #define usbhsh_for_each_udev(pos, hpriv, i) \ argument
110 __usbhsh_for_each_udev(1, pos, hpriv, i)
112 #define usbhsh_for_each_udev_with_dev0(pos, hpriv, i) \ argument
113 __usbhsh_for_each_udev(0, pos, hpriv, i)
155 static struct usbhsh_request *usbhsh_ureq_alloc(struct usbhsh_hpriv *hpriv, in usbhsh_ureq_alloc() argument
172 static void usbhsh_ureq_free(struct usbhsh_hpriv *hpriv, in usbhsh_ureq_free() argument
184 static int usbhsh_is_running(struct usbhsh_hpriv *hpriv) in usbhsh_is_running() argument
193 return (hpriv->mod.irq_attch == NULL); in usbhsh_is_running()
199 static void usbhsh_endpoint_sequence_save(struct usbhsh_hpriv *hpriv, in usbhsh_endpoint_sequence_save() argument
241 static struct usbhsh_device *usbhsh_device_get(struct usbhsh_hpriv *hpriv,
[all …]
/linux/drivers/ata/
H A Dahci_ceva.c122 static void ahci_ceva_setup(struct ahci_host_priv *hpriv) in ahci_ceva_setup() argument
124 void __iomem *mmio = hpriv->mmio; in ahci_ceva_setup()
125 struct ceva_ahci_priv *cevapriv = hpriv->plat_data; in ahci_ceva_setup()
191 static int ceva_ahci_platform_enable_resources(struct ahci_host_priv *hpriv) in ceva_ahci_platform_enable_resources() argument
195 rc = ahci_platform_enable_regulators(hpriv); in ceva_ahci_platform_enable_resources()
199 rc = ahci_platform_enable_clks(hpriv); in ceva_ahci_platform_enable_resources()
204 rc = ahci_platform_assert_rsts(hpriv); in ceva_ahci_platform_enable_resources()
208 for (i = 0; i < hpriv->nports; i++) { in ceva_ahci_platform_enable_resources()
209 if (ahci_ignore_port(hpriv, i)) in ceva_ahci_platform_enable_resources()
212 rc = phy_init(hpriv->phys[i]); in ceva_ahci_platform_enable_resources()
[all …]
H A Dahci_brcm.c118 static void brcm_sata_alpm_init(struct ahci_host_priv *hpriv) in brcm_sata_alpm_init() argument
120 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_sata_alpm_init()
125 host_caps = readl(hpriv->mmio + HOST_CAP); in brcm_sata_alpm_init()
127 hpriv->flags |= AHCI_HFLAG_YES_ALPM; in brcm_sata_alpm_init()
138 hpriv->mmio + SATA_PORT_PCTRL6(port_ctrl)); in brcm_sata_alpm_init()
217 static u32 brcm_ahci_get_portmask(struct ahci_host_priv *hpriv, in brcm_ahci_get_portmask() argument
222 impl = readl(hpriv->mmio + HOST_PORTS_IMPL); in brcm_ahci_get_portmask()
253 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_read_id() local
254 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_ahci_read_id()
255 void __iomem *mmio = hpriv->mmio; in brcm_ahci_read_id()
[all …]
H A Dahci_st.c53 static int st_ahci_deassert_resets(struct ahci_host_priv *hpriv, in st_ahci_deassert_resets() argument
56 struct st_ahci_drv_data *drv_data = hpriv->plat_data; in st_ahci_deassert_resets()
88 struct ahci_host_priv *hpriv = host->private_data; in st_ahci_host_stop() local
89 struct st_ahci_drv_data *drv_data = hpriv->plat_data; in st_ahci_host_stop()
99 ahci_platform_disable_resources(hpriv); in st_ahci_host_stop()
102 static int st_ahci_probe_resets(struct ahci_host_priv *hpriv, in st_ahci_probe_resets() argument
105 struct st_ahci_drv_data *drv_data = hpriv->plat_data; in st_ahci_probe_resets()
125 return st_ahci_deassert_resets(hpriv, dev); in st_ahci_probe_resets()
147 struct ahci_host_priv *hpriv; in st_ahci_probe() local
154 hpriv = ahci_platform_get_resources(pdev, 0); in st_ahci_probe()
[all …]
H A Dsata_mv.c438 #define IS_GEN_I(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_I) argument
439 #define IS_GEN_II(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_II) argument
440 #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) argument
441 #define IS_PCIE(hpriv) ((hpriv)->hp_flags & MV_HP_PCIE) argument
442 #define IS_SOC(hpriv) ((hpriv)->hp_flags & MV_HP_FLAG_SOC) argument
577 void (*phy_errata)(struct mv_host_priv *hpriv, void __iomem *mmio,
579 void (*enable_leds)(struct mv_host_priv *hpriv, void __iomem *mmio);
580 void (*read_preamp)(struct mv_host_priv *hpriv, int idx,
584 void (*reset_flash)(struct mv_host_priv *hpriv, void __iomem *mmio);
604 static void mv5_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio,
[all …]
H A Dahci_sunxi.c149 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_sunxi_start_engine() local
195 sunxi_clrsetbits(hpriv->mmio + AHCI_P0DMACR, 0x0000ffff, 0x00004433); in ahci_sunxi_start_engine()
215 struct ahci_host_priv *hpriv; in ahci_sunxi_probe() local
218 hpriv = ahci_platform_get_resources(pdev, AHCI_PLATFORM_GET_RESETS); in ahci_sunxi_probe()
219 if (IS_ERR(hpriv)) in ahci_sunxi_probe()
220 return PTR_ERR(hpriv); in ahci_sunxi_probe()
222 hpriv->start_engine = ahci_sunxi_start_engine; in ahci_sunxi_probe()
224 rc = ahci_platform_enable_resources(hpriv); in ahci_sunxi_probe()
228 rc = ahci_sunxi_phy_init(dev, hpriv->mmio); in ahci_sunxi_probe()
232 hpriv->flags = AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | in ahci_sunxi_probe()
[all …]
H A Dahci_dm816.c61 static int ahci_dm816_phy_init(struct ahci_host_priv *hpriv, struct device *dev) in ahci_dm816_phy_init() argument
72 if (hpriv->n_clks < 2) { in ahci_dm816_phy_init()
77 refclk_rate = clk_get_rate(hpriv->clks[1].clk); in ahci_dm816_phy_init()
93 writel(val, hpriv->mmio + AHCI_DM816_P0PHYCR_REG); in ahci_dm816_phy_init()
98 writel(val, hpriv->mmio + AHCI_DM816_P1PHYCR_REG); in ahci_dm816_phy_init()
144 struct ahci_host_priv *hpriv; in ahci_dm816_probe() local
147 hpriv = ahci_platform_get_resources(pdev, 0); in ahci_dm816_probe()
148 if (IS_ERR(hpriv)) in ahci_dm816_probe()
149 return PTR_ERR(hpriv); in ahci_dm816_probe()
151 rc = ahci_platform_enable_resources(hpriv); in ahci_dm816_probe()
[all …]
H A Dahci_platform.c45 struct ahci_host_priv *hpriv; in ahci_probe() local
49 hpriv = ahci_platform_get_resources(pdev, in ahci_probe()
51 if (IS_ERR(hpriv)) in ahci_probe()
52 return PTR_ERR(hpriv); in ahci_probe()
54 rc = ahci_platform_enable_resources(hpriv); in ahci_probe()
59 hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ; in ahci_probe()
65 rc = ahci_platform_init_host(pdev, hpriv, port, in ahci_probe()
72 ahci_platform_disable_resources(hpriv); in ahci_probe()
H A Dpata_rdc.c42 struct rdc_host_priv *hpriv = ap->host->private_data; in rdc_pata_cable_detect() local
47 if ((hpriv->saved_iocfg & mask) == 0) in rdc_pata_cable_detect()
316 struct rdc_host_priv *hpriv; in rdc_init_one() local
329 hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); in rdc_init_one()
330 if (!hpriv) in rdc_init_one()
336 pci_read_config_dword(pdev, 0x54, &hpriv->saved_iocfg); in rdc_init_one()
341 host->private_data = hpriv; in rdc_init_one()
354 struct rdc_host_priv *hpriv = host->private_data; in rdc_remove_one() local
356 pci_write_config_dword(pdev, 0x54, hpriv->saved_iocfg); in rdc_remove_one()
H A Dpata_hpt366.c390 const void *hpriv = NULL; in hpt36x_init_one() local
411 hpriv = &hpt366_40; in hpt36x_init_one()
414 hpriv = &hpt366_25; in hpt36x_init_one()
417 hpriv = &hpt366_33; in hpt36x_init_one()
421 return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, (void *)hpriv, 0); in hpt36x_init_one()
H A Dpata_hpt3x2n.c498 void *hpriv = (void *)USE_DPLL; in hpt3x2n_init_one() local
592 hpriv = (void *)(PCI66 | USE_DPLL); in hpt3x2n_init_one()
603 return ata_pci_bmdma_init_one(dev, ppi, &hpt3x2n_sht, hpriv, 0); in hpt3x2n_init_one()
/linux/drivers/accel/habanalabs/common/
H A Dhabanalabs_ioctl.c138 static int events_info(struct hl_fpriv *hpriv, struct hl_info_args *args) in events_info() argument
147 mutex_lock(&hpriv->notifier_event.lock); in events_info()
148 events_mask = hpriv->notifier_event.events_mask; in events_info()
149 hpriv->notifier_event.events_mask = 0; in events_info()
150 mutex_unlock(&hpriv->notifier_event.lock); in events_info()
155 static int dram_usage_info(struct hl_fpriv *hpriv, struct hl_info_args *args) in dram_usage_info() argument
157 struct hl_device *hdev = hpriv->hdev; in dram_usage_info()
171 if (hpriv->ctx) in dram_usage_info()
173 atomic64_read(&hpriv->ctx->dram_phys_mem); in dram_usage_info()
332 static int pci_counters_info(struct hl_fpriv *hpriv, struct hl_info_args *args) in pci_counters_info() argument
[all …]
H A Dhabanalabs_drv.c181 struct hl_fpriv *hpriv; in hl_device_open() local
184 hpriv = kzalloc_obj(*hpriv); in hl_device_open()
185 if (!hpriv) in hl_device_open()
188 hpriv->hdev = hdev; in hl_device_open()
189 mutex_init(&hpriv->notifier_event.lock); in hl_device_open()
190 mutex_init(&hpriv->restore_phase_mutex); in hl_device_open()
191 mutex_init(&hpriv->ctx_lock); in hl_device_open()
192 kref_init(&hpriv->refcount); in hl_device_open()
194 hl_ctx_mgr_init(&hpriv->ctx_mgr); in hl_device_open()
195 hl_mem_mgr_init(hpriv->hdev->dev, &hpriv->mem_mgr); in hl_device_open()
[all …]
H A Dcontext.c139 if (ctx->hpriv) { in hl_ctx_do_release()
140 struct hl_fpriv *hpriv = ctx->hpriv; in hl_ctx_do_release() local
142 mutex_lock(&hpriv->ctx_lock); in hl_ctx_do_release()
143 hpriv->ctx = NULL; in hl_ctx_do_release()
144 mutex_unlock(&hpriv->ctx_lock); in hl_ctx_do_release()
146 hl_hpriv_put(hpriv); in hl_ctx_do_release()
152 int hl_ctx_create(struct hl_device *hdev, struct hl_fpriv *hpriv) in hl_ctx_create() argument
154 struct hl_ctx_mgr *ctx_mgr = &hpriv->ctx_mgr; in hl_ctx_create()
179 hl_hpriv_get(hpriv); in hl_ctx_create()
180 ctx->hpriv = hpriv; in hl_ctx_create()
[all …]
H A Dcommand_submission.c316 static int cs_parser(struct hl_fpriv *hpriv, struct hl_cs_job *job) in cs_parser() argument
318 struct hl_device *hdev = hpriv->hdev; in cs_parser()
1347 static int hl_cs_sanity_checks(struct hl_fpriv *hpriv, union hl_cs_args *args) in hl_cs_sanity_checks() argument
1349 struct hl_device *hdev = hpriv->hdev; in hl_cs_sanity_checks()
1350 struct hl_ctx *ctx = hpriv->ctx; in hl_cs_sanity_checks()
1487 static int cs_ioctl_default(struct hl_fpriv *hpriv, void __user *chunks, in cs_ioctl_default() argument
1493 struct hl_device *hdev = hpriv->hdev; in cs_ioctl_default()
1496 struct hl_ctx *ctx = hpriv->ctx; in cs_ioctl_default()
1509 hpriv->ctx); in cs_ioctl_default()
1519 rc = allocate_cs(hdev, hpriv->ctx, CS_TYPE_DEFAULT, in cs_ioctl_default()
[all …]
H A Ddevice.c464 struct hl_fpriv *hpriv; in hpriv_release() local
467 hpriv = container_of(ref, struct hl_fpriv, refcount); in hpriv_release()
469 hdev = hpriv->hdev; in hpriv_release()
473 hl_debugfs_remove_file(hpriv); in hpriv_release()
475 mutex_destroy(&hpriv->ctx_lock); in hpriv_release()
476 mutex_destroy(&hpriv->restore_phase_mutex); in hpriv_release()
479 hl_mem_mgr_idr_destroy(&hpriv->mem_mgr); in hpriv_release()
508 list_del(&hpriv->dev_node); in hpriv_release()
511 put_pid(hpriv->taskpid); in hpriv_release()
536 if (hpriv->notifier_event.eventfd) in hpriv_release()
[all …]
H A Dcommand_buffer.c366 struct hl_fpriv *hpriv = file_priv->driver_priv; in hl_cb_ioctl() local
367 struct hl_device *hdev = hpriv->hdev; in hl_cb_ioctl()
389 rc = hl_cb_create(hdev, &hpriv->mem_mgr, hpriv->ctx, in hl_cb_ioctl()
400 rc = hl_cb_destroy(&hpriv->mem_mgr, in hl_cb_ioctl()
405 rc = hl_cb_info(&hpriv->mem_mgr, args->in.cb_handle, in hl_cb_ioctl()
H A Dmemory.c26 static int allocate_timestamps_buffers(struct hl_fpriv *hpriv,
1460 int hl_hw_block_mmap(struct hl_fpriv *hpriv, struct vm_area_struct *vma) in hl_hw_block_mmap() argument
1463 struct hl_device *hdev = hpriv->hdev; in hl_hw_block_mmap()
1464 struct hl_ctx *ctx = hpriv->ctx; in hl_hw_block_mmap()
1846 fput(ctx->hpriv->file_priv->filp); in hl_release_dmabuf()
1890 get_file(ctx->hpriv->file_priv->filp); in export_dmabuf()
2174 static int allocate_timestamps_buffers(struct hl_fpriv *hpriv, struct hl_mem_in *args, u64 *handle) in allocate_timestamps_buffers() argument
2176 struct hl_mem_mgr *mmg = &hpriv->mem_mgr; in allocate_timestamps_buffers()
2196 struct hl_fpriv *hpriv = file_priv->driver_priv; in hl_mem_ioctl() local
2199 struct hl_device *hdev = hpriv->hdev; in hl_mem_ioctl()
[all …]
H A Ddebugfs.c2120 void hl_debugfs_add_file(struct hl_fpriv *hpriv) in hl_debugfs_add_file() argument
2122 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs; in hl_debugfs_add_file()
2125 list_add(&hpriv->debugfs_list, &dev_entry->file_list); in hl_debugfs_add_file()
2129 void hl_debugfs_remove_file(struct hl_fpriv *hpriv) in hl_debugfs_remove_file() argument
2131 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs; in hl_debugfs_remove_file()
2134 list_del(&hpriv->debugfs_list); in hl_debugfs_remove_file()
/linux/include/linux/
H A Dahci_platform.h23 int ahci_platform_enable_phys(struct ahci_host_priv *hpriv);
24 void ahci_platform_disable_phys(struct ahci_host_priv *hpriv);
25 struct clk *ahci_platform_find_clk(struct ahci_host_priv *hpriv,
27 int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
28 void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
29 int ahci_platform_deassert_rsts(struct ahci_host_priv *hpriv);
30 int ahci_platform_assert_rsts(struct ahci_host_priv *hpriv);
31 int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv);
32 void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv);
33 int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
[all …]