Subject: Re: [PATCH 02/15] phy: mvebu-cp110-comphy: Add SMC call support

From: Miquel Raynal <[email-masked]>
Date: Wed, 3 Apr 2019 11:24:09 +0200

Hi Grzegorz,

Grzegorz Jaszczyk <[email-masked]> wrote on Wed, 3 Apr 2019 11:02:15
+0200:

> Hi Miquel,
> 
> pon., 1 kwi 2019 o 18:52 Miquel Raynal <[email-masked]> napisał(a):
> > +static int mvebu_comphy_power_on(struct phy *phy)
> > +{
> > +       struct mvebu_comphy_lane *lane = phy_get_drvdata(phy);
> > +       struct mvebu_comphy_priv *priv = lane->priv;
> > +       u32 fw_param = 0;
> > +       int fw_mode;
> > +       int ret;
> > +
> > +       fw_mode = mvebu_comphy_get_fw_mode(lane->id, lane->port,
> > +                                          lane->mode, lane->submode);
> > +       if (fw_mode < 0)
> > +               goto try_legacy;
> > +
> > +       /* Try SMC flow first */
> > +       switch (lane->mode) {
> > +       case PHY_MODE_ETHERNET:
> > +               dev_dbg(priv->dev, "set lane %d to Ethernet mode\n", lane->id);
> > +               switch (lane->submode) {
> > +               case PHY_INTERFACE_MODE_SGMII:
> > +               case PHY_INTERFACE_MODE_2500BASEX:
> > +               case PHY_INTERFACE_MODE_10GKR:
> > +                       fw_param = COMPHY_FW_PARAM(fw_mode, lane->port);
> 
> It seems it will not work for SGMII and 2500BASEX. It is because you
> are setting max speed for all comphy modes inside COMPHY_FW_PARAM
> macro which is wrong. Did you test it?

I misread ATF implementation, I was sure the speed was derived from the
type and this parameter was useless. I'll do the modification.

> BTW can you point to some public temporary git branch where this
> patchset can be found?

Just pushed there if you want to take a look:
https://github.com/miquelraynal/linux.git marvell/5.1-rc1/cp110-comphy

Thanks for the review!
Miquèl

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel