Messages in this thread | | | Date | Thu, 12 Feb 2015 17:52:42 -0800 | From | David Cohen <> | Subject | Re: [PATCH 8/8] phy: add driver for TI TUSB1210 ULPI PHY |
| |
Hi Heikki,
Sorry I am starting a new branch on this thread. I need to go back to another topic on this same patch.
On Fri, Jan 23, 2015 at 05:12:58PM +0200, Heikki Krogerus wrote: > TUSB1210 ULPI PHY has vendor specific register for eye > diagram tuning. On some platforms the system firmware has > set optimized value to it. In order to not loose the > optimized value, the driver stores it during probe and > restores it every time the PHY is powered back on. > > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > Cc: Kishon Vijay Abraham I <kishon@ti.com> > ---
[snip]
> + /* Store initial eye diagram optimisation value */ > + ret = ulpi_read(ulpi, TUSB1210_VENDOR_SPECIFIC2);
We can't rely on eye diagram optimization value here. It's possible the phy went through reset (e.g. module unloading/loading). We need a more consistent method. Could we use _DSD instead? That would be more compatible with DT too.
Br, David
> + if (ret < 0) > + return ret; > + > + tusb->eye_diagram_tuning = ret; > + > + tusb->phy = ulpi_phy_create(ulpi, &phy_ops); > + if (IS_ERR(tusb->phy)) > + return PTR_ERR(tusb->phy); > + > + tusb->ulpi = ulpi; > + > + phy_set_drvdata(tusb->phy, tusb); > + ulpi_set_drvdata(ulpi, tusb); > + return 0; > +} > +
| |