Loading Documentation/devicetree/bindings/bus/mhi.txt +7 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,13 @@ mhi channel node properties: Definition: Time sensitive data channel, host should process all pending data before system suspend. - mhi,chan-type Usage: optional Value type: <u32> Definition: By default, chan-type is same as 'chan,dir' property except in some special channels, chan type supplement chan direction. 3 = default no direction, or inbound coalesced channel ========================== mhi event node properties: ========================== Loading drivers/bus/mhi/core/mhi_init.c +10 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ int mhi_init_dev_ctxt(struct mhi_controller *mhi_cntrl) chan_ctxt->chstate = MHI_CH_STATE_DISABLED; chan_ctxt->brstmode = mhi_chan->db_cfg.brstmode; chan_ctxt->pollcfg = mhi_chan->db_cfg.pollcfg; chan_ctxt->chtype = mhi_chan->dir; chan_ctxt->chtype = mhi_chan->type; chan_ctxt->erindex = mhi_chan->er_index; mhi_chan->ch_state = MHI_CH_STATE_DISABLED; Loading Loading @@ -940,6 +940,15 @@ static int of_parse_ch_cfg(struct mhi_controller *mhi_cntrl, if (ret) goto error_chan_cfg; /* * For most channels, chtype is identical to channel directions, * if not defined, assign ch direction to chtype */ ret = of_property_read_u32(child, "mhi,chan-type", &mhi_chan->type); if (ret) mhi_chan->type = (enum mhi_ch_type)mhi_chan->dir; ret = of_property_read_u32(child, "mhi,ee", &mhi_chan->ee_mask); if (ret) goto error_chan_cfg; Loading drivers/bus/mhi/core/mhi_internal.h +8 −0 Original line number Diff line number Diff line Loading @@ -484,6 +484,13 @@ enum mhi_ch_ee_mask { MHI_CH_EE_EDL = BIT(MHI_EE_EDL), }; enum mhi_ch_type { MHI_CH_TYPE_INVALID = 0, MHI_CH_TYPE_OUTBOUND = DMA_TO_DEVICE, MHI_CH_TYPE_INBOUND = DMA_FROM_DEVICE, MHI_CH_TYPE_INBOUND_COALESCED = 3, }; struct db_cfg { bool reset_req; bool db_mode; Loading Loading @@ -577,6 +584,7 @@ struct mhi_chan { struct mhi_ring tre_ring; u32 er_index; u32 intmod; enum mhi_ch_type type; enum dma_data_direction dir; struct db_cfg db_cfg; u32 ee_mask; Loading Loading
Documentation/devicetree/bindings/bus/mhi.txt +7 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,13 @@ mhi channel node properties: Definition: Time sensitive data channel, host should process all pending data before system suspend. - mhi,chan-type Usage: optional Value type: <u32> Definition: By default, chan-type is same as 'chan,dir' property except in some special channels, chan type supplement chan direction. 3 = default no direction, or inbound coalesced channel ========================== mhi event node properties: ========================== Loading
drivers/bus/mhi/core/mhi_init.c +10 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ int mhi_init_dev_ctxt(struct mhi_controller *mhi_cntrl) chan_ctxt->chstate = MHI_CH_STATE_DISABLED; chan_ctxt->brstmode = mhi_chan->db_cfg.brstmode; chan_ctxt->pollcfg = mhi_chan->db_cfg.pollcfg; chan_ctxt->chtype = mhi_chan->dir; chan_ctxt->chtype = mhi_chan->type; chan_ctxt->erindex = mhi_chan->er_index; mhi_chan->ch_state = MHI_CH_STATE_DISABLED; Loading Loading @@ -940,6 +940,15 @@ static int of_parse_ch_cfg(struct mhi_controller *mhi_cntrl, if (ret) goto error_chan_cfg; /* * For most channels, chtype is identical to channel directions, * if not defined, assign ch direction to chtype */ ret = of_property_read_u32(child, "mhi,chan-type", &mhi_chan->type); if (ret) mhi_chan->type = (enum mhi_ch_type)mhi_chan->dir; ret = of_property_read_u32(child, "mhi,ee", &mhi_chan->ee_mask); if (ret) goto error_chan_cfg; Loading
drivers/bus/mhi/core/mhi_internal.h +8 −0 Original line number Diff line number Diff line Loading @@ -484,6 +484,13 @@ enum mhi_ch_ee_mask { MHI_CH_EE_EDL = BIT(MHI_EE_EDL), }; enum mhi_ch_type { MHI_CH_TYPE_INVALID = 0, MHI_CH_TYPE_OUTBOUND = DMA_TO_DEVICE, MHI_CH_TYPE_INBOUND = DMA_FROM_DEVICE, MHI_CH_TYPE_INBOUND_COALESCED = 3, }; struct db_cfg { bool reset_req; bool db_mode; Loading Loading @@ -577,6 +584,7 @@ struct mhi_chan { struct mhi_ring tre_ring; u32 er_index; u32 intmod; enum mhi_ch_type type; enum dma_data_direction dir; struct db_cfg db_cfg; u32 ee_mask; Loading