diff mbox

[U-Boot] ARM: lacie_kw: add support for WIRELESS_SPACE

Message ID 1345140514-9048-1-git-send-email-albert.u.boot@aribaud.net
State Superseded
Delegated to: Prafulla Wadaskar
Headers show

Commit Message

Albert ARIBAUD Aug. 16, 2012, 6:08 p.m. UTC
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
---

This patch adds the Wireless Space to the lacie_kw sub-targets.
It *should* not change a thing to the already existing sub-targets
(except that each one gets its own prompt).

Owners of NETSPACE_[MAX]_V2, INETSPACE_V2, NET2BIG_V2 please test.

 board/LaCie/netspace_v2/netspace_v2.c |   42 ++----------
 board/LaCie/netspace_v2/netspace_v2.h |  121 +++++++++++++++++++++++++++++++++
 boards.cfg                            |    1 +
 drivers/net/mvgbe.c                   |   10 ++-
 include/configs/lacie_kw.h            |   38 ++++++++++-
 5 files changed, 175 insertions(+), 37 deletions(-)

Comments

Prafulla Wadaskar Aug. 17, 2012, 7:59 a.m. UTC | #1
> -----Original Message-----
> From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> bounces@lists.denx.de] On Behalf Of Albert ARIBAUD
> Sent: 16 August 2012 23:39
> To: u-boot@lists.denx.de
> Subject: [U-Boot] [PATCH] ARM: lacie_kw: add support for
> WIRELESS_SPACE
> 
> 
> Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> ---
> 
> This patch adds the Wireless Space to the lacie_kw sub-targets.
> It *should* not change a thing to the already existing sub-targets
> (except that each one gets its own prompt).
> 
> Owners of NETSPACE_[MAX]_V2, INETSPACE_V2, NET2BIG_V2 please test.
> 
>  board/LaCie/netspace_v2/netspace_v2.c |   42 ++----------
>  board/LaCie/netspace_v2/netspace_v2.h |  121
> +++++++++++++++++++++++++++++++++
>  boards.cfg                            |    1 +
>  drivers/net/mvgbe.c                   |   10 ++-

It would be good if you split the patch, to me the change to above file is generic, which is your dependency.

>  include/configs/lacie_kw.h            |   38 ++++++++++-
>  5 files changed, 175 insertions(+), 37 deletions(-)
> 
...snip...
> diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h
> index c35c2db..a979ab4 100644
> --- a/include/configs/lacie_kw.h
> +++ b/include/configs/lacie_kw.h
> @@ -33,6 +33,10 @@
>  #elif defined(CONFIG_NET2BIG_V2)
>  #define CONFIG_MACH_TYPE		MACH_TYPE_NET2BIG_V2
>  #define CONFIG_IDENT_STRING		" 2Big v2"
> +#elif defined(CONFIG_WIRELESS_SPACE)
> +#define MACH_TYPE_WIRELESS_SPACE	2500 /* is missing in mach-types.h
> */
> +#define CONFIG_MACH_TYPE		MACH_TYPE_WIRELESS_SPACE
> +#define CONFIG_IDENT_STRING		" Wireless Space"
>  #else
>  #error "Unknown board"
>  #endif
> @@ -73,6 +77,12 @@
>  #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-
> is2.cfg
>  #endif
> 
> +#ifdef CONFIG_WIRELESS_SPACE
> +/* No SPI but NAND */
> +#undef CONFIG_CMD_SF
> +#define CONFIG_CMD_NAND
> +#endif
> +
>  /*
>   * mv-common.h should be defined after CMD configs since it used them
>   * to enable certain macros
> @@ -90,8 +100,14 @@
>  #define CONFIG_SYS_IDE_MAXDEVICE        1
>  #if defined(CONFIG_NET2BIG_V2)
>  #define CONFIG_SYS_PROMPT		"2big2> "
> -#else
> +#elif defined(CONFIG_NETSPACE_V2)
>  #define CONFIG_SYS_PROMPT		"ns2> "
> +#elif defined(CONFIG_INETSPACE_V2)
> +#define CONFIG_SYS_PROMPT		"is2> "
> +#elif defined(CONFIG_WIRELESS_SPACE)
> +#define CONFIG_SYS_PROMPT		"ws> "
> +#else
> +#define CONFIG_SYS_PROMPT		"lacie-kw> "
>  #endif
> 
>  /*
> @@ -99,7 +115,16 @@
>   */
>  #ifdef CONFIG_CMD_NET
>  #define CONFIG_MISC_INIT_R /* Call misc_init_r() to initialize MAC
> address */
> +#if defined(CONFIG_WIRELESS_SPACE)
> +#define CONFIG_MVGBE_PORTS		{1, 1}	/* enable both ports only */
> +#define CONFIG_EGIGA1_PHY		0x6		/* egiga1 has a PHY, egiga0
> has NOT */
> +#define CONFIG_MVGBE_PHY_ADRS	{0xa, 0x6}
> +#define CONFIG_MII
> +#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
> +#else
>  #define CONFIG_MVGBE_PORTS		{1, 0} /* enable port 0 only */
> +#define CONFIG_EGIGA0_PHY		0x8
> +#endif
>  #define CONFIG_NETCONSOLE
>  #endif
> 
> @@ -154,11 +179,20 @@
>  /*
>   * Environment variables configurations
>   */
> +
> +#if defined(CONFIG_WIRELESS_SPACE)
> +#define CONFIG_ENV_IS_IN_NAND
> +#define CONFIG_ENV_SECT_SIZE		0x10000	/* 64KB */
> +#define CONFIG_ENV_SIZE			0x1000	/* 4KB */
> +#define CONFIG_ENV_ADDR			0x70000
> +#define CONFIG_ENV_OFFSET		0x70000	/* env starts here */
> +#else
>  #define CONFIG_ENV_IS_IN_SPI_FLASH
>  #define CONFIG_ENV_SECT_SIZE		0x10000	/* 64KB */
>  #define CONFIG_ENV_SIZE			0x1000	/* 4KB */
>  #define CONFIG_ENV_ADDR			0x70000
>  #define CONFIG_ENV_OFFSET		0x70000	/* env starts here */
> +#endif
> 
>  /*
>   * Default environment variables
> @@ -185,4 +219,6 @@
>  	"usbload=usb start && "					\
>  		"fatload usb 0:1 $loadaddr /boot/$bootfile\0"
> 
> +//#define DEBUG

Either remove it or make it c-style comments.

Regards...
Prafulla . . .

> +
>  #endif /* _CONFIG_LACIE_KW_H */
> --
> 1.7.9.5
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Albert ARIBAUD Aug. 17, 2012, 5:37 p.m. UTC | #2
Hi Prafulla,

