Searched refs:tsin (Results 1 - 4 of 4) sorted by relevance

/linux-4.4.14/drivers/media/platform/sti/c8sectpfe/
H A Dc8sectpfe-core.c316 "Timeout waiting for idle irq on tsin%d\n", c8sectpfe_stop_feed()
425 static void free_input_block(struct c8sectpfei *fei, struct channel_info *tsin) free_input_block() argument
427 if (!fei || !tsin) free_input_block()
430 if (tsin->back_buffer_busaddr) free_input_block()
431 if (!dma_mapping_error(fei->dev, tsin->back_buffer_busaddr)) free_input_block()
432 dma_unmap_single(fei->dev, tsin->back_buffer_busaddr, free_input_block()
435 kfree(tsin->back_buffer_start); free_input_block()
437 if (tsin->pid_buffer_busaddr) free_input_block()
438 if (!dma_mapping_error(fei->dev, tsin->pid_buffer_busaddr)) free_input_block()
439 dma_unmap_single(fei->dev, tsin->pid_buffer_busaddr, free_input_block()
442 kfree(tsin->pid_buffer_start); free_input_block()
448 struct channel_info *tsin) configure_memdma_and_inputblock()
454 if (!fei || !tsin) configure_memdma_and_inputblock()
457 dev_dbg(fei->dev, "%s:%d Configuring channel=%p tsin=%d\n" configure_memdma_and_inputblock()
458 , __func__, __LINE__, tsin, tsin->tsin_id); configure_memdma_and_inputblock()
460 init_completion(&tsin->idle_completion); configure_memdma_and_inputblock()
462 tsin->back_buffer_start = kzalloc(FEI_BUFFER_SIZE + configure_memdma_and_inputblock()
465 if (!tsin->back_buffer_start) { configure_memdma_and_inputblock()
471 tsin->back_buffer_aligned = tsin->back_buffer_start configure_memdma_and_inputblock()
474 tsin->back_buffer_aligned = (void *) configure_memdma_and_inputblock()
475 (((uintptr_t) tsin->back_buffer_aligned) & ~0x1F); configure_memdma_and_inputblock()
477 tsin->back_buffer_busaddr = dma_map_single(fei->dev, configure_memdma_and_inputblock()
478 (void *)tsin->back_buffer_aligned, configure_memdma_and_inputblock()
482 if (dma_mapping_error(fei->dev, tsin->back_buffer_busaddr)) { configure_memdma_and_inputblock()
493 tsin->pid_buffer_start = kzalloc(2048, GFP_KERNEL); configure_memdma_and_inputblock()
495 if (!tsin->pid_buffer_start) { configure_memdma_and_inputblock()
507 tsin->pid_buffer_aligned = tsin->pid_buffer_start + configure_memdma_and_inputblock()
510 tsin->pid_buffer_aligned = (void *) configure_memdma_and_inputblock()
511 (((uintptr_t) tsin->pid_buffer_aligned) & ~0x3ff); configure_memdma_and_inputblock()
513 tsin->pid_buffer_busaddr = dma_map_single(fei->dev, configure_memdma_and_inputblock()
514 tsin->pid_buffer_aligned, configure_memdma_and_inputblock()
518 if (dma_mapping_error(fei->dev, tsin->pid_buffer_busaddr)) { configure_memdma_and_inputblock()
526 tsin->pid_buffer_busaddr, configure_memdma_and_inputblock()
530 snprintf(tsin_pin_name, MAX_NAME, "tsin%d-%s", tsin->tsin_id, configure_memdma_and_inputblock()
531 (tsin->serial_not_parallel ? "serial" : "parallel")); configure_memdma_and_inputblock()
533 tsin->pstate = pinctrl_lookup_state(fei->pinctrl, tsin_pin_name); configure_memdma_and_inputblock()
534 if (IS_ERR(tsin->pstate)) { configure_memdma_and_inputblock()
537 ret = PTR_ERR(tsin->pstate); configure_memdma_and_inputblock()
541 ret = pinctrl_select_state(fei->pinctrl, tsin->pstate); configure_memdma_and_inputblock()
551 tmp |= BIT(tsin->tsin_id); configure_memdma_and_inputblock()
554 if (tsin->serial_not_parallel) configure_memdma_and_inputblock()
557 if (tsin->invert_ts_clk) configure_memdma_and_inputblock()
560 if (tsin->async_not_sync) configure_memdma_and_inputblock()
565 writel(tmp, fei->io + C8SECTPFE_IB_IP_FMT_CFG(tsin->tsin_id)); configure_memdma_and_inputblock()
570 fei->io + C8SECTPFE_IB_SYNCLCKDRP_CFG(tsin->tsin_id)); configure_memdma_and_inputblock()
572 writel(TS_PKT_SIZE, fei->io + C8SECTPFE_IB_PKT_LEN(tsin->tsin_id)); configure_memdma_and_inputblock()
576 tsin->fifo = (tsin->tsin_id * FIFO_LEN); configure_memdma_and_inputblock()
578 writel(tsin->fifo, fei->io + C8SECTPFE_IB_BUFF_STRT(tsin->tsin_id)); configure_memdma_and_inputblock()
579 writel(tsin->fifo + FIFO_LEN - 1, configure_memdma_and_inputblock()
580 fei->io + C8SECTPFE_IB_BUFF_END(tsin->tsin_id)); configure_memdma_and_inputblock()
582 writel(tsin->fifo, fei->io + C8SECTPFE_IB_READ_PNT(tsin->tsin_id)); configure_memdma_and_inputblock()
583 writel(tsin->fifo, fei->io + C8SECTPFE_IB_WRT_PNT(tsin->tsin_id)); configure_memdma_and_inputblock()
585 writel(tsin->pid_buffer_busaddr, configure_memdma_and_inputblock()
586 fei->io + PIDF_BASE(tsin->tsin_id)); configure_memdma_and_inputblock()
589 tsin->tsin_id, readl(fei->io + PIDF_BASE(tsin->tsin_id)), configure_memdma_and_inputblock()
590 &tsin->pid_buffer_busaddr); configure_memdma_and_inputblock()
603 writel(tmp, fei->io + C8SECTPFE_IB_PID_SET(tsin->tsin_id)); configure_memdma_and_inputblock()
606 tsin->tsin_id, configure_memdma_and_inputblock()
607 readl(fei->io + C8SECTPFE_IB_WRT_PNT(tsin->tsin_id)), configure_memdma_and_inputblock()
608 readl(fei->io + C8SECTPFE_IB_READ_PNT(tsin->tsin_id)), configure_memdma_and_inputblock()
609 readl(fei->io + C8SECTPFE_IB_BUFF_STRT(tsin->tsin_id)), configure_memdma_and_inputblock()
610 readl(fei->io + C8SECTPFE_IB_BUFF_END(tsin->tsin_id))); configure_memdma_and_inputblock()
613 tsin->irec = fei->io + DMA_MEMDMA_OFFSET + DMA_DMEM_OFFSET + configure_memdma_and_inputblock()
619 tsin->irec += (tsin->tsin_id * DMA_PRDS_SIZE); configure_memdma_and_inputblock()
621 writel(tsin->fifo, tsin->irec + DMA_PRDS_MEMBASE); configure_memdma_and_inputblock()
623 writel(tsin->fifo + FIFO_LEN - 1, tsin->irec + DMA_PRDS_MEMTOP); configure_memdma_and_inputblock()
625 writel((188 + 7)&~7, tsin->irec + DMA_PRDS_PKTSIZE); configure_memdma_and_inputblock()
627 writel(0x1, tsin->irec + DMA_PRDS_TPENABLE); configure_memdma_and_inputblock()
631 writel(tsin->back_buffer_busaddr, tsin->irec + DMA_PRDS_BUSBASE_TP(0)); configure_memdma_and_inputblock()
633 tmp = tsin->back_buffer_busaddr + FEI_BUFFER_SIZE - 1; configure_memdma_and_inputblock()
634 writel(tmp, tsin->irec + DMA_PRDS_BUSTOP_TP(0)); configure_memdma_and_inputblock()
636 writel(tsin->back_buffer_busaddr, tsin->irec + DMA_PRDS_BUSWP_TP(0)); configure_memdma_and_inputblock()
637 writel(tsin->back_buffer_busaddr, tsin->irec + DMA_PRDS_BUSRP_TP(0)); configure_memdma_and_inputblock()
640 tasklet_init(&tsin->tsklet, channel_swdemux_tsklet, configure_memdma_and_inputblock()
641 (unsigned long) tsin); configure_memdma_and_inputblock()
646 free_input_block(fei, tsin); configure_memdma_and_inputblock()
672 struct channel_info *tsin; c8sectpfe_probe() local
751 dev_err(dev, "More tsin declared than exist on SoC!\n"); c8sectpfe_probe()
759 dev_err(dev, "Error getting tsin pins\n"); c8sectpfe_probe()
776 tsin = fei->channel_data[index]; for_each_child_of_node()
778 tsin->fei = fei; for_each_child_of_node()
780 ret = of_property_read_u32(child, "tsin-num", &tsin->tsin_id); for_each_child_of_node()
787 if (tsin->tsin_id > fei->hw_stats.num_ib) { for_each_child_of_node()
789 "tsin-num %d specified greater than number\n\t" for_each_child_of_node()
791 tsin->tsin_id, fei->hw_stats.num_ib); for_each_child_of_node()
796 tsin->invert_ts_clk = of_property_read_bool(child, for_each_child_of_node()
799 tsin->serial_not_parallel = of_property_read_bool(child, for_each_child_of_node()
802 tsin->async_not_sync = of_property_read_bool(child, for_each_child_of_node()
806 &tsin->dvb_card); for_each_child_of_node()
817 tsin->i2c_adapter = for_each_child_of_node()
819 if (!tsin->i2c_adapter) { for_each_child_of_node()
826 tsin->rst_gpio = of_get_named_gpio(child, "rst-gpio", 0); for_each_child_of_node()
828 ret = gpio_is_valid(tsin->rst_gpio); for_each_child_of_node()
831 "reset gpio for tsin%d not valid (gpio=%d)\n", for_each_child_of_node()
832 tsin->tsin_id, tsin->rst_gpio); for_each_child_of_node()
836 ret = devm_gpio_request_one(dev, tsin->rst_gpio, for_each_child_of_node()
839 dev_err(dev, "Can't request tsin%d reset gpio\n" for_each_child_of_node()
846 gpio_direction_output(tsin->rst_gpio, 0); for_each_child_of_node()
848 gpio_direction_output(tsin->rst_gpio, 1); for_each_child_of_node()
852 tsin->demux_mapping = index; for_each_child_of_node()
858 tsin->tsin_id, tsin->invert_ts_clk, for_each_child_of_node()
859 tsin->serial_not_parallel, tsin->async_not_sync, for_each_child_of_node()
860 tsin->dvb_card); for_each_child_of_node()
944 struct channel_info *tsin; configure_channels() local
947 /* iterate round each tsin and configure memdma descriptor and IB hw */ for_each_child_of_node()
950 tsin = fei->channel_data[index]; for_each_child_of_node()
967 tsin = fei->channel_data[index];
968 free_input_block(fei, tsin);
447 configure_memdma_and_inputblock(struct c8sectpfei *fei, struct channel_info *tsin) configure_memdma_and_inputblock() argument
H A Dc8sectpfe-common.c206 struct channel_info *tsin; c8sectpfe_tuner_unregister_frontend() local
210 tsin = fei->channel_data[n]; c8sectpfe_tuner_unregister_frontend()
212 if (tsin && tsin->frontend) { c8sectpfe_tuner_unregister_frontend()
213 dvb_unregister_frontend(tsin->frontend); c8sectpfe_tuner_unregister_frontend()
214 dvb_frontend_detach(tsin->frontend); c8sectpfe_tuner_unregister_frontend()
217 if (tsin && tsin->i2c_adapter) c8sectpfe_tuner_unregister_frontend()
218 i2c_put_adapter(tsin->i2c_adapter); c8sectpfe_tuner_unregister_frontend()
220 if (tsin && tsin->i2c_client) { c8sectpfe_tuner_unregister_frontend()
221 if (tsin->i2c_client->dev.driver->owner) c8sectpfe_tuner_unregister_frontend()
222 module_put(tsin->i2c_client->dev.driver->owner); c8sectpfe_tuner_unregister_frontend()
223 i2c_unregister_device(tsin->i2c_client); c8sectpfe_tuner_unregister_frontend()
235 struct channel_info *tsin; c8sectpfe_tuner_register_frontend() local
244 tsin = fei->channel_data[n]; c8sectpfe_tuner_register_frontend()
246 res = c8sectpfe_frontend_attach(&frontend, *c8sectpfe, tsin, n); c8sectpfe_tuner_register_frontend()
257 tsin->frontend = frontend; c8sectpfe_tuner_register_frontend()
H A Dc8sectpfe-dvb.c118 struct channel_info *tsin, int chan_num) c8sectpfe_frontend_attach()
128 if (!tsin) c8sectpfe_frontend_attach()
131 switch (tsin->dvb_card) { c8sectpfe_frontend_attach()
137 if (tsin->dvb_card == STV0367_TDA18212_NIMA_1) c8sectpfe_frontend_attach()
140 tsin->i2c_adapter); c8sectpfe_frontend_attach()
141 else if (tsin->dvb_card == STV0367_TDA18212_NIMB_1) c8sectpfe_frontend_attach()
144 tsin->i2c_adapter); c8sectpfe_frontend_attach()
148 tsin->i2c_adapter); c8sectpfe_frontend_attach()
153 , __func__, dvb_card_str(tsin->dvb_card)); c8sectpfe_frontend_attach()
182 client = i2c_new_device(tsin->i2c_adapter, &tda18212_info); c8sectpfe_frontend_attach()
194 tsin->i2c_client = client; c8sectpfe_frontend_attach()
200 tsin->i2c_adapter, STV090x_DEMODULATOR_0); c8sectpfe_frontend_attach()
204 __func__, dvb_card_str(tsin->dvb_card)); c8sectpfe_frontend_attach()
209 &stv6110x_config, tsin->i2c_adapter); c8sectpfe_frontend_attach()
213 , __func__, dvb_card_str(tsin->dvb_card)); c8sectpfe_frontend_attach()
228 dvb_attach(lnbh24_attach, *fe, tsin->i2c_adapter, 0, 0, 0x9); c8sectpfe_frontend_attach()
234 __func__, dvb_card_str(tsin->dvb_card)); c8sectpfe_frontend_attach()
242 dvb_card_str(tsin->dvb_card)); c8sectpfe_frontend_attach()
116 c8sectpfe_frontend_attach(struct dvb_frontend **fe, struct c8sectpfe *c8sectpfe, struct channel_info *tsin, int chan_num) c8sectpfe_frontend_attach() argument
H A Dc8sectpfe-dvb.h17 struct c8sectpfe *c8sectpfe, struct channel_info *tsin,

Completed in 227 milliseconds