diff options
author | Sibi Sankar <sibis@codeaurora.org> | 2020-01-10 02:42:15 +0530 |
---|---|---|
committer | Georgi Djakov <georgi.djakov@linaro.org> | 2020-02-11 19:52:31 +0200 |
commit | 6760baa247a9cec3e1fbee2a297830c019b536a1 (patch) | |
tree | 0730c237e75aa36b226da796470a65aa9fd5a09b | |
parent | 41e592427d41529e5935cafdf631cbc1e19e3127 (diff) |
interconnect: qcom: Add OSM L3 support on SC7180
Add Operating State Manager (OSM) L3 interconnect provider support on
SC7180 SoCs.
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
-rw-r--r-- | drivers/interconnect/qcom/osm-l3.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/interconnect/qcom/osm-l3.c b/drivers/interconnect/qcom/osm-l3.c index 7fde53c70081..df2cec3fa291 100644 --- a/drivers/interconnect/qcom/osm-l3.c +++ b/drivers/interconnect/qcom/osm-l3.c @@ -28,6 +28,7 @@ #define OSM_L3_MAX_LINKS 1 #define SDM845_MAX_RSC_NODES 130 +#define SC7180_MAX_RSC_NODES 137 #define to_qcom_provider(_provider) \ container_of(_provider, struct qcom_osm_l3_icc_provider, provider) @@ -37,6 +38,11 @@ enum { SDM845_SLAVE_OSM_L3, }; +enum { + SC7180_MASTER_OSM_L3_APPS = SC7180_MAX_RSC_NODES + 1, + SC7180_SLAVE_OSM_L3, +}; + struct qcom_osm_l3_icc_provider { void __iomem *base; unsigned int max_state; @@ -87,6 +93,19 @@ 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, +}; + +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; @@ -248,6 +267,7 @@ err: } 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 }, { }, }; |