Hi Marek and Jean-Jacques,

-----Original Message-----
From: U-Boot [mailto:[email protected]] On Behalf Of Marek Vasut
Sent: vendredi 21 juillet 2017 11:03
To: Jean-Jacques Hiblot <[email protected]>; Patrice CHOTARD 
<[email protected]>; [email protected]; [email protected]
Cc: [email protected]; Christophe KERELLO <[email protected]>
Subject: Re: [U-Boot] [PATCH] phy: add a NO-OP phy driver

On 07/21/2017 10:49 AM, Jean-Jacques Hiblot wrote:
> The no-op phy driver is useful when a driver uses the phy framework 
> but no PHY driver is available for the hardware (or the hardware has 
> no PHY).
> 
> Signed-off-by: Jean-Jacques Hiblot <[email protected]>


So with this patch we have noop PHY driver
But that don't solve all the issues:

1/ compilation issue

=> dependency need to be added to avoid to modify all defconfig

In drivers/usb/host/Kconfig
        Add select  PHY

For  USB_EHCI_GENERIC and USB_OHCI_GENERIC

PS: I don't sure that solve issue for all the case (is USB is activated in SPL 
for boards)

2/ execution need to be protected

In all driver, we have de sequence 

        err = generic_phy_get_by_index(dev, 0, &priv->phy);
        if (err) {
                if (err != -ENOENT) {
                        error("failed to get usb phy\n");
                        goto reset_err;
                }
        }

        err = generic_phy_init(&priv->phy);
        if (err) {
                error("failed to init usb phy\n");
                goto reset_err;
        }

=> the priv->phy can be invalid (if ENOENT error)

        int generic_phy_init(struct phy *phy)
        int generic_phy_reset(struct phy *phy)
        int generic_phy_exit(struct phy *phy)
        int generic_phy_power_on(struct phy *phy)
        int generic_phy_power_off(struct phy *phy)

        need to be protected for invalid phy 

Regards

Patrick
_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to