On Fri, 17 Aug 2012 00:59:24 -0700, Prafulla Wadaskar
<prafulla@marvell.com> wrote:

> 
> 
> > -----Original Message-----
> > From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> > bounces@lists.denx.de] On Behalf Of Albert ARIBAUD
> > Sent: 16 August 2012 23:39
> > To: u-boot@lists.denx.de
> > Subject: [U-Boot] [PATCH] ARM: lacie_kw: add support for
> > WIRELESS_SPACE
> > 
> > 
> > Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> > ---
> > 
> > This patch adds the Wireless Space to the lacie_kw sub-targets.
> > It *should* not change a thing to the already existing sub-targets
> > (except that each one gets its own prompt).
> > 
> > Owners of NETSPACE_[MAX]_V2, INETSPACE_V2, NET2BIG_V2 please test.
> > 
> >  board/LaCie/netspace_v2/netspace_v2.c |   42 ++----------
> >  board/LaCie/netspace_v2/netspace_v2.h |  121
> > +++++++++++++++++++++++++++++++++
> >  boards.cfg                            |    1 +
> >  drivers/net/mvgbe.c                   |   10 ++-
> 
> It would be good if you split the patch, to me the change to above
> file is generic, which is your dependency.

You're correct. I'll post V2 as a two-patch series.
 
