From patchwork Mon Mar 21 15:18:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12787388 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C900C433FE for ; Mon, 21 Mar 2022 15:20:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350182AbiCUPVc (ORCPT ); Mon, 21 Mar 2022 11:21:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350143AbiCUPV0 (ORCPT ); Mon, 21 Mar 2022 11:21:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B743A4616F; Mon, 21 Mar 2022 08:19:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3CF3060F7F; Mon, 21 Mar 2022 15:19:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B188DC340E8; Mon, 21 Mar 2022 15:19:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647875945; bh=Mpf9l4QtYNeu7tz12esx3WrDN3+PTig3fwTFp3UV+Uo=; h=From:To:Cc:Subject:Date:From; b=C2mV8/Qd4eCvgZvmf75OYoJTK1w/EbyEQjLsMsbmLdPsmMcigLfnDo+H9CqFIOx9Y z1I9VfjxCJawAwVDEBKivzN1q/667cH+nXwWWVaUimI0CMp7RYKVUgzcHNGZXMYhX6 xHVD/8yPxDqNpLpcU1B3WtB6HYYNOv3/hvWT6/9qHSVQNxOFPj5qU0bqg5CisN9tzM 7qUsACTVmgVHwZ44iKTEhIOgUAeiY2ElUrTgQouXlnY6lIwrpPRc0A5GRFbIfWlxtg iOcmbFUIZWm1aMMGMMQHU7h2lahlXS0lptFhd9FLiMtqhevdwzZLqkzumliavQ8wVW 5Gc7dIXJZZkBg== From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Amit Pundir , Luca Weiss , Brian Masney Subject: [PATCH v2] ufs: qcom: drop custom Android boot parameters Date: Mon, 21 Mar 2022 16:18:53 +0100 Message-Id: <20220321151853.24138-1-krzk@kernel.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 Tested-by: Amit Pundir Tested-by: Luca Weiss Reviewed-by: Brian Masney Reviewed-by: Bjorn Andersson Reviewed-by: Alim Akhtar --- 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;