Commit d6cd2f85 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'icc-5.18-rc1' of...

Merge tag 'icc-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/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: default avatarGeorgi 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
parents 9edcfaa3 52c85167
Loading
Loading
Loading
Loading
+31 −2
Original line number Diff line number Diff line
@@ -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
@@ -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
@@ -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:
+9 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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;
+1 −9
Original line number Diff line number Diff line
@@ -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,
};

+29 −7
Original line number Diff line number Diff line
@@ -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,
@@ -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

@@ -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 */