| /Linux-v5.4/drivers/gpu/drm/arm/ |
| D | malidp_hw.c | 270 static int malidp500_query_hw(struct malidp_hw_device *hwdev) in malidp500_query_hw() argument 272 u32 conf = malidp_hw_read(hwdev, MALIDP500_CONFIG_ID); in malidp500_query_hw() 276 hwdev->min_line_size = 2; in malidp500_query_hw() 277 hwdev->max_line_size = SZ_2K * ln_size_mult; in malidp500_query_hw() 278 hwdev->rotation_memory[0] = SZ_1K * 64 * ln_size_mult; in malidp500_query_hw() 279 hwdev->rotation_memory[1] = 0; /* no second rotation memory bank */ in malidp500_query_hw() 284 static void malidp500_enter_config_mode(struct malidp_hw_device *hwdev) in malidp500_enter_config_mode() argument 288 malidp_hw_setbits(hwdev, MALIDP500_DC_CONFIG_REQ, MALIDP500_DC_CONTROL); in malidp500_enter_config_mode() 290 status = malidp_hw_read(hwdev, hwdev->hw->map.dc_base + MALIDP_REG_STATUS); in malidp500_enter_config_mode() 303 static void malidp500_leave_config_mode(struct malidp_hw_device *hwdev) in malidp500_leave_config_mode() argument [all …]
|
| D | malidp_hw.h | 147 int (*query_hw)(struct malidp_hw_device *hwdev); 152 void (*enter_config_mode)(struct malidp_hw_device *hwdev); 157 void (*leave_config_mode)(struct malidp_hw_device *hwdev); 162 bool (*in_config_mode)(struct malidp_hw_device *hwdev); 171 void (*set_config_valid)(struct malidp_hw_device *hwdev, u8 value); 177 void (*modeset)(struct malidp_hw_device *hwdev, struct videomode *m); 183 int (*rotmem_required)(struct malidp_hw_device *hwdev, u16 w, u16 h, 186 int (*se_set_scaling_coeffs)(struct malidp_hw_device *hwdev, 190 long (*se_calc_mclk)(struct malidp_hw_device *hwdev, 203 int (*enable_memwrite)(struct malidp_hw_device *hwdev, dma_addr_t *addrs, [all …]
|
| D | malidp_drv.c | 41 static void malidp_write_gamma_table(struct malidp_hw_device *hwdev, in malidp_write_gamma_table() argument 52 malidp_hw_write(hwdev, gamma_write_mask, in malidp_write_gamma_table() 53 hwdev->hw->map.coeffs_base + MALIDP_COEF_TABLE_ADDR); in malidp_write_gamma_table() 55 malidp_hw_write(hwdev, data[i], in malidp_write_gamma_table() 56 hwdev->hw->map.coeffs_base + in malidp_write_gamma_table() 64 struct malidp_hw_device *hwdev = malidp->dev; in malidp_atomic_commit_update_gamma() local 70 malidp_hw_clearbits(hwdev, in malidp_atomic_commit_update_gamma() 79 malidp_write_gamma_table(hwdev, mc->gamma_coeffs); in malidp_atomic_commit_update_gamma() 81 malidp_hw_setbits(hwdev, MALIDP_DISP_FUNC_GAMMA, in malidp_atomic_commit_update_gamma() 91 struct malidp_hw_device *hwdev = malidp->dev; in malidp_atomic_commit_update_coloradj() local [all …]
|
| D | malidp_crtc.c | 28 struct malidp_hw_device *hwdev = malidp->dev; in malidp_crtc_mode_valid() local 37 rate = clk_round_rate(hwdev->pxlclk, req_rate); in malidp_crtc_mode_valid() 52 struct malidp_hw_device *hwdev = malidp->dev; in malidp_crtc_atomic_enable() local 62 clk_prepare_enable(hwdev->pxlclk); in malidp_crtc_atomic_enable() 65 clk_set_rate(hwdev->pxlclk, crtc->state->adjusted_mode.crtc_clock * 1000); in malidp_crtc_atomic_enable() 67 hwdev->hw->modeset(hwdev, &vm); in malidp_crtc_atomic_enable() 68 hwdev->hw->leave_config_mode(hwdev); in malidp_crtc_atomic_enable() 76 struct malidp_hw_device *hwdev = malidp->dev; in malidp_crtc_atomic_disable() local 83 hwdev->hw->enter_config_mode(hwdev); in malidp_crtc_atomic_disable() 85 clk_disable_unprepare(hwdev->pxlclk); in malidp_crtc_atomic_disable() [all …]
|
| D | malidp_planes.c | 520 ms->format = malidp_hw_get_format_id(&mp->hwdev->hw->map, in malidp_de_plane_check() 528 u8 alignment = malidp_hw_get_pitch_align(mp->hwdev, rotated); in malidp_de_plane_check() 549 if ((state->crtc_w > mp->hwdev->max_line_size) || in malidp_de_plane_check() 550 (state->crtc_h > mp->hwdev->max_line_size) || in malidp_de_plane_check() 551 (state->crtc_w < mp->hwdev->min_line_size) || in malidp_de_plane_check() 552 (state->crtc_h < mp->hwdev->min_line_size)) in malidp_de_plane_check() 561 !(mp->hwdev->hw->features & MALIDP_DEVICE_LV_HAS_3_STRIDES) && in malidp_de_plane_check() 594 val = mp->hwdev->hw->rotmem_required(mp->hwdev, state->crtc_w, in malidp_de_plane_check() 625 num_strides = (mp->hwdev->hw->features & in malidp_de_set_plane_pitches() 636 malidp_hw_write(mp->hwdev, pitches[i] * block_h, in malidp_de_set_plane_pitches() [all …]
|
| D | malidp_mw.c | 243 struct malidp_hw_device *hwdev = malidp->dev; in malidp_mw_atomic_commit() local 262 hwdev->hw->enable_memwrite(hwdev, mw_state->addrs, in malidp_mw_atomic_commit() 270 hwdev->hw->disable_memwrite(hwdev); in malidp_mw_atomic_commit()
|
| /Linux-v5.4/drivers/net/ethernet/huawei/hinic/ |
| D | hinic_hw_dev.c | 70 static int get_capability(struct hinic_hwdev *hwdev, in get_capability() argument 73 struct hinic_cap *nic_cap = &hwdev->nic_cap; in get_capability() 76 if (!HINIC_IS_PF(hwdev->hwif) && !HINIC_IS_PPF(hwdev->hwif)) in get_capability() 82 num_aeqs = HINIC_HWIF_NUM_AEQS(hwdev->hwif); in get_capability() 83 num_ceqs = HINIC_HWIF_NUM_CEQS(hwdev->hwif); in get_capability() 84 num_irqs = HINIC_HWIF_NUM_IRQS(hwdev->hwif); in get_capability() 110 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in get_cap_from_fw() local 111 struct hinic_hwif *hwif = hwdev->hwif; in get_cap_from_fw() 128 return get_capability(hwdev, &dev_cap); in get_cap_from_fw() 137 static int get_dev_cap(struct hinic_hwdev *hwdev) in get_dev_cap() argument [all …]
|
| D | hinic_port.c | 41 struct hinic_hwdev *hwdev = nic_dev->hwdev; in change_mac() local 43 struct hinic_hwif *hwif = hwdev->hwif; in change_mac() 63 err = hinic_port_msg_cmd(hwdev, cmd, &port_mac_cmd, in change_mac() 112 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_get_mac() local 114 struct hinic_hwif *hwif = hwdev->hwif; in hinic_port_get_mac() 121 err = hinic_port_msg_cmd(hwdev, HINIC_PORT_CMD_GET_MAC, in hinic_port_get_mac() 144 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_set_mtu() local 146 struct hinic_hwif *hwif = hwdev->hwif; in hinic_port_set_mtu() 165 err = hinic_port_msg_cmd(hwdev, HINIC_PORT_CMD_CHANGE_MTU, in hinic_port_set_mtu() 186 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_add_vlan() local [all …]
|
| D | hinic_hw_dev.h | 242 struct hinic_hwdev hwdev; member 249 void hinic_hwdev_cb_register(struct hinic_hwdev *hwdev, 255 void hinic_hwdev_cb_unregister(struct hinic_hwdev *hwdev, 258 int hinic_port_msg_cmd(struct hinic_hwdev *hwdev, enum hinic_port_cmd cmd, 262 int hinic_hwdev_ifup(struct hinic_hwdev *hwdev); 264 void hinic_hwdev_ifdown(struct hinic_hwdev *hwdev); 268 void hinic_free_hwdev(struct hinic_hwdev *hwdev); 270 int hinic_hwdev_max_num_qps(struct hinic_hwdev *hwdev); 272 int hinic_hwdev_num_qps(struct hinic_hwdev *hwdev); 274 struct hinic_sq *hinic_hwdev_get_sq(struct hinic_hwdev *hwdev, int i); [all …]
|
| D | hinic_main.c | 117 int i, num_qps = hinic_hwdev_num_qps(nic_dev->hwdev); in update_nic_stats() 134 int err, i, j, num_txqs = hinic_hwdev_num_qps(nic_dev->hwdev); in create_txqs() 147 struct hinic_sq *sq = hinic_hwdev_get_sq(nic_dev->hwdev, i); in create_txqs() 173 int i, num_txqs = hinic_hwdev_num_qps(nic_dev->hwdev); in free_txqs() 194 int err, i, j, num_rxqs = hinic_hwdev_num_qps(nic_dev->hwdev); in create_rxqs() 207 struct hinic_rq *rq = hinic_hwdev_get_rq(nic_dev->hwdev, i); in create_rxqs() 233 int i, num_rxqs = hinic_hwdev_num_qps(nic_dev->hwdev); in free_rxqs() 250 err = hinic_set_max_qnum(nic_dev, nic_dev->hwdev->nic_cap.max_qps); in hinic_configure_max_qnum() 319 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_enable_rss() local 320 struct hinic_hwif *hwif = hwdev->hwif; in hinic_enable_rss() [all …]
|
| D | hinic_rx.c | 132 struct hinic_hwdev *hwdev = nic_dev->hwdev; in rx_alloc_skb() local 133 struct hinic_hwif *hwif = hwdev->hwif; in rx_alloc_skb() 169 struct hinic_hwdev *hwdev = nic_dev->hwdev; in rx_unmap_skb() local 170 struct hinic_hwif *hwif = hwdev->hwif; in rx_unmap_skb() 432 hinic_hwdev_set_msix_state(nic_dev->hwdev, in rx_poll() 461 hinic_hwdev_set_msix_state(nic_dev->hwdev, in rx_irq() 466 hinic_hwdev_msix_cnt_set(nic_dev->hwdev, rq->msix_entry); in rx_irq() 475 struct hinic_hwdev *hwdev = nic_dev->hwdev; in rx_request_irq() local 483 hinic_hwdev_msix_set(hwdev, rq->msix_entry, in rx_request_irq()
|
| D | hinic_tx.c | 136 struct hinic_hwdev *hwdev = nic_dev->hwdev; in tx_map_skb() local 137 struct hinic_hwif *hwif = hwdev->hwif; in tx_map_skb() 187 struct hinic_hwdev *hwdev = nic_dev->hwdev; in tx_unmap_skb() local 188 struct hinic_hwif *hwif = hwdev->hwif; in tx_unmap_skb() 674 hinic_hwdev_set_msix_state(nic_dev->hwdev, in free_tx_poll() 703 hinic_hwdev_set_msix_state(nic_dev->hwdev, in tx_irq() 707 hinic_hwdev_msix_cnt_set(nic_dev->hwdev, txq->sq->msix_entry); in tx_irq() 716 struct hinic_hwdev *hwdev = nic_dev->hwdev; in tx_request_irq() local 717 struct hinic_hwif *hwif = hwdev->hwif; in tx_request_irq() 724 hinic_hwdev_msix_set(nic_dev->hwdev, sq->msix_entry, in tx_request_irq() [all …]
|
| D | hinic_ethtool.c | 121 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_get_drvinfo() local 122 struct hinic_hwif *hwif = hwdev->hwif; in hinic_get_drvinfo() 148 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_get_channels() local 150 channels->max_rx = hwdev->nic_cap.max_qps; in hinic_get_channels() 151 channels->max_tx = hwdev->nic_cap.max_qps; in hinic_get_channels() 154 channels->rx_count = hinic_hwdev_num_qps(hwdev); in hinic_get_channels() 155 channels->tx_count = hinic_hwdev_num_qps(hwdev); in hinic_get_channels()
|
| D | hinic_hw_mgmt.c | 550 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in hinic_pf_to_mgmt_init() local 571 hinic_aeq_register_hw_cb(&hwdev->aeqs, HINIC_MSG_FROM_MGMT_CPU, in hinic_pf_to_mgmt_init() 584 struct hinic_hwdev *hwdev = &pfhwdev->hwdev; in hinic_pf_to_mgmt_free() local 586 hinic_aeq_unregister_hw_cb(&hwdev->aeqs, HINIC_MSG_FROM_MGMT_CPU); in hinic_pf_to_mgmt_free()
|
| /Linux-v5.4/include/linux/ |
| D | pci-dma-compat.h | 17 pci_alloc_consistent(struct pci_dev *hwdev, size_t size, in pci_alloc_consistent() argument 20 return dma_alloc_coherent(&hwdev->dev, size, dma_handle, GFP_ATOMIC); in pci_alloc_consistent() 24 pci_zalloc_consistent(struct pci_dev *hwdev, size_t size, in pci_zalloc_consistent() argument 27 return dma_alloc_coherent(&hwdev->dev, size, dma_handle, GFP_ATOMIC); in pci_zalloc_consistent() 31 pci_free_consistent(struct pci_dev *hwdev, size_t size, in pci_free_consistent() argument 34 dma_free_coherent(&hwdev->dev, size, vaddr, dma_handle); in pci_free_consistent() 38 pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction) in pci_map_single() argument 40 return dma_map_single(&hwdev->dev, ptr, size, (enum dma_data_direction)direction); in pci_map_single() 44 pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, in pci_unmap_single() argument 47 dma_unmap_single(&hwdev->dev, dma_addr, size, (enum dma_data_direction)direction); in pci_unmap_single() [all …]
|
| D | swiotlb.h | 47 extern phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, 55 extern void swiotlb_tbl_unmap_single(struct device *hwdev, 62 extern void swiotlb_tbl_sync_single(struct device *hwdev,
|
| /Linux-v5.4/drivers/hwmon/ |
| D | hwmon.c | 61 struct hwmon_device *hwdev; /* Reference to hwmon device */ member 122 struct hwmon_device *hwdev = tdata->hwdev; in hwmon_thermal_get_temp() local 126 ret = hwdev->chip->ops->read(&hwdev->dev, hwmon_temp, hwmon_temp_input, in hwmon_thermal_get_temp() 141 struct hwmon_device *hwdev, int index) in hwmon_thermal_add_sensor() argument 150 tdata->hwdev = hwdev; in hwmon_thermal_add_sensor() 153 tzd = devm_thermal_zone_of_sensor_register(&hwdev->dev, index, tdata, in hwmon_thermal_add_sensor() 166 struct hwmon_device *hwdev, int index) in hwmon_thermal_add_sensor() argument 568 struct hwmon_device *hwdev; in __hwmon_device_register() local 582 hwdev = kzalloc(sizeof(*hwdev), GFP_KERNEL); in __hwmon_device_register() 583 if (hwdev == NULL) { in __hwmon_device_register() [all …]
|
| D | scpi-hwmon.c | 133 struct device *hwdev, *dev = &pdev->dev; in scpi_hwmon_probe() local 242 hwdev = devm_hwmon_device_register_with_groups(dev, in scpi_hwmon_probe() 245 if (IS_ERR(hwdev)) in scpi_hwmon_probe() 246 return PTR_ERR(hwdev); in scpi_hwmon_probe()
|
| D | scmi-hwmon.c | 168 struct device *hwdev, *dev = &sdev->dev; in scmi_hwmon_probe() local 254 hwdev = devm_hwmon_device_register_with_info(dev, "scmi_sensors", in scmi_hwmon_probe() 258 return PTR_ERR_OR_ZERO(hwdev); in scmi_hwmon_probe()
|
| /Linux-v5.4/drivers/xen/ |
| D | swiotlb-xen.c | 276 xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, in xen_swiotlb_alloc_coherent() argument 302 ret = xen_alloc_coherent_pages(hwdev, size, dma_handle, flags, attrs); in xen_swiotlb_alloc_coherent() 307 if (hwdev && hwdev->coherent_dma_mask) in xen_swiotlb_alloc_coherent() 308 dma_mask = hwdev->coherent_dma_mask; in xen_swiotlb_alloc_coherent() 322 xen_free_coherent_pages(hwdev, size, ret, (dma_addr_t)phys, attrs); in xen_swiotlb_alloc_coherent() 332 xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr, in xen_swiotlb_free_coherent() argument 339 if (hwdev && hwdev->coherent_dma_mask) in xen_swiotlb_free_coherent() 340 dma_mask = hwdev->coherent_dma_mask; in xen_swiotlb_free_coherent() 354 xen_free_coherent_pages(hwdev, size, vaddr, (dma_addr_t)phys, attrs); in xen_swiotlb_free_coherent() 420 static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, in xen_swiotlb_unmap_page() argument [all …]
|
| /Linux-v5.4/drivers/infiniband/hw/qib/ |
| D | qib_user_pages.c | 59 int qib_map_page(struct pci_dev *hwdev, struct page *page, dma_addr_t *daddr) in qib_map_page() argument 63 phys = pci_map_page(hwdev, page, 0, PAGE_SIZE, PCI_DMA_FROMDEVICE); in qib_map_page() 64 if (pci_dma_mapping_error(hwdev, phys)) in qib_map_page() 68 pci_unmap_page(hwdev, phys, PAGE_SIZE, PCI_DMA_FROMDEVICE); in qib_map_page() 69 phys = pci_map_page(hwdev, page, 0, PAGE_SIZE, in qib_map_page() 71 if (pci_dma_mapping_error(hwdev, phys)) in qib_map_page()
|
| /Linux-v5.4/include/xen/arm/ |
| D | page-coherent.h | 8 static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size, in xen_alloc_coherent_pages() argument 11 return dma_direct_alloc(hwdev, size, dma_handle, flags, attrs); in xen_alloc_coherent_pages() 14 static inline void xen_free_coherent_pages(struct device *hwdev, size_t size, in xen_free_coherent_pages() argument 17 dma_direct_free(hwdev, size, cpu_addr, dma_handle, attrs); in xen_free_coherent_pages()
|
| /Linux-v5.4/drivers/net/ethernet/via/ |
| D | via-rhine.c | 677 static inline int verify_mmio(struct device *hwdev, in verify_mmio() argument 692 dev_err(hwdev, in verify_mmio() 902 static int rhine_init_one_common(struct device *hwdev, u32 quirks, in rhine_init_one_common() argument 911 rc = dma_set_mask(hwdev, DMA_BIT_MASK(32)); in rhine_init_one_common() 913 dev_err(hwdev, "32-bit DMA addresses not supported by the card!?\n"); in rhine_init_one_common() 922 SET_NETDEV_DEV(dev, hwdev); in rhine_init_one_common() 999 dev_set_drvdata(hwdev, dev); in rhine_init_one_common() 1037 struct device *hwdev = &pdev->dev; in rhine_init_one_pci() local 1082 dev_err(hwdev, "Insufficient PCI resources, aborting\n"); in rhine_init_one_pci() 1098 dev_err(hwdev, in rhine_init_one_pci() [all …]
|
| /Linux-v5.4/arch/x86/include/asm/xen/ |
| D | page-coherent.h | 8 static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size, in xen_alloc_coherent_pages() argument 17 static inline void xen_free_coherent_pages(struct device *hwdev, size_t size, in xen_free_coherent_pages() argument
|
| /Linux-v5.4/kernel/dma/ |
| D | swiotlb.c | 445 phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, in swiotlb_tbl_map_single() argument 469 dev_warn_once(hwdev, "Invalid sizes (mapping: %zd bytes, alloc: %zd bytes)", in swiotlb_tbl_map_single() 474 mask = dma_get_seg_boundary(hwdev); in swiotlb_tbl_map_single() 556 dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes), total %lu (slots), used %lu (slots)\n", in swiotlb_tbl_map_single() 580 void swiotlb_tbl_unmap_single(struct device *hwdev, phys_addr_t tlb_addr, in swiotlb_tbl_unmap_single() argument 627 void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, in swiotlb_tbl_sync_single() argument
|