> >  include/configs/lacie_kw.h            |   38 ++++++++++-
> >  5 files changed, 175 insertions(+), 37 deletions(-)
> > 
> ...snip...
> > diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h
> > index c35c2db..a979ab4 100644
> > --- a/include/configs/lacie_kw.h
> > +++ b/include/configs/lacie_kw.h
> > @@ -33,6 +33,10 @@
> >  #elif defined(CONFIG_NET2BIG_V2)
> >  #define CONFIG_MACH_TYPE		MACH_TYPE_NET2BIG_V2
> >  #define CONFIG_IDENT_STRING		" 2Big v2"
> > +#elif defined(CONFIG_WIRELESS_SPACE)
> > +#define MACH_TYPE_WIRELESS_SPACE	2500 /* is missing in
> > mach-types.h */
> > +#define CONFIG_MACH_TYPE		MACH_TYPE_WIRELESS_SPACE
> > +#define CONFIG_IDENT_STRING		" Wireless Space"
> >  #else
> >  #error "Unknown board"
> >  #endif
> > @@ -73,6 +77,12 @@
> >  #define CONFIG_SYS_KWD_CONFIG
> > $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage- is2.cfg
> >  #endif
> > 
> > +#ifdef CONFIG_WIRELESS_SPACE
> > +/* No SPI but NAND */
> > +#undef CONFIG_CMD_SF
> > +#define CONFIG_CMD_NAND
> > +#endif
> > +
> >  /*
> >   * mv-common.h should be defined after CMD configs since it used
> > them
> >   * to enable certain macros
> > @@ -90,8 +100,14 @@
> >  #define CONFIG_SYS_IDE_MAXDEVICE        1
> >  #if defined(CONFIG_NET2BIG_V2)
> >  #define CONFIG_SYS_PROMPT		"2big2> "
> > -#else
> > +#elif defined(CONFIG_NETSPACE_V2)
> >  #define CONFIG_SYS_PROMPT		"ns2> "
> > +#elif defined(CONFIG_INETSPACE_V2)
> > +#define CONFIG_SYS_PROMPT		"is2> "
> > +#elif defined(CONFIG_WIRELESS_SPACE)
> > +#define CONFIG_SYS_PROMPT		"ws> "
> > +#else
> > +#define CONFIG_SYS_PROMPT		"lacie-kw> "
> >  #endif
> > 
> >  /*
> > @@ -99,7 +115,16 @@
> >   */
> >  #ifdef CONFIG_CMD_NET
> >  #define CONFIG_MISC_INIT_R /* Call misc_init_r() to initialize MAC
> > address */
> > +#if defined(CONFIG_WIRELESS_SPACE)
> > +#define CONFIG_MVGBE_PORTS		{1, 1}	/* enable
> > both ports only */ +#define CONFIG_EGIGA1_PHY
> > 0x6		/* egiga1 has a PHY, egiga0 has NOT */
> > +#define CONFIG_MVGBE_PHY_ADRS	{0xa, 0x6}
> > +#define CONFIG_MII
> > +#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
> > +#else
> >  #define CONFIG_MVGBE_PORTS		{1, 0} /* enable port 0
> > only */ +#define CONFIG_EGIGA0_PHY		0x8
> > +#endif
> >  #define CONFIG_NETCONSOLE
> >  #endif
> > 
> > @@ -154,11 +179,20 @@
> >  /*
> >   * Environment variables configurations
> >   */
> > +
> > +#if defined(CONFIG_WIRELESS_SPACE)
> > +#define CONFIG_ENV_IS_IN_NAND
> > +#define CONFIG_ENV_SECT_SIZE		0x10000	/* 64KB
> > */ +#define CONFIG_ENV_SIZE			0x1000	/*
> > 4KB */ +#define CONFIG_ENV_ADDR			0x70000
> > +#define CONFIG_ENV_OFFSET		0x70000	/* env
> > starts here */ +#else
> >  #define CONFIG_ENV_IS_IN_SPI_FLASH
> >  #define CONFIG_ENV_SECT_SIZE		0x10000	/* 64KB
> > */ #define CONFIG_ENV_SIZE			0x1000	/*
> > 4KB */ #define CONFIG_ENV_ADDR			0x70000
> >  #define CONFIG_ENV_OFFSET		0x70000	/* env
> > starts here */ +#endif
> > 
> >  /*
> >   * Default environment variables
> > @@ -185,4 +219,6 @@
> >  	"usbload=usb start &&
> > "					\ "fatload usb 0:1
> > $loadaddr /boot/$bootfile\0"
> > 
> > +//#define DEBUG
> 
> Either remove it or make it c-style comments.

... oops... I'll remove this.

> Regards...
> Prafulla . . .

Thanks for the review.

I'll also copy Sion Guinot (maintainer for the whole lacie_kw boards)
in V2.

Amicalement,
Tom Rini Aug. 17, 2012, 5:55 p.m. UTC | #3
On Thu, Aug 16, 2012 at 08:08:34PM +0200, Albert ARIBAUD wrote:

> Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
[snip]
> @@ -90,8 +100,14 @@
>  #define CONFIG_SYS_IDE_MAXDEVICE        1
>  #if defined(CONFIG_NET2BIG_V2)
>  #define CONFIG_SYS_PROMPT		"2big2> "
> -#else
> +#elif defined(CONFIG_NETSPACE_V2)
>  #define CONFIG_SYS_PROMPT		"ns2> "
> +#elif defined(CONFIG_INETSPACE_V2)
> +#define CONFIG_SYS_PROMPT		"is2> "
> +#elif defined(CONFIG_WIRELESS_SPACE)
> +#define CONFIG_SYS_PROMPT		"ws> "
> +#else
> +#define CONFIG_SYS_PROMPT		"lacie-kw> "

Is this really a good thing?  Over here I've been trying / hoping to get
everyone to just use 'U-Boot # ' as the prompt as this makes automated
testing easier and there's other run-time ways to see what we're on.
Albert ARIBAUD Aug. 17, 2012, 9:28 p.m. UTC | #4
Hi Tom,

On Fri, 17 Aug 2012 10:55:38 -0700, Tom Rini <trini@ti.com> wrote:

> On Thu, Aug 16, 2012 at 08:08:34PM +0200, Albert ARIBAUD wrote:
> 
> > Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> [snip]
> > @@ -90,8 +100,14 @@
> >  #define CONFIG_SYS_IDE_MAXDEVICE        1
> >  #if defined(CONFIG_NET2BIG_V2)
> >  #define CONFIG_SYS_PROMPT		"2big2> "
> > -#else
> > +#elif defined(CONFIG_NETSPACE_V2)
> >  #define CONFIG_SYS_PROMPT		"ns2> "
> > +#elif defined(CONFIG_INETSPACE_V2)
> > +#define CONFIG_SYS_PROMPT		"is2> "
> > +#elif defined(CONFIG_WIRELESS_SPACE)
> > +#define CONFIG_SYS_PROMPT		"ws> "
> > +#else
> > +#define CONFIG_SYS_PROMPT		"lacie-kw> "
> 
> Is this really a good thing?  Over here I've been trying / hoping to
> get everyone to just use 'U-Boot # ' as the prompt as this makes
> automated testing easier and there's other run-time ways to see what
> we're on.

I quite like prompts that identify the board I'm on, but it's not a
must either. Cc:ing Simon in cas his own patches re lacie_kw would be
impacted by your suggestion.

Amicalement,
Prafulla Wadaskar Aug. 21, 2012, 7:16 a.m. UTC | #5
> -----Original Message-----
> From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> bounces@lists.denx.de] On Behalf Of Albert ARIBAUD
> Sent: 18 August 2012 02:59
> To: Tom Rini
> Cc: u-boot@lists.denx.de
> Subject: Re: [U-Boot] [PATCH] ARM: lacie_kw: add support for
> WIRELESS_SPACE
> 
> Hi Tom,
> 
> On Fri, 17 Aug 2012 10:55:38 -0700, Tom Rini <trini@ti.com> wrote:
> 
> > On Thu, Aug 16, 2012 at 08:08:34PM +0200, Albert ARIBAUD wrote:
> >
> > > Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> > [snip]
> > > @@ -90,8 +100,14 @@
> > >  #define CONFIG_SYS_IDE_MAXDEVICE        1
> > >  #if defined(CONFIG_NET2BIG_V2)
> > >  #define CONFIG_SYS_PROMPT		"2big2> "
> > > -#else
> > > +#elif defined(CONFIG_NETSPACE_V2)
> > >  #define CONFIG_SYS_PROMPT		"ns2> "
> > > +#elif defined(CONFIG_INETSPACE_V2)
> > > +#define CONFIG_SYS_PROMPT		"is2> "
> > > +#elif defined(CONFIG_WIRELESS_SPACE)
> > > +#define CONFIG_SYS_PROMPT		"ws> "
> > > +#else
> > > +#define CONFIG_SYS_PROMPT		"lacie-kw> "
> >
> > Is this really a good thing?  Over here I've been trying / hoping to
> > get everyone to just use 'U-Boot # ' as the prompt as this makes
> > automated testing easier and there's other run-time ways to see what
> > we're on.

I personally vote to have common boot prompt 'U-boot #'.

> 
> I quite like prompts that identify the board I'm on, but it's not a
> must either. Cc:ing Simon in cas his own patches re lacie_kw would be
> impacted by your suggestion.

Well, we can expose a command to detect/print the board info, if needed.

Regards...
Prafulla . . .
Simon Guinot Aug. 22, 2012, 3:16 p.m. UTC | #6
On Tue, Aug 21, 2012 at 12:16:40AM -0700, Prafulla Wadaskar wrote:
> 
> 
> > -----Original Message-----
> > From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> > bounces@lists.denx.de] On Behalf Of Albert ARIBAUD
> > Sent: 18 August 2012 02:59
> > To: Tom Rini
> > Cc: u-boot@lists.denx.de
> > Subject: Re: [U-Boot] [PATCH] ARM: lacie_kw: add support for
> > WIRELESS_SPACE
> > 
> > Hi Tom,
> > 
> > On Fri, 17 Aug 2012 10:55:38 -0700, Tom Rini <trini@ti.com> wrote:
> > 
> > > On Thu, Aug 16, 2012 at 08:08:34PM +0200, Albert ARIBAUD wrote:
> > >
> > > > Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> > > [snip]
> > > > @@ -90,8 +100,14 @@
> > > >  #define CONFIG_SYS_IDE_MAXDEVICE        1
> > > >  #if defined(CONFIG_NET2BIG_V2)
> > > >  #define CONFIG_SYS_PROMPT		"2big2> "
> > > > -#else
> > > > +#elif defined(CONFIG_NETSPACE_V2)
> > > >  #define CONFIG_SYS_PROMPT		"ns2> "
> > > > +#elif defined(CONFIG_INETSPACE_V2)
> > > > +#define CONFIG_SYS_PROMPT		"is2> "
> > > > +#elif defined(CONFIG_WIRELESS_SPACE)
> > > > +#define CONFIG_SYS_PROMPT		"ws> "
> > > > +#else
> > > > +#define CONFIG_SYS_PROMPT		"lacie-kw> "
> > >
> > > Is this really a good thing?  Over here I've been trying / hoping to
> > > get everyone to just use 'U-Boot # ' as the prompt as this makes
> > > automated testing easier and there's other run-time ways to see what
> > > we're on.
> 
> I personally vote to have common boot prompt 'U-boot #'.
> 
> > 
> > I quite like prompts that identify the board I'm on, but it's not a
> > must either. Cc:ing Simon in cas his own patches re lacie_kw would be
> > impacted by your suggestion.
> 
> Well, we can expose a command to detect/print the board info, if needed.

The run-time command "version" already returns both the system and the
machine informations. This command can be used for testing purposes.
IMHO the only requirement for an U-Boot prompt is to be short enough.
Everything else is a matter of taste. Mine goes for the machine name.

Regards,

Simon
Albert ARIBAUD Sept. 22, 2012, 8:51 a.m. UTC | #7
Hi Simon,

On Wed, 22 Aug 2012 17:16:21 +0200, Simon Guinot
<simon.guinot@sequanux.org> wrote:

> On Tue, Aug 21, 2012 at 12:16:40AM -0700, Prafulla Wadaskar wrote:
> > 
> > 
> > > -----Original Message-----
> > > From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> > > bounces@lists.denx.de] On Behalf Of Albert ARIBAUD
> > > Sent: 18 August 2012 02:59
> > > To: Tom Rini
> > > Cc: u-boot@lists.denx.de
> > > Subject: Re: [U-Boot] [PATCH] ARM: lacie_kw: add support for
> > > WIRELESS_SPACE
> > > 
> > > Hi Tom,
> > > 
> > > On Fri, 17 Aug 2012 10:55:38 -0700, Tom Rini <trini@ti.com> wrote:
> > > 
> > > > On Thu, Aug 16, 2012 at 08:08:34PM +0200, Albert ARIBAUD wrote:
> > > >
> > > > > Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> > > > [snip]
> > > > > @@ -90,8 +100,14 @@
> > > > >  #define CONFIG_SYS_IDE_MAXDEVICE        1
> > > > >  #if defined(CONFIG_NET2BIG_V2)
> > > > >  #define CONFIG_SYS_PROMPT		"2big2> "
> > > > > -#else
> > > > > +#elif defined(CONFIG_NETSPACE_V2)
> > > > >  #define CONFIG_SYS_PROMPT		"ns2> "
> > > > > +#elif defined(CONFIG_INETSPACE_V2)
> > > > > +#define CONFIG_SYS_PROMPT		"is2> "
> > > > > +#elif defined(CONFIG_WIRELESS_SPACE)
> > > > > +#define CONFIG_SYS_PROMPT		"ws> "
> > > > > +#else
> > > > > +#define CONFIG_SYS_PROMPT		"lacie-kw> "
> > > >
> > > > Is this really a good thing?  Over here I've been trying /
> > > > hoping to get everyone to just use 'U-Boot # ' as the prompt as
> > > > this makes automated testing easier and there's other run-time
> > > > ways to see what we're on.
> > 
> > I personally vote to have common boot prompt 'U-boot #'.
> > 
> > > 
> > > I quite like prompts that identify the board I'm on, but it's not
> > > a must either. Cc:ing Simon in cas his own patches re lacie_kw
> > > would be impacted by your suggestion.
> > 
> > Well, we can expose a command to detect/print the board info, if
> > needed.
> 
> The run-time command "version" already returns both the system and the
> machine informations. This command can be used for testing purposes.
> IMHO the only requirement for an U-Boot prompt is to be short enough.
> Everything else is a matter of taste. Mine goes for the machine name.
> 
> Regards,
> 
> Simon

Tom,

Can automated test cope with a general prompt of the form '.*#' ?

Amicalement,
Tom Rini Sept. 22, 2012, 5:38 p.m. UTC | #8
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/22/12 01:51, Albert ARIBAUD wrote:
> Hi Simon,
> 
> On Wed, 22 Aug 2012 17:16:21 +0200, Simon Guinot 
> <simon.guinot@sequanux.org> wrote:
> 
>> On Tue, Aug 21, 2012 at 12:16:40AM -0700, Prafulla Wadaskar
>> wrote:
>>> 
>>> 
>>>> -----Original Message----- From: u-boot-bounces@lists.denx.de
>>>> [mailto:u-boot- bounces@lists.denx.de] On Behalf Of Albert
>>>> ARIBAUD Sent: 18 August 2012 02:59 To: Tom Rini Cc:
>>>> u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] ARM:
>>>> lacie_kw: add support for WIRELESS_SPACE
>>>> 
>>>> Hi Tom,
>>>> 
>>>> On Fri, 17 Aug 2012 10:55:38 -0700, Tom Rini <trini@ti.com>
>>>> wrote:
>>>> 
>>>>> On Thu, Aug 16, 2012 at 08:08:34PM +0200, Albert ARIBAUD
>>>>> wrote:
>>>>> 
>>>>>> Signed-off-by: Albert ARIBAUD
>>>>>> <albert.u.boot@aribaud.net>
>>>>> [snip]
>>>>>> @@ -90,8 +100,14 @@ #define CONFIG_SYS_IDE_MAXDEVICE
>>>>>> 1 #if defined(CONFIG_NET2BIG_V2) #define
>>>>>> CONFIG_SYS_PROMPT		"2big2> " -#else +#elif
>>>>>> defined(CONFIG_NETSPACE_V2) #define CONFIG_SYS_PROMPT
>>>>>> "ns2> " +#elif defined(CONFIG_INETSPACE_V2) +#define
>>>>>> CONFIG_SYS_PROMPT		"is2> " +#elif
>>>>>> defined(CONFIG_WIRELESS_SPACE) +#define CONFIG_SYS_PROMPT
>>>>>> "ws> " +#else +#define CONFIG_SYS_PROMPT		"lacie-kw> "
>>>>> 
>>>>> Is this really a good thing?  Over here I've been trying / 
>>>>> hoping to get everyone to just use 'U-Boot # ' as the
>>>>> prompt as this makes automated testing easier and there's
>>>>> other run-time ways to see what we're on.
>>> 
>>> I personally vote to have common boot prompt 'U-boot #'.
>>> 
>>>> 
>>>> I quite like prompts that identify the board I'm on, but it's
>>>> not a must either. Cc:ing Simon in cas his own patches re
>>>> lacie_kw would be impacted by your suggestion.
>>> 
>>> Well, we can expose a command to detect/print the board info,
>>> if needed.
>> 
>> The run-time command "version" already returns both the system
>> and the machine informations. This command can be used for
>> testing purposes. IMHO the only requirement for an U-Boot prompt
>> is to be short enough. Everything else is a matter of taste. Mine
>> goes for the machine name.
>> 
>> Regards,
>> 
>> Simon
> 
> Tom,
> 
> Can automated test cope with a general prompt of the form '.*#' ?

Sure, probably.  It's really just something that popped into my head
rather than a hard requirement or anything.  It's also possible to
just setup your testing framework to take the prompt as a variable, so
this is just a personal preference thing.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQXfeOAAoJENk4IS6UOR1W0tUP/RIANji/ltjv29q/64C7Q6Vo
JreBmUcXI3BcUF13WIH8SVwW80DG0J29Pa2k2t9X+UxvXwXvv2eJCdEk5Pq6Fu4u
ksHS58kca/ufA5Rb+6JlvlCbLwet9kfyyk+4At5D4DfFnAX0XqbhfbkaA5Qay+U5
fccb9R8bY+HD3A5euKKLMZDP3bKij9293yJIOuaD6BIw8qVSkcy+a4Zgm4PvlPsx
b6W04IGW1w1NEArej2gpDutawDGfTulFpfFzNnR1a4BnxyII+VzZxuIMdbyc7MLc
/nbeSynRh35af892Xuzx6NCtpASYvN776BGws0kNLcR699pA0BcMRSCVaOKVpF3P
wMkx6bUXQQ0FsvLy5OD5yJt2xSNLSxbIAV/ZiU3GsZ4AbWrmKhax53+XRcWmasPa
HyhozQ0/lMaSkK4KOu6LHmRSHrSSEsUmJnVzyjWm7BOb+IY0WHntq47A+T8QoMuF
foed5J0ON5XRHDzbzk34pPBdfg+qCIc4+PQ2XsiRYJe+T3DNOCZgOwByzo0sasRh
EC53I2Q95fQsafhgSs0EVCw0nJIa1z0uWEnQIH0K6gyffkNGyj1UPkLPf+qva+t0
GJXqwkgRfvjO/MQIN+SFn6flMKfxgobqztcDck5tvS+8s5mMZtsoy24F6jW/znXo
2Cqs4OFBzE5Efbv1PWcC
=DhtF
-----END PGP SIGNATURE-----
Albert ARIBAUD Oct. 5, 2012, 8:40 p.m. UTC | #9
Hi Tom,

On Sat, 22 Sep 2012 10:38:22 -0700, Tom Rini <trini@TI.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 09/22/12 01:51, Albert ARIBAUD wrote:
> > Hi Simon,
> > 
> > On Wed, 22 Aug 2012 17:16:21 +0200, Simon Guinot 
> > <simon.guinot@sequanux.org> wrote:
> > 
> >> On Tue, Aug 21, 2012 at 12:16:40AM -0700, Prafulla Wadaskar
> >> wrote:
> >>> 
> >>> 
> >>>> -----Original Message----- From: u-boot-bounces@lists.denx.de
> >>>> [mailto:u-boot- bounces@lists.denx.de] On Behalf Of Albert
> >>>> ARIBAUD Sent: 18 August 2012 02:59 To: Tom Rini Cc:
> >>>> u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] ARM:
> >>>> lacie_kw: add support for WIRELESS_SPACE
> >>>> 
> >>>> Hi Tom,
> >>>> 
> >>>> On Fri, 17 Aug 2012 10:55:38 -0700, Tom Rini <trini@ti.com>
> >>>> wrote:
> >>>> 
> >>>>> On Thu, Aug 16, 2012 at 08:08:34PM +0200, Albert ARIBAUD
> >>>>> wrote:
> >>>>> 
> >>>>>> Signed-off-by: Albert ARIBAUD
> >>>>>> <albert.u.boot@aribaud.net>
> >>>>> [snip]
> >>>>>> @@ -90,8 +100,14 @@ #define CONFIG_SYS_IDE_MAXDEVICE
> >>>>>> 1 #if defined(CONFIG_NET2BIG_V2) #define
> >>>>>> CONFIG_SYS_PROMPT		"2big2> " -#else +#elif
> >>>>>> defined(CONFIG_NETSPACE_V2) #define CONFIG_SYS_PROMPT
> >>>>>> "ns2> " +#elif defined(CONFIG_INETSPACE_V2) +#define
> >>>>>> CONFIG_SYS_PROMPT		"is2> " +#elif
> >>>>>> defined(CONFIG_WIRELESS_SPACE) +#define CONFIG_SYS_PROMPT
> >>>>>> "ws> " +#else +#define CONFIG_SYS_PROMPT		"lacie-kw> "
> >>>>> 
> >>>>> Is this really a good thing?  Over here I've been trying / 
> >>>>> hoping to get everyone to just use 'U-Boot # ' as the
> >>>>> prompt as this makes automated testing easier and there's
> >>>>> other run-time ways to see what we're on.
> >>> 
> >>> I personally vote to have common boot prompt 'U-boot #'.
> >>> 
> >>>> 
> >>>> I quite like prompts that identify the board I'm on, but it's
> >>>> not a must either. Cc:ing Simon in cas his own patches re
> >>>> lacie_kw would be impacted by your suggestion.
> >>> 
> >>> Well, we can expose a command to detect/print the board info,
> >>> if needed.
> >> 
> >> The run-time command "version" already returns both the system
> >> and the machine informations. This command can be used for
> >> testing purposes. IMHO the only requirement for an U-Boot prompt
> >> is to be short enough. Everything else is a matter of taste. Mine
> >> goes for the machine name.
> >> 
> >> Regards,
> >> 
> >> Simon
> > 
> > Tom,
> > 
> > Can automated test cope with a general prompt of the form '.*#' ?
> 
> Sure, probably.  It's really just something that popped into my head
> rather than a hard requirement or anything.  It's also possible to
> just setup your testing framework to take the prompt as a variable, so
> this is just a personal preference thing.

Ok, then, prompts will stay as they are in the patch.

BTW, I took a look at prompts across the whole codebase... You get all
sorts. :)

Amicalement,
diff mbox

Patch

diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c
index 68e8a77..084f0cf 100644
--- a/board/LaCie/netspace_v2/netspace_v2.c
+++ b/board/LaCie/netspace_v2/netspace_v2.c
@@ -39,40 +39,7 @@  int board_early_init_f(void)
 			NETSPACE_V2_OE_LOW, NETSPACE_V2_OE_HIGH);
 
 	/* Multi-Purpose Pins Functionality configuration */
