Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e999097 authored by Prudhvi Yarlagadda's avatar Prudhvi Yarlagadda Committed by Gerrit - the friendly Code Review server
Browse files

qcom-geni-se: Convert agrregate ab/ib into actual bandwidth



Multiply aggregate ab/ib of corex/2x QUP clock with 20000x4 to
convert them into actual required bandwidth.

Change-Id: Icfc694aff6a0ac537ecb544e792f400c6a3346f1
Signed-off-by: default avatarPrudhvi Yarlagadda <pyarlaga@codeaurora.org>
parent fe47cf3d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@
#define GENI_SE_DMA_PTR_H(ptr) 0
#endif

/* Convert BCM threshold to actual frequency x 4 */
#define CONV_TO_BW(x) (x*20000*4)
#define NUM_LOG_PAGES 2
#define MAX_CLK_PERF_LEVEL 32
static unsigned long default_bus_bw_set[] = {0, 19200000, 50000000,
@@ -732,9 +734,9 @@ static int geni_se_rmv_ab_ib(struct geni_se_device *geni_se_dev,

	if (geni_se_dev->num_paths == 2) {
		geni_se_dev->pdata->usecase[1].vectors[0].ab  =
			geni_se_dev->cur_ab;
			CONV_TO_BW(geni_se_dev->cur_ab);
		geni_se_dev->pdata->usecase[1].vectors[0].ib  =
			geni_se_dev->cur_ib;
			CONV_TO_BW(geni_se_dev->cur_ib);
	}

	if (bus_bw_update && geni_se_dev->num_paths != 2)
@@ -879,9 +881,9 @@ static int geni_se_add_ab_ib(struct geni_se_device *geni_se_dev,

	if (geni_se_dev->num_paths == 2) {
		geni_se_dev->pdata->usecase[1].vectors[0].ab  =
			geni_se_dev->cur_ab;
			CONV_TO_BW(geni_se_dev->cur_ab);
		geni_se_dev->pdata->usecase[1].vectors[0].ib  =
			geni_se_dev->cur_ib;
			CONV_TO_BW(geni_se_dev->cur_ib);
	}

	if (bus_bw_update && geni_se_dev->num_paths != 2)