From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/1 net-next] NET: FEC: dynamtic check DMA desc buff type
Date: Fri, 4 Jan 2013 14:09:17 +0100 [thread overview]
Message-ID: <20130104130917.GC1906@pengutronix.de> (raw)
In-Reply-To: <1357265063-30528-1-git-send-email-Frank.Li@freescale.com>
On Fri, Jan 04, 2013 at 10:04:23AM +0800, Frank Li wrote:
> MX6 and mx28 support enhanced DMA descriptor buff to support 1588
> ptp. But MX25, MX3x, MX5x can't support enhanced DMA descriptor buff.
> Check fec type and choose correct DMA descriptor buff type.
>
> Remove static config CONFIG_FEC_PTP.
> ptp function will be auto detected.
>
> Signed-off-by: Frank Li <Frank.Li@freescale.com>
Two minor comments, otherwise:
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> @@ -1574,6 +1617,8 @@ fec_probe(struct platform_device *pdev)
> fep->pdev = pdev;
> fep->dev_id = dev_id++;
>
> + fep->bufdesc_ex = 0;
> +
fep already is zeroed, so this is unnecessary.
> if (!fep->hwp) {
> ret = -ENOMEM;
> goto failed_ioremap;
> @@ -1628,19 +1673,19 @@ fec_probe(struct platform_device *pdev)
> goto failed_clk;
> }
>
> -#ifdef CONFIG_FEC_PTP
> fep->clk_ptp = devm_clk_get(&pdev->dev, "ptp");
> + fep->bufdesc_ex =
> + pdev->id_entry->driver_data & FEC_QUIRK_HAS_BUFDESC_EX;
> if (IS_ERR(fep->clk_ptp)) {
> ret = PTR_ERR(fep->clk_ptp);
> - goto failed_clk;
> + fep->bufdesc_ex = 0;
> }
Since you remove the goto you can remove the 'ret =' aswell.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
WARNING: multiple messages have this Message-ID (diff)
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Frank Li <Frank.Li@freescale.com>
Cc: lznuaa@gmail.com, davem@davemloft.net,
linux-arm-kernel@lists.infradead.org, shawn.guo@linaro.org,
netdev@vger.kernel.org
Subject: Re: [PATCH v3 1/1 net-next] NET: FEC: dynamtic check DMA desc buff type
Date: Fri, 4 Jan 2013 14:09:17 +0100 [thread overview]
Message-ID: <20130104130917.GC1906@pengutronix.de> (raw)
In-Reply-To: <1357265063-30528-1-git-send-email-Frank.Li@freescale.com>
On Fri, Jan 04, 2013 at 10:04:23AM +0800, Frank Li wrote:
> MX6 and mx28 support enhanced DMA descriptor buff to support 1588
> ptp. But MX25, MX3x, MX5x can't support enhanced DMA descriptor buff.
> Check fec type and choose correct DMA descriptor buff type.
>
> Remove static config CONFIG_FEC_PTP.
> ptp function will be auto detected.
>
> Signed-off-by: Frank Li <Frank.Li@freescale.com>
Two minor comments, otherwise:
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> @@ -1574,6 +1617,8 @@ fec_probe(struct platform_device *pdev)
> fep->pdev = pdev;
> fep->dev_id = dev_id++;
>
> + fep->bufdesc_ex = 0;
> +
fep already is zeroed, so this is unnecessary.
> if (!fep->hwp) {
> ret = -ENOMEM;
> goto failed_ioremap;
> @@ -1628,19 +1673,19 @@ fec_probe(struct platform_device *pdev)
> goto failed_clk;
> }
>
> -#ifdef CONFIG_FEC_PTP
> fep->clk_ptp = devm_clk_get(&pdev->dev, "ptp");
> + fep->bufdesc_ex =
> + pdev->id_entry->driver_data & FEC_QUIRK_HAS_BUFDESC_EX;
> if (IS_ERR(fep->clk_ptp)) {
> ret = PTR_ERR(fep->clk_ptp);
> - goto failed_clk;
> + fep->bufdesc_ex = 0;
> }
Since you remove the goto you can remove the 'ret =' aswell.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2013-01-04 13:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-04 2:04 [PATCH v3 1/1 net-next] NET: FEC: dynamtic check DMA desc buff type Frank Li
2013-01-04 2:04 ` Frank Li
2013-01-04 13:09 ` Sascha Hauer [this message]
2013-01-04 13:09 ` Sascha Hauer
2013-01-04 23:16 ` David Miller
2013-01-04 23:16 ` David Miller
2013-03-20 16:04 ` Uwe Kleine-König
2013-03-20 16:04 ` Uwe Kleine-König
2013-03-20 17:28 ` Ben Hutchings
2013-03-20 17:28 ` Ben Hutchings
2013-03-20 19:09 ` Ben Hutchings
2013-03-20 19:09 ` Ben Hutchings
2013-03-20 18:06 ` Fabio Estevam
2013-03-20 18:06 ` Fabio Estevam
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=20130104130917.GC1906@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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.