-	u32 kwmpp_config[] = {
-		MPP0_SPI_SCn,
-		MPP1_SPI_MOSI,
-		MPP2_SPI_SCK,
-		MPP3_SPI_MISO,
-		MPP4_NF_IO6,
-		MPP5_NF_IO7,
-		MPP6_SYSRST_OUTn,
-		MPP7_GPO,		/* Fan speed (bit 1) */
-		MPP8_TW_SDA,
-		MPP9_TW_SCK,
-		MPP10_UART0_TXD,
-		MPP11_UART0_RXD,
-		MPP12_GPO,		/* Red led */
-		MPP14_GPIO,		/* USB fuse */
-		MPP16_GPIO,		/* SATA 0 power */
-		MPP17_GPIO,		/* SATA 1 power */
-		MPP18_NF_IO0,
-		MPP19_NF_IO1,
-		MPP20_SATA1_ACTn,
-		MPP21_SATA0_ACTn,
-		MPP22_GPIO,		/* Fan speed (bit 0) */
-		MPP23_GPIO,		/* Fan power */
-		MPP24_GPIO,		/* USB mode select */
-		MPP25_GPIO,		/* Fan rotation fail */
-		MPP26_GPIO,		/* USB vbus-in detection */
-		MPP28_GPIO,		/* USB enable vbus-out */
-		MPP29_GPIO,		/* Blue led (slow register) */
-		MPP30_GPIO,		/* Blue led (command register) */
-		MPP31_GPIO,		/* Board power off */
-		MPP32_GPIO,		/* Button (0 = Released, 1 = Pushed) */
-		MPP33_GPIO,		/* Fan speed (bit 2) */
-		0
-	};
+	u32 kwmpp_config[] = NETSPACE_V2_MPP_CONFIG;
 	kirkwood_mpp_conf(kwmpp_config, NULL);
 
 	return 0;
