mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
soc: qcom: geni-se: Add geni_icc_set_bw_ab() function
Add a new function geni_icc_set_bw_ab() that allows callers to set average bandwidth values for all ICC (Interconnect) paths in a single call. This function takes separate parameters for core, config, and DDR average bandwidth values and applies them to the respective ICC paths. This provides a more convenient API for drivers that need to configure specific average bandwidth values. Co-developed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com> Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org> Link: https://lore.kernel.org/r/20260227061544.1785978-3-praveen.talari@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
committed by
Bjorn Andersson
parent
e231930279
commit
f746fedb89
@@ -946,6 +946,28 @@ int geni_icc_set_bw(struct geni_se *se)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(geni_icc_set_bw);
|
||||
|
||||
/**
|
||||
* geni_icc_set_bw_ab() - Set average bandwidth for all ICC paths and apply
|
||||
* @se: Pointer to the concerned serial engine.
|
||||
* @core_ab: Average bandwidth in kBps for GENI_TO_CORE path.
|
||||
* @cfg_ab: Average bandwidth in kBps for CPU_TO_GENI path.
|
||||
* @ddr_ab: Average bandwidth in kBps for GENI_TO_DDR path.
|
||||
*
|
||||
* Sets bandwidth values for all ICC paths and applies them. DDR path is
|
||||
* optional and only set if it exists.
|
||||
*
|
||||
* Return: 0 on success, negative error code on failure.
|
||||
*/
|
||||
int geni_icc_set_bw_ab(struct geni_se *se, u32 core_ab, u32 cfg_ab, u32 ddr_ab)
|
||||
{
|
||||
se->icc_paths[GENI_TO_CORE].avg_bw = core_ab;
|
||||
se->icc_paths[CPU_TO_GENI].avg_bw = cfg_ab;
|
||||
se->icc_paths[GENI_TO_DDR].avg_bw = ddr_ab;
|
||||
|
||||
return geni_icc_set_bw(se);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(geni_icc_set_bw_ab);
|
||||
|
||||
void geni_icc_set_tag(struct geni_se *se, u32 tag)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -528,6 +528,7 @@ void geni_se_rx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len);
|
||||
int geni_icc_get(struct geni_se *se, const char *icc_ddr);
|
||||
|
||||
int geni_icc_set_bw(struct geni_se *se);
|
||||
int geni_icc_set_bw_ab(struct geni_se *se, u32 core_ab, u32 cfg_ab, u32 ddr_ab);
|
||||
void geni_icc_set_tag(struct geni_se *se, u32 tag);
|
||||
|
||||
int geni_icc_enable(struct geni_se *se);
|
||||
|
||||
Reference in New Issue
Block a user