All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Igal.Liberman@freescale.com" <Igal.Liberman@freescale.com>,
	"madalin.bucur@freescale.com" <madalin.bucur@freescale.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC,v3,12/12] fsl/fman: Add FMan MAC driver
Date: Tue, 21 Jul 2015 13:44:59 +0000	[thread overview]
Message-ID: <1437486300.10831.42.camel@transmode.se> (raw)
In-Reply-To: <BL2PR03MB545971A75540877E4B4FFD3E6850@BL2PR03MB545.namprd03.prod.outlook.com>

On Mon, 2015-07-20 at 13:33 +0000, Madalin-Cristian Bucur wrote:
> > -----Original Message-----
> > From: Joakim Tjernlund [mailto:joakim.tjernlund@transmode.se]
> > Sent: Monday, July 20, 2015 3:57 PM
> > To: netdev@vger.kernel.org; Liberman Igal-B31950; Bucur Madalin-Cristia=
n-
> > B32716
> > Cc: linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org
> > Subject: Re: [RFC,v3,12/12] fsl/fman: Add FMan MAC driver
> >=20
> > On Mon, 2015-07-20 at 12:28 +0000, Madalin-Cristian Bucur wrote:
> > > Hi Joakim,
> > >=20
> > > It seems we just need to align to the API introduced by Thomas Petazz=
oni
> > > in 3be2a49e.
> > >=20
> > > Madalin
> >=20
> > So it seems, any idea when the next spin will be ready?
> > Could you also push it onto
> >   http://git.freescale.com/git/cgit.cgi/ppc/upstream/linux.git/
> > ?
> >=20
> >  Jocke
>=20
> We're working on addressing all the feedback received to date (you've jus=
t added
> a bit more) then we'll re-submit the FMan driver together with the DPAA E=
thernet
> driver. A push in the public git is also going to take place after the pa=
tches are sent
> for review.

Hi again

Now I got to actually use PHY less(aka. Fixed PHY) too. I had to hack AN of=
f for all such links
to get a 1000 SGMII link working:
--- a/drivers/net/ethernet/freescale/fman/mac/memac.c
+++ b/drivers/net/ethernet/freescale/fman/mac/memac.c
@@ -80,7 +80,10 @@ static void setup_sgmii_internal_phy(struct memac_t *p_m=
emac, uint8_t phy_addr)
                           ENET_SPEED_1000);
=20
        /* SGMII mode + AN enable */
-       tmp_reg16 =3D PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII;
+       //tmp_reg16 =3D PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII;
+       tmp_reg16 =3D PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII | 0x8;
+       if (p_memac->mac_id !=3D 0)
+               tmp_reg16 &=3D ~PHY_SGMII_IF_MODE_AN;
        memac_mii_write_phy_reg(p_memac, phy_addr, 0x14, tmp_reg16);
=20
        /* Device ability according to SGMII specification */
@@ -104,6 +107,8 @@ static void setup_sgmii_internal_phy(struct memac_t *p_=
memac, uint8_t phy_addr)
=20
        /* Restart AN */
        tmp_reg16 =3D PHY_SGMII_CR_DEF_VAL | PHY_SGMII_CR_RESET_AN;
+       if (p_memac->mac_id !=3D 0)
+               tmp_reg16 &=3D ~0x1000;
        memac_mii_write_phy_reg(p_memac, phy_addr, 0x0, tmp_reg16);
=20
        /* Restore original enet mode */


Could you please fix this too?

 Jocke=

WARNING: multiple messages have this Message-ID (diff)
From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Igal.Liberman@freescale.com" <Igal.Liberman@freescale.com>,
	"madalin.bucur@freescale.com" <madalin.bucur@freescale.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC,v3,12/12] fsl/fman: Add FMan MAC driver
Date: Tue, 21 Jul 2015 13:44:59 +0000	[thread overview]
Message-ID: <1437486300.10831.42.camel@transmode.se> (raw)
In-Reply-To: <BL2PR03MB545971A75540877E4B4FFD3E6850@BL2PR03MB545.namprd03.prod.outlook.com>

On Mon, 2015-07-20 at 13:33 +0000, Madalin-Cristian Bucur wrote:
> > -----Original Message-----
> > From: Joakim Tjernlund [mailto:joakim.tjernlund@transmode.se]
> > Sent: Monday, July 20, 2015 3:57 PM
> > To: netdev@vger.kernel.org; Liberman Igal-B31950; Bucur Madalin-Cristian-
> > B32716
> > Cc: linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org
> > Subject: Re: [RFC,v3,12/12] fsl/fman: Add FMan MAC driver
> > 
> > On Mon, 2015-07-20 at 12:28 +0000, Madalin-Cristian Bucur wrote:
> > > Hi Joakim,
> > > 
> > > It seems we just need to align to the API introduced by Thomas Petazzoni
> > > in 3be2a49e.
> > > 
> > > Madalin
> > 
> > So it seems, any idea when the next spin will be ready?
> > Could you also push it onto
> >   http://git.freescale.com/git/cgit.cgi/ppc/upstream/linux.git/
> > ?
> > 
> >  Jocke
> 
> We're working on addressing all the feedback received to date (you've just added
> a bit more) then we'll re-submit the FMan driver together with the DPAA Ethernet
> driver. A push in the public git is also going to take place after the patches are sent
> for review.

