ufs: qcom: drop custom Android boot parameters
Subsystems (2)
PATCH v2 1/1 ufs: qcom: drop custom Android boot parameters
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. This 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.
---
Changes since v1
1. Fix commit msg typo (Alim).
2. Add tags.
See also:
https://lore.kernel.org/linux-devicetree/[email protected]/T/#u
--- drivers/scsi/ufs/ufs-qcom.c | 15 --------------- 1 file changed, 15 deletions(-)
drivers/scsi/ufs/ufs-qcom.c +0 -15
@@ -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 ;
Signature · 1 line
2.32.0
Quoted 16 lines
-----Original Message-----
From: Krzysztof Kozlowski [mailto:[email protected]]
Sent: Monday, March 21, 2022 8:49 PM
To: Andy Gross <[email protected]>; Bjorn Andersson <[email protected]>; Alim Akhtar <[email protected]>; Avri Altman <[email protected]>; James E.J. Bottomley <[email protected]>; Martin K. Petersen <[email protected]>; [email protected]; [email protected]; linux- [email protected]
Cc: Krzysztof Kozlowski <[email protected]>; Amit Pundir <[email protected]>; Luca Weiss <[email protected]>; Brian Masney <[email protected]>
Subject: [PATCH v2] ufs: qcom: drop custom Android boot parameters
Quoted 2 lines
The QCOM UFS driver requires an androidboot.bootdevice command line argument matching the UFS device name. If the name is different, it
refuses
Quoted 4 lines
to probe. This 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
Quoted 9 lines
boot regardless of bootloader. Driver should not depend on some Android custom environment data.
Signed-off-by Krzysztof Kozlowski <[email protected]>Tested-by Amit Pundir <[email protected]>Tested-by Luca Weiss <[email protected]>Reviewed-by Brian Masney <[email protected]>Reviewed-by Bjorn Andersson <[email protected]>
drivers/scsi/ufs/ufs-qcom.c
Quoted 14 lines
---
Changes since v1
1. Fix commit msg typo (Alim).
2. Add tags.See also:
https://lore.kernel.org/linux-devicetree/f61abc2b-3ce8-7b1f-3d28-
[email protected]/T/#u
---drivers/scsi/ufs/ufs-qcom.c| 15 ---------------1 file changed, 15 deletions(-)drivers/scsi/ufs/ufs-qcom.c +0
-0
index
Quoted 34 lines
0d2e950d0865..586c0e567ff9100644drivers/scsi/ufs/ufs-qcom.c +0
-13@@ -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
Quoted 27 lines · Alim Akhtar
Quoted 16 lines
-----Original Message-----
From: Krzysztof Kozlowski [mailto:[email protected]]
Sent: Monday, March 21, 2022 8:49 PM
To: Andy Gross <[email protected]>; Bjorn Andersson <[email protected]>; Alim Akhtar <[email protected]>; Avri Altman <[email protected]>; James E.J. Bottomley <[email protected]>; Martin K. Petersen <[email protected]>; [email protected]; [email protected]; linux- [email protected]
Cc: Krzysztof Kozlowski <[email protected]>; Amit Pundir <[email protected]>; Luca Weiss <[email protected]>; Brian Masney <[email protected]>
Subject: [PATCH v2] ufs: qcom: drop custom Android boot parametersQuoted 2 lines
The QCOM UFS driver requires an androidboot.bootdevice command line argument matching the UFS device name. If the name is different, it
refuses
Quoted 4 lines
to probe. This 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
Quoted 3 lines
boot regardless of bootloader. Driver should not depend on some Android custom environment data.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Krzysztof Kozlowski <[email protected]>Tested-by Amit Pundir <[email protected]>Tested-by Luca Weiss <[email protected]>Reviewed-by Brian Masney <[email protected]>Reviewed-by Bjorn Andersson <[email protected]>Reviewed-by Alim Akhtar <[email protected]>
Ah, sorry, I think I missed your Rb from v1.
Best regards,
Krzysztof
Martin K. Petersen
AppliedKrzysztof,
Quoted 4 lines
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. This androidboot.bootdevice is provided by stock/vendor (from an Android-based device) bootloader.
Applied to 5.18/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 10 lines · Krzysztof Kozlowski
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. This 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.
[...]
Applied to 5.18/scsi-fixes, thanks!
[1/1] ufs: qcom: drop custom Android boot parameters
https://git.kernel.org/mkp/scsi/c/5ca0faf9c292
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering