public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ilya Yanok <yanok@emcraft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] MPC8308ERDB: minimal support for devboard from Freescale
Date: Wed, 23 Jun 2010 16:01:08 +0400	[thread overview]
Message-ID: <4C21F784.5040500@emcraft.com> (raw)
In-Reply-To: <4C210AA4.1020101@gmail.com>

Hi Ben,

On 22.06.2010 23:10, Ben Warren wrote:
>>>>> +int board_eth_init(bd_t *bis)
>>>>> +{
>>>>> +    cpu_eth_init(bis);    /* Initialize TSECs first */
>>>>>
>>>> I think it's wrong to ignore the return code here.
>>> What makes you think so? What can we do with the return code here? 
>>> Print
>>> warning? If we return error from board_eth_init() calling code will 
>>> call
>>> cpu_eth_init() again which is useless as we have already called it.
>
> Yes, print a warning if < 0.  As you've noticed, returning -1 wouldn't 
> be good.  I'm not aware of a U-boot policy for handling hardware 
> problems other than printf.

Actually I thought that controllers missing in the "NET: " line would be 
enough but I'll add a warning if you ask.

>>>>> +    return pci_eth_init(bis);
>> My understanding is that pci_eth_init() and board_eth_init() return
>> the number of NIC's found - should that number not include the number
>> of successfully initialized TSECs?
>>
> Yes, please.  Something like:
>
> int board_eth_init(bd_t *bis)
> {
>     int rc, num_if = 0;
>     if ((rc = cpu_eth_init(bis)) >= 0)
>     {
>         num_if += rc;
>     } else {
>         print error message
>     }
>     if ((rc = pci_eth_init(bis)) >= 0)
>     {
>         num_if += rc;
>     } else {
>         print error message
>     }
>     return num_if;
> }
>
> I'm working on changing net/eth.c to be less kludgy, but am having a 
> hard time setting up my test bed.  Hopefully in the next few days.

I'll do like you proposed.

Regards, Ilya.

  reply	other threads:[~2010-06-23 12:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-20 17:32 [U-Boot] [PATCH 0/2] Support for MPC8308ERDB board Ilya Yanok
2010-06-20 17:32 ` [U-Boot] [PATCH 1/2] mpc8308: support for Freescale MPC8308 cpu Ilya Yanok
2010-06-21  7:44   ` Wolfgang Denk
2010-06-21 11:41     ` Ilya Yanok
2010-06-22 16:11       ` Wolfgang Denk
2010-06-28 12:44         ` Ilya Yanok
2010-07-09 21:13           ` Kim Phillips
2010-06-20 17:32 ` [U-Boot] [PATCH 2/2] MPC8308ERDB: minimal support for devboard from Freescale Ilya Yanok
2010-06-21  7:44   ` Wolfgang Denk
2010-06-21 12:25     ` Ilya Yanok
2010-06-22 18:14       ` Wolfgang Denk
2010-06-22 19:10         ` Ben Warren
2010-06-23 12:01           ` Ilya Yanok [this message]
2010-06-23 11:57         ` Ilya Yanok
2010-06-23  0:17   ` Kim Phillips
2010-06-23 21:30     ` Ilya Yanok
2010-06-23 22:08       ` Wolfgang Denk
2010-06-24 15:59     ` Ilya Yanok
2010-06-24 18:00       ` Kim Phillips
2010-06-24 19:36         ` Ilya Yanok
2010-06-25  1:25           ` Aggrwal Poonam-B10812
     [not found]           ` <20100624190054.847e4452.kim.phillips@freescale.com>
2010-07-20  0:33             ` Kim Phillips
2010-07-20  5:46               ` Wolfgang Denk
2010-07-20 15:08               ` Ilya Yanok
2010-08-10 16:32               ` [U-Boot] [PATCH 2/2] MPC8308ERDB: minimal support for devboard from Freescale (ICache issue) Ilya Yanok
2010-06-28 12:45     ` [U-Boot] [PATCH 2/2] MPC8308ERDB: minimal support for devboard from Freescale Ilya Yanok
2010-07-01  0:30       ` Kim Phillips
2010-07-01  9:13         ` Ilya Yanok
2010-07-07 16:16           ` [U-Boot] [PATCH 2/2] MPC8308RDB: " Ilya Yanok
2010-07-09 21:14             ` Kim Phillips

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=4C21F784.5040500@emcraft.com \
    --to=yanok@emcraft.com \
    --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