mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: "U-Boot Version 2 (barebox)" <barebox@lists.infradead.org>
Subject: Re: can someone explain this CONFIG_COMMANDS, CFG_CMD thing?
Date: Mon, 21 Dec 2009 17:23:07 +0100	[thread overview]
Message-ID: <20091221162306.GN15126@pengutronix.de> (raw)
In-Reply-To: <alpine.LFD.2.00.0912210947530.18397@localhost>

On Mon, Dec 21, 2009 at 09:56:07AM -0500, Robert P. J. Day wrote:
> 
>   i'm looking at some of the stuff sascha commented on earlier, like:
> 
> $ grep -r CONFIG_MII drivers
> drivers/net/Makefile:obj-$(CONFIG_MIIPHY)			+= miiphy.o
> drivers/net/at91_ether.c:#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII)
> drivers/net/at91_ether.c:#endif	/* defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) */
> drivers/net/at91_ether.c:#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII)
> $
> 
> and i'd like to clarify what any of that is *supposed* to mean.
> 
>   first, what means "CONFIG_COMMANDS"?  that is, in the sense that
> you're *bitwise* or'ing it with something else?  is that supposed to
> be a test that a command has been selected for inclusion?  surely
> there's a cleaner way to do that.

Forget about CONFIG_COMMANDS. This is from old U-Boot and is a bitmask
for the available commands. CFG_CMD_MII was one bit of this command
mask. Someday they realized that they want to support more than 32
commands and got rid of it.

The parts you are referring to should simply be

#if defined(CONFIG_MII)

Hm, looking closer at it this part of the at91 ethernet driver is
outdated. Compare to the other ethernet drivers to get an idea how phys
are handled now. Maybe I'll fix this after christmas.

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 |

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

      reply	other threads:[~2009-12-21 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-21 14:56 Robert P. J. Day
2009-12-21 16:23 ` Sascha Hauer [this message]

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=20091221162306.GN15126@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=rpjday@crashcourse.ca \
    /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