public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [RFC][PATCH 1/1] Add board_eth_init() function
Date: Sat, 22 Mar 2008 14:03:28 +0900	[thread overview]
Message-ID: <47E49320.1080504@ruby.dti.ne.jp> (raw)
In-Reply-To: <47E472FD.7010907@gmail.com>

Hi Ben,

with a quick glance, find the comments below.

Ben Warren wrote:
> diff --git a/include/netdev.h b/include/netdev.h
> new file mode 100644
> index 0000000..19195fa
> --- /dev/null
> +++ b/include/netdev.h
> @@ -0,0 +1,35 @@
> +/*
> + * (C) Copyright 2008
> + * Benjamin Warren, biggerbadderben at gmail.com
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +/*
> + * netdev.h - definitions an prototypes for network devices
> + */
> +
> +#ifndef _NETDEV_H_
> +#define _NETDEV_H_
> +
> +int tsec_initialize(bd_t * bis, int index, char *devname);
> +
> +#endif /* _NETDEV_H_ */
> +
> +

Do we need such controller dependent declarations in netdev.h?
FWIW board_eth_init() is reasonable for me.

And I know we need to go on a step-by-step basis, do you have any
plan to have register/unregister interfaces?

Ah, remove the last 2 lines :-)

> diff --git a/net/eth.c b/net/eth.c
> index 16a6dcb..3d02272 100644
> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -28,6 +28,13 @@
> 
> #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
> 
> +int __board_eth_init(bd_t *bis)
> +{
> +	return 0;
> +}
> +
> +int board_eth_init(bd_t *bis) __attribute((weak, 
> alias("__board_eth_init")));
> +
> #ifdef CFG_GT_6426x
> extern int gt6426x_eth_initialize(bd_t *bis);
> #endif

[This comment is not for Ben, but for everyone.]

Do we need such alias to empty function? Only __attribute((weak)) is
enough for me. If we have some default behavior which isn't empty, I
can see the weak & alias. Thought?

  Shinya

  reply	other threads:[~2008-03-22  5:03 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-22  2:46 [U-Boot-Users] [RFC][PATCH 1/1] Add board_eth_init() function Ben Warren
2008-03-22  5:03 ` Shinya Kuribayashi [this message]
     [not found]   ` <f8328f7c0803220505n39c9ddb5sf9c9cf037b8f4665@mail.gmail.com>
2008-03-22 12:07     ` Ben Warren
2008-03-22 15:55   ` Vlad Lungu
2008-03-23  6:19     ` Shinya Kuribayashi
2008-03-26 10:00       ` Haavard Skinnemoen
2008-03-26 11:39         ` Shinya Kuribayashi
2008-03-26 12:41           ` Haavard Skinnemoen
2008-03-26 14:15             ` Ben Warren
2008-03-26 14:27               ` Haavard Skinnemoen
2008-03-22  6:31 ` Stefan Roese
2008-03-22  9:59   ` Wolfgang Denk
2008-03-22 10:14     ` Stefan Roese
2008-03-22 11:35       ` Markus Klotzbücher
2008-03-22 14:01       ` Wolfgang Denk
2008-03-22 15:43         ` Ben Warren
2008-03-25  7:04           ` Stefan Roese
2008-03-25 11:11             ` Ben Warren
2008-03-25 14:22             ` Ben Warren
2008-03-25 14:41               ` Joakim Tjernlund
2008-03-25 14:57                 ` Ben Warren
2008-03-25 15:31                   ` Joakim Tjernlund
2008-03-25 15:56                     ` Jerry Van Baren
2008-03-25 16:59                       ` Joakim Tjernlund
2008-03-25 14:43               ` Stefan Roese
2008-03-25 16:17               ` Andy Fleming
2008-03-25 16:33                 ` Stefan Roese
2008-03-25 17:04                   ` Andy Fleming
2008-03-25 17:53                     ` Ben Warren
2008-03-26 10:06             ` Haavard Skinnemoen
2008-03-26 10:14               ` Stefan Roese
2008-03-26 10:25                 ` Haavard Skinnemoen
2008-03-26 10:34                   ` Stefan Roese
2008-03-26 11:06                     ` Haavard Skinnemoen
2008-03-26 11:43                       ` Stefan Roese
2008-03-26 12:19                         ` Haavard Skinnemoen
2008-03-26 12:39                           ` Stefan Roese
2008-03-23  0:06 ` [U-Boot-Users] [OT] Using MTD to manipulate CFI flash on PCI boards? David Hawkins

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=47E49320.1080504@ruby.dti.ne.jp \
    --to=skuribay@ruby.dti.ne.jp \
    --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