/** * enum geni_se_xfer_mode: Transfer modes supported by Serial Engines * * @GENI_SE_INVALID: Invalid mode * @GENI_SE_FIFO: FIFO mode. Data is transferred with SE FIFO * by programmed IO method * @GENI_SE_DMA: Serial Engine DMA mode. Data is transferred * with SE by DMAengine internal to SE * @GENI_GPI_DMA: GPI DMA mode. Data is transferred using a DMAengine * configured by a firmware residing on a GSI engine. This DMA name is * interchangeably used as GSI or GPI which seem to imply the same DMAengine
*/
/** * struct geni_se - GENI Serial Engine * @base: Base Address of the Serial Engine's register block * @dev: Pointer to the Serial Engine device * @wrapper: Pointer to the parent QUP Wrapper core * @clk: Handle to the core serial engine clock * @num_clk_levels: Number of valid clock levels in clk_perf_tbl * @clk_perf_tbl: Table of clock frequency input to serial engine clock * @icc_paths: Array of ICC paths for SE
*/ struct geni_se { void __iomem *base; struct device *dev; struct geni_wrapper *wrapper; struct clk *clk; unsignedint num_clk_levels; unsignedlong *clk_perf_tbl; struct geni_icc_path icc_paths[3];
};
/* QUP SE VERSION value for major number 2 and minor number 5 */ #define QUP_SE_VERSION_2_5 0x20050000
/* * Define bandwidth thresholds that cause the underlying Core 2X interconnect * clock to run at the named frequency. These baseline values are recommended * by the hardware team, and are not dynamically scaled with GENI bandwidth * beyond basic on/off.
*/ #define CORE_2X_19_2_MHZ 960 #define CORE_2X_50_MHZ 2500 #define CORE_2X_100_MHZ 5000 #define CORE_2X_150_MHZ 7500 #define CORE_2X_200_MHZ 10000 #define CORE_2X_236_MHZ 16383
/** * geni_se_read_proto() - Read the protocol configured for a serial engine * @se: Pointer to the concerned serial engine. * * Return: Protocol value as configured in the serial engine.
*/ staticinline u32 geni_se_read_proto(struct geni_se *se)
{
u32 val;
val = readl_relaxed(se->base + GENI_FW_REVISION_RO);
/** * geni_se_setup_m_cmd() - Setup the primary sequencer * @se: Pointer to the concerned serial engine. * @cmd: Command/Operation to setup in the primary sequencer. * @params: Parameter for the sequencer command. * * This function is used to configure the primary sequencer with the * command and its associated parameters.
*/ staticinlinevoid geni_se_setup_m_cmd(struct geni_se *se, u32 cmd, u32 params)
{
u32 m_cmd;
/** * geni_se_setup_s_cmd() - Setup the secondary sequencer * @se: Pointer to the concerned serial engine. * @cmd: Command/Operation to setup in the secondary sequencer. * @params: Parameter for the sequencer command. * * This function is used to configure the secondary sequencer with the * command and its associated parameters.
*/ staticinlinevoid geni_se_setup_s_cmd(struct geni_se *se, u32 cmd, u32 params)
{
u32 s_cmd;
/** * geni_se_cancel_m_cmd() - Cancel the command configured in the primary * sequencer * @se: Pointer to the concerned serial engine. * * This function is used to cancel the currently configured command in the * primary sequencer.
*/ staticinlinevoid geni_se_cancel_m_cmd(struct geni_se *se)
{
writel_relaxed(M_GENI_CMD_CANCEL, se->base + SE_GENI_M_CMD_CTRL_REG);
}
/** * geni_se_cancel_s_cmd() - Cancel the command configured in the secondary * sequencer * @se: Pointer to the concerned serial engine. * * This function is used to cancel the currently configured command in the * secondary sequencer.
*/ staticinlinevoid geni_se_cancel_s_cmd(struct geni_se *se)
{
writel_relaxed(S_GENI_CMD_CANCEL, se->base + SE_GENI_S_CMD_CTRL_REG);
}
/** * geni_se_abort_m_cmd() - Abort the command configured in the primary sequencer * @se: Pointer to the concerned serial engine. * * This function is used to force abort the currently configured command in the * primary sequencer.
*/ staticinlinevoid geni_se_abort_m_cmd(struct geni_se *se)
{
writel_relaxed(M_GENI_CMD_ABORT, se->base + SE_GENI_M_CMD_CTRL_REG);
}
/** * geni_se_abort_s_cmd() - Abort the command configured in the secondary * sequencer * @se: Pointer to the concerned serial engine. * * This function is used to force abort the currently configured command in the * secondary sequencer.
*/ staticinlinevoid geni_se_abort_s_cmd(struct geni_se *se)
{
writel_relaxed(S_GENI_CMD_ABORT, se->base + SE_GENI_S_CMD_CTRL_REG);
}
/** * geni_se_get_tx_fifo_depth() - Get the TX fifo depth of the serial engine * based on QUP HW version * @se: Pointer to the concerned serial engine. * * This function is used to get the depth i.e. number of elements in the * TX fifo of the serial engine. * * Return: TX fifo depth in units of FIFO words.
*/ staticinline u32 geni_se_get_tx_fifo_depth(struct geni_se *se)
{
u32 val, hw_version, hw_major, hw_minor, tx_fifo_depth_mask;
/** * geni_se_get_tx_fifo_width() - Get the TX fifo width of the serial engine * @se: Pointer to the concerned serial engine. * * This function is used to get the width i.e. word size per element in the * TX fifo of the serial engine. * * Return: TX fifo width in bits
*/ staticinline u32 geni_se_get_tx_fifo_width(struct geni_se *se)
{
u32 val;
/** * geni_se_get_rx_fifo_depth() - Get the RX fifo depth of the serial engine * based on QUP HW version * @se: Pointer to the concerned serial engine. * * This function is used to get the depth i.e. number of elements in the * RX fifo of the serial engine. * * Return: RX fifo depth in units of FIFO words
*/ staticinline u32 geni_se_get_rx_fifo_depth(struct geni_se *se)
{
u32 val, hw_version, hw_major, hw_minor, rx_fifo_depth_mask;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.