[PATCH v2 03/11] phy: mtk-tphy: make shared reg optional for v1

Chunfeng Yun chunfeng.yun at mediatek.com
Wed Aug 19 10:27:28 CEST 2020


On Wed, 2020-08-19 at 10:02 +0200, Frank Wunderlich wrote:
> From: Frank Wunderlich <frank-w at public-files.de>
> 
> make the shared reg optional when version is v1 for sata
> 
> Suggested-by: Chunfeng Yun <chunfeng.yun at mediatek.com>
> Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
> ---
>  drivers/phy/phy-mtk-tphy.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
> index 326227a30d..3d7b9cd2b1 100644
> --- a/drivers/phy/phy-mtk-tphy.c
> +++ b/drivers/phy/phy-mtk-tphy.c
> @@ -698,11 +698,10 @@ static int mtk_tphy_probe(struct udevice *dev)
>  	tphy->dev = dev;
>  	tphy->version = dev_get_driver_data(dev);
>  
> -	/* v1 has shared banks */
> +	/* v1 has shared banks for usb/pcie mode, */
> +	/* but not for sata mode */
>  	if (tphy->version == MTK_TPHY_V1) {
>  		tphy->sif_base = dev_read_addr_ptr(dev);
> -		if (!tphy->sif_base)
> -			return -ENOENT;
>  	}
Reviewed-by: Chunfeng Yun <chunfeng.yun at mediatek.com>

Thanks

>  
>  	dev_for_each_subnode(subnode, dev) {



More information about the U-Boot mailing list