@@ -107,7 +74,12 @@  int misc_init_r(void)
 /* Configure and initialize PHY */
 void reset_phy(void)
 {
-	mv_phy_88e1116_init("egiga0", 8);
+#ifdef CONFIG_EGIGA0_PHY
+	mv_phy_88e1116_init("egiga0", CONFIG_EGIGA0_PHY);
+#endif
+#ifdef CONFIG_EGIGA1_PHY
+	mv_phy_88e1116_init("egiga1", CONFIG_EGIGA1_PHY);
+#endif
 }
 #endif
 
diff --git a/board/LaCie/netspace_v2/netspace_v2.h b/board/LaCie/netspace_v2/netspace_v2.h
index 34e492c..fc1d571 100644
--- a/board/LaCie/netspace_v2/netspace_v2.h
+++ b/board/LaCie/netspace_v2/netspace_v2.h
@@ -24,11 +24,132 @@ 
 #define NETSPACE_V2_H
 
 /* GPIO configuration */
+
+/* Net Space V2, Net Space Max V2, Internet Space V2: */
+#if defined(CONFIG_NETSPACE_MAX_V2) \
+    || defined(CONFIG_NETSPACE_V2) \
+    || defined(CONFIG_NET2BIG_V2) \
+    || defined(CONFIG_INETSPACE_V2)
+
 #define NETSPACE_V2_OE_LOW		0x06004000
 #define NETSPACE_V2_OE_HIGH		0x00000031
 #define NETSPACE_V2_OE_VAL_LOW		0x10030000
 #define NETSPACE_V2_OE_VAL_HIGH		0x00000000
 
