From: Patrick DELAUNAY Date: Fri, 21 Jul 2017 12:12:04 +0000 Subject: [U-Boot] [PATCH] phy: add a NO-OP phy driver In-Reply-To: <0b506014-aa3d-bbc2-9d88-8c27cd8dc940@denx.de> References: <1500626943-9672-1-git-send-email-jjhiblot@ti.com> <0b506014-aa3d-bbc2-9d88-8c27cd8dc940@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek and Jean-Jacques, -----Original Message----- From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Marek Vasut Sent: vendredi 21 juillet 2017 11:03 To: Jean-Jacques Hiblot ; Patrice CHOTARD ; u-boot at lists.denx.de; sjg at chromium.org Cc: ran.wang_1 at nxp.com; Christophe KERELLO 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 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