* [PATCH v3] net: fec: Fix build for MCF5272
@ 2013-06-18 17:04 Guenter Roeck
[not found] ` <CAOMZO5CU57Jqtzt2ZX=TYiemn5okASo4GU_zer+j736J8yj0OQ@mail.gmail.com>
2013-06-20 0:00 ` [PATCH v3] net: fec: Fix build for MCF5272 David Miller
0 siblings, 2 replies; 9+ messages in thread
From: Guenter Roeck @ 2013-06-18 17:04 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Fabio Estevam, linux-kernel, Guenter Roeck,
Frank Li, Jim Baxter
Commits 4c09eed9 (net: fec: Enable imx6 enet checksum acceleration) and
baa70a5c (net: fec: enable pause frame to improve rx prefomance for 1G
network) introduced functionality into the FEC driver which is not
supported on MCF5272. The registers used to implement this functionality
do not exist on MCF5272. Since register defines for MCF5272 are separate
from register defines for other chips, building images for MCF5272 fails
as follows.
fec_main.c: In function 'fec_restart':
fec_main.c:520:8: error: 'FEC_RACC' undeclared (first use in this function)
fec_main.c:585:3: error: 'FEC_R_FIFO_RSEM' undeclared (first use in this function)
fec_main.c:586:3: error: 'FEC_R_FIFO_RSFL' undeclared (first use in this function)
fec_main.c:587:3: error: 'FEC_R_FIFO_RAEM' undeclared (first use in this function)
fec_main.c:588:3: error: 'FEC_R_FIFO_RAFL' undeclared (first use in this function)
fec_main.c:591:3: error: 'FEC_OPD' undeclared (first use in this function)
Adding the missing register defines is not an option, since the registers
do not exist on MCF5272. Disable the added functionality for MCF5272 builds.
Cc: Frank Li <Frank.Li@freescale.com>
Cc: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v3: Add build error to commit log
v2: Improved explanation to clarify that the build fails due to missing register
defines which can not be added since the registers don't exist on MCF5272.
This problem exists in 3.9 as well, though only due to commit baa70a5c. The
patch does therefore not cleanly apply to 3.9. Options I can see are to ignore
the build error in 3.9, to back-port the patch manually, or to split it into
two separate patches. David, let me know which approach you prefer.
drivers/net/ethernet/freescale/fec_main.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index a667015..d48099f 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -516,6 +516,7 @@ fec_restart(struct net_device *ndev, int duplex)
/* Set MII speed */
writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
+#if !defined(CONFIG_M5272)
/* set RX checksum */
val = readl(fep->hwp + FEC_RACC);
if (fep->csum_flags & FLAG_RX_CSUM_ENABLED)
@@ -523,6 +524,7 @@ fec_restart(struct net_device *ndev, int duplex)
else
val &= ~FEC_RACC_OPTIONS;
writel(val, fep->hwp + FEC_RACC);
+#endif
/*
* The phy interface and speed need to get configured
@@ -575,6 +577,7 @@ fec_restart(struct net_device *ndev, int duplex)
#endif
}
+#if !defined(CONFIG_M5272)
/* enable pause frame*/
if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) ||
((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) &&
@@ -592,6 +595,7 @@ fec_restart(struct net_device *ndev, int duplex)
} else {
rcntl &= ~FEC_ENET_FCE;
}
+#endif /* !defined(CONFIG_M5272) */
writel(rcntl, fep->hwp + FEC_R_CNTRL);
@@ -1205,7 +1209,9 @@ static int fec_enet_mii_probe(struct net_device *ndev)
/* mask with MAC supported features */
if (id_entry->driver_data & FEC_QUIRK_HAS_GBIT) {
phy_dev->supported &= PHY_GBIT_FEATURES;
+#if !defined(CONFIG_M5272)
phy_dev->supported |= SUPPORTED_Pause;
+#endif
}
else
phy_dev->supported &= PHY_BASIC_FEATURES;
@@ -1390,6 +1396,8 @@ static int fec_enet_get_ts_info(struct net_device *ndev,
}
}
+#if !defined(CONFIG_M5272)
+
static void fec_enet_get_pauseparam(struct net_device *ndev,
struct ethtool_pauseparam *pause)
{
@@ -1436,9 +1444,13 @@ static int fec_enet_set_pauseparam(struct net_device *ndev,
return 0;
}
+#endif /* !defined(CONFIG_M5272) */
+
static const struct ethtool_ops fec_enet_ethtool_ops = {
+#if !defined(CONFIG_M5272)
.get_pauseparam = fec_enet_get_pauseparam,
.set_pauseparam = fec_enet_set_pauseparam,
+#endif
.get_settings = fec_enet_get_settings,
.set_settings = fec_enet_set_settings,
.get_drvinfo = fec_enet_get_drvinfo,
@@ -1874,10 +1886,12 @@ fec_probe(struct platform_device *pdev)
/* setup board info structure */
fep = netdev_priv(ndev);
+#if !defined(CONFIG_M5272)
/* default enable pause frame auto negotiation */
if (pdev->id_entry &&
(pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT))
fep->pause_flag |= FEC_PAUSE_FLAG_AUTONEG;
+#endif
fep->hwp = devm_request_and_ioremap(&pdev->dev, r);
fep->pdev = pdev;
--
1.7.9.7
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Nightly stable builds [Was: fec: Fix build for MCF5272]
[not found] ` <CAOMZO5CU57Jqtzt2ZX=TYiemn5okASo4GU_zer+j736J8yj0OQ@mail.gmail.com>
@ 2013-06-19 20:43 ` Guenter Roeck
2013-06-19 22:15 ` Greg Kroah-Hartman
0 siblings, 1 reply; 9+ messages in thread
From: Guenter Roeck @ 2013-06-19 20:43 UTC (permalink / raw)
To: Fabio Estevam
Cc: Greg Kroah-Hartman, linux-kernel, Michael Ellerman,
Stephen Rothwell
On Wed, Jun 19, 2013 at 10:42:36AM -0300, Fabio Estevam wrote:
> Hi Guenter,
>
> FYI
>
> I asked Stephen to include m5272c3_defconfig as part of his daily
> build and now it is available:
> http://kisskb.ellerman.id.au/kisskb/buildresult/8991795/
>
Nice front-end.
Greg, would it be useful to set up something similar for pending stable builds ?
I have back-end code doing that running on one of my servers at home, but no
web front-end.
Any idea whom to talk to to set this up ? Stephen ? Michael ?
Thanks,
Guenter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Nightly stable builds [Was: fec: Fix build for MCF5272]
2013-06-19 20:43 ` Nightly stable builds [Was: fec: Fix build for MCF5272] Guenter Roeck
@ 2013-06-19 22:15 ` Greg Kroah-Hartman
2013-06-19 23:24 ` Guenter Roeck
0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2013-06-19 22:15 UTC (permalink / raw)
To: Guenter Roeck
Cc: Fabio Estevam, linux-kernel, Michael Ellerman, Stephen Rothwell
On Wed, Jun 19, 2013 at 01:43:48PM -0700, Guenter Roeck wrote:
> On Wed, Jun 19, 2013 at 10:42:36AM -0300, Fabio Estevam wrote:
> > Hi Guenter,
> >
> > FYI
> >
> > I asked Stephen to include m5272c3_defconfig as part of his daily
> > build and now it is available:
> > http://kisskb.ellerman.id.au/kisskb/buildresult/8991795/
> >
> Nice front-end.
>
> Greg, would it be useful to set up something similar for pending stable builds ?
> I have back-end code doing that running on one of my servers at home, but no
> web front-end.
>
> Any idea whom to talk to to set this up ? Stephen ? Michael ?
I have no idea. I publish the stable build patches all publically, so a
build-bot could easily be built using it, which would be great to have.
thanks
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Nightly stable builds [Was: fec: Fix build for MCF5272]
2013-06-19 22:15 ` Greg Kroah-Hartman
@ 2013-06-19 23:24 ` Guenter Roeck
2013-06-21 1:21 ` Michael Ellerman
0 siblings, 1 reply; 9+ messages in thread
From: Guenter Roeck @ 2013-06-19 23:24 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Fabio Estevam, linux-kernel, Michael Ellerman, Stephen Rothwell
On Wed, Jun 19, 2013 at 03:15:19PM -0700, Greg Kroah-Hartman wrote:
> On Wed, Jun 19, 2013 at 01:43:48PM -0700, Guenter Roeck wrote:
> > On Wed, Jun 19, 2013 at 10:42:36AM -0300, Fabio Estevam wrote:
> > > Hi Guenter,
> > >
> > > FYI
> > >
> > > I asked Stephen to include m5272c3_defconfig as part of his daily
> > > build and now it is available:
> > > http://kisskb.ellerman.id.au/kisskb/buildresult/8991795/
> > >
> > Nice front-end.
> >
> > Greg, would it be useful to set up something similar for pending stable builds ?
> > I have back-end code doing that running on one of my servers at home, but no
> > web front-end.
> >
> > Any idea whom to talk to to set this up ? Stephen ? Michael ?
>
> I have no idea. I publish the stable build patches all publically, so a
> build-bot could easily be built using it, which would be great to have.
>
The build-bot isn't the problem; as I mentioned above, I already have one
running. I was referring to a web front-end for it.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3] net: fec: Fix build for MCF5272
2013-06-18 17:04 [PATCH v3] net: fec: Fix build for MCF5272 Guenter Roeck
[not found] ` <CAOMZO5CU57Jqtzt2ZX=TYiemn5okASo4GU_zer+j736J8yj0OQ@mail.gmail.com>
@ 2013-06-20 0:00 ` David Miller
2013-06-29 3:12 ` Guenter Roeck
1 sibling, 1 reply; 9+ messages in thread
From: David Miller @ 2013-06-20 0:00 UTC (permalink / raw)
To: linux; +Cc: netdev, festevam, linux-kernel, Frank.Li, jim_baxter
From: Guenter Roeck <linux@roeck-us.net>
Date: Tue, 18 Jun 2013 10:04:59 -0700
> Commits 4c09eed9 (net: fec: Enable imx6 enet checksum acceleration) and
> baa70a5c (net: fec: enable pause frame to improve rx prefomance for 1G
> network) introduced functionality into the FEC driver which is not
> supported on MCF5272. The registers used to implement this functionality
> do not exist on MCF5272. Since register defines for MCF5272 are separate
> from register defines for other chips, building images for MCF5272 fails
> as follows.
>
> fec_main.c: In function 'fec_restart':
> fec_main.c:520:8: error: 'FEC_RACC' undeclared (first use in this function)
> fec_main.c:585:3: error: 'FEC_R_FIFO_RSEM' undeclared (first use in this function)
> fec_main.c:586:3: error: 'FEC_R_FIFO_RSFL' undeclared (first use in this function)
> fec_main.c:587:3: error: 'FEC_R_FIFO_RAEM' undeclared (first use in this function)
> fec_main.c:588:3: error: 'FEC_R_FIFO_RAFL' undeclared (first use in this function)
> fec_main.c:591:3: error: 'FEC_OPD' undeclared (first use in this function)
>
> Adding the missing register defines is not an option, since the registers
> do not exist on MCF5272. Disable the added functionality for MCF5272 builds.
>
> Cc: Frank Li <Frank.Li@freescale.com>
> Cc: Jim Baxter <jim_baxter@mentor.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Applied, thanks.
> This problem exists in 3.9 as well, though only due to commit baa70a5c. The
> patch does therefore not cleanly apply to 3.9. Options I can see are to ignore
> the build error in 3.9, to back-port the patch manually, or to split it into
> two separate patches. David, let me know which approach you prefer.
You can feel free to send me a backport for v3.9-stable, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Nightly stable builds [Was: fec: Fix build for MCF5272]
2013-06-19 23:24 ` Guenter Roeck
@ 2013-06-21 1:21 ` Michael Ellerman
2013-06-21 1:46 ` Guenter Roeck
0 siblings, 1 reply; 9+ messages in thread
From: Michael Ellerman @ 2013-06-21 1:21 UTC (permalink / raw)
To: Guenter Roeck
Cc: Greg Kroah-Hartman, Fabio Estevam, linux-kernel, Stephen Rothwell
On Wed, 2013-06-19 at 16:24 -0700, Guenter Roeck wrote:
> On Wed, Jun 19, 2013 at 03:15:19PM -0700, Greg Kroah-Hartman wrote:
> > On Wed, Jun 19, 2013 at 01:43:48PM -0700, Guenter Roeck wrote:
> > > On Wed, Jun 19, 2013 at 10:42:36AM -0300, Fabio Estevam wrote:
> > > > Hi Guenter,
> > > >
> > > > FYI
> > > >
> > > > I asked Stephen to include m5272c3_defconfig as part of his daily
> > > > build and now it is available:
> > > > http://kisskb.ellerman.id.au/kisskb/buildresult/8991795/
> > > >
> > > Nice front-end.
> > >
> > > Greg, would it be useful to set up something similar for pending stable builds ?
> > > I have back-end code doing that running on one of my servers at home, but no
> > > web front-end.
> > >
> > > Any idea whom to talk to to set this up ? Stephen ? Michael ?
> >
> > I have no idea. I publish the stable build patches all publically, so a
> > build-bot could easily be built using it, which would be great to have.
> >
> The build-bot isn't the problem; as I mentioned above, I already have one
> running. I was referring to a web front-end for it.
Hi Guenter,
Actually I hate the web front end, but that's because I wrote it :)
It's pretty, but it doesn't scale very well, "one of these days" I'll
rewrite it. My plan is to actually just make it a frontend for buildbot
- but I never have time :)
We already build the published stable branches, see:
http://kisskb.ellerman.id.au/kisskb/branch/
But I think you're talking about building the patch queues before they
go into git? If so the only hurdle would be someone publishing a git
tree of them - kisskb only knows how to build git trees.
cheers
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Nightly stable builds [Was: fec: Fix build for MCF5272]
2013-06-21 1:21 ` Michael Ellerman
@ 2013-06-21 1:46 ` Guenter Roeck
2013-06-21 1:57 ` Greg Kroah-Hartman
0 siblings, 1 reply; 9+ messages in thread
From: Guenter Roeck @ 2013-06-21 1:46 UTC (permalink / raw)
To: Michael Ellerman
Cc: Greg Kroah-Hartman, Fabio Estevam, linux-kernel, Stephen Rothwell
On Fri, Jun 21, 2013 at 11:21:01AM +1000, Michael Ellerman wrote:
>
> On Wed, 2013-06-19 at 16:24 -0700, Guenter Roeck wrote:
> > On Wed, Jun 19, 2013 at 03:15:19PM -0700, Greg Kroah-Hartman wrote:
> > > On Wed, Jun 19, 2013 at 01:43:48PM -0700, Guenter Roeck wrote:
> > > > On Wed, Jun 19, 2013 at 10:42:36AM -0300, Fabio Estevam wrote:
> > > > > Hi Guenter,
> > > > >
> > > > > FYI
> > > > >
> > > > > I asked Stephen to include m5272c3_defconfig as part of his daily
> > > > > build and now it is available:
> > > > > http://kisskb.ellerman.id.au/kisskb/buildresult/8991795/
> > > > >
> > > > Nice front-end.
> > > >
> > > > Greg, would it be useful to set up something similar for pending stable builds ?
> > > > I have back-end code doing that running on one of my servers at home, but no
> > > > web front-end.
> > > >
> > > > Any idea whom to talk to to set this up ? Stephen ? Michael ?
> > >
> > > I have no idea. I publish the stable build patches all publically, so a
> > > build-bot could easily be built using it, which would be great to have.
> > >
> > The build-bot isn't the problem; as I mentioned above, I already have one
> > running. I was referring to a web front-end for it.
>
> Hi Guenter,
>
> Actually I hate the web front end, but that's because I wrote it :)
>
> It's pretty, but it doesn't scale very well, "one of these days" I'll
> rewrite it. My plan is to actually just make it a frontend for buildbot
> - but I never have time :)
>
Time is my problem too ... but then it is more costly for me if a problem
makes it into a release, so I have some interest in getting builds
(and at some point run tests) automated as much as possible.
> We already build the published stable branches, see:
> http://kisskb.ellerman.id.au/kisskb/branch/
>
> But I think you're talking about building the patch queues before they
> go into git? If so the only hurdle would be someone publishing a git
Yes, that is the idea.
> tree of them - kisskb only knows how to build git trees.
>
I "solved" that problem by creating a front-end to my own nightly build script,
which also works on git repos. Essentially it takes the stable queue from Greg's
repo on kernel.org, executes quiltimport on top of the respective stable
branch, and then starts the actual build script.
Would it help if I manage to automate that and publish the resulting branches in
a repository on kernel.org, say, on a nightly basis ?
Another key advantage of having a git repository would be that it would trigger
auto-builds as well as smatch runs by others, so test coverage would be much
better than today.
Greg, would it be ok with you if I create such a repository, or would you want
to create and manage one yourself ?
Thanks,
Guenter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Nightly stable builds [Was: fec: Fix build for MCF5272]
2013-06-21 1:46 ` Guenter Roeck
@ 2013-06-21 1:57 ` Greg Kroah-Hartman
0 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2013-06-21 1:57 UTC (permalink / raw)
To: Guenter Roeck
Cc: Michael Ellerman, Fabio Estevam, linux-kernel, Stephen Rothwell
On Thu, Jun 20, 2013 at 06:46:41PM -0700, Guenter Roeck wrote:
> On Fri, Jun 21, 2013 at 11:21:01AM +1000, Michael Ellerman wrote:
> >
> > On Wed, 2013-06-19 at 16:24 -0700, Guenter Roeck wrote:
> > > On Wed, Jun 19, 2013 at 03:15:19PM -0700, Greg Kroah-Hartman wrote:
> > > > On Wed, Jun 19, 2013 at 01:43:48PM -0700, Guenter Roeck wrote:
> > > > > On Wed, Jun 19, 2013 at 10:42:36AM -0300, Fabio Estevam wrote:
> > > > > > Hi Guenter,
> > > > > >
> > > > > > FYI
> > > > > >
> > > > > > I asked Stephen to include m5272c3_defconfig as part of his daily
> > > > > > build and now it is available:
> > > > > > http://kisskb.ellerman.id.au/kisskb/buildresult/8991795/
> > > > > >
> > > > > Nice front-end.
> > > > >
> > > > > Greg, would it be useful to set up something similar for pending stable builds ?
> > > > > I have back-end code doing that running on one of my servers at home, but no
> > > > > web front-end.
> > > > >
> > > > > Any idea whom to talk to to set this up ? Stephen ? Michael ?
> > > >
> > > > I have no idea. I publish the stable build patches all publically, so a
> > > > build-bot could easily be built using it, which would be great to have.
> > > >
> > > The build-bot isn't the problem; as I mentioned above, I already have one
> > > running. I was referring to a web front-end for it.
> >
> > Hi Guenter,
> >
> > Actually I hate the web front end, but that's because I wrote it :)
> >
> > It's pretty, but it doesn't scale very well, "one of these days" I'll
> > rewrite it. My plan is to actually just make it a frontend for buildbot
> > - but I never have time :)
> >
> Time is my problem too ... but then it is more costly for me if a problem
> makes it into a release, so I have some interest in getting builds
> (and at some point run tests) automated as much as possible.
>
> > We already build the published stable branches, see:
> > http://kisskb.ellerman.id.au/kisskb/branch/
> >
> > But I think you're talking about building the patch queues before they
> > go into git? If so the only hurdle would be someone publishing a git
>
> Yes, that is the idea.
>
> > tree of them - kisskb only knows how to build git trees.
> >
> I "solved" that problem by creating a front-end to my own nightly build script,
> which also works on git repos. Essentially it takes the stable queue from Greg's
> repo on kernel.org, executes quiltimport on top of the respective stable
> branch, and then starts the actual build script.
>
> Would it help if I manage to automate that and publish the resulting branches in
> a repository on kernel.org, say, on a nightly basis ?
>
> Another key advantage of having a git repository would be that it would trigger
> auto-builds as well as smatch runs by others, so test coverage would be much
> better than today.
>
> Greg, would it be ok with you if I create such a repository, or would you want
> to create and manage one yourself ?
I don't want to create any such repo, so feel free to do it yourself :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3] net: fec: Fix build for MCF5272
2013-06-20 0:00 ` [PATCH v3] net: fec: Fix build for MCF5272 David Miller
@ 2013-06-29 3:12 ` Guenter Roeck
0 siblings, 0 replies; 9+ messages in thread
From: Guenter Roeck @ 2013-06-29 3:12 UTC (permalink / raw)
To: David Miller; +Cc: netdev, festevam, linux-kernel, Frank.Li, jim_baxter
On Wed, Jun 19, 2013 at 05:00:18PM -0700, David Miller wrote:
> From: Guenter Roeck <linux@roeck-us.net>
> Date: Tue, 18 Jun 2013 10:04:59 -0700
>
> > Commits 4c09eed9 (net: fec: Enable imx6 enet checksum acceleration) and
> > baa70a5c (net: fec: enable pause frame to improve rx prefomance for 1G
> > network) introduced functionality into the FEC driver which is not
> > supported on MCF5272. The registers used to implement this functionality
> > do not exist on MCF5272. Since register defines for MCF5272 are separate
> > from register defines for other chips, building images for MCF5272 fails
> > as follows.
> >
> > fec_main.c: In function 'fec_restart':
> > fec_main.c:520:8: error: 'FEC_RACC' undeclared (first use in this function)
> > fec_main.c:585:3: error: 'FEC_R_FIFO_RSEM' undeclared (first use in this function)
> > fec_main.c:586:3: error: 'FEC_R_FIFO_RSFL' undeclared (first use in this function)
> > fec_main.c:587:3: error: 'FEC_R_FIFO_RAEM' undeclared (first use in this function)
> > fec_main.c:588:3: error: 'FEC_R_FIFO_RAFL' undeclared (first use in this function)
> > fec_main.c:591:3: error: 'FEC_OPD' undeclared (first use in this function)
> >
> > Adding the missing register defines is not an option, since the registers
> > do not exist on MCF5272. Disable the added functionality for MCF5272 builds.
> >
> > Cc: Frank Li <Frank.Li@freescale.com>
> > Cc: Jim Baxter <jim_baxter@mentor.com>
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>
> Applied, thanks.
>
> > This problem exists in 3.9 as well, though only due to commit baa70a5c. The
> > patch does therefore not cleanly apply to 3.9. Options I can see are to ignore
> > the build error in 3.9, to back-port the patch manually, or to split it into
> > two separate patches. David, let me know which approach you prefer.
>
> You can feel free to send me a backport for v3.9-stable, thanks.
>
Here it is.
Guenter
---
From: Guenter Roeck <linux@roeck-us.net>
Date: Tue, 18 Jun 2013 10:04:59 -0700
Subject: [PATCH] net: fec: Fix build for MCF5272
Commits 4c09eed9 (net: fec: Enable imx6 enet checksum acceleration) and
baa70a5c (net: fec: enable pause frame to improve rx prefomance for 1G
network) introduced functionality into the FEC driver which is not
supported on MCF5272. The registers used to implement this functionality
do not exist on MCF5272. Since register defines for MCF5272 are separate
from register defines for other chips, building images for MCF5272 fails
as follows.
fec_main.c: In function 'fec_restart':
fec_main.c:520:8: error: 'FEC_RACC' undeclared (first use in this function)
fec_main.c:585:3: error: 'FEC_R_FIFO_RSEM' undeclared (first use in this function)
fec_main.c:586:3: error: 'FEC_R_FIFO_RSFL' undeclared (first use in this function)
fec_main.c:587:3: error: 'FEC_R_FIFO_RAEM' undeclared (first use in this function)
fec_main.c:588:3: error: 'FEC_R_FIFO_RAFL' undeclared (first use in this function)
fec_main.c:591:3: error: 'FEC_OPD' undeclared (first use in this function)
Adding the missing register defines is not an option, since the registers
do not exist on MCF5272. Disable the added functionality for MCF5272 builds.
Backport to v3.9. Upstream commit d13919301d9a34cd4d3cc5ac73b89012c48cad71.
Cc: Frank Li <Frank.Li@freescale.com>
Cc: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/ethernet/freescale/fec.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index ef5b595..49af0174 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -527,6 +527,7 @@ fec_restart(struct net_device *ndev, int duplex)
#endif
}
+#if !defined(CONFIG_M5272)
/* enable pause frame*/
if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) ||
((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) &&
@@ -544,6 +545,7 @@ fec_restart(struct net_device *ndev, int duplex)
} else {
rcntl &= ~FEC_ENET_FCE;
}
+#endif /* !defined(CONFIG_M5272) */
writel(rcntl, fep->hwp + FEC_R_CNTRL);
@@ -1139,7 +1141,9 @@ static int fec_enet_mii_probe(struct net_device *ndev)
/* mask with MAC supported features */
if (id_entry->driver_data & FEC_QUIRK_HAS_GBIT) {
phy_dev->supported &= PHY_GBIT_FEATURES;
+#if !defined(CONFIG_M5272)
phy_dev->supported |= SUPPORTED_Pause;
+#endif
}
else
phy_dev->supported &= PHY_BASIC_FEATURES;
@@ -1326,6 +1330,8 @@ static int fec_enet_get_ts_info(struct net_device *ndev,
}
}
+#if !defined(CONFIG_M5272)
+
static void fec_enet_get_pauseparam(struct net_device *ndev,
struct ethtool_pauseparam *pause)
{
@@ -1372,9 +1378,13 @@ static int fec_enet_set_pauseparam(struct net_device *ndev,
return 0;
}
+#endif /* !defined(CONFIG_M5272) */
+
static const struct ethtool_ops fec_enet_ethtool_ops = {
+#if !defined(CONFIG_M5272)
.get_pauseparam = fec_enet_get_pauseparam,
.set_pauseparam = fec_enet_set_pauseparam,
+#endif
.get_settings = fec_enet_get_settings,
.set_settings = fec_enet_set_settings,
.get_drvinfo = fec_enet_get_drvinfo,
@@ -1794,10 +1804,12 @@ fec_probe(struct platform_device *pdev)
/* setup board info structure */
fep = netdev_priv(ndev);
+#if !defined(CONFIG_M5272)
/* default enable pause frame auto negotiation */
if (pdev->id_entry &&
(pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT))
fep->pause_flag |= FEC_PAUSE_FLAG_AUTONEG;
+#endif
fep->hwp = ioremap(r->start, resource_size(r));
fep->pdev = pdev;
--
1.7.9.7
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-06-29 3:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 17:04 [PATCH v3] net: fec: Fix build for MCF5272 Guenter Roeck
[not found] ` <CAOMZO5CU57Jqtzt2ZX=TYiemn5okASo4GU_zer+j736J8yj0OQ@mail.gmail.com>
2013-06-19 20:43 ` Nightly stable builds [Was: fec: Fix build for MCF5272] Guenter Roeck
2013-06-19 22:15 ` Greg Kroah-Hartman
2013-06-19 23:24 ` Guenter Roeck
2013-06-21 1:21 ` Michael Ellerman
2013-06-21 1:46 ` Guenter Roeck
2013-06-21 1:57 ` Greg Kroah-Hartman
2013-06-20 0:00 ` [PATCH v3] net: fec: Fix build for MCF5272 David Miller
2013-06-29 3:12 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).