Loading Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ Optional properties: - pinctrl-names, pinctrl-0, pinctrl-1,.. pinctrl-n: Refer to "Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt" for these optional properties - non-removable : defines if the connected ufs device is not removable Note: If above properties are not defined it can be assumed that the supply Loading arch/arm/boot/dts/qcom/sdm660.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -2287,6 +2287,7 @@ lanes-per-direction = <1>; spm-level = <5>; non-removable; qcom,msm-bus,name = "ufs1"; qcom,msm-bus,num-cases = <12>; qcom,msm-bus,num-paths = <2>; Loading drivers/scsi/ufs/ufs-qcom.c +18 −3 Original line number Diff line number Diff line Loading @@ -2093,9 +2093,6 @@ static int ufs_qcom_init(struct ufs_hba *hba) struct ufs_qcom_host *host; struct resource *res; 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; Loading Loading @@ -2787,6 +2784,24 @@ static int ufs_qcom_probe(struct platform_device *pdev) { int err; struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; /* * On qcom platforms, bootdevice is the primary storage * device. This device can either be eMMC or UFS. * The type of device connected is detected at runtime. * So, if an eMMC device is connected, and this function * is invoked, it would turn-off the regulator if it detects * that the storage device is not ufs. * These regulators are turned ON by the bootloaders & turning * them off without sending PON may damage the connected device. * Hence, check for the connected device early-on & don't turn-off * the regulators. */ if (of_property_read_bool(np, "non-removable") && strlen(android_boot_dev) && strcmp(android_boot_dev, dev_name(dev))) return -ENODEV; /* Perform generic probe */ err = ufshcd_pltfrm_init(pdev, &ufs_hba_qcom_variant); Loading Loading
Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ Optional properties: - pinctrl-names, pinctrl-0, pinctrl-1,.. pinctrl-n: Refer to "Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt" for these optional properties - non-removable : defines if the connected ufs device is not removable Note: If above properties are not defined it can be assumed that the supply Loading
arch/arm/boot/dts/qcom/sdm660.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -2287,6 +2287,7 @@ lanes-per-direction = <1>; spm-level = <5>; non-removable; qcom,msm-bus,name = "ufs1"; qcom,msm-bus,num-cases = <12>; qcom,msm-bus,num-paths = <2>; Loading
drivers/scsi/ufs/ufs-qcom.c +18 −3 Original line number Diff line number Diff line Loading @@ -2093,9 +2093,6 @@ static int ufs_qcom_init(struct ufs_hba *hba) struct ufs_qcom_host *host; struct resource *res; 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; Loading Loading @@ -2787,6 +2784,24 @@ static int ufs_qcom_probe(struct platform_device *pdev) { int err; struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; /* * On qcom platforms, bootdevice is the primary storage * device. This device can either be eMMC or UFS. * The type of device connected is detected at runtime. * So, if an eMMC device is connected, and this function * is invoked, it would turn-off the regulator if it detects * that the storage device is not ufs. * These regulators are turned ON by the bootloaders & turning * them off without sending PON may damage the connected device. * Hence, check for the connected device early-on & don't turn-off * the regulators. */ if (of_property_read_bool(np, "non-removable") && strlen(android_boot_dev) && strcmp(android_boot_dev, dev_name(dev))) return -ENODEV; /* Perform generic probe */ err = ufshcd_pltfrm_init(pdev, &ufs_hba_qcom_variant); Loading