Skip to content

Commit

Permalink
interconnect: qcom: Add OSM L3 support on SC7180
Browse files Browse the repository at this point in the history
Add Operating State Manager (OSM) L3 interconnect provider support on
SC7180 SoCs.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Link: https://lore.kernel.org/r/20200227105632.15041-6-sibis@codeaurora.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
  • Loading branch information
Sibi Sankar authored and Georgi Djakov committed Mar 3, 2020
1 parent ff3edec commit 03c4e61
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/interconnect/qcom/osm-l3.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <dt-bindings/interconnect/qcom,osm-l3.h>

#include "sc7180.h"
#include "sdm845.h"

#define LUT_MAX_ENTRIES 40U
Expand Down Expand Up @@ -82,6 +83,19 @@ const static struct qcom_icc_desc sdm845_icc_osm_l3 = {
.num_nodes = ARRAY_SIZE(sdm845_osm_l3_nodes),
};

DEFINE_QNODE(sc7180_osm_apps_l3, SC7180_MASTER_OSM_L3_APPS, 16, SC7180_SLAVE_OSM_L3);
DEFINE_QNODE(sc7180_osm_l3, SC7180_SLAVE_OSM_L3, 16);

static struct qcom_icc_node *sc7180_osm_l3_nodes[] = {
[MASTER_OSM_L3_APPS] = &sc7180_osm_apps_l3,
[SLAVE_OSM_L3] = &sc7180_osm_l3,
};

const static struct qcom_icc_desc sc7180_icc_osm_l3 = {
.nodes = sc7180_osm_l3_nodes,
.num_nodes = ARRAY_SIZE(sc7180_osm_l3_nodes),
};

static int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
{
struct qcom_osm_l3_icc_provider *qp;
Expand Down Expand Up @@ -242,6 +256,7 @@ static int qcom_osm_l3_probe(struct platform_device *pdev)
}

static const struct of_device_id osm_l3_of_match[] = {
{ .compatible = "qcom,sc7180-osm-l3", .data = &sc7180_icc_osm_l3 },
{ .compatible = "qcom,sdm845-osm-l3", .data = &sdm845_icc_osm_l3 },
{ }
};
Expand Down
2 changes: 2 additions & 0 deletions drivers/interconnect/qcom/sc7180.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,7 @@
#define SC7180_SLAVE_SERVICE_SNOC 134
#define SC7180_SLAVE_QDSS_STM 135
#define SC7180_SLAVE_TCU 136
#define SC7180_MASTER_OSM_L3_APPS 137
#define SC7180_SLAVE_OSM_L3 138

#endif

0 comments on commit 03c4e61

Please sign in to comment.