From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Andy Gross <andy.gross@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v8 01/10] firmware: qcom_scm: Fix to allow COMPILE_TEST-ing
Date: Tue, 2 May 2017 12:22:01 -0700 [thread overview]
Message-ID: <20170502192201.GY15143@minitux> (raw)
In-Reply-To: <1493370837-19793-2-git-send-email-stanimir.varbanov@linaro.org>
On Fri 28 Apr 02:13 PDT 2017, Stanimir Varbanov wrote:
> Unfortunatly previous attempt to allow consumer drivers to
> use COMPILE_TEST option in Kconfig is not enough, because in the
> past the consumer drivers used 'depends on' Kconfig option but
> now they are using 'select' Kconfig option which means on non ARM
> arch'es compilation is triggered. Thus we need to move the ifdefery
> one level below by touching the private qcom_scm.h header.
>
> To: Andy Gross <andy.gross@linaro.org>
"To" should not be listed in the commit message and "Cc" means that you
really do expect Stephen and myself to say something - i.e. it's not the
same as To and Cc in the email header.
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> ---
> drivers/firmware/Kconfig | 2 +-
> drivers/firmware/qcom_scm.h | 72 ++++++++++++++++++++++++++++++++++++++-------
> include/linux/qcom_scm.h | 32 --------------------
> 3 files changed, 62 insertions(+), 44 deletions(-)
>
> diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
> index 6e4ed5a9c6fd..480578c3691a 100644
> --- a/drivers/firmware/Kconfig
> +++ b/drivers/firmware/Kconfig
> @@ -204,7 +204,7 @@ config FW_CFG_SYSFS_CMDLINE
>
> config QCOM_SCM
> bool
> - depends on ARM || ARM64
> + depends on ARM || ARM64 || COMPILE_TEST
> select RESET_CONTROLLER
>
> config QCOM_SCM_32
> diff --git a/drivers/firmware/qcom_scm.h b/drivers/firmware/qcom_scm.h
> index 9bea691f30fb..d2b5723afb3f 100644
> --- a/drivers/firmware/qcom_scm.h
> +++ b/drivers/firmware/qcom_scm.h
> @@ -12,6 +12,7 @@
> #ifndef __QCOM_SCM_INT_H
> #define __QCOM_SCM_INT_H
>
> +#if IS_ENABLED(CONFIG_ARM) || IS_ENABLED(CONFIG_ARM64)
> #define QCOM_SCM_SVC_BOOT 0x1
> #define QCOM_SCM_BOOT_ADDR 0x1
> #define QCOM_SCM_BOOT_ADDR_MC 0x11
> @@ -58,6 +59,66 @@ extern int __qcom_scm_pas_auth_and_reset(struct device *dev, u32 peripheral);
> extern int __qcom_scm_pas_shutdown(struct device *dev, u32 peripheral);
> extern int __qcom_scm_pas_mss_reset(struct device *dev, bool reset);
>
> +#define QCOM_SCM_SVC_MP 0xc
> +#define QCOM_SCM_RESTORE_SEC_CFG 2
> +extern int __qcom_scm_restore_sec_cfg(struct device *dev, u32 device_id,
> + u32 spare);
> +#define QCOM_SCM_IOMMU_SECURE_PTBL_SIZE 3
> +#define QCOM_SCM_IOMMU_SECURE_PTBL_INIT 4
Don't you need these constants in the COMPILE_TEST case?
> +extern int __qcom_scm_iommu_secure_ptbl_size(struct device *dev, u32 spare,
> + size_t *size);
> +extern int __qcom_scm_iommu_secure_ptbl_init(struct device *dev, u64 addr,
> + u32 size, u32 spare);
> +#else
> +static inline int __qcom_scm_set_remote_state(struct device *dev, u32 state,
> + u32 id)
> +{ return -ENODEV; }
Please space this out over 3 lines with proper indentation.
> +static inline int __qcom_scm_set_warm_boot_addr(struct device *dev, void *entry,
> + const cpumask_t *cpus)
> +{ return -ENODEV; }
> +static inline int __qcom_scm_set_cold_boot_addr(void *entry,
> + const cpumask_t *cpus)
> +{ return -ENODEV; }
> +static inline void __qcom_scm_cpu_power_down(u32 flags) {}
> +static inline int __qcom_scm_is_call_available(struct device *dev, u32 svc_id,
> + u32 cmd_id)
> +{ return -ENODEV; }
> +#define QCOM_SCM_SVC_HDCP 0x11
> +#define QCOM_SCM_CMD_HDCP 0x01
> +static inline int __qcom_scm_hdcp_req(struct device *dev,
> + struct qcom_scm_hdcp_req *req,
> + u32 req_cnt, u32 *resp)
> +{ return -ENODEV; }
> +static inline void __qcom_scm_init(void) {}
> +#define QCOM_SCM_SVC_PIL 0x2
> +#define QCOM_SCM_PAS_IS_SUPPORTED_CMD 0x7
Do we only need 4 service-related defines in the COMPILE_TEST case?
I don't think we want to duplicate all the defines, so please prepend a
separate patch grouping them at the top.
Regards,
Bjorn
next prev parent reply other threads:[~2017-05-02 19:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 9:13 [PATCH v8 00/10] Qualcomm video decoder/encoder driver Stanimir Varbanov
2017-04-28 9:13 ` [PATCH v8 01/10] firmware: qcom_scm: Fix to allow COMPILE_TEST-ing Stanimir Varbanov
2017-05-02 19:22 ` Bjorn Andersson [this message]
2017-05-05 11:34 ` Hans Verkuil
2017-05-05 13:23 ` Stanimir Varbanov
2017-05-05 14:30 ` Hans Verkuil
2017-04-28 9:13 ` [PATCH v8 02/10] media: v4l2-mem2mem: extend m2m APIs for more accurate buffer management Stanimir Varbanov
2017-05-05 11:36 ` Hans Verkuil
2017-04-28 9:13 ` [PATCH v8 03/10] doc: DT: venus: binding document for Qualcomm video driver Stanimir Varbanov
2017-04-28 9:13 ` [PATCH v8 04/10] MAINTAINERS: Add Qualcomm Venus video accelerator driver Stanimir Varbanov
2017-04-28 9:13 ` [PATCH v8 05/10] media: venus: adding core part and helper functions Stanimir Varbanov
2017-04-28 22:02 ` Jordan Crouse
2017-04-29 20:22 ` Bjorn Andersson
2017-05-02 9:17 ` Stanimir Varbanov
2017-05-03 13:46 ` Jordan Crouse
2017-04-29 22:21 ` Sakari Ailus
2017-05-02 8:52 ` Stanimir Varbanov
2017-05-02 18:52 ` Bjorn Andersson
2017-05-05 13:29 ` Stanimir Varbanov
2017-04-28 9:13 ` [PATCH v8 06/10] media: venus: vdec: add video decoder files Stanimir Varbanov
2017-04-28 9:13 ` [PATCH v8 07/10] media: venus: venc: add video encoder files Stanimir Varbanov
2017-04-28 9:13 ` [PATCH v8 08/10] media: venus: hfi: add Host Firmware Interface (HFI) Stanimir Varbanov
2017-04-28 9:13 ` [PATCH v8 09/10] media: venus: hfi: add Venus HFI files Stanimir Varbanov
2017-04-28 9:13 ` [PATCH v8 10/10] media: venus: enable building of Venus video driver Stanimir Varbanov
2017-05-05 12:44 ` [PATCH v8 00/10] Qualcomm video decoder/encoder driver Hans Verkuil
2017-05-05 13:42 ` Stanimir Varbanov
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=20170502192201.GY15143@minitux \
--to=bjorn.andersson@linaro.org \
--cc=andy.gross@linaro.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=stanimir.varbanov@linaro.org \
/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).