+/* Wireless Space */
+
+#elif defined(CONFIG_WIRELESS_SPACE)
+
+#define NETSPACE_V2_OE_LOW		0xFF006808	
+#define NETSPACE_V2_OE_HIGH		0x0000F989
+#define NETSPACE_V2_OE_VAL_LOW		0x00000000
+#define NETSPACE_V2_OE_VAL_HIGH		0x00000000
+
+#else
+
+#error Undefined or unsupported LaCie KW board variant
+
+#endif
+
 #define NETSPACE_V2_GPIO_BUTTON         32
 
+/* MPP configuration */
+
+/* Net Space V2, Net Space Max V2, Internet Space V2: */
+#if defined(CONFIG_NETSPACE_MAX_V2) \
+	|| defined(CONFIG_NETSPACE_V2) \
+	|| defined(CONFIG_NET2BIG_V2) \
+    || defined(CONFIG_INETSPACE_V2)
+
+#define NETSPACE_V2_MPP_CONFIG	{ \
+		MPP0_SPI_SCn, \
+		MPP1_SPI_MOSI, \
+		MPP2_SPI_SCK, \
+		MPP3_SPI_MISO, \
+		MPP4_NF_IO6, \
+		MPP5_NF_IO7, \
+		MPP6_SYSRST_OUTn, \
+		MPP7_GPO,		/* Fan speed (bit 1) */ \
+		MPP8_TW_SDA, \
+		MPP9_TW_SCK, \
+		MPP10_UART0_TXD, \
+		MPP11_UART0_RXD, \
+		MPP12_GPO,		/* Red led */ \
+		MPP14_GPIO,		/* USB fuse */ \
+		MPP16_GPIO,		/* SATA 0 power */ \
+		MPP17_GPIO,		/* SATA 1 power */ \
+		MPP18_NF_IO0, \
+		MPP19_NF_IO1, \
+		MPP20_SATA1_ACTn, \
+		MPP21_SATA0_ACTn, \
+		MPP22_GPIO,		/* Fan speed (bit 0) */ \
+		MPP23_GPIO,		/* Fan power */ \
+		MPP24_GPIO,		/* USB mode select */ \
+		MPP25_GPIO,		/* Fan rotation fail */ \
+		MPP26_GPIO,		/* USB vbus-in detection */ \
+		MPP28_GPIO,		/* USB enable vbus-out */ \
+		MPP29_GPIO,		/* Blue led (slow register) */ \
+		MPP30_GPIO,		/* Blue led (command register) */ \
+		MPP31_GPIO,		/* Board power off */ \
+		MPP32_GPIO,		/* Button (0 = Released, 1 = Pushed) */ \
+		MPP33_GPIO,		/* Fan speed (bit 2) */ \
+		0 \
+	}
+
+#elif defined(CONFIG_WIRELESS_SPACE)
+
+#define NETSPACE_V2_MPP_CONFIG	{ \
+		MPP0_NF_IO2, \
+		MPP1_NF_IO3, \
+		MPP2_NF_IO4, \
+		MPP3_NF_IO5, \
+		MPP4_NF_IO6, \
+		MPP5_NF_IO7, \
+		MPP6_SYSRST_OUTn, \
+		MPP7_GPO,		/* Fan speed (bit 1) */ \
+		MPP8_TW_SDA, \
+		MPP9_TW_SCK, \
+		MPP10_UART0_TXD, \
+		MPP11_UART0_RXD, \
+		MPP13_GPIO,		/* Red led */ \
+		MPP14_GPIO,		/* USB fuse */ \
+		MPP15_SATA0_ACTn, \
+		MPP16_GPIO,		/* SATA 0 power */ \
+		MPP17_GPIO,		/* SATA 1 power */ \
+		MPP18_NF_IO0, \
+		MPP19_NF_IO1, \
+		MPP20_GE1_0,		/* Gigabit Ethernet 1 */ \
+		MPP21_GE1_1, \
+		MPP22_GE1_2, \
+		MPP23_GE1_3, \
+		MPP24_GE1_4, \
+		MPP25_GE1_5, \
+		MPP26_GE1_6, \
+		MPP27_GE1_7, \
+		MPP28_GE1_8, \
+		MPP29_GE1_9, \
+		MPP30_GE1_10, \
+		MPP31_GE1_11, \
+		MPP32_GE1_12, \
+		MPP33_GE1_13, \
+		MPP34_GE1_14, \
+		MPP35_GE1_15, \
+		MPP36_GPIO,		/* Fan speed (bit 2) */ \
+		MPP37_GPIO,		/* Fan speed (bit 0) */ \
+		MPP38_GPIO,		/* Fan power */ \
+		MPP39_GPIO,		/* Fan rotation fail */ \
+		MPP40_GPIO,		/* Ethernet switch link */ \
+		MPP41_GPIO,		/* USB enable host vbus */ \
+		MPP42_GPIO,		/* LED clock control */ \
+		MPP43_GPIO,		/* WPS button (0 = Pushed, 1 = Released) */ \
+		MPP44_GPIO,		/* Red LED on/off */ \
+		MPP45_GPIO,		/* Red LED timer blink (on=100ms, off=100ms) */ \
+		MPP46_GPIO,		/* Green LED on/off */ \
+		MPP47_GPIO,		/* LED (blue, green) SATA activity blink */ \
+		MPP48_GPIO,		/* Blue LED on/off */ \
+		0 \
+	}
+
+#endif
+
 #endif /* NETSPACE_V2_H */
