All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: "Zulkifli, Muhammad Husaini" <muhammad.husaini.zulkifli@intel.com>
Cc: Michal Simek <michal.simek@xilinx.com>,
	"Hunter, Adrian" <adrian.hunter@intel.com>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Raja Subramanian,
	Lakshmi Bai"  <lakshmi.bai.raja.subramanian@intel.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"Wan Mohamad,
	Wan Ahmad Zainie"  <wan.ahmad.zainie.wan.mohamad@intel.com>
Subject: Re: [PATCH v2 2/3] firmware: Keem Bay: Add support for Arm Trusted Firmware Service call
Date: Mon, 5 Oct 2020 09:44:41 +0100	[thread overview]
Message-ID: <20201005084441.znou7licvvtomva4@bogus> (raw)
In-Reply-To: <BYAPR11MB30151480E71BBA232E9B0ADEB80C0@BYAPR11MB3015.namprd11.prod.outlook.com>

On Mon, Oct 05, 2020 at 08:37:13AM +0000, Zulkifli, Muhammad Husaini wrote:
> Hi Sudeep,
> 
> I am facing an error during sending yesterday.
> I response again to your feedback as below
> 
> >-----Original Message-----
> >From: Sudeep Holla <sudeep.holla@arm.com>
> >Sent: Friday, October 2, 2020 10:51 PM
> >To: Michal Simek <michal.simek@xilinx.com>
> >Cc: Zulkifli, Muhammad Husaini <muhammad.husaini.zulkifli@intel.com>;
> >Hunter, Adrian <adrian.hunter@intel.com>; ulf.hansson@linaro.org; linux-
> >mmc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> >kernel@vger.kernel.org; Raja Subramanian, Lakshmi Bai
> ><lakshmi.bai.raja.subramanian@intel.com>; arnd@arndb.de; Sudeep Holla
> ><sudeep.holla@arm.com>; Wan Mohamad, Wan Ahmad Zainie
> ><wan.ahmad.zainie.wan.mohamad@intel.com>
> >Subject: Re: [PATCH v2 2/3] firmware: Keem Bay: Add support for Arm Trusted
> >Firmware Service call
> >
> >Hi Michal,
> >
> >On Fri, Oct 02, 2020 at 03:53:33PM +0200, Michal Simek wrote:
> >> Hi Sudeep,
> >>
> >> On 02. 10. 20 12:58, Sudeep Holla wrote:
> >> > Hi Michal,
> >> >
> >> > On Fri, Oct 02, 2020 at 10:23:02AM +0200, Michal Simek wrote:
> >> >> Hi Sudeep,
> >> >>
> >> >> On 01. 10. 20 17:35, Sudeep Holla wrote:
> >> >
> >> > [...]
> >> >
> >> >>>
> >> >>> What are the other uses of this KEEMBAY_SIP_* ?
> >> >>> For now I tend to move this to the driver making use of it using
> >> >>> arm_smccc_1_1_invoke directly if possible. I don't see the need
> >> >>> for this to be separate driver. But do let us know the features
> >> >>> implemented in the firmware. If it is not v1.1+, reasons for not
> >> >>> upgrading as you need v1.1 for some CPU errata implementation.
> >> >>
> >> >> This driver has been created based on my request to move it out the
> >> >> mmc driver. It looks quite hacky to have arm_smccc_res and call
> >> >> arm_smccc_smc() also with some IDs where it is visible that the
> >> >> part of ID is just based on any spec.
> >> >
> >> > OK, driver is fine but no dt-bindings as it is discoverable. It can
> >> > also be just a wrapper library instead as it needs no explicit
> >> > initialisation like drivers to setup.
> >>
> >> I am fine with it. Do we have any example which we can point him to?
> >>
> >
> >You seem to have figured that out already with SOC_ID example.
> >That was quick I must say 😄.
> >
> >>
> >> >
> >> >> Also in v1 he is just calling SMC. But maybe there is going a need
> >> >> to call HVC instead which is something what device driver shouldn't
> >> >> decide that's why IMHO doing step via firmware driver is much better
> >approach.
> >> >
> >> > Agreed and one must use arm_smccc_get_conduit or something similar.
> >> > No additional bindings for each and ever platform and driver that
> >> > uses SMCCC please.
> >> >
> >> >> Of course if there is a better/cleaner way how this should be done
> >> >> I am happy to get more information about it.
> >> >>
> >> >
> >> > Let me know what you think about my thoughts stated above.
> >>
> >>
> >> I am fine with it. The key point is to have these sort it out because
> >> I see that a lot of drivers just simply call that SMCs from drivers
> >> which is IMHO wrong.
> >>
> >
> >Sure, sorry I didn't express my concern properly. I want to avoid dt bindings for
> >these and use the SMCCC discovery we have in place already if possible.
> >
> >If this driver had consumers in the DT and it needs to be represented in DT, it is
> >a different story and I agree for need for a driver there.
> >But I don't see one in this usecase.
> 
> 
> Does it ok if I do some checking in arasan controller driver as below and represented it in the DT of arasan,sdhci.yaml:
> This is to ensure that for Keem Bay SOC specific, the firmware driver must be consume.
> 
> 	if (of_device_is_compatible(np, "intel,keembay-sdhci-5.1-sd")) {
> 		struct device_node *dn;
> 		struct gpio_desc *uhs;
> 
> 		dn = of_find_node_by_name(NULL, "keembay_firmware");

You have keembay_sd_voltage_selection function as Michal prefers, I have
no objections for that. But please no keembay_firmware node in DT.
You can implement this as a driver or simple smccc based function library
without DT node using SMCCC get_version. I hope the firmware gives error
for unimplemented FIDs, thereby eliminating the need for any DT node or
config option.

-- 
Regards,
Sudeep

WARNING: multiple messages have this Message-ID (diff)
From: Sudeep Holla <sudeep.holla@arm.com>
To: "Zulkifli, Muhammad Husaini" <muhammad.husaini.zulkifli@intel.com>
Cc: "ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"Raja Subramanian,
	Lakshmi Bai" <lakshmi.bai.raja.subramanian@intel.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michal Simek <michal.simek@xilinx.com>,
	"Wan Mohamad,
	Wan Ahmad Zainie" <wan.ahmad.zainie.wan.mohamad@intel.com>,
	"Hunter, Adrian" <adrian.hunter@intel.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 2/3] firmware: Keem Bay: Add support for Arm Trusted Firmware Service call
