linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Florian Fainelli <florian@openwrt.org>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>,
	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 17:41:14 +0400	[thread overview]
Message-ID: <4A70517A.6060006@ru.mvista.com> (raw)
In-Reply-To: <200907291010.09526.florian@openwrt.org>

Hello.

Florian Fainelli wrote:

>>> 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'd NAK such patch (and have already done so, AFAIR).

> I will make the au1000-eth devices be registered on a per-board basis.

    Please don't. You can register them in platform.c, and yet leave 
actually board specific platform data in the board files. There's no reason 
to duplicate the platfrom device itself.

WBR, Sergei

  reply	other threads:[~2009-07-29 13:40 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
2009-07-29 13:41     ` Sergei Shtylyov [this message]
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=4A70517A.6060006@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=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).