From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/13] davinci_emac: move arch-independent defines to separate header
Date: Wed, 30 Nov 2011 09:42:57 +0200 [thread overview]
Message-ID: <4ED5DE81.2040106@compulab.co.il> (raw)
In-Reply-To: <1322498261-20645-2-git-send-email-yanok@emcraft.com>
Hi Ilya,
On 11/28/11 18:37, Ilya Yanok wrote:
> DaVinci EMAC is found not only on DaVinci SoCs but on some OMAP3 SoCs
> also. This patch moves common defines from arch-davinci/emac_defs.h to
> drivers/net/davinci_emac.h
>
> DaVinci specific PHY drivers hacked to include the new header. We might
> want to switch to phylib in future.
>
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
> arch/arm/cpu/arm926ejs/davinci/dp83848.c | 1 +
> arch/arm/cpu/arm926ejs/davinci/et1011c.c | 1 +
> arch/arm/cpu/arm926ejs/davinci/ksz8873.c | 1 +
> arch/arm/cpu/arm926ejs/davinci/lxt972.c | 1 +
> arch/arm/include/asm/arch-davinci/emac_defs.h | 289 -----------------------
> drivers/net/davinci_emac.c | 1 +
> drivers/net/davinci_emac.h | 314 +++++++++++++++++++++++++
> 7 files changed, 319 insertions(+), 289 deletions(-)
> create mode 100644 drivers/net/davinci_emac.h
>
> diff --git a/arch/arm/cpu/arm926ejs/davinci/dp83848.c b/arch/arm/cpu/arm926ejs/davinci/dp83848.c
> index c71c685..d435e4b 100644
> --- a/arch/arm/cpu/arm926ejs/davinci/dp83848.c
> +++ b/arch/arm/cpu/arm926ejs/davinci/dp83848.c
> @@ -29,6 +29,7 @@
> #include <net.h>
> #include <dp83848.h>
> #include <asm/arch/emac_defs.h>
> +#include "../../../../../drivers/net/davinci_emac.h"
Doesn't this look terrible?
I'd suggest, to split the davinci_emac.h to driver private part
(if there is) and to public part.
Then put the public part into the include/ directory - just as,
for example, dm9000 does.
Other then that, the patch indeed good and very useful.
Thanks.
[...]
> diff --git a/arch/arm/cpu/arm926ejs/davinci/ksz8873.c b/arch/arm/cpu/arm926ejs/davinci/ksz8873.c
> index 634eda0..3546e7f 100644
> --- a/arch/arm/cpu/arm926ejs/davinci/ksz8873.c
> +++ b/arch/arm/cpu/arm926ejs/davinci/ksz8873.c
> @@ -36,6 +36,7 @@
> #include <net.h>
> #include <asm/arch/emac_defs.h>
> #include <asm/io.h>
> +#include "../../../../../drivers/net/davinci_emac.h"
grrr..
>
> int ksz8873_is_phy_connected(int phy_addr)
> {
> diff --git a/arch/arm/cpu/arm926ejs/davinci/lxt972.c b/arch/arm/cpu/arm926ejs/davinci/lxt972.c
> index 733d413..cce1fe4 100644
> --- a/arch/arm/cpu/arm926ejs/davinci/lxt972.c
> +++ b/arch/arm/cpu/arm926ejs/davinci/lxt972.c
> @@ -30,6 +30,7 @@
> #include <miiphy.h>
> #include <lxt971a.h>
> #include <asm/arch/emac_defs.h>
> +#include "../../../../../drivers/net/davinci_emac.h"
grrr..
[...]
> diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> index 36c33af..43c4373 100644
> --- a/drivers/net/davinci_emac.c
> +++ b/drivers/net/davinci_emac.c
> @@ -43,6 +43,7 @@
> #include <malloc.h>
> #include <asm/arch/emac_defs.h>
> #include <asm/io.h>
> +#include "davinci_emac.h"
then here, it will be both:
#include <davinci_emac.h>
#include "davinci_emac.h"
[...]
--
Regards,
Igor.
next prev parent reply other threads:[~2011-11-30 7:42 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-28 16:37 [U-Boot] [PATCH V3 00/13] Support for HTKW mcx board Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 01/13] davinci_emac: move arch-independent defines to separate header Ilya Yanok
2011-11-29 18:57 ` Tom Rini
2011-11-30 7:35 ` Igor Grinberg
2011-11-30 14:21 ` Tom Rini
2011-11-30 15:16 ` Igor Grinberg
2011-11-30 15:27 ` Tom Rini
2011-11-30 7:42 ` Igor Grinberg [this message]
2011-12-07 23:48 ` Ilya Yanok
2011-12-08 14:33 ` Igor Grinberg
2011-12-08 14:42 ` Tom Rini
2011-12-08 15:13 ` Igor Grinberg
2011-11-28 16:37 ` [U-Boot] [PATCH 02/13] davinci_emac: use internal addresses in buffer descriptors Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 03/13] davinci_emac: conditionally compile specific PHY support Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 04/13] arm926ejs: add noop implementation for dcache ops Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 05/13] davinci_emac: fix for running with dcache enabled Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 06/13] davinci_emac: hardcode 100Mbps for AM35xx and RMII Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 07/13] AM35xx: add EMAC support Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 08/13] AM3517: move AM3517 specific mux defines to generic header Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 09/13] nand_spl_simple: add support for software ECC Ilya Yanok
2011-11-29 18:42 ` Scott Wood
2011-11-28 16:37 ` [U-Boot] [PATCH 10/13] omap_gpmc: use SOFTECC in SPL if it's enabled Ilya Yanok
2011-11-29 18:43 ` Scott Wood
2011-11-28 16:37 ` [U-Boot] [PATCH 11/13] nand_spl_simple: store temp data at CONFIG_SPL_NAND_WORKSPACE Ilya Yanok
2011-11-29 18:43 ` Scott Wood
2011-11-30 8:06 ` Igor Grinberg
2011-12-07 9:06 ` Stefano Babic
2011-12-07 17:46 ` Ilya Yanok
2011-12-07 18:18 ` Scott Wood
2011-12-07 18:45 ` Wolfgang Denk
2011-12-07 19:05 ` Ilya Yanok
2011-12-07 19:07 ` Stefano Babic
2011-11-28 16:37 ` [U-Boot] [PATCH 12/13] ehci-omap: driver for EHCI host on OMAP3 Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 13/13] mcx: support for HTKW mcx board Ilya Yanok
2011-11-29 18:54 ` Tom Rini
2011-11-30 13:49 ` Andy Fleming
2011-11-30 14:24 ` Tom Rini
2011-11-30 18:41 ` Wolfgang Denk
2011-11-30 8:21 ` Igor Grinberg
2011-12-12 15:39 ` Ilya Yanok
2011-12-12 16:22 ` Tom Rini
2011-12-13 19:18 ` Ilya Yanok
2011-12-14 22:40 ` Tom Rini
2011-11-29 7:29 ` [U-Boot] [PATCH V3 00/13] Support " Igor Grinberg
2011-11-29 7:39 ` Ilya Yanok
2011-11-29 7:54 ` Igor Grinberg
-- strict thread matches above, loose matches on Subject: below --
2011-11-11 0:39 [U-Boot] [PATCH v2 " Ilya Yanok
2011-11-11 0:39 ` [U-Boot] [PATCH 01/13] davinci_emac: move arch-independent defines to separate header Ilya Yanok
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=4ED5DE81.2040106@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox