linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH 1/4] alchemy: register au1000_eth as a platform driver  part one
Date: Wed, 29 Jul 2009 10:10:09 +0200	[thread overview]
Message-ID: <200907291010.09526.florian@openwrt.org> (raw)
In-Reply-To: <f861ec6f0907290015v34d277beh18efed6aac10aa79@mail.gmail.com>

Le Wednesday 29 July 2009 09:15:52 Manuel Lauss, vous avez écrit :
> Hi Florian,
>
> On Tue, Jul 28, 2009 at 11:00 PM, Florian Fainelli<florian@openwrt.org> wrote:
> > --- a/arch/mips/alchemy/common/platform.c
> > +++ b/arch/mips/alchemy/common/platform.c
> > @@ -331,6 +331,61 @@ static struct platform_device pbdb_smbus_device = {
> >  };
> >  #endif
> >
> > +/* All Alchemy board have at least one Ethernet MAC */
>
> Au1200/1300 don't have a MAC (unfortunately, IMO).

Right.

>
> >  static int __init au1xxx_platform_init(void)
> >  {
> >        unsigned int uartclk = get_au1x00_uart_baud_base() * 16;
> > -       int i;
> > +       int i, ni;
> >
> >        /* Fill up uartclk. */
> >        for (i = 0; au1x00_uart_data[i].flags; i++)
> >                au1x00_uart_data[i].uartclk = uartclk;
> >
> > +       /* Register second MAC if enabled in pinfunc */
> > +#ifndef CONFIG_SOC_AU1100
> > +        ni = (int)((au_readl(SYS_PINFUNC) & (u32)(SYS_PF_NI2)) >> 4);
> > +        if (!(ni + 1))
> > +               platform_device_register(&au1xxx_eth1_device);
> > +#endif
> > +
>
> This won't work on Au1200/Au1300 since their SYS_PINFUNC register
> has a different bit layout.
>
>
> And you already know that I'm not very fond of alchemy/common/platform.c
> ;-) I still think you should add appropriate MAC platform information to
> the boards which actually use it.

Yes I know ;) I was just wanting to get this out quickly before you kill platform.c

I will make the au1000-eth devices be registered on a per-board basis.
-- 
Best regards, Florian Fainelli
Email: florian@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------

  parent reply	other threads:[~2009-07-29  8:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 21:00 [PATCH 1/4] alchemy: register au1000_eth as a platform driver part one Florian Fainelli
2009-07-29  7:15 ` Manuel Lauss
2009-07-29  7:15   ` Manuel Lauss
2009-07-29  8:10   ` Florian Fainelli [this message]
2009-07-29 13:41     ` Sergei Shtylyov
2009-07-29 14:27       ` Manuel Lauss
2009-07-29 14:27         ` Manuel Lauss
2009-07-30 20:50         ` Florian Fainelli

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=200907291010.09526.florian@openwrt.org \
    --to=florian@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=manuel.lauss@googlemail.com \
    --cc=ralf@linux-mips.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 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).