]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
firmware: ti_sci: Update ti_sci_cmd_rm_udmap_tx_ch_cfg() API to the latest
authorVignesh Raghavendra <vigneshr@ti.com>
Mon, 10 May 2021 14:36:02 +0000 (20:06 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Wed, 12 May 2021 11:06:38 +0000 (16:36 +0530)
Update struct ti_sci_msg_rm_udmap_tx_ch_cfg_req to latest ABI to support
AM64x BCDMA Block copy channels.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
drivers/firmware/ti_sci.c
drivers/firmware/ti_sci.h
include/linux/soc/ti/ti_sci_protocol.h

index 0cdfb0e91a95e4854b2b4bdd32bae9e30a842dcb..2aec2e34d3038890dd4306ec0501d6d02ee4f276 100644 (file)
@@ -2466,6 +2466,9 @@ static int ti_sci_cmd_rm_udmap_tx_ch_cfg(
        req.tx_orderid = params->tx_orderid;
        req.fdepth = params->fdepth;
        req.tx_sched_priority = params->tx_sched_priority;
+       req.tx_burst_size = params->tx_burst_size;
+       req.tx_tdtype = params->tx_tdtype;
+       req.extended_ch_type = params->extended_ch_type;
 
        ret = ti_sci_do_xfer(info, xfer);
        if (ret) {
index 327bb820f3a7f5ba5828b566b4a4434464f74a53..eec488f065092e2314b250f288e441ae5b6fabf6 100644 (file)
@@ -998,6 +998,9 @@ struct ti_sci_msg_psil_unpair {
  *   11 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_supr_tdpkt
  *   12 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_credit_count
  *   13 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::fdepth
+ *   14 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_burst_size
+ *   15 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_tdtype
+ *   16 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::extended_ch_type
  *
  * @nav_id: SoC device ID of Navigator Subsystem where tx channel is located
  *
@@ -1058,6 +1061,18 @@ struct ti_sci_msg_psil_unpair {
  * @tx_sched_priority: UDMAP transmit channel tx scheduling priority
  * configuration to be programmed into the priority field of the channel's
  * TCHAN_TST_SCHED register.
+ *
+ * @tx_burst_size: UDMAP transmit channel burst size configuration to be
+ * programmed into the tx_burst_size field of the TCHAN_TCFG register.
+ *
+ * @tx_tdtype: UDMAP transmit channel teardown type configuration to be
+ * programmed into the tdtype field of the TCHAN_TCFG register:
+ * 0 - Return immediately
+ * 1 - Wait for completion message from remote peer
+ *
+ * @extended_ch_type: Valid for BCDMA.
+ * 0 - the channel is split tx channel (tchan)
+ * 1 - the channel is block copy channel (bchan)
  */
 struct ti_sci_msg_rm_udmap_tx_ch_cfg_req {
        struct ti_sci_msg_hdr hdr;
@@ -1078,6 +1093,9 @@ struct ti_sci_msg_rm_udmap_tx_ch_cfg_req {
        u8 tx_orderid;
        u16 fdepth;
        u8 tx_sched_priority;
+       u8 tx_burst_size;
+       u8 tx_tdtype;
+       u8 extended_ch_type;
 } __packed;
 
 /**
index eb916ba10194bc51479be53d9665271cf95af4b1..794737923cf1bdddfc1a2492abbd0dde28aac1ba 100644 (file)
@@ -379,6 +379,13 @@ struct ti_sci_rm_psil_ops {
 #define TI_SCI_RM_UDMAP_RX_FLOW_DESC_HOST              0
 #define TI_SCI_RM_UDMAP_RX_FLOW_DESC_MONO              2
 
+#define TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_64_BYTES       1
+#define TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_128_BYTES      2
+#define TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_256_BYTES      3
+
+#define TI_SCI_RM_BCDMA_EXTENDED_CH_TYPE_TCHAN         0
+#define TI_SCI_RM_BCDMA_EXTENDED_CH_TYPE_BCHAN         1
+
 /* UDMAP TX/RX channel valid_params common declarations */
 #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_PAUSE_ON_ERR_VALID                BIT(0)
 #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_ATYPE_VALID                BIT(1)
@@ -389,6 +396,7 @@ struct ti_sci_rm_psil_ops {
 #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_QOS_VALID                  BIT(6)
 #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_ORDER_ID_VALID             BIT(7)
 #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_SCHED_PRIORITY_VALID       BIT(8)
+#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_BURST_SIZE_VALID          BIT(14)
 
 /**
  * Configures a Navigator Subsystem UDMAP transmit channel
@@ -403,6 +411,8 @@ struct ti_sci_msg_rm_udmap_tx_ch_cfg {
 #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_SUPR_TDPKT_VALID        BIT(11)
 #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_CREDIT_COUNT_VALID      BIT(12)
 #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_FDEPTH_VALID            BIT(13)
+#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_TDTYPE_VALID            BIT(15)
+#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_EXTENDED_CH_TYPE_VALID    BIT(16)
        u16 nav_id;
        u16 index;
        u8 tx_pause_on_err;
@@ -419,6 +429,9 @@ struct ti_sci_msg_rm_udmap_tx_ch_cfg {
        u8 tx_orderid;
        u16 fdepth;
        u8 tx_sched_priority;
+       u8 tx_burst_size;
+       u8 tx_tdtype;
+       u8 extended_ch_type;
 };
 
 /**
@@ -448,6 +461,7 @@ struct ti_sci_msg_rm_udmap_rx_ch_cfg {
        u8 rx_chan_type;
        u8 rx_ignore_short;
        u8 rx_ignore_long;
+       u8 rx_burst_size;
 };
 
 /**