[PATCH v10 11/26] scsi: ufs: mediatek: Remove undocumented downstream reset cruft

Chaotian Jing (井朝天) Chaotian.Jing at mediatek.com
Thu Jul 30 22:49:42 PDT 2026


On Thu, 2026-07-30 at 11:49 +0200, Louis-Alexis Eyraud wrote:
> From: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>
> 
> The MediaTek UFS host driver's probe function allows using a
> ti,syscon-reset as a reset, without going through the appropriate
> abstractions, or by documenting this in the binding at all.
> 
> Remove this, it's downstream code and does not belong here.
> 
> Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno at collabora.com>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud at collabora.com>
Reviewed-by: Chaotian Jing <chaotian.jing at mediatek.com>
> ---
>  drivers/ufs/host/ufs-mediatek.c | 33 +++--------------------------
> ----
>  1 file changed, 3 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-
> mediatek.c
> index 65036c839031..a2749e79514c 100644
> --- a/drivers/ufs/host/ufs-mediatek.c
> +++ b/drivers/ufs/host/ufs-mediatek.c
> @@ -2402,38 +2402,12 @@ MODULE_DEVICE_TABLE(of, ufs_mtk_of_match);
>  static int ufs_mtk_probe(struct platform_device *pdev)
>  {
>  	int err;
> -	struct device *dev = &pdev->dev, *phy_dev = NULL;
> -	struct device_node *reset_node, *phy_node = NULL;
> -	struct platform_device *reset_pdev, *phy_pdev = NULL;
> -	struct device_link *link;
>  	struct ufs_hba *hba;
> +	struct platform_device *phy_pdev = NULL;
> +	struct device *dev = &pdev->dev, *phy_dev = NULL;
> +	struct device_node *phy_node = NULL;
>  	struct ufs_mtk_host *host;
>  
> -	reset_node = of_find_compatible_node(NULL, NULL,
> -					     "ti,syscon-reset");
> -	if (!reset_node) {
> -		dev_notice(dev, "find ti,syscon-reset fail\n");
> -		goto skip_reset;
> -	}
> -	reset_pdev = of_find_device_by_node(reset_node);
> -	if (!reset_pdev) {
> -		dev_notice(dev, "find reset_pdev fail\n");
> -		goto skip_reset;
> -	}
> -	link = device_link_add(dev, &reset_pdev->dev,
> -		DL_FLAG_AUTOPROBE_CONSUMER);
> -	put_device(&reset_pdev->dev);
> -	if (!link) {
> -		dev_notice(dev, "add reset device_link fail\n");
> -		goto skip_reset;
> -	}
> -	/* supplier is not probed */
> -	if (link->status == DL_STATE_DORMANT) {
> -		err = -EPROBE_DEFER;
> -		goto out;
> -	}
> -
> -skip_reset:
>  	/* find phy node */
>  	phy_node = of_parse_phandle(dev->of_node, "phys", 0);
>  
> @@ -2479,7 +2453,6 @@ static int ufs_mtk_probe(struct platform_device
> *pdev)
>  
>  out:
>  	of_node_put(phy_node);
> -	of_node_put(reset_node);
>  	return err;
>  }
>  
> 


More information about the Linux-mediatek mailing list