From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 08/19] SPEAr : Network support configured for spear SoCs
Date: Mon, 10 May 2010 13:20:42 -0700 [thread overview]
Message-ID: <4BE86A9A.7080207@gmail.com> (raw)
In-Reply-To: <1273144741-32010-9-git-send-email-vipin.kumar@st.com>
Hi Vipin,
Sorry for weighing in so late on this...
On 5/6/2010 4:18 AM, Vipin KUMAR wrote:
> Signed-off-by: Vipin Kumar<vipin.kumar@st.com>
> ---
> arch/arm/include/asm/arch-spear/hardware.h | 1 +
> board/spear/spear300/spear300.c | 10 ++++++++++
> board/spear/spear310/spear310.c | 10 ++++++++++
> board/spear/spear320/spear320.c | 10 ++++++++++
> board/spear/spear600/spear600.c | 10 ++++++++++
> include/configs/spear-common.h | 14 ++++++++++++--
> include/configs/spear3xx.h | 3 +++
> 7 files changed, 56 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-spear/hardware.h b/arch/arm/include/asm/arch-spear/hardware.h
> index 818f36c..39d64b6 100644
> --- a/arch/arm/include/asm/arch-spear/hardware.h
> +++ b/arch/arm/include/asm/arch-spear/hardware.h
> @@ -31,6 +31,7 @@
> #define CONFIG_SPEAR_SYSCNTLBASE (0xFCA00000)
> #define CONFIG_SPEAR_TIMERBASE (0xFC800000)
> #define CONFIG_SPEAR_MISCBASE (0xFCA80000)
> +#define CONFIG_SPEAR_ETHBASE (0xE0800000)
>
> #define CONFIG_SYS_NAND_CLE (1<< 16)
> #define CONFIG_SYS_NAND_ALE (1<< 17)
> diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c
> index 60ee544..774f466 100644
> --- a/board/spear/spear300/spear300.c
> +++ b/board/spear/spear300/spear300.c
> @@ -22,6 +22,7 @@
> */
>
> #include<common.h>
> +#include<netdev.h>
> #include<nand.h>
> #include<asm/io.h>
> #include<asm/arch/hardware.h>
> @@ -56,3 +57,12 @@ int board_nand_init(struct nand_chip *nand)
>
> return -1;
> }
> +
> +int board_eth_init(bd_t *bis)
> +{
> +#if defined(CONFIG_DESIGNWARE_ETH)
> + return designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY);
> +#else
> + return -1;
> +#endif
> +}
>
Returning -1 isn't really the right thing to do here. I apologize that
this is really confusing, and needs to be cleaned up. Next release - I
promise. If you want to call cpu_eth_init() here, call it directly.
Otherwise, return the number of devices found (0 or more). If there's
an error in designware_initialize(), you should handle it here, either
by asserting, printing a failure banner, etc.
The original intent in net/eth.c was something like this:
/* Try board-specific initialization first. If it fails or isn't
* present, try the cpu-specific initialization */
if (board_eth_init(bis) *is weak* )
cpu_eth_init(bis);
but the easiest way to check for weakness was to return -1. This is of
course an inappropriate number to use since it's the almost-universal
return code for failure.
Again, sorry for bringing this up after so many of your iterations.
regards,
Ben
next prev parent reply other threads:[~2010-05-10 20:20 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 11:18 [U-Boot] [PATCH v3 00/19] SPEAr : Network support for spear platforms and SPEAr1300 Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 01/19] u-boot.img file not created when srctree and objtree are different Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 02/19] change_bit routine defined Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 03/19] SPEAr : SMI erase and write timeouts increased Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 04/19] SPEAr : Placing ethaddr write and read within CONFIG_CMD_NET Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 05/19] SPEAr : Reducing the max RAM size to 128MB Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 06/19] SPEAr : Basic arch related support added for SPEAr SoCs Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 07/19] SPEAr : Network driver support added Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 08/19] SPEAr : Network support configured for spear SoCs Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 09/19] SPEAr : macb driver support added for spear310 and spear320 Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 10/19] SPEAr : FSMC driver support added Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 11/19] SPEAr : Configuring FSMC driver for NAND interface Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 12/19] SPEAr : i2c driver moved completely into drivers/i2c Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 13/19] SPEAr : smi driver moved completely into drivers/mtd Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 14/19] SPEAr : USB Device Controller driver support added Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 15/19] SPEAr : Supporting various configurations for spear3xx and spear6xx boards Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 16/19] SPEAr : Basic spear1300 architecture support added Vipin KUMAR
2010-05-06 11:18 ` [U-Boot] [PATCH v3 17/19] SPEAr : spear1300 SoC " Vipin KUMAR
2010-05-06 11:19 ` [U-Boot] [PATCH v3 18/19] SPEAr : Removing extraneous code Vipin KUMAR
2010-05-06 11:19 ` [U-Boot] [PATCH v3 19/19] SPEAr : USB device controller bugfixes Vipin KUMAR
2010-05-14 8:44 ` Remy Bohmer
2010-05-14 8:43 ` [U-Boot] [PATCH v3 14/19] SPEAr : USB Device Controller driver support added Remy Bohmer
2010-05-10 20:20 ` Ben Warren [this message]
2010-05-09 14:16 ` [U-Boot] [PATCH v3 00/19] SPEAr : Network support for spear platforms and SPEAr1300 Vipin Kumar
2010-05-14 2:56 ` Vipin KUMAR
2010-05-28 16:52 ` Vipin Kumar
2010-05-28 20:31 ` Ben Warren
2010-06-03 11:55 ` Vipin KUMAR
2010-06-11 6:14 ` Vipin KUMAR
2010-06-14 8:12 ` Vipin KUMAR
2010-06-22 14:23 ` Vipin Kumar
2010-06-22 15:30 ` [U-Boot] SPEAr (ARM) patchset inclusion for u-boot Armando VISCONTI
2010-06-22 20:30 ` Wolfgang Denk
2010-06-22 20:45 ` Armando VISCONTI
2010-06-23 3:31 ` Vipin KUMAR
2010-06-25 17:53 ` Armando VISCONTI
2010-05-25 10:27 ` [U-Boot] [PATCH v3 00/19] SPEAr : Network support for spear platforms and SPEAr1300 Shiraz HASHIM
2010-05-25 11:03 ` Shiraz HASHIM
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=4BE86A9A.7080207@gmail.com \
--to=biggerbadderben@gmail.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