Lines Matching refs:sdma
423 struct sdma_engine *sdma; member
662 static inline u32 chnenbl_ofs(struct sdma_engine *sdma, unsigned int event) in chnenbl_ofs() argument
664 u32 chnenbl0 = sdma->drvdata->chnenbl0; in chnenbl_ofs()
671 struct sdma_engine *sdma = sdmac->sdma; in sdma_config_ownership() local
678 evt = readl_relaxed(sdma->regs + SDMA_H_EVTOVR); in sdma_config_ownership()
679 mcu = readl_relaxed(sdma->regs + SDMA_H_HOSTOVR); in sdma_config_ownership()
680 dsp = readl_relaxed(sdma->regs + SDMA_H_DSPOVR); in sdma_config_ownership()
697 writel_relaxed(evt, sdma->regs + SDMA_H_EVTOVR); in sdma_config_ownership()
698 writel_relaxed(mcu, sdma->regs + SDMA_H_HOSTOVR); in sdma_config_ownership()
699 writel_relaxed(dsp, sdma->regs + SDMA_H_DSPOVR); in sdma_config_ownership()
704 static void sdma_enable_channel(struct sdma_engine *sdma, int channel) in sdma_enable_channel() argument
706 writel(BIT(channel), sdma->regs + SDMA_H_START); in sdma_enable_channel()
712 static int sdma_run_channel0(struct sdma_engine *sdma) in sdma_run_channel0() argument
717 sdma_enable_channel(sdma, 0); in sdma_run_channel0()
719 ret = readl_relaxed_poll_timeout_atomic(sdma->regs + SDMA_H_STATSTOP, in sdma_run_channel0()
722 dev_err(sdma->dev, "Timeout waiting for CH0 ready\n"); in sdma_run_channel0()
725 reg = readl(sdma->regs + SDMA_H_CONFIG); in sdma_run_channel0()
728 writel_relaxed(reg, sdma->regs + SDMA_H_CONFIG); in sdma_run_channel0()
734 static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size, in sdma_load_script() argument
737 struct sdma_buffer_descriptor *bd0 = sdma->bd0; in sdma_load_script()
743 buf_virt = dma_alloc_coherent(sdma->dev, size, &buf_phys, GFP_KERNEL); in sdma_load_script()
747 spin_lock_irqsave(&sdma->channel_0_lock, flags); in sdma_load_script()
757 ret = sdma_run_channel0(sdma); in sdma_load_script()
759 spin_unlock_irqrestore(&sdma->channel_0_lock, flags); in sdma_load_script()
761 dma_free_coherent(sdma->dev, size, buf_virt, buf_phys); in sdma_load_script()
768 struct sdma_engine *sdma = sdmac->sdma; in sdma_event_enable() local
771 u32 chnenbl = chnenbl_ofs(sdma, event); in sdma_event_enable()
773 val = readl_relaxed(sdma->regs + chnenbl); in sdma_event_enable()
775 writel_relaxed(val, sdma->regs + chnenbl); in sdma_event_enable()
780 struct sdma_engine *sdma = sdmac->sdma; in sdma_event_disable() local
782 u32 chnenbl = chnenbl_ofs(sdma, event); in sdma_event_disable()
785 val = readl_relaxed(sdma->regs + chnenbl); in sdma_event_disable()
787 writel_relaxed(val, sdma->regs + chnenbl); in sdma_event_disable()
799 struct sdma_engine *sdma = sdmac->sdma; in sdma_start_desc() local
810 sdma->channel_control[channel].base_bd_ptr = desc->bd_phys; in sdma_start_desc()
811 sdma->channel_control[channel].current_bd_ptr = desc->bd_phys; in sdma_start_desc()
812 sdma_enable_channel(sdma, sdmac->channel); in sdma_start_desc()
892 struct sdma_engine *sdma = dev_id; in sdma_int_handler() local
895 stat = readl_relaxed(sdma->regs + SDMA_H_INTR); in sdma_int_handler()
896 writel_relaxed(stat, sdma->regs + SDMA_H_INTR); in sdma_int_handler()
902 struct sdma_channel *sdmac = &sdma->channel[channel]; in sdma_int_handler()
930 struct sdma_engine *sdma = sdmac->sdma; in sdma_get_pc() local
946 emi_2_emi = sdma->script_addrs->ap_2_ap_addr; in sdma_get_pc()
949 emi_2_per = sdma->script_addrs->bp_2_ap_addr; in sdma_get_pc()
950 per_2_emi = sdma->script_addrs->ap_2_bp_addr; in sdma_get_pc()
953 per_2_emi = sdma->script_addrs->firi_2_mcu_addr; in sdma_get_pc()
954 emi_2_per = sdma->script_addrs->mcu_2_firi_addr; in sdma_get_pc()
957 per_2_emi = sdma->script_addrs->uart_2_mcu_addr; in sdma_get_pc()
958 emi_2_per = sdma->script_addrs->mcu_2_app_addr; in sdma_get_pc()
961 per_2_emi = sdma->script_addrs->uartsh_2_mcu_addr; in sdma_get_pc()
962 emi_2_per = sdma->script_addrs->mcu_2_shp_addr; in sdma_get_pc()
965 per_2_emi = sdma->script_addrs->ata_2_mcu_addr; in sdma_get_pc()
966 emi_2_per = sdma->script_addrs->mcu_2_ata_addr; in sdma_get_pc()
969 per_2_emi = sdma->script_addrs->app_2_mcu_addr; in sdma_get_pc()
972 if (sdmac->sdma->drvdata->ecspi_fixed) { in sdma_get_pc()
973 emi_2_per = sdma->script_addrs->mcu_2_app_addr; in sdma_get_pc()
975 emi_2_per = sdma->script_addrs->mcu_2_ecspi_addr; in sdma_get_pc()
983 per_2_emi = sdma->script_addrs->app_2_mcu_addr; in sdma_get_pc()
984 emi_2_per = sdma->script_addrs->mcu_2_app_addr; in sdma_get_pc()
987 per_2_emi = sdma->script_addrs->ssish_2_mcu_addr; in sdma_get_pc()
988 emi_2_per = sdma->script_addrs->mcu_2_ssish_addr; in sdma_get_pc()
997 per_2_emi = sdma->script_addrs->shp_2_mcu_addr; in sdma_get_pc()
998 emi_2_per = sdma->script_addrs->mcu_2_shp_addr; in sdma_get_pc()
1001 per_2_emi = sdma->script_addrs->asrc_2_mcu_addr; in sdma_get_pc()
1002 emi_2_per = sdma->script_addrs->asrc_2_mcu_addr; in sdma_get_pc()
1003 per_2_per = sdma->script_addrs->per_2_per_addr; in sdma_get_pc()
1007 per_2_emi = sdma->script_addrs->shp_2_mcu_addr; in sdma_get_pc()
1008 emi_2_per = sdma->script_addrs->mcu_2_shp_addr; in sdma_get_pc()
1009 per_2_per = sdma->script_addrs->per_2_per_addr; in sdma_get_pc()
1012 per_2_emi = sdma->script_addrs->mshc_2_mcu_addr; in sdma_get_pc()
1013 emi_2_per = sdma->script_addrs->mcu_2_mshc_addr; in sdma_get_pc()
1016 per_2_emi = sdma->script_addrs->dptc_dvfs_addr; in sdma_get_pc()
1019 per_2_emi = sdma->script_addrs->spdif_2_mcu_addr; in sdma_get_pc()
1020 emi_2_per = sdma->script_addrs->mcu_2_spdif_addr; in sdma_get_pc()
1023 emi_2_per = sdma->script_addrs->ext_mem_2_ipu_addr; in sdma_get_pc()
1037 struct sdma_engine *sdma = sdmac->sdma; in sdma_load_context() local
1040 struct sdma_context_data *context = sdma->context; in sdma_load_context()
1041 struct sdma_buffer_descriptor *bd0 = sdma->bd0; in sdma_load_context()
1057 dev_dbg(sdma->dev, "load_address = %d\n", load_address); in sdma_load_context()
1058 dev_dbg(sdma->dev, "wml = 0x%08x\n", (u32)sdmac->watermark_level); in sdma_load_context()
1059 dev_dbg(sdma->dev, "shp_addr = 0x%08x\n", sdmac->shp_addr); in sdma_load_context()
1060 dev_dbg(sdma->dev, "per_addr = 0x%08x\n", sdmac->per_addr); in sdma_load_context()
1061 dev_dbg(sdma->dev, "event_mask0 = 0x%08x\n", (u32)sdmac->event_mask[0]); in sdma_load_context()
1062 dev_dbg(sdma->dev, "event_mask1 = 0x%08x\n", (u32)sdmac->event_mask[1]); in sdma_load_context()
1064 spin_lock_irqsave(&sdma->channel_0_lock, flags); in sdma_load_context()
1081 bd0->buffer_addr = sdma->context_phys; in sdma_load_context()
1083 ret = sdma_run_channel0(sdma); in sdma_load_context()
1085 spin_unlock_irqrestore(&sdma->channel_0_lock, flags); in sdma_load_context()
1098 struct sdma_engine *sdma = sdmac->sdma; in sdma_disable_channel() local
1101 writel_relaxed(BIT(channel), sdma->regs + SDMA_H_STATSTOP); in sdma_disable_channel()
1159 struct sdma_engine *sdma = sdmac->sdma; in sdma_set_watermarklevel_for_p2p() local
1186 if (sdmac->per_address2 >= sdma->spba_start_addr && in sdma_set_watermarklevel_for_p2p()
1187 sdmac->per_address2 <= sdma->spba_end_addr) in sdma_set_watermarklevel_for_p2p()
1190 if (sdmac->per_address >= sdma->spba_start_addr && in sdma_set_watermarklevel_for_p2p()
1191 sdmac->per_address <= sdma->spba_end_addr) in sdma_set_watermarklevel_for_p2p()
1246 struct sdma_engine *sdma = sdmac->sdma; in sdma_set_channel_priority() local
1254 writel_relaxed(priority, sdma->regs + SDMA_CHNPRI_0 + 4 * channel); in sdma_set_channel_priority()
1259 static int sdma_request_channel0(struct sdma_engine *sdma) in sdma_request_channel0() argument
1263 sdma->bd0 = dma_alloc_coherent(sdma->dev, PAGE_SIZE, &sdma->bd0_phys, in sdma_request_channel0()
1265 if (!sdma->bd0) { in sdma_request_channel0()
1270 sdma->channel_control[0].base_bd_ptr = sdma->bd0_phys; in sdma_request_channel0()
1271 sdma->channel_control[0].current_bd_ptr = sdma->bd0_phys; in sdma_request_channel0()
1273 sdma_set_channel_priority(&sdma->channel[0], MXC_SDMA_DEFAULT_PRIORITY); in sdma_request_channel0()
1286 desc->bd = dma_alloc_coherent(desc->sdmac->sdma->dev, bd_size, in sdma_alloc_bd()
1300 dma_free_coherent(desc->sdmac->sdma->dev, bd_size, desc->bd, in sdma_free_bd()
1329 dev_dbg(sdmac->sdma->dev, "MEMCPY in case?\n"); in sdma_alloc_chan_resources()
1356 ret = clk_enable(sdmac->sdma->clk_ipg); in sdma_alloc_chan_resources()
1359 ret = clk_enable(sdmac->sdma->clk_ahb); in sdma_alloc_chan_resources()
1370 clk_disable(sdmac->sdma->clk_ahb); in sdma_alloc_chan_resources()
1372 clk_disable(sdmac->sdma->clk_ipg); in sdma_alloc_chan_resources()
1379 struct sdma_engine *sdma = sdmac->sdma; in sdma_free_chan_resources() local
1394 clk_disable(sdma->clk_ipg); in sdma_free_chan_resources()
1395 clk_disable(sdma->clk_ahb); in sdma_free_chan_resources()
1403 if (!sdmac->sdma->fw_loaded && sdmac->is_ram_script) { in sdma_transfer_init()
1404 dev_warn_once(sdmac->sdma->dev, "sdma firmware not ready!\n"); in sdma_transfer_init()
1446 struct sdma_engine *sdma = sdmac->sdma; in sdma_prep_memcpy() local
1456 dev_dbg(sdma->dev, "memcpy: %pad->%pad, len=%zu, channel=%d.\n", in sdma_prep_memcpy()
1486 dev_dbg(sdma->dev, "entry %d: count: %zd dma: 0x%x %s%s\n", in sdma_prep_memcpy()
1503 struct sdma_engine *sdma = sdmac->sdma; in sdma_prep_slave_sg() local
1515 dev_dbg(sdma->dev, "setting up %d entries for channel %d.\n", in sdma_prep_slave_sg()
1527 dev_err(sdma->dev, "SDMA channel %d: maximum bytes for sg entry exceeded: %d > %d\n", in sdma_prep_slave_sg()
1564 dev_dbg(sdma->dev, "entry %d: count: %d dma: %#llx %s%s\n", in sdma_prep_slave_sg()
1587 struct sdma_engine *sdma = sdmac->sdma; in sdma_prep_dma_cyclic() local
1593 dev_dbg(sdma->dev, "%s channel: %d\n", __func__, channel); in sdma_prep_dma_cyclic()
1606 dev_err(sdma->dev, "SDMA channel %d: maximum period size exceeded: %zu > %d\n", in sdma_prep_dma_cyclic()
1630 dev_dbg(sdma->dev, "entry %d: count: %zu dma: %#llx %s%s\n", in sdma_prep_dma_cyclic()
1689 if (sdmac->event_id0 >= sdmac->sdma->drvdata->num_events) in sdma_config()
1694 if (sdmac->event_id1 >= sdmac->sdma->drvdata->num_events) in sdma_config()
1759 static void sdma_add_scripts(struct sdma_engine *sdma, in sdma_add_scripts() argument
1763 s32 *saddr_arr = (u32 *)sdma->script_addrs; in sdma_add_scripts()
1767 if (!sdma->script_number) in sdma_add_scripts()
1768 sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1; in sdma_add_scripts()
1770 if (sdma->script_number > sizeof(struct sdma_script_start_addrs) in sdma_add_scripts()
1772 dev_err(sdma->dev, in sdma_add_scripts()
1774 sdma->script_number); in sdma_add_scripts()
1778 for (i = 0; i < sdma->script_number; i++) in sdma_add_scripts()
1790 sdma->script_addrs->uart_2_mcu_addr = addr->uart_2_mcu_addr; in sdma_add_scripts()
1792 sdma->script_addrs->uartsh_2_mcu_addr = addr->uartsh_2_mcu_addr; in sdma_add_scripts()
1798 struct sdma_engine *sdma = context; in sdma_load_firmware() local
1804 dev_info(sdma->dev, "external firmware not found, using ROM firmware\n"); in sdma_load_firmware()
1820 sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1; in sdma_load_firmware()
1823 sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V2; in sdma_load_firmware()
1826 sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3; in sdma_load_firmware()
1829 sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V4; in sdma_load_firmware()
1832 dev_err(sdma->dev, "unknown firmware version\n"); in sdma_load_firmware()
1839 clk_enable(sdma->clk_ipg); in sdma_load_firmware()
1840 clk_enable(sdma->clk_ahb); in sdma_load_firmware()
1842 sdma_load_script(sdma, ram_code, in sdma_load_firmware()
1845 clk_disable(sdma->clk_ipg); in sdma_load_firmware()
1846 clk_disable(sdma->clk_ahb); in sdma_load_firmware()
1848 sdma_add_scripts(sdma, addr); in sdma_load_firmware()
1850 sdma->fw_loaded = true; in sdma_load_firmware()
1852 dev_info(sdma->dev, "loaded firmware %d.%d\n", in sdma_load_firmware()
1862 static int sdma_event_remap(struct sdma_engine *sdma) in sdma_event_remap() argument
1864 struct device_node *np = sdma->dev->of_node; in sdma_event_remap()
1878 dev_dbg(sdma->dev, "no event needs to be remapped\n"); in sdma_event_remap()
1881 dev_err(sdma->dev, "the property %s must modulo %d\n", in sdma_event_remap()
1889 dev_err(sdma->dev, "failed to get gpr regmap\n"); in sdma_event_remap()
1897 dev_err(sdma->dev, "failed to read property %s index %d\n", in sdma_event_remap()
1904 dev_err(sdma->dev, "failed to read property %s index %d\n", in sdma_event_remap()
1911 dev_err(sdma->dev, "failed to read property %s index %d\n", in sdma_event_remap()
1926 static int sdma_get_firmware(struct sdma_engine *sdma, in sdma_get_firmware() argument
1932 FW_ACTION_UEVENT, fw_name, sdma->dev, in sdma_get_firmware()
1933 GFP_KERNEL, sdma, sdma_load_firmware); in sdma_get_firmware()
1938 static int sdma_init(struct sdma_engine *sdma) in sdma_init() argument
1943 ret = clk_enable(sdma->clk_ipg); in sdma_init()
1946 ret = clk_enable(sdma->clk_ahb); in sdma_init()
1950 if (sdma->drvdata->check_ratio && in sdma_init()
1951 (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg))) in sdma_init()
1952 sdma->clk_ratio = 1; in sdma_init()
1955 writel_relaxed(0, sdma->regs + SDMA_H_C0PTR); in sdma_init()
1957 sdma->channel_control = dma_alloc_coherent(sdma->dev, in sdma_init()
1962 if (!sdma->channel_control) { in sdma_init()
1967 sdma->context = (void *)sdma->channel_control + in sdma_init()
1969 sdma->context_phys = ccb_phys + in sdma_init()
1973 for (i = 0; i < sdma->drvdata->num_events; i++) in sdma_init()
1974 writel_relaxed(0, sdma->regs + chnenbl_ofs(sdma, i)); in sdma_init()
1978 writel_relaxed(0, sdma->regs + SDMA_CHNPRI_0 + i * 4); in sdma_init()
1980 ret = sdma_request_channel0(sdma); in sdma_init()
1984 sdma_config_ownership(&sdma->channel[0], false, true, false); in sdma_init()
1987 writel_relaxed(0x4050, sdma->regs + SDMA_CHN0ADDR); in sdma_init()
1990 if (sdma->clk_ratio) in sdma_init()
1991 writel_relaxed(SDMA_H_CONFIG_ACR, sdma->regs + SDMA_H_CONFIG); in sdma_init()
1993 writel_relaxed(0, sdma->regs + SDMA_H_CONFIG); in sdma_init()
1995 writel_relaxed(ccb_phys, sdma->regs + SDMA_H_C0PTR); in sdma_init()
1998 sdma_set_channel_priority(&sdma->channel[0], 7); in sdma_init()
2000 clk_disable(sdma->clk_ipg); in sdma_init()
2001 clk_disable(sdma->clk_ahb); in sdma_init()
2006 clk_disable(sdma->clk_ahb); in sdma_init()
2008 clk_disable(sdma->clk_ipg); in sdma_init()
2009 dev_err(sdma->dev, "initialisation failed with %d\n", ret); in sdma_init()
2030 struct sdma_engine *sdma = ofdma->of_dma_data; in sdma_xlate() local
2031 dma_cap_mask_t mask = sdma->dma_device.cap_mask; in sdma_xlate()
2063 struct sdma_engine *sdma; in sdma_probe() local
2070 sdma = devm_kzalloc(&pdev->dev, sizeof(*sdma), GFP_KERNEL); in sdma_probe()
2071 if (!sdma) in sdma_probe()
2074 spin_lock_init(&sdma->channel_0_lock); in sdma_probe()
2076 sdma->dev = &pdev->dev; in sdma_probe()
2077 sdma->drvdata = of_device_get_match_data(sdma->dev); in sdma_probe()
2084 sdma->regs = devm_ioremap_resource(&pdev->dev, iores); in sdma_probe()
2085 if (IS_ERR(sdma->regs)) in sdma_probe()
2086 return PTR_ERR(sdma->regs); in sdma_probe()
2088 sdma->clk_ipg = devm_clk_get(&pdev->dev, "ipg"); in sdma_probe()
2089 if (IS_ERR(sdma->clk_ipg)) in sdma_probe()
2090 return PTR_ERR(sdma->clk_ipg); in sdma_probe()
2092 sdma->clk_ahb = devm_clk_get(&pdev->dev, "ahb"); in sdma_probe()
2093 if (IS_ERR(sdma->clk_ahb)) in sdma_probe()
2094 return PTR_ERR(sdma->clk_ahb); in sdma_probe()
2096 ret = clk_prepare(sdma->clk_ipg); in sdma_probe()
2100 ret = clk_prepare(sdma->clk_ahb); in sdma_probe()
2105 sdma); in sdma_probe()
2109 sdma->irq = irq; in sdma_probe()
2111 sdma->script_addrs = kzalloc(sizeof(*sdma->script_addrs), GFP_KERNEL); in sdma_probe()
2112 if (!sdma->script_addrs) { in sdma_probe()
2118 saddr_arr = (s32 *)sdma->script_addrs; in sdma_probe()
2119 for (i = 0; i < sizeof(*sdma->script_addrs) / sizeof(s32); i++) in sdma_probe()
2122 dma_cap_set(DMA_SLAVE, sdma->dma_device.cap_mask); in sdma_probe()
2123 dma_cap_set(DMA_CYCLIC, sdma->dma_device.cap_mask); in sdma_probe()
2124 dma_cap_set(DMA_MEMCPY, sdma->dma_device.cap_mask); in sdma_probe()
2126 INIT_LIST_HEAD(&sdma->dma_device.channels); in sdma_probe()
2129 struct sdma_channel *sdmac = &sdma->channel[i]; in sdma_probe()
2131 sdmac->sdma = sdma; in sdma_probe()
2144 vchan_init(&sdmac->vc, &sdma->dma_device); in sdma_probe()
2147 ret = sdma_init(sdma); in sdma_probe()
2151 ret = sdma_event_remap(sdma); in sdma_probe()
2155 if (sdma->drvdata->script_addrs) in sdma_probe()
2156 sdma_add_scripts(sdma, sdma->drvdata->script_addrs); in sdma_probe()
2158 sdma->dma_device.dev = &pdev->dev; in sdma_probe()
2160 sdma->dma_device.device_alloc_chan_resources = sdma_alloc_chan_resources; in sdma_probe()
2161 sdma->dma_device.device_free_chan_resources = sdma_free_chan_resources; in sdma_probe()
2162 sdma->dma_device.device_tx_status = sdma_tx_status; in sdma_probe()
2163 sdma->dma_device.device_prep_slave_sg = sdma_prep_slave_sg; in sdma_probe()
2164 sdma->dma_device.device_prep_dma_cyclic = sdma_prep_dma_cyclic; in sdma_probe()
2165 sdma->dma_device.device_config = sdma_config; in sdma_probe()
2166 sdma->dma_device.device_terminate_all = sdma_terminate_all; in sdma_probe()
2167 sdma->dma_device.device_synchronize = sdma_channel_synchronize; in sdma_probe()
2168 sdma->dma_device.src_addr_widths = SDMA_DMA_BUSWIDTHS; in sdma_probe()
2169 sdma->dma_device.dst_addr_widths = SDMA_DMA_BUSWIDTHS; in sdma_probe()
2170 sdma->dma_device.directions = SDMA_DMA_DIRECTIONS; in sdma_probe()
2171 sdma->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; in sdma_probe()
2172 sdma->dma_device.device_prep_dma_memcpy = sdma_prep_memcpy; in sdma_probe()
2173 sdma->dma_device.device_issue_pending = sdma_issue_pending; in sdma_probe()
2174 sdma->dma_device.copy_align = 2; in sdma_probe()
2175 dma_set_max_seg_size(sdma->dma_device.dev, SDMA_BD_MAX_CNT); in sdma_probe()
2177 platform_set_drvdata(pdev, sdma); in sdma_probe()
2179 ret = dma_async_device_register(&sdma->dma_device); in sdma_probe()
2186 ret = of_dma_controller_register(np, sdma_xlate, sdma); in sdma_probe()
2195 sdma->spba_start_addr = spba_res.start; in sdma_probe()
2196 sdma->spba_end_addr = spba_res.end; in sdma_probe()
2211 ret = sdma_get_firmware(sdma, fw_name); in sdma_probe()
2219 dma_async_device_unregister(&sdma->dma_device); in sdma_probe()
2221 kfree(sdma->script_addrs); in sdma_probe()
2223 clk_unprepare(sdma->clk_ahb); in sdma_probe()
2225 clk_unprepare(sdma->clk_ipg); in sdma_probe()
2231 struct sdma_engine *sdma = platform_get_drvdata(pdev); in sdma_remove() local
2234 devm_free_irq(&pdev->dev, sdma->irq, sdma); in sdma_remove()
2235 dma_async_device_unregister(&sdma->dma_device); in sdma_remove()
2236 kfree(sdma->script_addrs); in sdma_remove()
2237 clk_unprepare(sdma->clk_ahb); in sdma_remove()
2238 clk_unprepare(sdma->clk_ipg); in sdma_remove()
2241 struct sdma_channel *sdmac = &sdma->channel[i]; in sdma_remove()