Re: [v5, 2/3] interconnect: qcom: Add SC7180 interconnect provider driver
From: Georgi Djakov
Date: Tue Mar 10 2020 - 11:35:48 EST
On 3/9/20 19:33, Evan Green wrote:
> On Tue, Mar 3, 2020 at 5:18 AM Odelu Kukatla <okukatla@xxxxxxxxxxxxxx> wrote:
>>
>> Add driver for the Qualcomm interconnect buses found in SC7180 based
>> platforms. The topology consists of several NoCs that are controlled by
>> a remote processor that collects the aggregated bandwidth for each
>> master-slave pairs.
>>
>> Signed-off-by: Odelu Kukatla <okukatla@xxxxxxxxxxxxxx>
>> ---
>> drivers/interconnect/qcom/Kconfig | 10 +
>> drivers/interconnect/qcom/Makefile | 2 +
>> drivers/interconnect/qcom/sc7180.c | 641 +++++++++++++++++++++++++++++++++++++
>> drivers/interconnect/qcom/sc7180.h | 149 +++++++++
>> 4 files changed, 802 insertions(+)
>> create mode 100644 drivers/interconnect/qcom/sc7180.c
>> create mode 100644 drivers/interconnect/qcom/sc7180.h
>>
>> diff --git a/drivers/interconnect/qcom/Kconfig b/drivers/interconnect/qcom/Kconfig
>> index f6418a6..482c5be 100644
>> --- a/drivers/interconnect/qcom/Kconfig
>> +++ b/drivers/interconnect/qcom/Kconfig
>> @@ -42,6 +42,16 @@ config INTERCONNECT_QCOM_RPMH
>> depends on INTERCONNECT_QCOM || COMPILE_TEST
>> depends on QCOM_COMMAND_DB
>>
>> +config INTERCONNECT_QCOM_SC7180
>> + tristate "Qualcomm SC7180 interconnect driver"
>> + depends on INTERCONNECT_QCOM
>> + depends on (QCOM_RPMH && QCOM_COMMAND_DB && OF) || COMPILE_TEST
>> + select INTERCONNECT_QCOM_RPMH
>> + select INTERCONNECT_QCOM_BCM_VOTER
>> + help
>> + This is a driver for the Qualcomm Network-on-Chip on sc7180-based
>> + platforms.
>> +
>> config INTERCONNECT_QCOM_SDM845
>> tristate "Qualcomm SDM845 interconnect driver"
>> depends on INTERCONNECT_QCOM
>> diff --git a/drivers/interconnect/qcom/Makefile b/drivers/interconnect/qcom/Makefile
>> index d591bb5..5325558 100644
>> --- a/drivers/interconnect/qcom/Makefile
>> +++ b/drivers/interconnect/qcom/Makefile
>> @@ -5,6 +5,7 @@ qnoc-msm8916-objs := msm8916.o
>> qnoc-msm8974-objs := msm8974.o
>> qnoc-qcs404-objs := qcs404.o
>> icc-rpmh-obj := icc-rpmh.o
>> +qnoc-sc7180-objs := sc7180.o
>> qnoc-sdm845-objs := sdm845.o
>> icc-smd-rpm-objs := smd-rpm.o
>>
>> @@ -13,5 +14,6 @@ obj-$(CONFIG_INTERCONNECT_QCOM_MSM8916) += qnoc-msm8916.o
>> obj-$(CONFIG_INTERCONNECT_QCOM_MSM8974) += qnoc-msm8974.o
>> obj-$(CONFIG_INTERCONNECT_QCOM_QCS404) += qnoc-qcs404.o
>> obj-$(CONFIG_INTERCONNECT_QCOM_RPMH) += icc-rpmh.o
>> +obj-$(CONFIG_INTERCONNECT_QCOM_SC7180) += qnoc-sc7180.o
>> obj-$(CONFIG_INTERCONNECT_QCOM_SDM845) += qnoc-sdm845.o
>> obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o
>> diff --git a/drivers/interconnect/qcom/sc7180.c b/drivers/interconnect/qcom/sc7180.c
>> new file mode 100644
>> index 0000000..dcf493d
>> --- /dev/null
>> +++ b/drivers/interconnect/qcom/sc7180.c
>> @@ -0,0 +1,641 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) 2020, The Linux Foundation. All rights reserved.
>> + *
>> + */
>> +
>> +#include <linux/device.h>
>> +#include <linux/interconnect.h>
>> +#include <linux/interconnect-provider.h>
>> +#include <linux/module.h>
>> +#include <linux/of_platform.h>
>
> Nit: As Georgi mentioned in the previous review, you can remove this
> an replace it with of_device.h. No need to spin for just that, though.
I have already applied this version, so any follow-up patches are welcome.
Thanks,
Georgi