/linux-4.1.27/drivers/crypto/ux500/cryp/ |
H A D | cryp_irq.c | 20 void cryp_enable_irq_src(struct cryp_device_data *device_data, u32 irq_src) cryp_enable_irq_src() argument 24 dev_dbg(device_data->dev, "[%s]", __func__); cryp_enable_irq_src() 26 i = readl_relaxed(&device_data->base->imsc); cryp_enable_irq_src() 28 writel_relaxed(i, &device_data->base->imsc); cryp_enable_irq_src() 31 void cryp_disable_irq_src(struct cryp_device_data *device_data, u32 irq_src) cryp_disable_irq_src() argument 35 dev_dbg(device_data->dev, "[%s]", __func__); cryp_disable_irq_src() 37 i = readl_relaxed(&device_data->base->imsc); cryp_disable_irq_src() 39 writel_relaxed(i, &device_data->base->imsc); cryp_disable_irq_src() 42 bool cryp_pending_irq_src(struct cryp_device_data *device_data, u32 irq_src) cryp_pending_irq_src() argument 44 return (readl_relaxed(&device_data->base->mis) & irq_src) > 0; cryp_pending_irq_src()
|
H A D | cryp.c | 21 void cryp_wait_until_done(struct cryp_device_data *device_data) cryp_wait_until_done() argument 23 while (cryp_is_logic_busy(device_data)) cryp_wait_until_done() 29 * @device_data: Pointer to the device data struct for base address. 31 int cryp_check(struct cryp_device_data *device_data) cryp_check() argument 35 if (NULL == device_data) cryp_check() 38 peripheralid2 = readl_relaxed(&device_data->base->periphId2); cryp_check() 45 readl_relaxed(&device_data->base->periphId0)) cryp_check() 47 readl_relaxed(&device_data->base->periphId1)) cryp_check() 49 readl_relaxed(&device_data->base->periphId3)) cryp_check() 51 readl_relaxed(&device_data->base->pcellId0)) cryp_check() 53 readl_relaxed(&device_data->base->pcellId1)) cryp_check() 55 readl_relaxed(&device_data->base->pcellId2)) cryp_check() 57 readl_relaxed(&device_data->base->pcellId3))) { cryp_check() 66 * @device_data: Pointer to the device data struct for base address. 69 void cryp_activity(struct cryp_device_data *device_data, cryp_activity() argument 72 CRYP_PUT_BITS(&device_data->base->cr, cryp_activity() 80 * @device_data: Pointer to the device data struct for base address. 82 void cryp_flush_inoutfifo(struct cryp_device_data *device_data) cryp_flush_inoutfifo() argument 90 cryp_activity(device_data, CRYP_CRYPEN_DISABLE); cryp_flush_inoutfifo() 91 cryp_wait_until_done(device_data); cryp_flush_inoutfifo() 93 CRYP_SET_BITS(&device_data->base->cr, CRYP_CR_FFLUSH_MASK); cryp_flush_inoutfifo() 99 while (readl_relaxed(&device_data->base->sr) != cryp_flush_inoutfifo() 106 * @device_data: Pointer to the device data struct for base address. 110 int cryp_set_configuration(struct cryp_device_data *device_data, cryp_set_configuration() argument 116 if (NULL == device_data || NULL == cryp_config) cryp_set_configuration() 147 writel_relaxed(cr_for_kse, &device_data->base->cr); cryp_set_configuration() 148 cryp_wait_until_done(device_data); cryp_set_configuration() 160 * @device_data: Pointer to the device data struct for base address. 164 int cryp_configure_protection(struct cryp_device_data *device_data, cryp_configure_protection() argument 170 CRYP_WRITE_BIT(&device_data->base->cr, cryp_configure_protection() 173 CRYP_PUT_BITS(&device_data->base->cr, cryp_configure_protection() 183 * @device_data: Pointer to the device data struct for base address. 185 int cryp_is_logic_busy(struct cryp_device_data *device_data) cryp_is_logic_busy() argument 187 return CRYP_TEST_BITS(&device_data->base->sr, cryp_is_logic_busy() 193 * @device_data: Pointer to the device data struct for base address. 196 void cryp_configure_for_dma(struct cryp_device_data *device_data, cryp_configure_for_dma() argument 199 CRYP_SET_BITS(&device_data->base->dmacr, cryp_configure_for_dma() 205 * @device_data: Pointer to the device data struct for base address. 209 int cryp_configure_key_values(struct cryp_device_data *device_data, cryp_configure_key_values() argument 213 while (cryp_is_logic_busy(device_data)) cryp_configure_key_values() 219 &device_data->base->key_1_l); cryp_configure_key_values() 221 &device_data->base->key_1_r); cryp_configure_key_values() 225 &device_data->base->key_2_l); cryp_configure_key_values() 227 &device_data->base->key_2_r); cryp_configure_key_values() 231 &device_data->base->key_3_l); cryp_configure_key_values() 233 &device_data->base->key_3_r); cryp_configure_key_values() 237 &device_data->base->key_4_l); cryp_configure_key_values() 239 &device_data->base->key_4_r); cryp_configure_key_values() 250 * @device_data: Pointer to the device data struct for base address. 254 int cryp_configure_init_vector(struct cryp_device_data *device_data, cryp_configure_init_vector() argument 260 while (cryp_is_logic_busy(device_data)) cryp_configure_init_vector() 266 &device_data->base->init_vect_0_l); cryp_configure_init_vector() 268 &device_data->base->init_vect_0_r); cryp_configure_init_vector() 272 &device_data->base->init_vect_1_l); cryp_configure_init_vector() 274 &device_data->base->init_vect_1_r); cryp_configure_init_vector() 286 * @device_data: Pointer to the device data struct for base address. 289 void cryp_save_device_context(struct cryp_device_data *device_data, cryp_save_device_context() argument 294 struct cryp_register __iomem *src_reg = device_data->base; cryp_save_device_context() 296 (struct cryp_config *)device_data->current_ctx; cryp_save_device_context() 302 cryp_activity(device_data, CRYP_CRYPEN_DISABLE); cryp_save_device_context() 303 cryp_wait_until_done(device_data); cryp_save_device_context() 306 cryp_configure_for_dma(device_data, CRYP_DMA_DISABLE_BOTH); cryp_save_device_context() 346 * @device_data: Pointer to the device data struct for base address. 349 void cryp_restore_device_context(struct cryp_device_data *device_data, cryp_restore_device_context() argument 352 struct cryp_register __iomem *reg = device_data->base; cryp_restore_device_context() 354 (struct cryp_config *)device_data->current_ctx; cryp_restore_device_context()
|
H A D | cryp_core.c | 194 struct cryp_device_data *device_data; cryp_interrupt_handler() local 202 device_data = (struct cryp_device_data *)param; cryp_interrupt_handler() 204 ctx = device_data->current_ctx; cryp_interrupt_handler() 212 cryp_pending_irq_src(device_data, CRYP_IRQ_SRC_OUTPUT_FIFO) ? cryp_interrupt_handler() 215 if (cryp_pending_irq_src(device_data, cryp_interrupt_handler() 220 readsl(&device_data->base->dout, ctx->outdata, count); cryp_interrupt_handler() 225 cryp_disable_irq_src(device_data, cryp_interrupt_handler() 229 } else if (cryp_pending_irq_src(device_data, cryp_interrupt_handler() 234 writesl(&device_data->base->din, ctx->indata, count); cryp_interrupt_handler() 240 cryp_disable_irq_src(device_data, cryp_interrupt_handler() 244 CRYP_PUT_BITS(&device_data->base->cr, cryp_interrupt_handler() 249 cryp_wait_until_done(device_data); cryp_interrupt_handler() 265 static int cfg_iv(struct cryp_device_data *device_data, u32 left, u32 right, cfg_iv() argument 270 dev_dbg(device_data->dev, "[%s]", __func__); cfg_iv() 275 return cryp_configure_init_vector(device_data, cfg_iv() 280 static int cfg_ivs(struct cryp_device_data *device_data, struct cryp_ctx *ctx) cfg_ivs() argument 287 dev_dbg(device_data->dev, "[%s]", __func__); cfg_ivs() 295 dev_err(device_data->dev, "[%s] Incorrect blocksize %d", cfg_ivs() 304 status = cfg_iv(device_data, iv[i*2], iv[i*2+1], cfg_ivs() 312 static int set_key(struct cryp_device_data *device_data, set_key() argument 320 dev_dbg(device_data->dev, "[%s]", __func__); set_key() 325 cryp_error = cryp_configure_key_values(device_data, set_key() 329 dev_err(device_data->dev, "[%s]: " set_key() 369 struct cryp_device_data *device_data) cryp_setup_context() 375 writel_relaxed(CRYP_IMSC_DEFAULT, &device_data->base->imsc); cryp_setup_context() 379 writel_relaxed(CRYP_DMACR_DEFAULT, &device_data->base->dmacr); cryp_setup_context() 387 cryp_flush_inoutfifo(device_data); cryp_setup_context() 398 if (cfg_ivs(device_data, ctx) != 0) cryp_setup_context() 402 cryp_set_configuration(device_data, &ctx->config, cryp_setup_context() 407 cryp_flush_inoutfifo(device_data); cryp_setup_context() 408 cryp_restore_device_context(device_data, &ctx->dev_ctx); cryp_setup_context() 417 &device_data->base->cr); cryp_setup_context() 423 struct cryp_device_data **device_data) cryp_get_device_data() 469 *device_data = local_device_data; cryp_get_device_data() 474 static void cryp_dma_setup_channel(struct cryp_device_data *device_data, cryp_dma_setup_channel() argument 479 .dst_addr = device_data->phybase + CRYP_DMA_TX_FIFO, cryp_dma_setup_channel() 485 .src_addr = device_data->phybase + CRYP_DMA_RX_FIFO, cryp_dma_setup_channel() 490 dma_cap_zero(device_data->dma.mask); cryp_dma_setup_channel() 491 dma_cap_set(DMA_SLAVE, device_data->dma.mask); cryp_dma_setup_channel() 493 device_data->dma.cfg_mem2cryp = mem_to_engine; cryp_dma_setup_channel() 494 device_data->dma.chan_mem2cryp = cryp_dma_setup_channel() 495 dma_request_channel(device_data->dma.mask, cryp_dma_setup_channel() 497 device_data->dma.cfg_mem2cryp); cryp_dma_setup_channel() 499 device_data->dma.cfg_cryp2mem = engine_to_mem; cryp_dma_setup_channel() 500 device_data->dma.chan_cryp2mem = cryp_dma_setup_channel() 501 dma_request_channel(device_data->dma.mask, cryp_dma_setup_channel() 503 device_data->dma.cfg_cryp2mem); cryp_dma_setup_channel() 505 dmaengine_slave_config(device_data->dma.chan_mem2cryp, &mem2cryp); cryp_dma_setup_channel() 506 dmaengine_slave_config(device_data->dma.chan_cryp2mem, &cryp2mem); cryp_dma_setup_channel() 508 init_completion(&device_data->dma.cryp_dma_complete); cryp_dma_setup_channel() 647 struct cryp_device_data *device_data) cryp_polling_mode() 655 writesl(&device_data->base->din, indata, len); cryp_polling_mode() 658 cryp_wait_until_done(device_data); cryp_polling_mode() 660 readsl(&device_data->base->dout, outdata, len); cryp_polling_mode() 662 cryp_wait_until_done(device_data); cryp_polling_mode() 667 struct cryp_device_data *device_data, cryp_disable_power() 674 spin_lock(&device_data->power_state_spinlock); cryp_disable_power() 675 if (!device_data->power_state) cryp_disable_power() 678 spin_lock(&device_data->ctx_lock); cryp_disable_power() 679 if (save_device_context && device_data->current_ctx) { cryp_disable_power() 680 cryp_save_device_context(device_data, cryp_disable_power() 681 &device_data->current_ctx->dev_ctx, cryp_disable_power() 683 device_data->restore_dev_ctx = true; cryp_disable_power() 685 spin_unlock(&device_data->ctx_lock); cryp_disable_power() 687 clk_disable(device_data->clk); cryp_disable_power() 688 ret = regulator_disable(device_data->pwr_regulator); cryp_disable_power() 694 device_data->power_state = false; cryp_disable_power() 697 spin_unlock(&device_data->power_state_spinlock); cryp_disable_power() 704 struct cryp_device_data *device_data, cryp_enable_power() 711 spin_lock(&device_data->power_state_spinlock); cryp_enable_power() 712 if (!device_data->power_state) { cryp_enable_power() 713 ret = regulator_enable(device_data->pwr_regulator); cryp_enable_power() 720 ret = clk_enable(device_data->clk); cryp_enable_power() 724 regulator_disable(device_data->pwr_regulator); cryp_enable_power() 727 device_data->power_state = true; cryp_enable_power() 730 if (device_data->restore_dev_ctx) { cryp_enable_power() 731 spin_lock(&device_data->ctx_lock); cryp_enable_power() 732 if (restore_device_context && device_data->current_ctx) { cryp_enable_power() 733 device_data->restore_dev_ctx = false; cryp_enable_power() 734 cryp_restore_device_context(device_data, cryp_enable_power() 735 &device_data->current_ctx->dev_ctx); cryp_enable_power() 737 spin_unlock(&device_data->ctx_lock); cryp_enable_power() 740 spin_unlock(&device_data->power_state_spinlock); cryp_enable_power() 746 struct cryp_device_data *device_data) hw_crypt_noxts() 765 ret = cryp_setup_context(ctx, device_data); hw_crypt_noxts() 771 cryp_enable_irq_src(device_data, CRYP_IRQ_SRC_INPUT_FIFO | hw_crypt_noxts() 791 cryp_polling_mode(ctx, device_data); hw_crypt_noxts() 799 cryp_save_device_context(device_data, &ctx->dev_ctx, cryp_mode); hw_crypt_noxts() 828 struct cryp_device_data *device_data; ablk_dma_crypt() local 839 ret = cryp_get_device_data(ctx, &device_data); ablk_dma_crypt() 843 ret = cryp_setup_context(ctx, device_data); ablk_dma_crypt() 852 cryp_configure_for_dma(device_data, CRYP_DMA_ENABLE_BOTH_DIRECTIONS); ablk_dma_crypt() 860 cryp_save_device_context(device_data, &ctx->dev_ctx, cryp_mode); ablk_dma_crypt() 864 spin_lock(&device_data->ctx_lock); ablk_dma_crypt() 865 device_data->current_ctx = NULL; ablk_dma_crypt() 867 spin_unlock(&device_data->ctx_lock); ablk_dma_crypt() 886 struct cryp_device_data *device_data; ablk_crypt() local 894 ret = cryp_get_device_data(ctx, &device_data); ablk_crypt() 917 ret = hw_crypt_noxts(ctx, device_data); ablk_crypt() 930 spin_lock(&device_data->ctx_lock); ablk_crypt() 931 device_data->current_ctx = NULL; ablk_crypt() 933 spin_unlock(&device_data->ctx_lock); ablk_crypt() 1410 struct cryp_device_data *device_data; ux500_cryp_probe() local 1417 device_data = kzalloc(sizeof(struct cryp_device_data), GFP_ATOMIC); ux500_cryp_probe() 1418 if (!device_data) { ux500_cryp_probe() 1424 device_data->dev = dev; ux500_cryp_probe() 1425 device_data->current_ctx = NULL; ux500_cryp_probe() 1449 device_data->phybase = res->start; ux500_cryp_probe() 1450 device_data->base = ioremap(res->start, resource_size(res)); ux500_cryp_probe() 1451 if (!device_data->base) { ux500_cryp_probe() 1457 spin_lock_init(&device_data->ctx_lock); ux500_cryp_probe() 1458 spin_lock_init(&device_data->power_state_spinlock); ux500_cryp_probe() 1461 device_data->pwr_regulator = regulator_get(&pdev->dev, "v-ape"); ux500_cryp_probe() 1462 if (IS_ERR(device_data->pwr_regulator)) { ux500_cryp_probe() 1464 ret = PTR_ERR(device_data->pwr_regulator); ux500_cryp_probe() 1465 device_data->pwr_regulator = NULL; ux500_cryp_probe() 1470 device_data->clk = clk_get(&pdev->dev, NULL); ux500_cryp_probe() 1471 if (IS_ERR(device_data->clk)) { ux500_cryp_probe() 1473 ret = PTR_ERR(device_data->clk); ux500_cryp_probe() 1477 ret = clk_prepare(device_data->clk); ux500_cryp_probe() 1484 ret = cryp_enable_power(device_data->dev, device_data, false); ux500_cryp_probe() 1490 cryp_error = cryp_check(device_data); ux500_cryp_probe() 1497 cryp_error = cryp_configure_protection(device_data, &prot); ux500_cryp_probe() 1517 device_data); ux500_cryp_probe() 1524 cryp_dma_setup_channel(device_data, dev); ux500_cryp_probe() 1526 platform_set_drvdata(pdev, device_data); ux500_cryp_probe() 1529 klist_add_tail(&device_data->list_node, &driver_data.device_list); ux500_cryp_probe() 1548 cryp_disable_power(device_data->dev, device_data, false); ux500_cryp_probe() 1551 clk_unprepare(device_data->clk); ux500_cryp_probe() 1554 clk_put(device_data->clk); ux500_cryp_probe() 1557 regulator_put(device_data->pwr_regulator); ux500_cryp_probe() 1560 iounmap(device_data->base); ux500_cryp_probe() 1566 kfree(device_data); ux500_cryp_probe() 1575 struct cryp_device_data *device_data; ux500_cryp_remove() local 1578 device_data = platform_get_drvdata(pdev); ux500_cryp_remove() 1579 if (!device_data) { ux500_cryp_remove() 1590 spin_lock(&device_data->ctx_lock); ux500_cryp_remove() 1592 if (device_data->current_ctx) { ux500_cryp_remove() 1594 spin_unlock(&device_data->ctx_lock); ux500_cryp_remove() 1600 spin_unlock(&device_data->ctx_lock); ux500_cryp_remove() 1603 if (klist_node_attached(&device_data->list_node)) ux500_cryp_remove() 1604 klist_remove(&device_data->list_node); ux500_cryp_remove() 1616 free_irq(res_irq->start, device_data); ux500_cryp_remove() 1619 if (cryp_disable_power(&pdev->dev, device_data, false)) ux500_cryp_remove() 1623 clk_unprepare(device_data->clk); ux500_cryp_remove() 1624 clk_put(device_data->clk); ux500_cryp_remove() 1625 regulator_put(device_data->pwr_regulator); ux500_cryp_remove() 1627 iounmap(device_data->base); ux500_cryp_remove() 1633 kfree(device_data); ux500_cryp_remove() 1641 struct cryp_device_data *device_data; ux500_cryp_shutdown() local 1645 device_data = platform_get_drvdata(pdev); ux500_cryp_shutdown() 1646 if (!device_data) { ux500_cryp_shutdown() 1653 spin_lock(&device_data->ctx_lock); ux500_cryp_shutdown() 1655 if (!device_data->current_ctx) { ux500_cryp_shutdown() 1664 device_data->current_ctx++; ux500_cryp_shutdown() 1666 spin_unlock(&device_data->ctx_lock); ux500_cryp_shutdown() 1669 if (klist_node_attached(&device_data->list_node)) ux500_cryp_shutdown() 1670 klist_remove(&device_data->list_node); ux500_cryp_shutdown() 1682 free_irq(res_irq->start, device_data); ux500_cryp_shutdown() 1685 if (cryp_disable_power(&pdev->dev, device_data, false)) ux500_cryp_shutdown() 1696 struct cryp_device_data *device_data; ux500_cryp_suspend() local 1703 device_data = platform_get_drvdata(pdev); ux500_cryp_suspend() 1704 if (!device_data) { ux500_cryp_suspend() 1715 spin_lock(&device_data->ctx_lock); ux500_cryp_suspend() 1716 if (!device_data->current_ctx) ux500_cryp_suspend() 1717 device_data->current_ctx++; ux500_cryp_suspend() 1718 spin_unlock(&device_data->ctx_lock); ux500_cryp_suspend() 1720 if (device_data->current_ctx == ++temp_ctx) { ux500_cryp_suspend() 1724 ret = cryp_disable_power(dev, device_data, false); ux500_cryp_suspend() 1727 ret = cryp_disable_power(dev, device_data, true); ux500_cryp_suspend() 1739 struct cryp_device_data *device_data; ux500_cryp_resume() local 1745 device_data = platform_get_drvdata(pdev); ux500_cryp_resume() 1746 if (!device_data) { ux500_cryp_resume() 1751 spin_lock(&device_data->ctx_lock); ux500_cryp_resume() 1752 if (device_data->current_ctx == ++temp_ctx) ux500_cryp_resume() 1753 device_data->current_ctx = NULL; ux500_cryp_resume() 1754 spin_unlock(&device_data->ctx_lock); ux500_cryp_resume() 1757 if (!device_data->current_ctx) ux500_cryp_resume() 1760 ret = cryp_enable_power(dev, device_data, true); ux500_cryp_resume() 368 cryp_setup_context(struct cryp_ctx *ctx, struct cryp_device_data *device_data) cryp_setup_context() argument 422 cryp_get_device_data(struct cryp_ctx *ctx, struct cryp_device_data **device_data) cryp_get_device_data() argument 646 cryp_polling_mode(struct cryp_ctx *ctx, struct cryp_device_data *device_data) cryp_polling_mode() argument 666 cryp_disable_power(struct device *dev, struct cryp_device_data *device_data, bool save_device_context) cryp_disable_power() argument 702 cryp_enable_power( struct device *dev, struct cryp_device_data *device_data, bool restore_device_context) cryp_enable_power() argument 745 hw_crypt_noxts(struct cryp_ctx *ctx, struct cryp_device_data *device_data) hw_crypt_noxts() argument
|
H A D | cryp_irq.h | 25 void cryp_enable_irq_src(struct cryp_device_data *device_data, u32 irq_src); 27 void cryp_disable_irq_src(struct cryp_device_data *device_data, u32 irq_src); 29 bool cryp_pending_irq_src(struct cryp_device_data *device_data, u32 irq_src);
|
H A D | cryp.h | 253 void cryp_wait_until_done(struct cryp_device_data *device_data); 257 int cryp_check(struct cryp_device_data *device_data); 259 void cryp_activity(struct cryp_device_data *device_data, 262 void cryp_flush_inoutfifo(struct cryp_device_data *device_data); 264 int cryp_set_configuration(struct cryp_device_data *device_data, 268 void cryp_configure_for_dma(struct cryp_device_data *device_data, 271 int cryp_configure_key_values(struct cryp_device_data *device_data, 275 int cryp_configure_init_vector(struct cryp_device_data *device_data, 281 int cryp_configure_protection(struct cryp_device_data *device_data, 285 void cryp_save_device_context(struct cryp_device_data *device_data, 289 void cryp_restore_device_context(struct cryp_device_data *device_data, 293 int cryp_is_logic_busy(struct cryp_device_data *device_data); 295 int cryp_get_status(struct cryp_device_data *device_data); 300 * @device_data: Pointer to the device data struct for base address. 303 int cryp_write_indata(struct cryp_device_data *device_data, u32 write_data); 308 * @device_data: Pointer to the device data struct for base address. 311 int cryp_read_outdata(struct cryp_device_data *device_data, u32 *read_data);
|
/linux-4.1.27/drivers/crypto/ux500/hash/ |
H A D | hash_core.c | 91 * @device_data: Structure for the hash device. 99 static void hash_messagepad(struct hash_device_data *device_data, 104 * @device_data: Structure for the hash device. 107 static void release_hash_device(struct hash_device_data *device_data) release_hash_device() argument 109 spin_lock(&device_data->ctx_lock); release_hash_device() 110 device_data->current_ctx->device = NULL; release_hash_device() 111 device_data->current_ctx = NULL; release_hash_device() 112 spin_unlock(&device_data->ctx_lock); release_hash_device() 121 static void hash_dma_setup_channel(struct hash_device_data *device_data, hash_dma_setup_channel() argument 127 .dst_addr = device_data->phybase + HASH_DMA_FIFO, hash_dma_setup_channel() 132 dma_cap_zero(device_data->dma.mask); hash_dma_setup_channel() 133 dma_cap_set(DMA_SLAVE, device_data->dma.mask); hash_dma_setup_channel() 135 device_data->dma.cfg_mem2hash = platform_data->mem_to_engine; hash_dma_setup_channel() 136 device_data->dma.chan_mem2hash = hash_dma_setup_channel() 137 dma_request_channel(device_data->dma.mask, hash_dma_setup_channel() 139 device_data->dma.cfg_mem2hash); hash_dma_setup_channel() 141 dmaengine_slave_config(device_data->dma.chan_mem2hash, &conf); hash_dma_setup_channel() 143 init_completion(&device_data->dma.complete); hash_dma_setup_channel() 226 * @device_data: Structure for the hash device. 232 struct hash_device_data *device_data, get_empty_message_digest() 236 struct hash_ctx *ctx = device_data->current_ctx; get_empty_message_digest() 256 dev_err(device_data->dev, "%s: Incorrect algorithm!\n", get_empty_message_digest() 274 dev_err(device_data->dev, "%s: Incorrect algorithm!\n", get_empty_message_digest() 280 dev_dbg(device_data->dev, get_empty_message_digest() 292 * @device_data: Structure for the hash device. 298 static int hash_disable_power(struct hash_device_data *device_data, hash_disable_power() argument 302 struct device *dev = device_data->dev; hash_disable_power() 304 spin_lock(&device_data->power_state_lock); hash_disable_power() 305 if (!device_data->power_state) hash_disable_power() 309 hash_save_state(device_data, hash_disable_power() 310 &device_data->state); hash_disable_power() 311 device_data->restore_dev_state = true; hash_disable_power() 314 clk_disable(device_data->clk); hash_disable_power() 315 ret = regulator_disable(device_data->regulator); hash_disable_power() 319 device_data->power_state = false; hash_disable_power() 322 spin_unlock(&device_data->power_state_lock); hash_disable_power() 329 * @device_data: Structure for the hash device. 335 static int hash_enable_power(struct hash_device_data *device_data, hash_enable_power() argument 339 struct device *dev = device_data->dev; hash_enable_power() 341 spin_lock(&device_data->power_state_lock); hash_enable_power() 342 if (!device_data->power_state) { hash_enable_power() 343 ret = regulator_enable(device_data->regulator); hash_enable_power() 349 ret = clk_enable(device_data->clk); hash_enable_power() 353 device_data->regulator); hash_enable_power() 356 device_data->power_state = true; hash_enable_power() 359 if (device_data->restore_dev_state) { hash_enable_power() 361 device_data->restore_dev_state = false; hash_enable_power() 362 hash_resume_state(device_data, &device_data->state); hash_enable_power() 366 spin_unlock(&device_data->power_state_lock); hash_enable_power() 374 * @device_data: Structure for the hash device. 381 struct hash_device_data **device_data) hash_get_device_data() 425 *device_data = local_device_data; hash_get_device_data() 433 * @device_data: Structure for the hash device. 441 static void hash_hw_write_key(struct hash_device_data *device_data, hash_hw_write_key() argument 447 HASH_CLEAR_BITS(&device_data->base->str, HASH_STR_NBLW_MASK); hash_hw_write_key() 468 while (readl(&device_data->base->str) & HASH_STR_DCAL_MASK) hash_hw_write_key() 473 while (readl(&device_data->base->str) & HASH_STR_DCAL_MASK) hash_hw_write_key() 479 * @device_data: Structure for the hash device. 485 static int init_hash_hw(struct hash_device_data *device_data, init_hash_hw() argument 490 ret = hash_setconfiguration(device_data, &ctx->config); init_hash_hw() 492 dev_err(device_data->dev, "%s: hash_setconfiguration() failed!\n", init_hash_hw() 497 hash_begin(device_data, ctx); init_hash_hw() 500 hash_hw_write_key(device_data, ctx->key, ctx->keylen); init_hash_hw() 599 * @device_data: Structure for the hash device. 604 static void hash_processblock(struct hash_device_data *device_data, hash_processblock() argument 611 HASH_CLEAR_BITS(&device_data->base->str, HASH_STR_NBLW_MASK); hash_processblock() 621 * @device_data: Structure for the hash device. 629 static void hash_messagepad(struct hash_device_data *device_data, hash_messagepad() argument 638 HASH_CLEAR_BITS(&device_data->base->str, HASH_STR_NBLW_MASK); hash_messagepad() 650 while (readl(&device_data->base->str) & HASH_STR_DCAL_MASK) hash_messagepad() 655 dev_dbg(device_data->dev, "%s: DIN=0x%08x NBLW=%lu\n", hash_messagepad() 656 __func__, readl_relaxed(&device_data->base->din), hash_messagepad() 657 readl_relaxed(&device_data->base->str) & HASH_STR_NBLW_MASK); hash_messagepad() 659 dev_dbg(device_data->dev, "%s: after dcal -> DIN=0x%08x NBLW=%lu\n", hash_messagepad() 660 __func__, readl_relaxed(&device_data->base->din), hash_messagepad() 661 readl_relaxed(&device_data->base->str) & HASH_STR_NBLW_MASK); hash_messagepad() 663 while (readl(&device_data->base->str) & HASH_STR_DCAL_MASK) hash_messagepad() 687 * @device_data: Structure for the hash device. 690 int hash_setconfiguration(struct hash_device_data *device_data, hash_setconfiguration() argument 710 HASH_SET_BITS(&device_data->base->cr, HASH_CR_ALGO_MASK); hash_setconfiguration() 714 HASH_CLEAR_BITS(&device_data->base->cr, HASH_CR_ALGO_MASK); hash_setconfiguration() 718 dev_err(device_data->dev, "%s: Incorrect algorithm\n", hash_setconfiguration() 728 HASH_CLEAR_BITS(&device_data->base->cr, hash_setconfiguration() 731 HASH_SET_BITS(&device_data->base->cr, HASH_CR_MODE_MASK); hash_setconfiguration() 732 if (device_data->current_ctx->keylen > HASH_BLOCK_SIZE) { hash_setconfiguration() 734 dev_dbg(device_data->dev, "%s: LKEY set\n", __func__); hash_setconfiguration() 735 HASH_SET_BITS(&device_data->base->cr, hash_setconfiguration() 738 dev_dbg(device_data->dev, "%s: LKEY cleared\n", hash_setconfiguration() 740 HASH_CLEAR_BITS(&device_data->base->cr, hash_setconfiguration() 745 dev_err(device_data->dev, "%s: HASH_INVALID_PARAMETER!\n", hash_setconfiguration() 754 * @device_data: Structure for the hash device. 757 void hash_begin(struct hash_device_data *device_data, struct hash_ctx *ctx) hash_begin() argument 762 while (readl(&device_data->base->str) & HASH_STR_DCAL_MASK) hash_begin() 775 HASH_CLEAR_BITS(&device_data->base->str, HASH_STR_NBLW_MASK); hash_begin() 778 static int hash_process_data(struct hash_device_data *device_data, hash_process_data() argument 796 ret = hash_resume_state(device_data, hash_process_data() 797 &device_data->state); hash_process_data() 799 device_data->state.buffer, hash_process_data() 802 dev_err(device_data->dev, hash_process_data() 808 ret = init_hash_hw(device_data, ctx); hash_process_data() 810 dev_err(device_data->dev, hash_process_data() 826 hash_processblock(device_data, hash_process_data() 836 hash_processblock(device_data, hash_process_data() 846 ret = hash_save_state(device_data, hash_process_data() 847 &device_data->state); hash_process_data() 849 memmove(device_data->state.buffer, hash_process_data() 853 dev_err(device_data->dev, "%s: hash_save_state() failed!\n", hash_process_data() 874 struct hash_device_data *device_data; hash_dma_final() local 878 ret = hash_get_device_data(ctx, &device_data); hash_dma_final() 882 dev_dbg(device_data->dev, "%s: (ctx=0x%x)!\n", __func__, (u32) ctx); hash_dma_final() 885 ret = hash_resume_state(device_data, &device_data->state); hash_dma_final() 888 dev_err(device_data->dev, "%s: hash_resume_state() failed!\n", hash_dma_final() 895 ret = hash_setconfiguration(device_data, &ctx->config); hash_dma_final() 897 dev_err(device_data->dev, hash_dma_final() 905 HASH_CLEAR_BITS(&device_data->base->cr, hash_dma_final() 908 HASH_SET_BITS(&device_data->base->cr, hash_dma_final() 910 HASH_SET_BITS(&device_data->base->cr, hash_dma_final() 917 hash_hw_write_key(device_data, ctx->key, ctx->keylen); hash_dma_final() 927 dev_err(device_data->dev, "%s: ctx->device->dma.nents = 0\n", hash_dma_final() 935 dev_err(device_data->dev, "%s: hash_dma_write() failed!\n", hash_dma_final() 944 while (readl(&device_data->base->str) & HASH_STR_DCAL_MASK) hash_dma_final() 951 dev_dbg(device_data->dev, "%s: keylen: %d\n", hash_dma_final() 953 hash_hw_write_key(device_data, key, keylen); hash_dma_final() 956 hash_get_digest(device_data, digest, ctx->config.algorithm); hash_dma_final() 960 release_hash_device(device_data); hash_dma_final() 980 struct hash_device_data *device_data; hash_hw_final() local 983 ret = hash_get_device_data(ctx, &device_data); hash_hw_final() 987 dev_dbg(device_data->dev, "%s: (ctx=0x%x)!\n", __func__, (u32) ctx); hash_hw_final() 990 ret = hash_resume_state(device_data, &device_data->state); hash_hw_final() 993 dev_err(device_data->dev, hash_hw_final() 1005 ret = get_empty_message_digest(device_data, &zero_hash[0], hash_hw_final() 1012 dev_dbg(device_data->dev, hash_hw_final() 1016 dev_err(device_data->dev, hash_hw_final() 1025 dev_err(device_data->dev, "%s: Empty message with keylength > 0, NOT supported\n", hash_hw_final() 1031 ret = init_hash_hw(device_data, ctx); hash_hw_final() 1033 dev_err(device_data->dev, hash_hw_final() 1040 hash_messagepad(device_data, req_ctx->state.buffer, hash_hw_final() 1044 while (readl(&device_data->base->str) & HASH_STR_DCAL_MASK) hash_hw_final() 1052 dev_dbg(device_data->dev, "%s: keylen: %d\n", hash_hw_final() 1054 hash_hw_write_key(device_data, key, keylen); hash_hw_final() 1057 hash_get_digest(device_data, digest, ctx->config.algorithm); hash_hw_final() 1061 release_hash_device(device_data); hash_hw_final() 1082 struct hash_device_data *device_data; hash_hw_update() local 1105 ret = hash_get_device_data(ctx, &device_data); hash_hw_update() 1112 ret = hash_process_data(device_data, ctx, req_ctx, msg_length, hash_hw_update() 1116 dev_err(device_data->dev, "%s: hash_internal_hw_update() failed!\n", hash_hw_update() 1125 dev_dbg(device_data->dev, "%s: indata length=%d, bin=%d\n", hash_hw_update() 1129 release_hash_device(device_data); hash_hw_update() 1136 * @device_data: Pointer to the device structure. 1139 int hash_resume_state(struct hash_device_data *device_data, hash_resume_state() argument 1147 dev_err(device_data->dev, "%s: HASH_INVALID_PARAMETER!\n", hash_resume_state() 1155 dev_err(device_data->dev, "%s: HASH_INVALID_PARAMETER!\n", hash_resume_state() 1168 writel_relaxed(temp_cr & HASH_CR_RESUME_MASK, &device_data->base->cr); hash_resume_state() 1170 if (readl(&device_data->base->cr) & HASH_CR_MODE_MASK) hash_resume_state() 1180 &device_data->base->csrx[count]); hash_resume_state() 1183 writel_relaxed(device_state->csfull, &device_data->base->csfull); hash_resume_state() 1184 writel_relaxed(device_state->csdatain, &device_data->base->csdatain); hash_resume_state() 1186 writel_relaxed(device_state->str_reg, &device_data->base->str); hash_resume_state() 1187 writel_relaxed(temp_cr, &device_data->base->cr); hash_resume_state() 1194 * @device_data: Pointer to the device structure. 1197 int hash_save_state(struct hash_device_data *device_data, hash_save_state() argument 1205 dev_err(device_data->dev, "%s: HASH_INVALID_PARAMETER!\n", hash_save_state() 1214 while (readl(&device_data->base->str) & HASH_STR_DCAL_MASK) hash_save_state() 1217 temp_cr = readl_relaxed(&device_data->base->cr); hash_save_state() 1219 device_state->str_reg = readl_relaxed(&device_data->base->str); hash_save_state() 1221 device_state->din_reg = readl_relaxed(&device_data->base->din); hash_save_state() 1223 if (readl(&device_data->base->cr) & HASH_CR_MODE_MASK) hash_save_state() 1233 readl_relaxed(&device_data->base->csrx[count]); hash_save_state() 1236 device_state->csfull = readl_relaxed(&device_data->base->csfull); hash_save_state() 1237 device_state->csdatain = readl_relaxed(&device_data->base->csdatain); hash_save_state() 1246 * @device_data: 1249 int hash_check_hw(struct hash_device_data *device_data) hash_check_hw() argument 1252 if (HASH_P_ID0 == readl_relaxed(&device_data->base->periphid0) && hash_check_hw() 1253 HASH_P_ID1 == readl_relaxed(&device_data->base->periphid1) && hash_check_hw() 1254 HASH_P_ID2 == readl_relaxed(&device_data->base->periphid2) && hash_check_hw() 1255 HASH_P_ID3 == readl_relaxed(&device_data->base->periphid3) && hash_check_hw() 1256 HASH_CELL_ID0 == readl_relaxed(&device_data->base->cellid0) && hash_check_hw() 1257 HASH_CELL_ID1 == readl_relaxed(&device_data->base->cellid1) && hash_check_hw() 1258 HASH_CELL_ID2 == readl_relaxed(&device_data->base->cellid2) && hash_check_hw() 1259 HASH_CELL_ID3 == readl_relaxed(&device_data->base->cellid3)) { hash_check_hw() 1263 dev_err(device_data->dev, "%s: HASH_UNSUPPORTED_HW!\n", __func__); hash_check_hw() 1269 * @device_data: Pointer to the device structure. 1273 void hash_get_digest(struct hash_device_data *device_data, hash_get_digest() argument 1280 dev_err(device_data->dev, "%s: Incorrect algorithm %d\n", hash_get_digest() 1290 dev_dbg(device_data->dev, "%s: digest array:(0x%x)\n", hash_get_digest() 1295 temp_hx_val = readl_relaxed(&device_data->base->hx[count]); hash_get_digest() 1616 static int ahash_algs_register_all(struct hash_device_data *device_data) ahash_algs_register_all() argument 1626 dev_err(device_data->dev, "%s: alg registration failed\n", ahash_algs_register_all() 1641 static void ahash_algs_unregister_all(struct hash_device_data *device_data) ahash_algs_unregister_all() argument 1657 struct hash_device_data *device_data; ux500_hash_probe() local 1660 device_data = kzalloc(sizeof(*device_data), GFP_ATOMIC); ux500_hash_probe() 1661 if (!device_data) { ux500_hash_probe() 1666 device_data->dev = dev; ux500_hash_probe() 1667 device_data->current_ctx = NULL; ux500_hash_probe() 1683 device_data->phybase = res->start; ux500_hash_probe() 1684 device_data->base = ioremap(res->start, resource_size(res)); ux500_hash_probe() 1685 if (!device_data->base) { ux500_hash_probe() 1690 spin_lock_init(&device_data->ctx_lock); ux500_hash_probe() 1691 spin_lock_init(&device_data->power_state_lock); ux500_hash_probe() 1694 device_data->regulator = regulator_get(dev, "v-ape"); ux500_hash_probe() 1695 if (IS_ERR(device_data->regulator)) { ux500_hash_probe() 1697 ret = PTR_ERR(device_data->regulator); ux500_hash_probe() 1698 device_data->regulator = NULL; ux500_hash_probe() 1703 device_data->clk = clk_get(dev, NULL); ux500_hash_probe() 1704 if (IS_ERR(device_data->clk)) { ux500_hash_probe() 1706 ret = PTR_ERR(device_data->clk); ux500_hash_probe() 1710 ret = clk_prepare(device_data->clk); ux500_hash_probe() 1717 ret = hash_enable_power(device_data, false); ux500_hash_probe() 1723 ret = hash_check_hw(device_data); ux500_hash_probe() 1730 hash_dma_setup_channel(device_data, dev); ux500_hash_probe() 1732 platform_set_drvdata(pdev, device_data); ux500_hash_probe() 1735 klist_add_tail(&device_data->list_node, &driver_data.device_list); ux500_hash_probe() 1739 ret = ahash_algs_register_all(device_data); ux500_hash_probe() 1750 hash_disable_power(device_data, false); ux500_hash_probe() 1753 clk_unprepare(device_data->clk); ux500_hash_probe() 1756 clk_put(device_data->clk); ux500_hash_probe() 1759 regulator_put(device_data->regulator); ux500_hash_probe() 1762 iounmap(device_data->base); ux500_hash_probe() 1768 kfree(device_data); ux500_hash_probe() 1780 struct hash_device_data *device_data; ux500_hash_remove() local 1783 device_data = platform_get_drvdata(pdev); ux500_hash_remove() 1784 if (!device_data) { ux500_hash_remove() 1794 spin_lock(&device_data->ctx_lock); ux500_hash_remove() 1796 if (device_data->current_ctx) { ux500_hash_remove() 1798 spin_unlock(&device_data->ctx_lock); ux500_hash_remove() 1804 spin_unlock(&device_data->ctx_lock); ux500_hash_remove() 1807 if (klist_node_attached(&device_data->list_node)) ux500_hash_remove() 1808 klist_remove(&device_data->list_node); ux500_hash_remove() 1812 ahash_algs_unregister_all(device_data); ux500_hash_remove() 1814 if (hash_disable_power(device_data, false)) ux500_hash_remove() 1818 clk_unprepare(device_data->clk); ux500_hash_remove() 1819 clk_put(device_data->clk); ux500_hash_remove() 1820 regulator_put(device_data->regulator); ux500_hash_remove() 1822 iounmap(device_data->base); ux500_hash_remove() 1828 kfree(device_data); ux500_hash_remove() 1840 struct hash_device_data *device_data; ux500_hash_shutdown() local 1842 device_data = platform_get_drvdata(pdev); ux500_hash_shutdown() 1843 if (!device_data) { ux500_hash_shutdown() 1850 spin_lock(&device_data->ctx_lock); ux500_hash_shutdown() 1852 if (!device_data->current_ctx) { ux500_hash_shutdown() 1861 device_data->current_ctx++; ux500_hash_shutdown() 1863 spin_unlock(&device_data->ctx_lock); ux500_hash_shutdown() 1866 if (klist_node_attached(&device_data->list_node)) ux500_hash_shutdown() 1867 klist_remove(&device_data->list_node); ux500_hash_shutdown() 1871 ahash_algs_unregister_all(device_data); ux500_hash_shutdown() 1873 iounmap(device_data->base); ux500_hash_shutdown() 1879 if (hash_disable_power(device_data, false)) ux500_hash_shutdown() 1892 struct hash_device_data *device_data; ux500_hash_suspend() local 1895 device_data = dev_get_drvdata(dev); ux500_hash_suspend() 1896 if (!device_data) { ux500_hash_suspend() 1901 spin_lock(&device_data->ctx_lock); ux500_hash_suspend() 1902 if (!device_data->current_ctx) ux500_hash_suspend() 1903 device_data->current_ctx++; ux500_hash_suspend() 1904 spin_unlock(&device_data->ctx_lock); ux500_hash_suspend() 1906 if (device_data->current_ctx == ++temp_ctx) { ux500_hash_suspend() 1910 ret = hash_disable_power(device_data, false); ux500_hash_suspend() 1913 ret = hash_disable_power(device_data, true); ux500_hash_suspend() 1929 struct hash_device_data *device_data; ux500_hash_resume() local 1932 device_data = dev_get_drvdata(dev); ux500_hash_resume() 1933 if (!device_data) { ux500_hash_resume() 1938 spin_lock(&device_data->ctx_lock); ux500_hash_resume() 1939 if (device_data->current_ctx == ++temp_ctx) ux500_hash_resume() 1940 device_data->current_ctx = NULL; ux500_hash_resume() 1941 spin_unlock(&device_data->ctx_lock); ux500_hash_resume() 1943 if (!device_data->current_ctx) ux500_hash_resume() 1946 ret = hash_enable_power(device_data, true); ux500_hash_resume() 231 get_empty_message_digest( struct hash_device_data *device_data, u8 *zero_hash, u32 *zero_hash_size, bool *zero_digest) get_empty_message_digest() argument 380 hash_get_device_data(struct hash_ctx *ctx, struct hash_device_data **device_data) hash_get_device_data() argument
|
H A D | hash_alg.h | 108 #define HASH_SET_DIN(val, len) writesl(&device_data->base->din, (val), (len)) 112 &device_data->base->cr, \ 118 &device_data->base->cr, \ 123 &device_data->base->str, \ 128 &device_data->base->str, \ 380 int hash_check_hw(struct hash_device_data *device_data); 382 int hash_setconfiguration(struct hash_device_data *device_data, 385 void hash_begin(struct hash_device_data *device_data, struct hash_ctx *ctx); 387 void hash_get_digest(struct hash_device_data *device_data, 392 int hash_save_state(struct hash_device_data *device_data, 395 int hash_resume_state(struct hash_device_data *device_data,
|
/linux-4.1.27/sound/core/ |
H A D | device.c | 32 * @device_data: the data pointer of this device 45 void *device_data, struct snd_device_ops *ops) snd_device_new() 50 if (snd_BUG_ON(!card || !device_data || !ops)) snd_device_new() 59 dev->device_data = device_data; snd_device_new() 97 static struct snd_device *look_for_dev(struct snd_card *card, void *device_data) look_for_dev() argument 102 if (dev->device_data == device_data) look_for_dev() 111 * @device_data: the data pointer to disconnect 121 void snd_device_disconnect(struct snd_card *card, void *device_data) snd_device_disconnect() argument 125 if (snd_BUG_ON(!card || !device_data)) snd_device_disconnect() 127 dev = look_for_dev(card, device_data); snd_device_disconnect() 132 device_data, __builtin_return_address(0)); snd_device_disconnect() 139 * @device_data: the data pointer to release 145 void snd_device_free(struct snd_card *card, void *device_data) snd_device_free() argument 149 if (snd_BUG_ON(!card || !device_data)) snd_device_free() 151 dev = look_for_dev(card, device_data); snd_device_free() 156 device_data, __builtin_return_address(0)); snd_device_free() 176 * @device_data: the data pointer to register 186 int snd_device_register(struct snd_card *card, void *device_data) snd_device_register() argument 190 if (snd_BUG_ON(!card || !device_data)) snd_device_register() 192 dev = look_for_dev(card, device_data); snd_device_register() 44 snd_device_new(struct snd_card *card, enum snd_device_type type, void *device_data, struct snd_device_ops *ops) snd_device_new() argument
|
H A D | jack.c | 39 struct snd_jack *jack = device->device_data; snd_jack_dev_disconnect() 56 struct snd_jack *jack = device->device_data; snd_jack_dev_free() 71 struct snd_jack *jack = device->device_data; snd_jack_dev_register()
|
H A D | hwdep.c | 412 struct snd_hwdep *hwdep = device->device_data; snd_hwdep_dev_free() 423 struct snd_hwdep *hwdep = device->device_data; snd_hwdep_dev_register() 465 struct snd_hwdep *hwdep = device->device_data; snd_hwdep_dev_disconnect()
|
H A D | compress_offload.c | 878 if (snd_BUG_ON(!device || !device->device_data)) snd_compress_dev_register() 880 compr = device->device_data; snd_compress_dev_register() 900 compr = device->device_data; snd_compress_dev_disconnect() 909 compr = device->device_data; snd_compress_dev_free()
|
H A D | pcm.c | 899 struct snd_pcm *pcm = device->device_data; snd_pcm_dev_free() 1069 if (snd_BUG_ON(!device || !device->device_data)) snd_pcm_dev_register() 1071 pcm = device->device_data; snd_pcm_dev_register() 1114 struct snd_pcm *pcm = device->device_data; snd_pcm_dev_disconnect()
|
H A D | info.c | 856 struct snd_info_entry *entry = device->device_data; snd_info_dev_free_entry() 863 struct snd_info_entry *entry = device->device_data; snd_info_dev_register_entry()
|
H A D | timer.c | 888 struct snd_timer *timer = device->device_data; snd_timer_dev_free() 894 struct snd_timer *timer = dev->device_data; snd_timer_dev_register() 939 struct snd_timer *timer = device->device_data; snd_timer_dev_disconnect() 1015 dev.device_data = timer; snd_timer_global_register()
|
H A D | rawmidi.c | 1609 struct snd_rawmidi *rmidi = device->device_data; snd_rawmidi_dev_free() 1626 struct snd_rawmidi *rmidi = device->device_data; snd_rawmidi_dev_register() 1707 struct snd_rawmidi *rmidi = device->device_data; snd_rawmidi_dev_disconnect()
|
H A D | control.c | 1751 struct snd_card *card = device->device_data; snd_ctl_dev_register() 1762 struct snd_card *card = device->device_data; snd_ctl_dev_disconnect() 1780 struct snd_card *card = device->device_data; snd_ctl_dev_free()
|
/linux-4.1.27/include/linux/ |
H A D | vfio.h | 35 int (*open)(void *device_data); 36 void (*release)(void *device_data); 37 ssize_t (*read)(void *device_data, char __user *buf, 39 ssize_t (*write)(void *device_data, const char __user *buf, 41 long (*ioctl)(void *device_data, unsigned int cmd, 43 int (*mmap)(void *device_data, struct vm_area_struct *vma); 44 void (*request)(void *device_data, unsigned int count); 49 void *device_data);
|
H A D | dmi.h | 83 void *device_data; /* Type specific data */ member in struct:dmi_device
|
/linux-4.1.27/sound/aoa/core/ |
H A D | alsa.c | 63 void * device_data, struct snd_device_ops * ops) aoa_snd_device_new() 70 err = snd_device_new(card, type, device_data, ops); aoa_snd_device_new() 75 err = snd_device_register(card, device_data); aoa_snd_device_new() 81 snd_device_free(card, device_data); aoa_snd_device_new() 62 aoa_snd_device_new(enum snd_device_type type, void * device_data, struct snd_device_ops * ops) aoa_snd_device_new() argument
|
/linux-4.1.27/drivers/vfio/platform/ |
H A D | vfio_platform_common.c | 96 static void vfio_platform_release(void *device_data) vfio_platform_release() argument 98 struct vfio_platform_device *vdev = device_data; vfio_platform_release() 112 static int vfio_platform_open(void *device_data) vfio_platform_open() argument 114 struct vfio_platform_device *vdev = device_data; vfio_platform_open() 145 static long vfio_platform_ioctl(void *device_data, vfio_platform_ioctl() argument 148 struct vfio_platform_device *vdev = device_data; vfio_platform_ioctl() 319 static ssize_t vfio_platform_read(void *device_data, char __user *buf, vfio_platform_read() argument 322 struct vfio_platform_device *vdev = device_data; vfio_platform_read() 395 static ssize_t vfio_platform_write(void *device_data, const char __user *buf, vfio_platform_write() argument 398 struct vfio_platform_device *vdev = device_data; vfio_platform_write() 437 static int vfio_platform_mmap(void *device_data, struct vm_area_struct *vma) vfio_platform_mmap() argument 439 struct vfio_platform_device *vdev = device_data; vfio_platform_mmap()
|
/linux-4.1.27/drivers/vfio/pci/ |
H A D | vfio_pci.c | 240 static void vfio_pci_release(void *device_data) vfio_pci_release() argument 242 struct vfio_pci_device *vdev = device_data; vfio_pci_release() 256 static int vfio_pci_open(void *device_data) vfio_pci_open() argument 258 struct vfio_pci_device *vdev = device_data; vfio_pci_open() 424 static long vfio_pci_ioctl(void *device_data, vfio_pci_ioctl() argument 427 struct vfio_pci_device *vdev = device_data; vfio_pci_ioctl() 795 static ssize_t vfio_pci_rw(void *device_data, char __user *buf, vfio_pci_rw() argument 799 struct vfio_pci_device *vdev = device_data; vfio_pci_rw() 823 static ssize_t vfio_pci_read(void *device_data, char __user *buf, vfio_pci_read() argument 829 return vfio_pci_rw(device_data, buf, count, ppos, false); vfio_pci_read() 832 static ssize_t vfio_pci_write(void *device_data, const char __user *buf, vfio_pci_write() argument 838 return vfio_pci_rw(device_data, (char __user *)buf, count, ppos, true); vfio_pci_write() 841 static int vfio_pci_mmap(void *device_data, struct vm_area_struct *vma) vfio_pci_mmap() argument 843 struct vfio_pci_device *vdev = device_data; vfio_pci_mmap() 906 static void vfio_pci_request(void *device_data, unsigned int count) vfio_pci_request() argument 908 struct vfio_pci_device *vdev = device_data; vfio_pci_request()
|
/linux-4.1.27/drivers/vfio/ |
H A D | vfio.c | 94 void *device_data; member in struct:vfio_device 366 void *device_data) vfio_group_create_device() 378 device->device_data = device_data; vfio_group_create_device() 612 const struct vfio_device_ops *ops, void *device_data) vfio_add_group_dev() 646 device = vfio_group_create_device(group, dev, ops, device_data); vfio_add_group_dev() 686 return device->device_data; vfio_device_data() 710 void *device_data = device->device_data; vfio_del_group_dev() local 756 device->ops->request(device_data, i++); vfio_del_group_dev() 779 return device_data; vfio_del_group_dev() 1201 ret = device->ops->open(device->device_data); vfio_group_get_device_fd() 1210 device->ops->release(device->device_data); vfio_group_get_device_fd() 1219 device->ops->release(device->device_data); vfio_group_get_device_fd() 1377 device->ops->release(device->device_data); vfio_device_fops_release() 1394 return device->ops->ioctl(device->device_data, cmd, arg); vfio_device_fops_unl_ioctl() 1405 return device->ops->read(device->device_data, buf, count, ppos); vfio_device_fops_read() 1417 return device->ops->write(device->device_data, buf, count, ppos); vfio_device_fops_write() 1427 return device->ops->mmap(device->device_data, vma); vfio_device_fops_mmap() 363 vfio_group_create_device(struct vfio_group *group, struct device *dev, const struct vfio_device_ops *ops, void *device_data) vfio_group_create_device() argument 611 vfio_add_group_dev(struct device *dev, const struct vfio_device_ops *ops, void *device_data) vfio_add_group_dev() argument
|
/linux-4.1.27/sound/core/seq/ |
H A D | seq_device.c | 160 struct snd_seq_device *dev = device->device_data; snd_seq_device_dev_free() 168 struct snd_seq_device *dev = device->device_data; snd_seq_device_dev_register() 181 struct snd_seq_device *dev = device->device_data; snd_seq_device_dev_disconnect()
|
/linux-4.1.27/include/sound/ |
H A D | core.h | 86 void *device_data; /* device structure */ member in struct:snd_device 278 void *device_data, struct snd_device_ops *ops); snd_minor_info_oss_done() 279 int snd_device_register(struct snd_card *card, void *device_data); snd_minor_info_oss_done() 281 void snd_device_disconnect(struct snd_card *card, void *device_data); snd_minor_info_oss_done() 283 void snd_device_free(struct snd_card *card, void *device_data); snd_minor_info_oss_done()
|
/linux-4.1.27/drivers/scsi/lpfc/ |
H A D | lpfc_mem.c | 220 struct lpfc_device_data *device_data; lpfc_mem_free() local 268 device_data = list_first_entry(&phba->luns, lpfc_mem_free() 271 list_del(&device_data->listentry); lpfc_mem_free() 272 mempool_free(device_data, phba->device_data_mem_pool); lpfc_mem_free()
|
H A D | lpfc_scsi.c | 5399 struct lpfc_device_data *device_data; lpfc_slave_alloc() local 5415 device_data = __lpfc_get_device_data(phba, lpfc_slave_alloc() 5420 if (!device_data) { lpfc_slave_alloc() 5422 device_data = lpfc_create_device_data(phba, lpfc_slave_alloc() 5426 if (!device_data) lpfc_slave_alloc() 5429 list_add_tail(&device_data->listentry, &phba->luns); lpfc_slave_alloc() 5431 device_data->rport_data = rport->dd_data; lpfc_slave_alloc() 5432 device_data->available = true; lpfc_slave_alloc() 5434 sdev->hostdata = device_data; lpfc_slave_alloc() 5525 struct lpfc_device_data *device_data = sdev->hostdata; lpfc_slave_destroy() local 5528 if ((phba->cfg_fof) && (device_data)) { lpfc_slave_destroy() 5530 device_data->available = false; lpfc_slave_destroy() 5531 if (!device_data->oas_enabled) lpfc_slave_destroy() 5532 lpfc_delete_device_data(phba, device_data); lpfc_slave_destroy()
|
/linux-4.1.27/drivers/input/touchscreen/ |
H A D | bu21013_ts.c | 251 * @device_data: void pointer 256 static irqreturn_t bu21013_gpio_irq(int irq, void *device_data) bu21013_gpio_irq() argument 258 struct bu21013_ts_data *data = device_data; bu21013_gpio_irq()
|
/linux-4.1.27/sound/aoa/ |
H A D | aoa.h | 120 void * device_data, struct snd_device_ops * ops);
|
/linux-4.1.27/drivers/media/usb/go7007/ |
H A D | snd-go7007.c | 215 struct go7007 *go = device->device_data; go7007_snd_free()
|
/linux-4.1.27/drivers/pci/ |
H A D | pci-label.c | 55 donboard = dmi->device_data; find_smbios_instance_string()
|
/linux-4.1.27/drivers/firmware/ |
H A D | dmi_scan.c | 249 dev->device_data = NULL; dmi_save_one_device() 285 dev->device_data = NULL; dmi_save_oem_strings_devices() 308 dev->device_data = data; dmi_save_ipmi_device() 330 onboard_dev->dev.device_data = onboard_dev; dmi_save_dev_onboard()
|
/linux-4.1.27/sound/drivers/opl4/ |
H A D | opl4_lib.c | 189 struct snd_opl4 *opl4 = device->device_data; snd_opl4_dev_free()
|
/linux-4.1.27/sound/i2c/ |
H A D | i2c.c | 75 struct snd_i2c_bus *bus = device->device_data; snd_i2c_bus_dev_free()
|
/linux-4.1.27/sound/isa/sb/ |
H A D | sb_common.c | 206 struct snd_sb *chip = device->device_data; snd_sbdsp_dev_free()
|
H A D | emu8000.c | 1077 struct snd_emu8000 *hw = device->device_data; snd_emu8000_dev_free()
|
/linux-4.1.27/sound/pci/ |
H A D | cs5530.c | 87 struct snd_cs5530 *chip = device->device_data; snd_cs5530_dev_free()
|
H A D | ak4531_codec.c | 353 struct snd_ak4531 *ak4531 = device->device_data; snd_ak4531_dev_free()
|
H A D | als300.c | 193 struct snd_als300 *chip = device->device_data; snd_als300_dev_free()
|
H A D | ad1889.c | 865 struct snd_ad1889 *chip = device->device_data; snd_ad1889_dev_free()
|
H A D | atiixp_modem.c | 1208 struct atiixp_modem *chip = device->device_data; snd_atiixp_dev_free()
|
H A D | bt87x.c | 702 struct snd_bt87x *chip = device->device_data; snd_bt87x_dev_free()
|
H A D | fm801.c | 1180 struct fm801 *chip = device->device_data; snd_fm801_dev_free()
|
H A D | intel8x0m.c | 1103 struct intel8x0m *chip = device->device_data; snd_intel8x0m_dev_free()
|
H A D | via82xx_modem.c | 1092 struct via82xx_modem *chip = device->device_data; snd_via82xx_dev_free()
|
H A D | atiixp.c | 1582 struct atiixp *chip = device->device_data; snd_atiixp_dev_free()
|
H A D | es1938.c | 1563 struct es1938 *chip = device->device_data; snd_es1938_dev_free()
|
H A D | sis7019.c | 1076 struct sis7019 *sis = dev->device_data; sis_dev_free()
|
H A D | sonicvibes.c | 1240 struct sonicvibes *sonic = device->device_data; snd_sonicvibes_dev_free()
|
H A D | cs4281.c | 1330 struct cs4281 *chip = device->device_data; snd_cs4281_dev_free()
|
H A D | ens1370.c | 1946 struct ensoniq *ensoniq = device->device_data; snd_ensoniq_dev_free()
|
H A D | maestro3.c | 2517 struct snd_m3 *chip = device->device_data; snd_m3_dev_free()
|
H A D | azt3328.c | 2312 struct snd_azf3328 *chip = device->device_data; snd_azf3328_dev_free()
|
H A D | cmipci.c | 2958 struct cmipci *cm = device->device_data; snd_cmipci_dev_free()
|
H A D | es1968.c | 2646 struct es1968 *chip = device->device_data; snd_es1968_dev_free()
|
H A D | intel8x0.c | 2952 struct intel8x0 *chip = device->device_data; snd_intel8x0_dev_free()
|
H A D | via82xx.c | 2358 struct via82xx *chip = device->device_data; snd_via82xx_dev_free()
|
/linux-4.1.27/sound/pci/vx222/ |
H A D | vx222.c | 132 struct vx_core *chip = device->device_data; snd_vx222_dev_free()
|
/linux-4.1.27/sound/pcmcia/pdaudiocf/ |
H A D | pdaudiocf.c | 86 struct snd_pdacf *chip = device->device_data; snd_pdacf_dev_free()
|
/linux-4.1.27/sound/pcmcia/vx/ |
H A D | vxpocket.c | 74 struct vx_core *chip = device->device_data; snd_vxpocket_dev_free()
|
/linux-4.1.27/drivers/media/usb/tm6000/ |
H A D | tm6000.h | 177 int model; /* index in the device_data struct */
|
/linux-4.1.27/include/uapi/scsi/fc/ |
H A D | fc_fs.h | 64 * FC-4 device_data.
|
/linux-4.1.27/sound/pci/au88x0/ |
H A D | au88x0.c | 123 vortex_t *vortex = device->device_data; snd_vortex_dev_free()
|
/linux-4.1.27/sound/pci/cs5535audio/ |
H A D | cs5535audio.c | 273 struct cs5535audio *cs5535au = device->device_data; snd_cs5535audio_dev_free()
|
/linux-4.1.27/sound/pci/hda/ |
H A D | hda_tegra.c | 291 struct azx *chip = device->device_data; hda_tegra_dev_free()
|
H A D | hda_codec.c | 501 snd_hda_bus_free(device->device_data); snd_hda_bus_dev_free() 507 struct hda_bus *bus = device->device_data; snd_hda_bus_dev_disconnect() 962 snd_hda_codec_register(device->device_data); snd_hda_codec_dev_register() 968 struct hda_codec *codec = device->device_data; snd_hda_codec_dev_disconnect() 976 struct hda_codec *codec = device->device_data; snd_hda_codec_dev_free()
|
H A D | hda_intel.c | 1162 return azx_free(device->device_data); azx_dev_free()
|
/linux-4.1.27/sound/sh/ |
H A D | sh_dac_audio.c | 308 struct snd_sh_dac *chip = device->device_data; snd_sh_dac_dev_free()
|
/linux-4.1.27/drivers/gpu/drm/qxl/ |
H A D | qxl_dev.h | 449 uint8_t device_data[QXL_CURSOR_DEVICE_DATA_SIZE]; member in struct:qxl_cursor_cmd
|
/linux-4.1.27/drivers/platform/chrome/ |
H A D | chromeos_laptop.c | 158 dev_data = (struct dmi_dev_onboard *)dmi_dev->device_data; __add_probed_i2c_device()
|
/linux-4.1.27/sound/drivers/opl3/ |
H A D | opl3_lib.c | 342 struct snd_opl3 *opl3 = device->device_data; snd_opl3_dev_free()
|
/linux-4.1.27/sound/i2c/other/ |
H A D | ak4113.c | 66 struct ak4113 *chip = device->device_data; snd_ak4113_dev_free()
|
H A D | ak4114.c | 76 struct ak4114 *chip = device->device_data; snd_ak4114_dev_free()
|
H A D | ak4117.c | 71 struct ak4117 *chip = device->device_data; snd_ak4117_dev_free()
|
/linux-4.1.27/sound/isa/gus/ |
H A D | gus_main.c | 128 struct snd_gus_card *gus = device->device_data; snd_gus_dev_free()
|
/linux-4.1.27/drivers/media/usb/em28xx/ |
H A D | em28xx.h | 611 int model; /* index in the device_data struct */
|
/linux-4.1.27/sound/isa/ad1816a/ |
H A D | ad1816a_lib.c | 582 struct snd_ad1816a *chip = device->device_data; snd_ad1816a_dev_free()
|
/linux-4.1.27/sound/mips/ |
H A D | hal2.c | 763 struct snd_hal2 *hal2 = device->device_data; hal2_dev_free()
|
H A D | sgio2audio.c | 821 struct snd_sgio2audio *chip = device->device_data; snd_sgio2audio_dev_free()
|
/linux-4.1.27/sound/parisc/ |
H A D | harmony.c | 904 struct snd_harmony *h = dev->device_data; snd_harmony_dev_free()
|
/linux-4.1.27/sound/pci/ac97/ |
H A D | ac97_codec.c | 1018 struct snd_ac97_bus *bus = device->device_data; snd_ac97_bus_dev_free() 1040 struct snd_ac97 *ac97 = device->device_data; snd_ac97_dev_free() 1957 struct snd_ac97 *ac97 = device->device_data; snd_ac97_dev_register() 1977 struct snd_ac97 *ac97 = device->device_data; snd_ac97_dev_disconnect()
|
/linux-4.1.27/sound/pci/aw2/ |
H A D | aw2-alsa.c | 223 struct aw2 *chip = device->device_data; snd_aw2_dev_free()
|
/linux-4.1.27/sound/pci/lola/ |
H A D | lola.c | 565 lola_free(device->device_data); lola_dev_free()
|
/linux-4.1.27/sound/usb/ |
H A D | card.c | 320 struct snd_usb_audio *chip = device->device_data; snd_usb_audio_dev_free()
|
H A D | mixer.c | 2167 struct usb_mixer_interface *mixer = device->device_data; snd_usb_mixer_dev_free()
|
/linux-4.1.27/sound/sparc/ |
H A D | cs4231.c | 1787 struct snd_cs4231 *cp = device->device_data; snd_cs4231_sbus_dev_free() 1953 struct snd_cs4231 *cp = device->device_data; snd_cs4231_ebus_dev_free()
|
H A D | amd7930.c | 927 struct snd_amd7930 *amd = device->device_data; snd_amd7930_dev_free()
|
/linux-4.1.27/drivers/media/usb/cx231xx/ |
H A D | cx231xx.h | 591 int model; /* index in the device_data struct */
|
/linux-4.1.27/sound/drivers/ |
H A D | ml403-ac97cr.c | 1105 struct snd_ml403_ac97cr *ml403_ac97cr = snddev->device_data; snd_ml403_ac97cr_dev_free()
|
H A D | serial-u16550.c | 780 struct snd_uart16550 *uart = device->device_data; snd_uart16550_dev_free()
|
/linux-4.1.27/sound/isa/es1688/ |
H A D | es1688_lib.c | 629 struct snd_es1688 *chip = device->device_data; snd_es1688_dev_free()
|
/linux-4.1.27/sound/pci/lx6464es/ |
H A D | lx6464es.c | 567 return snd_lx6464es_free(device->device_data); snd_lx6464es_dev_free()
|
/linux-4.1.27/sound/pci/mixart/ |
H A D | mixart.c | 1039 struct snd_mixart *chip = device->device_data; snd_mixart_chip_dev_free()
|
/linux-4.1.27/sound/ppc/ |
H A D | pmac.c | 897 struct snd_pmac *chip = device->device_data; snd_pmac_dev_free()
|
/linux-4.1.27/sound/spi/ |
H A D | at73c213.c | 871 struct snd_at73c213 *chip = device->device_data; snd_at73c213_dev_free()
|
/linux-4.1.27/drivers/char/ipmi/ |
H A D | ipmi_ssif.c | 1902 struct dmi_header *dm = dmi_dev->device_data; decode_dmi()
|
H A D | ipmi_si_intf.c | 2529 rv = decode_dmi((const struct dmi_header *) dev->device_data, dmi_find_bmc()
|
/linux-4.1.27/sound/pci/ctxfi/ |
H A D | ctatc.c | 1255 struct ct_atc *atc = dev->device_data; atc_dev_free()
|
/linux-4.1.27/sound/pci/emu10k1/ |
H A D | emu10k1x.c | 783 struct emu10k1x *chip = device->device_data; snd_emu10k1x_dev_free()
|
H A D | emu10k1_main.c | 1337 struct snd_emu10k1 *emu = device->device_data; snd_emu10k1_dev_free()
|
/linux-4.1.27/sound/pci/nm256/ |
H A D | nm256.c | 1462 struct nm256 *chip = device->device_data; snd_nm256_dev_free()
|
/linux-4.1.27/sound/pci/pcxhr/ |
H A D | pcxhr.c | 1201 struct snd_pcxhr *chip = device->device_data; pcxhr_chip_dev_free()
|
/linux-4.1.27/sound/isa/wss/ |
H A D | wss_lib.c | 1715 struct snd_wss *chip = device->device_data; snd_wss_dev_free()
|
/linux-4.1.27/sound/pci/ali5451/ |
H A D | ali5451.c | 2081 struct snd_ali *codec = device->device_data; snd_ali_dev_free()
|
/linux-4.1.27/sound/pci/ca0106/ |
H A D | ca0106_main.c | 1273 struct snd_ca0106 *chip = device->device_data; snd_ca0106_dev_free()
|
/linux-4.1.27/sound/pci/echoaudio/ |
H A D | echoaudio.c | 1893 struct echoaudio *chip = device->device_data; snd_echo_dev_free()
|
/linux-4.1.27/sound/pci/ice1712/ |
H A D | ice1724.c | 2525 struct snd_ice1712 *ice = device->device_data; snd_vt1724_dev_free()
|
H A D | ice1712.c | 2508 struct snd_ice1712 *ice = device->device_data; snd_ice1712_dev_free()
|
/linux-4.1.27/sound/pci/korg1212/ |
H A D | korg1212.c | 2137 struct snd_korg1212 *korg1212 = device->device_data; snd_korg1212_dev_free()
|
/linux-4.1.27/sound/pci/riptide/ |
H A D | riptide.c | 1836 struct snd_riptide *chip = device->device_data; snd_riptide_dev_free()
|
/linux-4.1.27/sound/pci/ymfpci/ |
H A D | ymfpci_main.c | 2266 struct snd_ymfpci *chip = device->device_data; snd_ymfpci_dev_free()
|
/linux-4.1.27/sound/pci/cs46xx/ |
H A D | cs46xx_lib.c | 2978 struct snd_cs46xx *chip = device->device_data; snd_cs46xx_dev_free()
|
/linux-4.1.27/sound/pci/trident/ |
H A D | trident_main.c | 3334 struct snd_trident *trident = device->device_data; snd_trident_dev_free()
|