Skip to content

Commit

Permalink
Merge tag 'icc-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/djakov/icc into char-misc-next

Georgi writes:

interconnect changes for 5.18

These are the interconnect changes for the 5.18-rc1 merge window
consisting of minor framework and driver updates.

Core changes:
 - Added stubs for the bulk API to expand compile testing coverage.

Driver changes:
 - imx: Implemented get_bw() function to get initial avg/peak bandwidth.
 - msm8939: Fix ioremap collision for snoc-mm.

Signed-off-by: Georgi Djakov <djakov@kernel.org>

* tag 'icc-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: Add stubs for the bulk API
  interconnect: qcom: msm8939: Remove snoc_mm specific regmap
  dt-bindings: interconnect: Convert snoc-mm to a sub-node of snoc
  interconnect: imx: Add imx_icc_get_bw function to set initial avg and peak
  • Loading branch information
gregkh committed Mar 11, 2022
2 parents 9edcfaa + 52c8516 commit d6cd2f8
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 18 deletions.
33 changes: 31 additions & 2 deletions Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ properties:
- qcom,msm8939-bimc
- qcom,msm8939-pcnoc
- qcom,msm8939-snoc
- qcom,msm8939-snoc-mm
- qcom,msm8996-a0noc
- qcom,msm8996-a1noc
- qcom,msm8996-a2noc
Expand Down Expand Up @@ -80,7 +79,6 @@ allOf:
- qcom,msm8939-bimc
- qcom,msm8939-pcnoc
- qcom,msm8939-snoc
- qcom,msm8939-snoc-mm
- qcom,msm8996-a1noc
- qcom,msm8996-a2noc
- qcom,msm8996-bimc
Expand All @@ -107,6 +105,37 @@ allOf:
- description: Bus Clock
- description: Bus A Clock

# Child node's properties
patternProperties:
'^interconnect-[a-z0-9]+$':
type: object
description:
snoc-mm is a child of snoc, sharing snoc's register address space.

properties:
compatible:
enum:
- qcom,msm8939-snoc-mm

'#interconnect-cells':
const: 1

clock-names:
items:
- const: bus
- const: bus_a

clocks:
items:
- description: Bus Clock
- description: Bus A Clock

required:
- compatible
- '#interconnect-cells'
- clock-names
- clocks

- if:
properties:
compatible:
Expand Down
9 changes: 9 additions & 0 deletions drivers/interconnect/imx/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ struct imx_icc_node {
struct dev_pm_qos_request qos_req;
};

static int imx_icc_get_bw(struct icc_node *node, u32 *avg, u32 *peak)
{
*avg = 0;
*peak = 0;

return 0;
}

static int imx_icc_node_set(struct icc_node *node)
{
struct device *dev = node->provider->dev;
Expand Down Expand Up @@ -241,6 +249,7 @@ int imx_icc_register(struct platform_device *pdev,
if (!provider)
return -ENOMEM;
provider->set = imx_icc_set;
provider->get_bw = imx_icc_get_bw;
provider->aggregate = icc_std_aggregate;
provider->xlate = of_icc_xlate_onecell;
provider->data = data;
Expand Down
10 changes: 1 addition & 9 deletions drivers/interconnect/qcom/msm8939.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,19 +1301,11 @@ static struct qcom_icc_node *msm8939_snoc_mm_nodes[] = {
[SNOC_MM_INT_2] = &mm_int_2,
};

static const struct regmap_config msm8939_snoc_mm_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
.val_bits = 32,
.max_register = 0x14080,
.fast_io = true,
};

static struct qcom_icc_desc msm8939_snoc_mm = {
.type = QCOM_ICC_NOC,
.nodes = msm8939_snoc_mm_nodes,
.num_nodes = ARRAY_SIZE(msm8939_snoc_mm_nodes),
.regmap_cfg = &msm8939_snoc_mm_regmap_config,
.regmap_cfg = &msm8939_snoc_regmap_config,
.qos_offset = 0x7000,
};

Expand Down
36 changes: 29 additions & 7 deletions include/linux/interconnect.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ struct icc_bulk_data {
u32 peak_bw;
};

int __must_check of_icc_bulk_get(struct device *dev, int num_paths,
struct icc_bulk_data *paths);
void icc_bulk_put(int num_paths, struct icc_bulk_data *paths);
int icc_bulk_set_bw(int num_paths, const struct icc_bulk_data *paths);
int icc_bulk_enable(int num_paths, const struct icc_bulk_data *paths);
void icc_bulk_disable(int num_paths, const struct icc_bulk_data *paths);

#if IS_ENABLED(CONFIG_INTERCONNECT)

struct icc_path *icc_get(struct device *dev, const int src_id,
Expand All @@ -58,6 +51,12 @@ int icc_disable(struct icc_path *path);
int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw);
void icc_set_tag(struct icc_path *path, u32 tag);
const char *icc_get_name(struct icc_path *path);
int __must_check of_icc_bulk_get(struct device *dev, int num_paths,
struct icc_bulk_data *paths);
void icc_bulk_put(int num_paths, struct icc_bulk_data *paths);
int icc_bulk_set_bw(int num_paths, const struct icc_bulk_data *paths);
int icc_bulk_enable(int num_paths, const struct icc_bulk_data *paths);
void icc_bulk_disable(int num_paths, const struct icc_bulk_data *paths);

#else

Expand Down Expand Up @@ -112,6 +111,29 @@ static inline const char *icc_get_name(struct icc_path *path)
return NULL;
}

static inline int of_icc_bulk_get(struct device *dev, int num_paths, struct icc_bulk_data *paths)
{
return 0;
}

static inline void icc_bulk_put(int num_paths, struct icc_bulk_data *paths)
{
}

static inline int icc_bulk_set_bw(int num_paths, const struct icc_bulk_data *paths)
{
return 0;
}

static inline int icc_bulk_enable(int num_paths, const struct icc_bulk_data *paths)
{
return 0;
}

static inline void icc_bulk_disable(int num_paths, const struct icc_bulk_data *paths)
{
}

#endif /* CONFIG_INTERCONNECT */

#endif /* __LINUX_INTERCONNECT_H */

0 comments on commit d6cd2f8

Please sign in to comment.