mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/3] net: mv643xx: add driver support
Date: Thu, 23 Jan 2014 23:51:39 +0100	[thread overview]
Message-ID: <52E19CFB.1040908@gmail.com> (raw)
In-Reply-To: <1390505010-7546-3-git-send-email-m.grzeschik@pengutronix.de>

On 01/23/2014 08:23 PM, Michael Grzeschik wrote:
> This patch adds basic support for the mv643xx gigabit
> ethernet stack. It is found on several marvell orion SoCs.
>
> The code is based on the kirkwood_egiga driver from u-boot and was renamed. It
> uses dma_alloc_coherent instead of xmalloc. The huge register representing
> struct was changed to register offset defines. The write and read macros got
> changed to direct writel and readl calls.

Nice patches! Unfortunately, I have no time to review and test them
today, but I do have some remarks right now.

> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
>   drivers/net/Kconfig   |   5 +
>   drivers/net/Makefile  |   1 +
>   drivers/net/mv643xx.c | 714 ++++++++++++++++++++++++++++++++++++++++++++++++++
>   drivers/net/mv643xx.h | 473 +++++++++++++++++++++++++++++++++

We really all hate "mv643xx" because it is a pain to say and write it.
I guess barebox will never be run on systems with mv64xxx controllers
but only Marvell Orion SoC.

I'd be *very* happy if you do s/mv643xx/orion/g

[...]
> diff --git a/drivers/net/mv643xx.c b/drivers/net/mv643xx.c
> new file mode 100644
> index 0000000..3d0bfdc
> --- /dev/null
> +++ b/drivers/net/mv643xx.c
> @@ -0,0 +1,714 @@
> +/*
[...]
> + */
> +
> +#include <common.h>
> +#include <malloc.h>
> +#include <net.h>
> +#include <init.h>
> +#include <driver.h>
> +#include <io.h>
> +#include <clock.h>
> +#include <xfuncs.h>
> +#include <linux/phy.h>
> +#include <linux/clk.h>
> +#include <linux/err.h>
> +#include <of_net.h>
> +#include <mach/dove-regs.h>

Please don't. The same driver will be used on Kirkwood and possibly
orion5x, mv78x00 if they get supported.

Have every register offset defined in here or "mv643xx.h" and get
rid of the above. If you need some callback for memory windows, let's
get it on now and create it in a way it is compatible with using this
driver on the other SoCs.

Also, we really have no plans for Dove, Kirkwood or any other Marvell
SoC with !CONFIG_OF, so feel free to remove any reference to non-DT
usage.

BTW, how about sorting the #includes alphabetically?

For the rest, I'll give it a go on Dove ASAP.

Sebastian


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-01-23 22:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 19:23 [PATCH 0/3] dove: cubox: ethernet support Michael Grzeschik
2014-01-23 19:23 ` [PATCH 1/3] ARM: mvebu: make dove_memory_find reachable for drivers Michael Grzeschik
2014-01-23 19:23 ` [PATCH 2/3] net: mv643xx: add driver support Michael Grzeschik
2014-01-23 22:51   ` Sebastian Hesselbarth [this message]
2014-01-24 13:07     ` Michael Grzeschik
2014-01-24 19:17       ` Sebastian Hesselbarth
2014-01-25  9:44         ` Michael Grzeschik
2014-01-25 12:50           ` Sebastian Hesselbarth
2014-01-23 19:23 ` [PATCH 3/3] ARM: mvebu: add ethernet node Michael Grzeschik

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=52E19CFB.1040908@gmail.com \
    --to=sebastian.hesselbarth@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=m.grzeschik@pengutronix.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