Date: Mon, 5 Oct 2020 09:44:41 +0100	[thread overview]
Message-ID: <20201005084441.znou7licvvtomva4@bogus> (raw)
In-Reply-To: <BYAPR11MB30151480E71BBA232E9B0ADEB80C0@BYAPR11MB3015.namprd11.prod.outlook.com>

On Mon, Oct 05, 2020 at 08:37:13AM +0000, Zulkifli, Muhammad Husaini wrote:
> Hi Sudeep,
> 
> I am facing an error during sending yesterday.
> I response again to your feedback as below
> 
> >-----Original Message-----
> >From: Sudeep Holla <sudeep.holla@arm.com>
> >Sent: Friday, October 2, 2020 10:51 PM
> >To: Michal Simek <michal.simek@xilinx.com>
> >Cc: Zulkifli, Muhammad Husaini <muhammad.husaini.zulkifli@intel.com>;
> >Hunter, Adrian <adrian.hunter@intel.com>; ulf.hansson@linaro.org; linux-
> >mmc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> >kernel@vger.kernel.org; Raja Subramanian, Lakshmi Bai
> ><lakshmi.bai.raja.subramanian@intel.com>; arnd@arndb.de; Sudeep Holla
> ><sudeep.holla@arm.com>; Wan Mohamad, Wan Ahmad Zainie
> ><wan.ahmad.zainie.wan.mohamad@intel.com>
> >Subject: Re: [PATCH v2 2/3] firmware: Keem Bay: Add support for Arm Trusted
> >Firmware Service call
> >
> >Hi Michal,
> >
> >On Fri, Oct 02, 2020 at 03:53:33PM +0200, Michal Simek wrote:
> >> Hi Sudeep,
> >>
> >> On 02. 10. 20 12:58, Sudeep Holla wrote:
> >> > Hi Michal,
> >> >
> >> > On Fri, Oct 02, 2020 at 10:23:02AM +0200, Michal Simek wrote:
> >> >> Hi Sudeep,
> >> >>
> >> >> On 01. 10. 20 17:35, Sudeep Holla wrote:
> >> >
> >> > [...]
> >> >
> >> >>>
> >> >>> What are the other uses of this KEEMBAY_SIP_* ?
> >> >>> For now I tend to move this to the driver making use of it using
> >> >>> arm_smccc_1_1_invoke directly if possible. I don't see the need
> >> >>> for this to be separate driver. But do let us know the features
> >> >>> implemented in the firmware. If it is not v1.1+, reasons for not
> >> >>> upgrading as you need v1.1 for some CPU errata implementation.
> >> >>
> >> >> This driver has been created based on my request to move it out the
> >> >> mmc driver. It looks quite hacky to have arm_smccc_res and call
> >> >> arm_smccc_smc() also with some IDs where it is visible that the
> >> >> part of ID is just based on any spec.
> >> >
> >> > OK, driver is fine but no dt-bindings as it is discoverable. It can
> >> > also be just a wrapper library instead as it needs no explicit
> >> > initialisation like drivers to setup.
> >>
> >> I am fine with it. Do we have any example which we can point him to?
> >>
> >
> >You seem to have figured that out already with SOC_ID example.
> >That was quick I must say 😄.
> >
> >>
> >> >
> >> >> Also in v1 he is just calling SMC. But maybe there is going a need
> >> >> to call HVC instead which is something what device driver shouldn't
> >> >> decide that's why IMHO doing step via firmware driver is much better
> >approach.
> >> >
> >> > Agreed and one must use arm_smccc_get_conduit or something similar.
> >> > No additional bindings for each and ever platform and driver that
> >> > uses SMCCC please.
> >> >
> >> >> Of course if there is a better/cleaner way how this should be done
> >> >> I am happy to get more information about it.
> >> >>
> >> >
> >> > Let me know what you think about my thoughts stated above.
> >>
> >>
> >> I am fine with it. The key point is to have these sort it out because
> >> I see that a lot of drivers just simply call that SMCs from drivers
> >> which is IMHO wrong.
> >>
> >
> >Sure, sorry I didn't express my concern properly. I want to avoid dt bindings for
> >these and use the SMCCC discovery we have in place already if possible.
> >
> >If this driver had consumers in the DT and it needs to be represented in DT, it is
> >a different story and I agree for need for a driver there.
> >But I don't see one in this usecase.
> 
> 
> Does it ok if I do some checking in arasan controller driver as below and represented it in the DT of arasan,sdhci.yaml:
> This is to ensure that for Keem Bay SOC specific, the firmware driver must be consume.
> 
> 	if (of_device_is_compatible(np, "intel,keembay-sdhci-5.1-sd")) {
> 		struct device_node *dn;
> 		struct gpio_desc *uhs;
> 
> 		dn = of_find_node_by_name(NULL, "keembay_firmware");

You have keembay_sd_voltage_selection function as Michal prefers, I have
no objections for that. But please no keembay_firmware node in DT.
You can implement this as a driver or simple smccc based function library
without DT node using SMCCC get_version. I hope the firmware gives error
for unimplemented FIDs, thereby eliminating the need for any DT node or
config option.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-10-05  8:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 14:21 [PATCH v2 0/3] mmc: sdhci-of-arasan: Enable UHS-1 support for Keem Bay SOC muhammad.husaini.zulkifli
2020-10-01 14:21 ` muhammad.husaini.zulkifli
2020-10-01 14:21 ` [PATCH v2 1/3] dt-bindings: arm: firmware: Add binding for Keem Bay Firmware Support muhammad.husaini.zulkifli
2020-10-01 14:21   ` muhammad.husaini.zulkifli
2020-10-01 14:21 ` [PATCH v2 2/3] firmware: Keem Bay: Add support for Arm Trusted Firmware Service call muhammad.husaini.zulkifli
2020-10-01 14:21   ` muhammad.husaini.zulkifli
2020-10-01 15:35   ` Sudeep Holla
2020-10-01 15:35     ` Sudeep Holla
2020-10-02  8:23     ` Michal Simek
2020-10-02  8:23       ` Michal Simek
2020-10-02 10:22       ` Zulkifli, Muhammad Husaini
2020-10-02 10:22         ` Zulkifli, Muhammad Husaini
2020-10-02 11:00         ` Sudeep Holla
2020-10-02 11:00           ` Sudeep Holla
2020-10-02 10:58       ` Sudeep Holla
2020-10-02 10:58         ` Sudeep Holla
2020-10-02 13:53         ` Michal Simek
2020-10-02 13:53           ` Michal Simek
2020-10-02 14:51           ` Sudeep Holla
2020-10-02 14:51             ` Sudeep Holla
2020-10-03 19:03             ` Zulkifli, Muhammad Husaini
2020-10-05  8:37             ` Zulkifli, Muhammad Husaini
2020-10-05  8:37               ` Zulkifli, Muhammad Husaini
2020-10-05  8:44               ` Sudeep Holla [this message]
2020-10-05  8:44                 ` Sudeep Holla
2020-10-05 17:04                 ` Zulkifli, Muhammad Husaini
2020-10-05 17:04                   ` Zulkifli, Muhammad Husaini
2020-10-05 20:07                   ` Sudeep Holla
2020-10-05 20:07                     ` Sudeep Holla
2020-10-06  1:14                     ` Zulkifli, Muhammad Husaini
2020-10-06  1:14                       ` Zulkifli, Muhammad Husaini
2020-10-06  1:22                     ` Zulkifli, Muhammad Husaini
2020-10-06  1:22                       ` Zulkifli, Muhammad Husaini
2020-10-06 11:13                       ` Sudeep Holla
2020-10-06 11:13                         ` Sudeep Holla
2020-10-06 11:46                         ` Michal Simek
2020-10-06 11:46                           ` Michal Simek
2020-10-06 12:08             ` Michal Simek
2020-10-06 12:08               ` Michal Simek
2020-10-01 14:21 ` [PATCH v2 3/3] mmc: sdhci-of-arasan: Enable UHS-1 support for Keem Bay SOC muhammad.husaini.zulkifli
2020-10-01 14:21   ` muhammad.husaini.zulkifli

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=20201005084441.znou7licvvtomva4@bogus \
    --to=sudeep.holla@arm.com \
    --cc=adrian.hunter@intel.com \
    --cc=arnd@arndb.de \
    --cc=lakshmi.bai.raja.subramanian@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=muhammad.husaini.zulkifli@intel.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wan.ahmad.zainie.wan.mohamad@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.