diff --git a/boards.cfg b/boards.cfg
index edd750c..f001b29 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -157,6 +157,7 @@  inetspace_v2                 arm         arm926ejs   netspace_v2         LaCie
 net2big_v2                   arm         arm926ejs   net2big_v2          LaCie          kirkwood	lacie_kw:NET2BIG_V2
 netspace_max_v2              arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:NETSPACE_MAX_V2
 netspace_v2                  arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:NETSPACE_V2
+wireless_space               arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:WIRELESS_SPACE
 dreamplug                    arm         arm926ejs   -                   Marvell        kirkwood
 guruplug                     arm         arm926ejs   -                   Marvell        kirkwood
 mv88f6281gtw_ge              arm         arm926ejs   -                   Marvell        kirkwood
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 47bf27c..670edb0 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -653,6 +653,14 @@  int mvgbe_initialize(bd_t *bis)
 	struct eth_device *dev;
 	int devnum;
 	u8 used_ports[MAX_MVGBE_DEVS] = CONFIG_MVGBE_PORTS;
+#if defined(CONFIG_MVGBE_PHY_ADRS)
+#define MVGBE_PHY_ADRS CONFIG_MVGBE_PHY_ADRS
+#elif defined(CONFIG_PHY_BASE_ADR)
+#define MVGBE_PHY_ADRS {CONFIG_PHY_BASE_ADR,CONFIG_PHY_BASE_ADR+1}
+#else
+#define MVGBE_PHY_ADRS {8,9}
+#endif
+ 	u8 used_phy_adrs[MAX_MVGBE_DEVS] = MVGBE_PHY_ADRS;
 
 	for (devnum = 0; devnum < MAX_MVGBE_DEVS; devnum++) {
 		/*skip if port is configured not to use */
@@ -733,7 +741,7 @@  error1:
 		miiphy_register(dev->name, smi_reg_read, smi_reg_write);
 		/* Set phy address of the port */
 		miiphy_write(dev->name, MV_PHY_ADR_REQUEST,
-				MV_PHY_ADR_REQUEST, PHY_BASE_ADR + devnum);
+				MV_PHY_ADR_REQUEST, used_phy_adrs[devnum]);
 #endif
 	}
 	return 0;
diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h
index c35c2db..a979ab4 100644
--- a/include/configs/lacie_kw.h
+++ b/include/configs/lacie_kw.h
@@ -33,6 +33,10 @@ 
 #elif defined(CONFIG_NET2BIG_V2)
 #define CONFIG_MACH_TYPE		MACH_TYPE_NET2BIG_V2
 #define CONFIG_IDENT_STRING		" 2Big v2"
+#elif defined(CONFIG_WIRELESS_SPACE)
+#define MACH_TYPE_WIRELESS_SPACE	2500 /* is missing in mach-types.h */
+#define CONFIG_MACH_TYPE		MACH_TYPE_WIRELESS_SPACE
+#define CONFIG_IDENT_STRING		" Wireless Space"
 #else
 #error "Unknown board"
 #endif
@@ -73,6 +77,12 @@ 
 #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-is2.cfg
 #endif
 
+#ifdef CONFIG_WIRELESS_SPACE
+/* No SPI but NAND */
+#undef CONFIG_CMD_SF
+#define CONFIG_CMD_NAND
+#endif
+
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
@@ -90,8 +100,14 @@ 
 #define CONFIG_SYS_IDE_MAXDEVICE        1
 #if defined(CONFIG_NET2BIG_V2)
 #define CONFIG_SYS_PROMPT		"2big2> "
-#else
+#elif defined(CONFIG_NETSPACE_V2)
 #define CONFIG_SYS_PROMPT		"ns2> "
+#elif defined(CONFIG_INETSPACE_V2)
+#define CONFIG_SYS_PROMPT		"is2> "
+#elif defined(CONFIG_WIRELESS_SPACE)
+#define CONFIG_SYS_PROMPT		"ws> "
+#else
+#define CONFIG_SYS_PROMPT		"lacie-kw> "
 #endif
 
 /*
@@ -99,7 +115,16 @@ 
  */
 #ifdef CONFIG_CMD_NET
 #define CONFIG_MISC_INIT_R /* Call misc_init_r() to initialize MAC address */
+#if defined(CONFIG_WIRELESS_SPACE)
+#define CONFIG_MVGBE_PORTS		{1, 1}	/* enable both ports only */
+#define CONFIG_EGIGA1_PHY		0x6		/* egiga1 has a PHY, egiga0 has NOT */
+#define CONFIG_MVGBE_PHY_ADRS	{0xa, 0x6}
+#define CONFIG_MII
+#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
+#else
 #define CONFIG_MVGBE_PORTS		{1, 0} /* enable port 0 only */
+#define CONFIG_EGIGA0_PHY		0x8
+#endif
 #define CONFIG_NETCONSOLE
 #endif
 
@@ -154,11 +179,20 @@ 
 /*
  * Environment variables configurations
  */
+
+#if defined(CONFIG_WIRELESS_SPACE)
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_SECT_SIZE		0x10000	/* 64KB */
+#define CONFIG_ENV_SIZE			0x1000	/* 4KB */
+#define CONFIG_ENV_ADDR			0x70000
+#define CONFIG_ENV_OFFSET		0x70000	/* env starts here */
+#else
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_SECT_SIZE		0x10000	/* 64KB */
 #define CONFIG_ENV_SIZE			0x1000	/* 4KB */
 #define CONFIG_ENV_ADDR			0x70000
 #define CONFIG_ENV_OFFSET		0x70000	/* env starts here */
+#endif
 
 /*
  * Default environment variables
@@ -185,4 +219,6 @@ 
 	"usbload=usb start && "					\
 		"fatload usb 0:1 $loadaddr /boot/$bootfile\0"
 
+//#define DEBUG
+
 #endif /* _CONFIG_LACIE_KW_H */