linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ufs: qcom: drop custom Android boot parameters
@ 2022-03-21 15:18 ` Krzysztof Kozlowski
  2022-03-21 15:40   ` Alim Akhtar
  2022-03-30  3:59   ` Martin K. Petersen
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-21 15:18 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-arm-msm,
	linux-scsi, linux-kernel
  Cc: Krzysztof Kozlowski, Amit Pundir, Luca Weiss, Brian Masney

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.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Tested-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

---

Changes since v1
1. Fix commit msg typo (Alim).
2. Add tags.

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH v2] ufs: qcom: drop custom Android boot parameters
  2022-03-21 15:18 ` [PATCH v2] ufs: qcom: drop custom Android boot parameters Krzysztof Kozlowski
@ 2022-03-21 15:40   ` Alim Akhtar
  2022-03-22 18:14     ` 'Krzysztof Kozlowski'
  2022-03-30  3:59   ` Martin K. Petersen
  1 sibling, 1 reply; 4+ messages in thread
From: Alim Akhtar @ 2022-03-21 15:40 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski', 'Andy Gross',
	'Bjorn Andersson', 'Avri Altman',
	'James E.J. Bottomley', 'Martin K. Petersen',
	linux-arm-msm, linux-scsi, linux-kernel
  Cc: 'Amit Pundir', 'Luca Weiss', 'Brian Masney'



>-----Original Message-----
>From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
>Sent: Monday, March 21, 2022 8:49 PM
>To: 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
>Cc: Krzysztof Kozlowski <krzk@kernel.org>; Amit Pundir
><amit.pundir@linaro.org>; Luca Weiss <luca.weiss@fairphone.com>; Brian
>Masney <bmasney@redhat.com>
>Subject: [PATCH v2] 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.
>
>Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>Tested-by: Amit Pundir <amit.pundir@linaro.org>
>Tested-by: Luca Weiss <luca.weiss@fairphone.com>
>Reviewed-by: Brian Masney <bmasney@redhat.com>
>Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

>---
>
>Changes since v1
>1. Fix commit msg typo (Alim).
>2. Add tags.
>
>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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ufs: qcom: drop custom Android boot parameters
  2022-03-21 15:40   ` Alim Akhtar
@ 2022-03-22 18:14     ` 'Krzysztof Kozlowski'
  0 siblings, 0 replies; 4+ messages in thread
From: 'Krzysztof Kozlowski' @ 2022-03-22 18:14 UTC (permalink / raw)
  To: Alim Akhtar, 'Andy Gross', 'Bjorn Andersson',
	'Avri Altman', 'James E.J. Bottomley',
	'Martin K. Petersen',
	linux-arm-msm, linux-scsi, linux-kernel
  Cc: 'Amit Pundir', 'Luca Weiss', 'Brian Masney'

On 21/03/2022 16:40, Alim Akhtar wrote:
> 
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
>> Sent: Monday, March 21, 2022 8:49 PM
>> To: 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
>> Cc: Krzysztof Kozlowski <krzk@kernel.org>; Amit Pundir
>> <amit.pundir@linaro.org>; Luca Weiss <luca.weiss@fairphone.com>; Brian
>> Masney <bmasney@redhat.com>
>> Subject: [PATCH v2] 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.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>> Tested-by: Amit Pundir <amit.pundir@linaro.org>
>> Tested-by: Luca Weiss <luca.weiss@fairphone.com>
>> Reviewed-by: Brian Masney <bmasney@redhat.com>
>> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>>
> 
> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

Ah, sorry, I think I missed your Rb from v1.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ufs: qcom: drop custom Android boot parameters
  2022-03-21 15:18 ` [PATCH v2] ufs: qcom: drop custom Android boot parameters Krzysztof Kozlowski
  2022-03-21 15:40   ` Alim Akhtar
@ 2022-03-30  3:59   ` Martin K. Petersen
  1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-03-30  3:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-arm-msm,
	linux-scsi, linux-kernel, Amit Pundir, Luca Weiss, Brian Masney


Krzysztof,

> 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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-30  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20220321151913epcas5p45ad53c827e3c87633acd29443322d0b5@epcas5p4.samsung.com>
2022-03-21 15:18 ` [PATCH v2] ufs: qcom: drop custom Android boot parameters Krzysztof Kozlowski
2022-03-21 15:40   ` Alim Akhtar
2022-03-22 18:14     ` 'Krzysztof Kozlowski'
2022-03-30  3:59   ` Martin K. Petersen

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).