Lines Matching +full:geni +full:- +full:se
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 */
56 * struct geni_se - GENI Serial Engine
63 * @icc_paths: Array of ICC paths for SE
75 /* Common SE registers */
296 /* QUP SE VERSION value for major number 2 and minor number 5 */
302 * by the hardware team, and are not dynamically scaled with GENI bandwidth
316 u32 geni_se_get_qup_hw_version(struct geni_se *se);
319 * geni_se_read_proto() - Read the protocol configured for a serial engine
320 * @se: Pointer to the concerned serial engine.
324 static inline u32 geni_se_read_proto(struct geni_se *se) in geni_se_read_proto() argument
328 val = readl_relaxed(se->base + GENI_FW_REVISION_RO); in geni_se_read_proto()
334 * geni_se_setup_m_cmd() - Setup the primary sequencer
335 * @se: Pointer to the concerned serial engine.
342 static inline void geni_se_setup_m_cmd(struct geni_se *se, u32 cmd, u32 params) in geni_se_setup_m_cmd() argument
347 writel(m_cmd, se->base + SE_GENI_M_CMD0); in geni_se_setup_m_cmd()
351 * geni_se_setup_s_cmd() - Setup the secondary sequencer
352 * @se: Pointer to the concerned serial engine.
359 static inline void geni_se_setup_s_cmd(struct geni_se *se, u32 cmd, u32 params) in geni_se_setup_s_cmd() argument
363 s_cmd = readl_relaxed(se->base + SE_GENI_S_CMD0); in geni_se_setup_s_cmd()
367 writel(s_cmd, se->base + SE_GENI_S_CMD0); in geni_se_setup_s_cmd()
371 * geni_se_cancel_m_cmd() - Cancel the command configured in the primary
373 * @se: Pointer to the concerned serial engine.
378 static inline void geni_se_cancel_m_cmd(struct geni_se *se) in geni_se_cancel_m_cmd() argument
380 writel_relaxed(M_GENI_CMD_CANCEL, se->base + SE_GENI_M_CMD_CTRL_REG); in geni_se_cancel_m_cmd()
384 * geni_se_cancel_s_cmd() - Cancel the command configured in the secondary
386 * @se: Pointer to the concerned serial engine.
391 static inline void geni_se_cancel_s_cmd(struct geni_se *se) in geni_se_cancel_s_cmd() argument
393 writel_relaxed(S_GENI_CMD_CANCEL, se->base + SE_GENI_S_CMD_CTRL_REG); in geni_se_cancel_s_cmd()
397 * geni_se_abort_m_cmd() - Abort the command configured in the primary sequencer
398 * @se: Pointer to the concerned serial engine.
403 static inline void geni_se_abort_m_cmd(struct geni_se *se) in geni_se_abort_m_cmd() argument
405 writel_relaxed(M_GENI_CMD_ABORT, se->base + SE_GENI_M_CMD_CTRL_REG); in geni_se_abort_m_cmd()
409 * geni_se_abort_s_cmd() - Abort the command configured in the secondary
411 * @se: Pointer to the concerned serial engine.
416 static inline void geni_se_abort_s_cmd(struct geni_se *se) in geni_se_abort_s_cmd() argument
418 writel_relaxed(S_GENI_CMD_ABORT, se->base + SE_GENI_S_CMD_CTRL_REG); in geni_se_abort_s_cmd()
422 * geni_se_get_tx_fifo_depth() - Get the TX fifo depth of the serial engine
424 * @se: Pointer to the concerned serial engine.
431 static inline u32 geni_se_get_tx_fifo_depth(struct geni_se *se) in geni_se_get_tx_fifo_depth() argument
435 hw_version = geni_se_get_qup_hw_version(se); in geni_se_get_tx_fifo_depth()
444 val = readl_relaxed(se->base + SE_HW_PARAM_0); in geni_se_get_tx_fifo_depth()
450 * geni_se_get_tx_fifo_width() - Get the TX fifo width of the serial engine
451 * @se: Pointer to the concerned serial engine.
458 static inline u32 geni_se_get_tx_fifo_width(struct geni_se *se) in geni_se_get_tx_fifo_width() argument
462 val = readl_relaxed(se->base + SE_HW_PARAM_0); in geni_se_get_tx_fifo_width()
468 * geni_se_get_rx_fifo_depth() - Get the RX fifo depth of the serial engine
470 * @se: Pointer to the concerned serial engine.
477 static inline u32 geni_se_get_rx_fifo_depth(struct geni_se *se) in geni_se_get_rx_fifo_depth() argument
481 hw_version = geni_se_get_qup_hw_version(se); in geni_se_get_rx_fifo_depth()
490 val = readl_relaxed(se->base + SE_HW_PARAM_1); in geni_se_get_rx_fifo_depth()
495 void geni_se_init(struct geni_se *se, u32 rx_wm, u32 rx_rfr);
497 void geni_se_select_mode(struct geni_se *se, enum geni_se_xfer_mode mode);
499 void geni_se_config_packing(struct geni_se *se, int bpw, int pack_words,
502 int geni_se_resources_off(struct geni_se *se);
504 int geni_se_resources_on(struct geni_se *se);
506 int geni_se_clk_tbl_get(struct geni_se *se, unsigned long **tbl);
508 int geni_se_clk_freq_match(struct geni_se *se, unsigned long req_freq,
512 void geni_se_tx_init_dma(struct geni_se *se, dma_addr_t iova, size_t len);
514 int geni_se_tx_dma_prep(struct geni_se *se, void *buf, size_t len,
517 void geni_se_rx_init_dma(struct geni_se *se, dma_addr_t iova, size_t len);
519 int geni_se_rx_dma_prep(struct geni_se *se, void *buf, size_t len,
522 void geni_se_tx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len);
524 void geni_se_rx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len);
526 int geni_icc_get(struct geni_se *se, const char *icc_ddr);
528 int geni_icc_set_bw(struct geni_se *se);
529 void geni_icc_set_tag(struct geni_se *se, u32 tag);
531 int geni_icc_enable(struct geni_se *se);
533 int geni_icc_disable(struct geni_se *se);