From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Luca Weiss" <luca.weiss@fairphone.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Andy Gross" <agross@kernel.org>,
"Bjorn Andersson" <bjorn.andersson@linaro.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Avri Altman" <avri.altman@wdc.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
<linux-arm-msm@vger.kernel.org>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [RFT] ufs: qcom: drop custom Android boot parameters
Date: Mon, 21 Mar 2022 13:13:56 +0100 [thread overview]
Message-ID: <CIPJBZ36YCV6.2J3QWEURX2EEQ@otso> (raw)
In-Reply-To: <CIPJ0CT6EQI9.2C0T9KAHDODH2@otso>
Hi all again,
On Mon Mar 21, 2022 at 12:58 PM CET, Luca Weiss wrote:
> Hi Krzysztof,
>
> On Sun Mar 20, 2022 at 12:06 PM CET, Krzysztof Kozlowski wrote:
> > The QCOM UFS driver requires an androidboot.bootdevice command line
> > argument matching the UFS device name. If the name is different, it
> > refuses to probe. Thise androidboot.bootdevice is provided by
> > stock/vendor (from an Android-based device) bootloader.
> >
> > This does not make sense from Linux point of view. Driver should be
> > able to boot regardless of bootloader. Driver should not depend on some
> > Android custom environment data.
> >
> > Cc: Luca Weiss <luca.weiss@fairphone.com>
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> As expected this makes UFS probe even if the node is named ufs@1d84000
> on my device.
>
> While I don't know why the code existed in the first place, it was added
> back in 2015 with the introduction of the driver, so probably it's just
> some remains from downstream that weren't cleaned up back then.
I went digging a bit and found the original commit from downstream:
https://source.codeaurora.org/quic/la/kernel/msm-3.18/commit/?id=15e2c78d6a7ec73be941e058671942fd9f72b128
<quote>
Boot device can be either UFS or eMMC which means if eMMC is the boot
device, probing UFS device is not desirable as it's not going to be
used after probing. Kernel command line parameter "android.bootdevice"
tells the kernel about the boot device so look at this boot device
parameter to know whether to probe UFS device or not.
</quote>
Should be safe to remove.
Regards
Luca
>
> With this commit also 6b9afd8f96c6 ("arm64: dts: qcom: sm8250: change
> ufs node name to ufshc") could be reverted (but it would probably make
> more sense to rename all ufshc@ to ufs@ in a new commit).
>
> Tested-by: Luca Weiss <luca.weiss@fairphone.com>
>
> Regards
> Luca
>
> >
> > ---
> >
> > Not tested, please kindly provide tests.
> >
> > See also:
> > https://lore.kernel.org/linux-devicetree/f61abc2b-3ce8-7b1f-3d28-8a4a03ec58eb@kernel.org/T/#u
> > ---
> > drivers/scsi/ufs/ufs-qcom.c | 15 ---------------
> > 1 file changed, 15 deletions(-)
> >
> > diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> > index 0d2e950d0865..586c0e567ff9 100644
> > --- a/drivers/scsi/ufs/ufs-qcom.c
> > +++ b/drivers/scsi/ufs/ufs-qcom.c
> > @@ -957,18 +957,6 @@ static const struct reset_control_ops ufs_qcom_reset_ops = {
> > .deassert = ufs_qcom_reset_deassert,
> > };
> >
> > -#define ANDROID_BOOT_DEV_MAX 30
> > -static char android_boot_dev[ANDROID_BOOT_DEV_MAX];
> > -
> > -#ifndef MODULE
> > -static int __init get_android_boot_dev(char *str)
> > -{
> > - strlcpy(android_boot_dev, str, ANDROID_BOOT_DEV_MAX);
> > - return 1;
> > -}
> > -__setup("androidboot.bootdevice=", get_android_boot_dev);
> > -#endif
> > -
> > /**
> > * ufs_qcom_init - bind phy with controller
> > * @hba: host controller instance
> > @@ -988,9 +976,6 @@ static int ufs_qcom_init(struct ufs_hba *hba)
> > struct resource *res;
> > struct ufs_clk_info *clki;
> >
> > - if (strlen(android_boot_dev) && strcmp(android_boot_dev, dev_name(dev)))
> > - return -ENODEV;
> > -
> > host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL);
> > if (!host) {
> > err = -ENOMEM;
> > --
> > 2.32.0
next prev parent reply other threads:[~2022-03-21 12:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220320110632epcas5p2d533561db40978dd00b81b391096e3a1@epcas5p2.samsung.com>
2022-03-20 11:06 ` [RFT] ufs: qcom: drop custom Android boot parameters Krzysztof Kozlowski
2022-03-21 11:22 ` Amit Pundir
2022-03-21 11:41 ` Alim Akhtar
2022-03-21 11:58 ` Luca Weiss
2022-03-21 12:13 ` Luca Weiss [this message]
2022-03-21 13:44 ` Brian Masney
2022-03-21 14:16 ` Bjorn Andersson
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=CIPJBZ36YCV6.2J3QWEURX2EEQ@otso \
--to=luca.weiss@fairphone.com \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=bjorn.andersson@linaro.org \
--cc=jejb@linux.ibm.com \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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