Hi again

Now I got to actually use PHY less(aka. Fixed PHY) too. I had to hack AN off for all such links
to get a 1000 SGMII link working:
--- a/drivers/net/ethernet/freescale/fman/mac/memac.c
+++ b/drivers/net/ethernet/freescale/fman/mac/memac.c
@@ -80,7 +80,10 @@ static void setup_sgmii_internal_phy(struct memac_t *p_memac, uint8_t phy_addr)
                           ENET_SPEED_1000);
 
        /* SGMII mode + AN enable */
-       tmp_reg16 = PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII;
+       //tmp_reg16 = PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII;
+       tmp_reg16 = PHY_SGMII_IF_MODE_AN | PHY_SGMII_IF_MODE_SGMII | 0x8;
+       if (p_memac->mac_id != 0)
+               tmp_reg16 &= ~PHY_SGMII_IF_MODE_AN;
        memac_mii_write_phy_reg(p_memac, phy_addr, 0x14, tmp_reg16);
 
        /* Device ability according to SGMII specification */
@@ -104,6 +107,8 @@ static void setup_sgmii_internal_phy(struct memac_t *p_memac, uint8_t phy_addr)
 
        /* Restart AN */
        tmp_reg16 = PHY_SGMII_CR_DEF_VAL | PHY_SGMII_CR_RESET_AN;
+       if (p_memac->mac_id != 0)
+               tmp_reg16 &= ~0x1000;
        memac_mii_write_phy_reg(p_memac, phy_addr, 0x0, tmp_reg16);
 
        /* Restore original enet mode */


Could you please fix this too?

 Jocke

  reply	other threads:[~2015-07-21 13:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29  9:29 [RFC,v3,12/12] fsl/fman: Add FMan MAC driver Igal.Liberman
2015-04-29  9:29 ` Igal.Liberman
2015-07-20 12:16 ` Joakim Tjernlund
2015-07-20 12:16   ` Joakim Tjernlund
2015-07-20 12:28   ` Madalin-Cristian Bucur
2015-07-20 12:28     ` Madalin-Cristian Bucur
2015-07-20 12:57     ` Joakim Tjernlund
2015-07-20 12:57       ` Joakim Tjernlund
2015-07-20 13:33       ` Madalin-Cristian Bucur
2015-07-20 13:33         ` Madalin-Cristian Bucur
2015-07-21 13:44         ` Joakim Tjernlund [this message]
2015-07-21 13:44           ` Joakim Tjernlund
  -- strict thread matches above, loose matches on Subject: below --
2015-05-07 13:05 [RFC,v3 01/12] fsl/fman: Add the FMan FLIB headers Madalin Bucur
2015-05-07 13:05 ` [RFC,v3 02/12] fsl/fman: Add the FMan FLIB Madalin Bucur
2015-05-07 13:05   ` [RFC,v3 03/12] fsl/fman: Add the FMan port FLIB headers Madalin Bucur
2015-05-07 13:05     ` [RFC,v3 04/12] fsl/fman: Add the FMan port FLIB Madalin Bucur
2015-05-07 13:05       ` [RFC,v3 05/12] fsl/fman: Add the FMan MAC FLIB headers Madalin Bucur
2015-05-07 13:05         ` [RFC,v3 06/12] fsl/fman: Add the FMan MAC FLIB Madalin Bucur
2015-05-07 13:05           ` [RFC,v3 07/12] fsl/fman: Add FMan MURAM support Madalin Bucur
2015-05-07 13:05             ` [RFC,v3 08/12] fsl/fman: Add Frame Manager support Madalin Bucur
2015-05-07 13:05               ` [RFC,v3 09/12] fsl/fman: Add FMan MAC support Madalin Bucur
2015-05-07 13:05                 ` [RFC,v3 10/12] fsl/fman: Add FMan SP support Madalin Bucur
2015-05-07 13:05                   ` [RFC,v3 11/12] fsl/fman: Add FMan Port Support Madalin Bucur
2015-05-07 13:05                     ` [RFC,v3 12/12] fsl/fman: Add FMan MAC driver Madalin Bucur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437486300.10831.42.camel@transmode.se \
    --to=joakim.tjernlund@transmode.se \
    --cc=Igal.Liberman@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@freescale.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.