From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Wed, 11 Jun 2008 07:30:43 -0400 Subject: [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization In-Reply-To: <20080611025031.3f203baa@siona.local> References: <1213086567-29194-1-git-send-email-biggerbadderben@gmail.com> <20080611025031.3f203baa@siona.local> Message-ID: <484FB763.2060700@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Haavard Skinnemoen wrote: > On Tue, 10 Jun 2008 01:29:27 -0700 > Ben Warren wrote: > >> This patch is the first step in cleaning up net/eth.c, by moving Ethernet >> initialization to CPU or board-specific code. Initial implementation is >> only on the Freescale TSEC controller, but others will be added soon. >> >> Signed-off-by: Ben Warren > > Sweet! > >> --- >> >> When we discussed this a few months ago, I was planning on defining the >> cpu_eth_init() and board_eth_init() functions as weak with no aliases, but in >> my testing this did not result in them being NULL, hence the default function. > > Works just as well, doesn't it? > >> diff --git a/net/eth.c b/net/eth.c >> index c4f24c6..e75dc43 100644 >> --- a/net/eth.c >> +++ b/net/eth.c >> @@ -28,6 +28,12 @@ >> >> #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) >> >> +/* CPU and board-specific Ethernet initializations. Aliased function >> + * signals caller to move on */ >> +static int __def_eth_init(bd_t *bis) {return -1;} > > Just a cosmetic thing: I really think this should look like a normal > function, i.e. not cuddling everything up on one line. I've seen such > things being mistaken for macros before. > > Haavard /* * ...and the comment style should be like this. Coding standards, * y'know. */ Best regards, gvb