Lines Matching full:wrapper

20  * Generic Interface (GENI) Serial Engine (SE) Wrapper driver is introduced
21 * to manage GENI firmware based Qualcomm Universal Peripheral (QUP) Wrapper
22 * controller. QUP Wrapper is designed to support various serial bus protocols
40 * |QUP Wrapper |
56 * Figure 1: GENI based QUP Wrapper
68 * GENI SE Wrapper driver is structured into 2 parts:
70 * geni_wrapper represents QUP Wrapper controller. This part of the driver
71 * manages QUP Wrapper information such as hardware version, clock
75 * engine information such as clocks, containing QUP Wrapper, etc. This part
85 * @struct geni_wrapper - Data structure to represent the QUP Wrapper Core
86 * @dev: Device pointer of the QUP wrapper core
87 * @base: Base address of this instance of QUP wrapper core
180 * geni_se_get_qup_hw_version() - Read the QUP wrapper Hardware version
183 * Return: Hardware Version of the wrapper.
187 struct geni_wrapper *wrapper = se->wrapper; in geni_se_get_qup_hw_version() local
189 return readl_relaxed(wrapper->base + QUP_HW_VER_REG); in geni_se_get_qup_hw_version()
443 struct geni_wrapper *wrapper = se->wrapper; in geni_se_clks_off() local
446 clk_bulk_disable_unprepare(ARRAY_SIZE(wrapper->ahb_clks), in geni_se_clks_off()
447 wrapper->ahb_clks); in geni_se_clks_off()
476 struct geni_wrapper *wrapper = se->wrapper; in geni_se_clks_on() local
478 ret = clk_bulk_prepare_enable(ARRAY_SIZE(wrapper->ahb_clks), in geni_se_clks_on()
479 wrapper->ahb_clks); in geni_se_clks_on()
485 clk_bulk_disable_unprepare(ARRAY_SIZE(wrapper->ahb_clks), in geni_se_clks_on()
486 wrapper->ahb_clks); in geni_se_clks_on()
637 struct geni_wrapper *wrapper = se->wrapper; in geni_se_tx_dma_prep() local
640 if (!wrapper) in geni_se_tx_dma_prep()
643 *iova = dma_map_single(wrapper->dev, buf, len, DMA_TO_DEVICE); in geni_se_tx_dma_prep()
644 if (dma_mapping_error(wrapper->dev, *iova)) in geni_se_tx_dma_prep()
673 struct geni_wrapper *wrapper = se->wrapper; in geni_se_rx_dma_prep() local
676 if (!wrapper) in geni_se_rx_dma_prep()
679 *iova = dma_map_single(wrapper->dev, buf, len, DMA_FROM_DEVICE); in geni_se_rx_dma_prep()
680 if (dma_mapping_error(wrapper->dev, *iova)) in geni_se_rx_dma_prep()
706 struct geni_wrapper *wrapper = se->wrapper; in geni_se_tx_dma_unprep() local
708 if (iova && !dma_mapping_error(wrapper->dev, iova)) in geni_se_tx_dma_unprep()
709 dma_unmap_single(wrapper->dev, iova, len, DMA_TO_DEVICE); in geni_se_tx_dma_unprep()
723 struct geni_wrapper *wrapper = se->wrapper; in geni_se_rx_dma_unprep() local
725 if (iova && !dma_mapping_error(wrapper->dev, iova)) in geni_se_rx_dma_unprep()
726 dma_unmap_single(wrapper->dev, iova, len, DMA_FROM_DEVICE); in geni_se_rx_dma_unprep()
821 struct geni_wrapper *wrapper; in geni_remove_earlycon_icc_vote() local
828 wrapper = earlycon_wrapper; in geni_remove_earlycon_icc_vote()
829 parent = of_get_next_parent(wrapper->dev->of_node); in geni_remove_earlycon_icc_vote()
838 wrapper = platform_get_drvdata(pdev); in geni_remove_earlycon_icc_vote()
839 icc_put(wrapper->to_core.path); in geni_remove_earlycon_icc_vote()
840 wrapper->to_core.path = NULL; in geni_remove_earlycon_icc_vote()
853 struct geni_wrapper *wrapper; in geni_se_probe() local
858 wrapper = devm_kzalloc(dev, sizeof(*wrapper), GFP_KERNEL); in geni_se_probe()
859 if (!wrapper) in geni_se_probe()
862 wrapper->dev = dev; in geni_se_probe()
864 wrapper->base = devm_ioremap_resource(dev, res); in geni_se_probe()
865 if (IS_ERR(wrapper->base)) in geni_se_probe()
866 return PTR_ERR(wrapper->base); in geni_se_probe()
869 wrapper->ahb_clks[0].id = "m-ahb"; in geni_se_probe()
870 wrapper->ahb_clks[1].id = "s-ahb"; in geni_se_probe()
871 ret = devm_clk_bulk_get(dev, NUM_AHB_CLKS, wrapper->ahb_clks); in geni_se_probe()
888 wrapper->to_core.path = devm_of_icc_get(dev, "qup-core"); in geni_se_probe()
889 if (IS_ERR(wrapper->to_core.path)) in geni_se_probe()
890 return PTR_ERR(wrapper->to_core.path); in geni_se_probe()
895 * Note: We are putting vote on each QUP wrapper instead only to which in geni_se_probe()
896 * earlycon is connected because QUP core clock of different wrapper in geni_se_probe()
902 ret = icc_set_bw(wrapper->to_core.path, GENI_DEFAULT_BW, in geni_se_probe()
911 earlycon_wrapper = wrapper; in geni_se_probe()
915 dev_set_drvdata(dev, wrapper); in geni_se_probe()