From: Georgi Djakov <djakov@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: AngeloGioacchino Del Regno
<angelogioacchino.delregno@somainline.org>,
Shawn Guo <shawn.guo@linaro.org>,
Yassine Oudjana <y.oudjana@protonmail.com>,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 04/11] interconnect: sdm660: merge common code into icc-rpm
Date: Mon, 4 Oct 2021 14:54:33 +0300 [thread overview]
Message-ID: <2eb2a06c-4edc-517c-f860-40079b12dd01@kernel.org> (raw)
In-Reply-To: <20210903232421.1384199-5-dmitry.baryshkov@linaro.org>
Hi Dmitry,
On 4.09.21 2:24, Dmitry Baryshkov wrote:
> Other RPM interconnect drivers might also use QoS support. Move AP-owned
> nodes support from SDM660 driver to common icc-rpm.c.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/interconnect/qcom/icc-rpm.c | 241 ++++++++++++--
> drivers/interconnect/qcom/icc-rpm.h | 42 ++-
> drivers/interconnect/qcom/sdm660.c | 485 ++--------------------------
> 3 files changed, 274 insertions(+), 494 deletions(-)
>
[..]> /**
> * struct qcom_icc_node - Qualcomm specific interconnect nodes
> * @name: the node name used in debugfs
> @@ -35,36 +55,48 @@ struct qcom_icc_provider {
> * @buswidth: width of the interconnect between a node and the bus (bytes)
> * @mas_rpm_id: RPM id for devices that are bus masters
> * @slv_rpm_id: RPM id for devices that are bus slaves
> + * @qos: NoC QoS setting parameters
> * @rate: current bus clock rate in Hz
> */
> struct qcom_icc_node {
> unsigned char *name;
> u16 id;
> - u16 links[QCOM_MAX_LINKS];
> + const u16 *links;
> u16 num_links;
> u16 buswidth;
> int mas_rpm_id;
> int slv_rpm_id;
> + struct qcom_icc_qos qos;
> u64 rate;
> };
>
> struct qcom_icc_desc {
> struct qcom_icc_node **nodes;
> size_t num_nodes;
> + const char ** clocks;
To match with what you have in patch [1/11], this should be
const char * const *clocks;
> + size_t num_clocks;
> + bool is_bimc_node;
> + const struct regmap_config *regmap_cfg;
> };
>
> #define DEFINE_QNODE(_name, _id, _buswidth, _mas_rpm_id, _slv_rpm_id, \
> ...) \
> + static const u16 _name ## _links[] = { __VA_ARGS__ }; \
> + \
> static struct qcom_icc_node _name = { \
> .name = #_name, \
> .id = _id, \
> .buswidth = _buswidth, \
> .mas_rpm_id = _mas_rpm_id, \
> .slv_rpm_id = _slv_rpm_id, \
> - .num_links = ARRAY_SIZE(((int[]){ __VA_ARGS__ })), \
> - .links = { __VA_ARGS__ }, \
> + .num_links = ARRAY_SIZE(_name ## _links), \
> + .links = _name ## _links, \
> }
>
> +/* Valid for both NoC and BIMC */
> +#define NOC_QOS_MODE_INVALID -1
> +#define NOC_QOS_MODE_FIXED 0x0
> +#define NOC_QOS_MODE_BYPASS 0x2
>
> int qnoc_probe(struct platform_device *pdev);
> int qnoc_remove(struct platform_device *pdev);
> diff --git a/drivers/interconnect/qcom/sdm660.c b/drivers/interconnect/qcom/sdm660.c
> index 4a72f9677d4e..384dd3661757 100644
> --- a/drivers/interconnect/qcom/sdm660.c
> +++ b/drivers/interconnect/qcom/sdm660.c
> @@ -16,42 +16,9 @@
> #include <linux/regmap.h>
> #include <linux/slab.h>
>
> +#include "icc-rpm.h"
> #include "smd-rpm.h"
>
> -#define RPM_BUS_MASTER_REQ 0x73616d62
> -#define RPM_BUS_SLAVE_REQ 0x766c7362
> -
> -/* BIMC QoS */
> -#define M_BKE_REG_BASE(n) (0x300 + (0x4000 * n))
> -#define M_BKE_EN_ADDR(n) (M_BKE_REG_BASE(n))
> -#define M_BKE_HEALTH_CFG_ADDR(i, n) (M_BKE_REG_BASE(n) + 0x40 + (0x4 * i))
> -
> -#define M_BKE_HEALTH_CFG_LIMITCMDS_MASK 0x80000000
> -#define M_BKE_HEALTH_CFG_AREQPRIO_MASK 0x300
> -#define M_BKE_HEALTH_CFG_PRIOLVL_MASK 0x3
> -#define M_BKE_HEALTH_CFG_AREQPRIO_SHIFT 0x8
> -#define M_BKE_HEALTH_CFG_LIMITCMDS_SHIFT 0x1f
> -
> -#define M_BKE_EN_EN_BMASK 0x1
> -
> -/* Valid for both NoC and BIMC */
> -#define NOC_QOS_MODE_INVALID -1
> -#define NOC_QOS_MODE_FIXED 0x0
> -#define NOC_QOS_MODE_LIMITER 0x1
> -#define NOC_QOS_MODE_BYPASS 0x2
> -
> -/* NoC QoS */
> -#define NOC_PERM_MODE_FIXED 1
> -#define NOC_PERM_MODE_BYPASS (1 << NOC_QOS_MODE_BYPASS)
> -
> -#define NOC_QOS_PRIORITYn_ADDR(n) (0x8 + (n * 0x1000))
> -#define NOC_QOS_PRIORITY_P1_MASK 0xc
> -#define NOC_QOS_PRIORITY_P0_MASK 0x3
> -#define NOC_QOS_PRIORITY_P1_SHIFT 0x2
> -
> -#define NOC_QOS_MODEn_ADDR(n) (0xc + (n * 0x1000))
> -#define NOC_QOS_MODEn_MASK 0x3
> -
> enum {
> SDM660_MASTER_IPA = 1,
> SDM660_MASTER_CNOC_A2NOC,
> @@ -160,94 +127,20 @@ enum {
> SDM660_SNOC,
> };
>
> -#define to_qcom_provider(_provider) \
> - container_of(_provider, struct qcom_icc_provider, provider)
> -
> -static const struct clk_bulk_data bus_clocks[] = {
> - { .id = "bus" },
> - { .id = "bus_a" },
> +static const char * bus_mm_clocks[] = {
Should be:
static const char * const bus_mm_clocks[] = {
> + "bus",
> + "bus_a",
> + "iface",
> };
>
> -static const struct clk_bulk_data bus_mm_clocks[] = {
> - { .id = "bus" },
> - { .id = "bus_a" },
> - { .id = "iface" },
> -};
> -
> -static const struct clk_bulk_data bus_a2noc_clocks[] = {
> - { .id = "bus" },
> - { .id = "bus_a" },
> - { .id = "ipa" },
> - { .id = "ufs_axi" },
> - { .id = "aggre2_ufs_axi" },
> - { .id = "aggre2_usb3_axi" },
> - { .id = "cfg_noc_usb2_axi" },
> -};
> -
[..]
> -
> -struct qcom_icc_desc {
> - struct qcom_icc_node **nodes;
> - size_t num_nodes;
> - const struct regmap_config *regmap_cfg;
> +static const char * bus_a2noc_clocks[] = {
Again:
static const char * const bus_a2noc_clocks[] = {
> + "bus",
> + "bus_a",
> + "ipa",
> + "ufs_axi",
> + "aggre2_ufs_axi",
> + "aggre2_usb3_axi",
> + "cfg_noc_usb2_axi",
> };
>
The rest looks good to me!
Thanks,
Georgi
next prev parent reply other threads:[~2021-10-04 11:54 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-03 23:24 [PATCH v2 0/11] interconnect: merge AP-owned support into icc-rpm Dmitry Baryshkov
2021-09-03 23:24 ` [PATCH v2 01/11] interconnect: icc-rpm: move bus clocks handling into qnoc_probe Dmitry Baryshkov
2021-09-04 10:58 ` AngeloGioacchino Del Regno
2021-09-04 11:04 ` Marijn Suijten
2021-10-04 11:49 ` Georgi Djakov
2021-09-03 23:24 ` [PATCH v2 02/11] interconnect: sdm660: expand DEFINE_QNODE macros Dmitry Baryshkov
2021-09-04 10:58 ` AngeloGioacchino Del Regno
2021-09-04 10:58 ` AngeloGioacchino Del Regno
2021-09-04 11:05 ` Marijn Suijten
2021-09-03 23:24 ` [PATCH v2 03/11] interconnect: sdm660: drop default/unused values Dmitry Baryshkov
2021-09-04 10:59 ` AngeloGioacchino Del Regno
2021-09-04 11:05 ` Marijn Suijten
2021-09-03 23:24 ` [PATCH v2 04/11] interconnect: sdm660: merge common code into icc-rpm Dmitry Baryshkov
2021-09-04 10:59 ` AngeloGioacchino Del Regno
2021-09-04 11:05 ` Marijn Suijten
2021-10-04 11:54 ` Georgi Djakov [this message]
2021-09-03 23:24 ` [PATCH v2 05/11] interconnect: icc-rpm: add support for QoS reg offset Dmitry Baryshkov
2021-09-04 10:59 ` AngeloGioacchino Del Regno
2021-09-03 23:24 ` [PATCH v2 06/11] interconnect: msm8916: expand DEFINE_QNODE macros Dmitry Baryshkov
2021-09-04 10:59 ` AngeloGioacchino Del Regno
2021-09-03 23:24 ` [PATCH v2 07/11] interconnect: msm8916: add support for AP-owned nodes Dmitry Baryshkov
2021-09-04 11:00 ` AngeloGioacchino Del Regno
2021-09-03 23:24 ` [PATCH v2 08/11] interconnect: msm8939: expand DEFINE_QNODE macros Dmitry Baryshkov
2021-09-04 11:00 ` AngeloGioacchino Del Regno
2021-09-03 23:24 ` [PATCH v2 09/11] interconnect: msm8939: add support for AP-owned nodes Dmitry Baryshkov
2021-09-04 11:00 ` AngeloGioacchino Del Regno
2021-09-03 23:24 ` [PATCH v2 10/11] interconnect: qcs404: expand DEFINE_QNODE macros Dmitry Baryshkov
2021-09-04 11:00 ` AngeloGioacchino Del Regno
2021-09-03 23:24 ` [PATCH v2 11/11] interconnect: qcom: drop DEFINE_QNODE macro Dmitry Baryshkov
2021-09-04 11:00 ` AngeloGioacchino Del Regno
2021-09-04 11:05 ` Marijn Suijten
2021-09-06 5:42 ` [PATCH v2 0/11] interconnect: merge AP-owned support into icc-rpm Shawn Guo
2021-09-25 19:40 ` Dmitry Baryshkov
2021-10-04 11:56 ` Georgi Djakov
2021-10-04 12:37 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2eb2a06c-4edc-517c-f860-40079b12dd01@kernel.org \
--to=djakov@kernel.org \
--cc=agross@kernel.org \
--cc=angelogioacchino.delregno@somainline.org \
--cc=bjorn.andersson@linaro.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=shawn.guo@linaro.org \
--cc=y.oudjana@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).