18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) 2008-2009 DENX Software Engineering.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Author: Yuri Tikhonov <yur@emcraft.com>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_ASYNC_TX_H_
88c2ecf20Sopenharmony_ci#define _ASM_POWERPC_ASYNC_TX_H_
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#if defined(CONFIG_440SPe) || defined(CONFIG_440SP)
118c2ecf20Sopenharmony_ciextern struct dma_chan *
128c2ecf20Sopenharmony_cippc440spe_async_tx_find_best_channel(enum dma_transaction_type cap,
138c2ecf20Sopenharmony_ci	struct page **dst_lst, int dst_cnt, struct page **src_lst,
148c2ecf20Sopenharmony_ci	int src_cnt, size_t src_sz);
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#define async_tx_find_channel(dep, cap, dst_lst, dst_cnt, src_lst, \
178c2ecf20Sopenharmony_ci			      src_cnt, src_sz) \
188c2ecf20Sopenharmony_ci	ppc440spe_async_tx_find_best_channel(cap, dst_lst, dst_cnt, src_lst, \
198c2ecf20Sopenharmony_ci					     src_cnt, src_sz)
208c2ecf20Sopenharmony_ci#else
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci#define async_tx_find_channel(dep, type, dst, dst_count, src, src_count, len) \
238c2ecf20Sopenharmony_ci	__async_tx_find_channel(dep, type)
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_cistruct dma_chan *
268c2ecf20Sopenharmony_ci__async_tx_find_channel(struct async_submit_ctl *submit,
278c2ecf20Sopenharmony_ci			enum dma_transaction_type tx_type);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci#endif
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#endif
32