Re: [PATCH v2 2/3] firmware: Keem Bay: Add support for Arm Trusted Firmware Service call
From: Sudeep Holla
Date: Fri Oct 02 2020 - 07:01:05 EST
On Fri, Oct 02, 2020 at 10:22:46AM +0000, Zulkifli, Muhammad Husaini wrote:
> Hi Sudeep,
>
> >-----Original Message-----
> >From: Michal Simek <michal.simek@xxxxxxxxxx>
> >Sent: Friday, October 2, 2020 4:23 PM
> >To: Sudeep Holla <sudeep.holla@xxxxxxx>; Zulkifli, Muhammad Husaini
> ><muhammad.husaini.zulkifli@xxxxxxxxx>
> >Cc: Hunter, Adrian <adrian.hunter@xxxxxxxxx>; michal.simek@xxxxxxxxxx;
> >ulf.hansson@xxxxxxxxxx; linux-mmc@xxxxxxxxxxxxxxx; linux-arm-
> >kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Raja Subramanian,
> >Lakshmi Bai <lakshmi.bai.raja.subramanian@xxxxxxxxx>; arnd@xxxxxxxx; Wan
> >Mohamad, Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@xxxxxxxxx>
> >Subject: Re: [PATCH v2 2/3] firmware: Keem Bay: Add support for Arm Trusted
> >Firmware Service call
> >
> >Hi Sudeep,
> >
> >On 01. 10. 20 17:35, Sudeep Holla wrote:
> >> On Thu, Oct 01, 2020 at 10:21:48PM +0800,
> >muhammad.husaini.zulkifli@xxxxxxxxx wrote:
> >>> From: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@xxxxxxxxx>
> >>>
> >>> Add generic firmware driver for Keem Bay SOC to support Arm Trusted
> >>> Firmware Services call.
> >>>
> >>> Signed-off-by: Muhammad Husaini Zulkifli
> >>> <muhammad.husaini.zulkifli@xxxxxxxxx>
> >>> ---
> >>> drivers/firmware/Kconfig | 1 +
> >>> drivers/firmware/Makefile | 1 +
> >>> drivers/firmware/intel/Kconfig | 14 +++
> >>> drivers/firmware/intel/Makefile | 4 +
> >>> drivers/firmware/intel/keembay_smc.c | 119 +++++++++++++++++++++
> >>> include/linux/firmware/intel/keembay_smc.h | 27 +++++
> >>> 6 files changed, 166 insertions(+)
> >>> create mode 100644 drivers/firmware/intel/Kconfig create mode
> >>> 100644 drivers/firmware/intel/Makefile create mode 100644
> >>> drivers/firmware/intel/keembay_smc.c
> >>> create mode 100644 include/linux/firmware/intel/keembay_smc.h
> >>>
> >>> diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
> >>> index fbd785dd0513..41de77d2720e 100644
> >>> --- a/drivers/firmware/Kconfig
> >>> +++ b/drivers/firmware/Kconfig
> >>> @@ -305,5 +305,6 @@ source "drivers/firmware/psci/Kconfig"
> >>> source "drivers/firmware/smccc/Kconfig"
> >>> source "drivers/firmware/tegra/Kconfig"
> >>> source "drivers/firmware/xilinx/Kconfig"
> >>> +source "drivers/firmware/intel/Kconfig"
> >>>
> >>> endmenu
> >>> diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
> >>> index 99510be9f5ed..00f295ab9860 100644
> >>> --- a/drivers/firmware/Makefile
> >>> +++ b/drivers/firmware/Makefile
> >>> @@ -33,3 +33,4 @@ obj-y += psci/
> >>> obj-y += smccc/
> >>> obj-y += tegra/
> >>> obj-y += xilinx/
> >>> +obj-y += intel/
> >>> diff --git a/drivers/firmware/intel/Kconfig
> >>> b/drivers/firmware/intel/Kconfig new file mode 100644 index
> >>> 000000000000..b2b7a4e5410b
> >>> --- /dev/null
> >>> +++ b/drivers/firmware/intel/Kconfig
> >>> @@ -0,0 +1,14 @@
> >>> +# SPDX-License-Identifier: GPL-2.0-only menu "Intel Firmware
> >>> +Drivers"
> >>> +
> >>> +config KEEMBAY_FIRMWARE
> >>> + bool "Enable Keem Bay firmware interface support"
> >>> + depends on HAVE_ARM_SMCCC
> >>
> >> What is the version of SMCCC implemented ?
> Our current Arm Trusted Firmware framework supports v1.1.
> Does it mean I should use HAVE_ARM_SMCCC_DISCOVERY?
Yes, HAVE_ARM_SMCCC_DISCOVERY is right dependency and allows you to
get smccc version via arm_smccc_get_version which may be useful in
future.
> Not really clear about this. As for HAVE_ARM_SMCCC will include
> support for the SMC and HVC.
>
Yes, but for sake of correctness I prefer HAVE_ARM_SMCCC_DISCOVERY.
--
Regards,
Sudeep