Lines Matching +full:geni +full:- +full:se +full:- +full:qup
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
15 * @GENI_SE_FIFO: FIFO mode. Data is transferred with SE FIFO
18 * with SE by DMAengine internal to SE
31 /* Protocols supported by GENI Serial Engines */
55 * struct geni_se - GENI Serial Engine
58 * @wrapper: Pointer to the parent QUP Wrapper core
62 * @icc_paths: Array of ICC paths for SE
74 /* Common SE registers */
264 /* QUP SE VERSION value for major number 2 and minor number 5 */
270 * by the hardware team, and are not dynamically scaled with GENI bandwidth
284 u32 geni_se_get_qup_hw_version(struct geni_se *se);
287 * geni_se_read_proto() - Read the protocol configured for a serial engine
288 * @se: Pointer to the concerned serial engine.
292 static inline u32 geni_se_read_proto(struct geni_se *se) in geni_se_read_proto() argument
296 val = readl_relaxed(se->base + GENI_FW_REVISION_RO); in geni_se_read_proto()
302 * geni_se_setup_m_cmd() - Setup the primary sequencer
303 * @se: Pointer to the concerned serial engine.
310 static inline void geni_se_setup_m_cmd(struct geni_se *se, u32 cmd, u32 params) in geni_se_setup_m_cmd() argument
315 writel(m_cmd, se->base + SE_GENI_M_CMD0); in geni_se_setup_m_cmd()
319 * geni_se_setup_s_cmd() - Setup the secondary sequencer
320 * @se: Pointer to the concerned serial engine.
327 static inline void geni_se_setup_s_cmd(struct geni_se *se, u32 cmd, u32 params) in geni_se_setup_s_cmd() argument
331 s_cmd = readl_relaxed(se->base + SE_GENI_S_CMD0); in geni_se_setup_s_cmd()
335 writel(s_cmd, se->base + SE_GENI_S_CMD0); in geni_se_setup_s_cmd()
339 * geni_se_cancel_m_cmd() - Cancel the command configured in the primary
341 * @se: Pointer to the concerned serial engine.
346 static inline void geni_se_cancel_m_cmd(struct geni_se *se) in geni_se_cancel_m_cmd() argument
348 writel_relaxed(M_GENI_CMD_CANCEL, se->base + SE_GENI_M_CMD_CTRL_REG); in geni_se_cancel_m_cmd()
352 * geni_se_cancel_s_cmd() - Cancel the command configured in the secondary
354 * @se: Pointer to the concerned serial engine.
359 static inline void geni_se_cancel_s_cmd(struct geni_se *se) in geni_se_cancel_s_cmd() argument
361 writel_relaxed(S_GENI_CMD_CANCEL, se->base + SE_GENI_S_CMD_CTRL_REG); in geni_se_cancel_s_cmd()
365 * geni_se_abort_m_cmd() - Abort the command configured in the primary sequencer
366 * @se: Pointer to the concerned serial engine.
371 static inline void geni_se_abort_m_cmd(struct geni_se *se) in geni_se_abort_m_cmd() argument
373 writel_relaxed(M_GENI_CMD_ABORT, se->base + SE_GENI_M_CMD_CTRL_REG); in geni_se_abort_m_cmd()
377 * geni_se_abort_s_cmd() - Abort the command configured in the secondary
379 * @se: Pointer to the concerned serial engine.
384 static inline void geni_se_abort_s_cmd(struct geni_se *se) in geni_se_abort_s_cmd() argument
386 writel_relaxed(S_GENI_CMD_ABORT, se->base + SE_GENI_S_CMD_CTRL_REG); in geni_se_abort_s_cmd()
390 * geni_se_get_tx_fifo_depth() - Get the TX fifo depth of the serial engine
391 * @se: Pointer to the concerned serial engine.
398 static inline u32 geni_se_get_tx_fifo_depth(struct geni_se *se) in geni_se_get_tx_fifo_depth() argument
402 val = readl_relaxed(se->base + SE_HW_PARAM_0); in geni_se_get_tx_fifo_depth()
408 * geni_se_get_tx_fifo_width() - Get the TX fifo width of the serial engine
409 * @se: Pointer to the concerned serial engine.
416 static inline u32 geni_se_get_tx_fifo_width(struct geni_se *se) in geni_se_get_tx_fifo_width() argument
420 val = readl_relaxed(se->base + SE_HW_PARAM_0); in geni_se_get_tx_fifo_width()
426 * geni_se_get_rx_fifo_depth() - Get the RX fifo depth of the serial engine
427 * @se: Pointer to the concerned serial engine.
434 static inline u32 geni_se_get_rx_fifo_depth(struct geni_se *se) in geni_se_get_rx_fifo_depth() argument
438 val = readl_relaxed(se->base + SE_HW_PARAM_1); in geni_se_get_rx_fifo_depth()
443 void geni_se_init(struct geni_se *se, u32 rx_wm, u32 rx_rfr);
445 void geni_se_select_mode(struct geni_se *se, enum geni_se_xfer_mode mode);
447 void geni_se_config_packing(struct geni_se *se, int bpw, int pack_words,
450 int geni_se_resources_off(struct geni_se *se);
452 int geni_se_resources_on(struct geni_se *se);
454 int geni_se_clk_tbl_get(struct geni_se *se, unsigned long **tbl);
456 int geni_se_clk_freq_match(struct geni_se *se, unsigned long req_freq,
460 int geni_se_tx_dma_prep(struct geni_se *se, void *buf, size_t len,
463 int geni_se_rx_dma_prep(struct geni_se *se, void *buf, size_t len,
466 void geni_se_tx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len);
468 void geni_se_rx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len);
470 int geni_icc_get(struct geni_se *se, const char *icc_ddr);
472 int geni_icc_set_bw(struct geni_se *se);
473 void geni_icc_set_tag(struct geni_se *se, u32 tag);
475 int geni_icc_enable(struct geni_se *se);
477 int geni_icc_disable(struct geni_se *se);