Luka Perkov | 14 Apr 19:25 2012
Picon

[PATCH v7] kirkwood: add NAS62x0 board support

Add support for new boards RaidSonic ICY BOX NAS6210 and NAS6220.

NAS6210 has 1 SATA and 1 eSATA port while NAS6220 has 2 SATA ports.

More information about the boards can be found here:

http://www.raidsonic.de/en/products/nas-systems.php?we_objectID=7036
http://www.raidsonic.de/en/products/nas-systems.php?we_objectID=7515

Signed-off-by: Luka Perkov <uboot <at> lukaperkov.net>
Signed-off-by: Gerald Kerma <dreagle <at> doukki.net>
Signed-off-by: Simon Baatz <gmbnomis <at> gmail.com>
---

Changes from version v1:

 * use tools/checkpatch.pl to locate patch errors and fix them
 * add two entries in boards.cfg, one for each board
 * fixed CONFIG_RESET_PHY_R
 * don't define values for macros that enable features only
 * remove static RAM configuration
 * fix comments
 * use only CONFIG_ENV_OFFSET and remove CONFIG_ENV_ADDR
 * clean coding style
 * add entry in MAINTAINERS file

Changes from version v2:

 * use defined() in macros for board selection for robustness

(Continue reading)

Marek Vasut | 15 Apr 12:41 2012
Picon

Re: [PATCH v7] kirkwood: add NAS62x0 board support

Dear Luka Perkov,

> Add support for new boards RaidSonic ICY BOX NAS6210 and NAS6220.
> 
> NAS6210 has 1 SATA and 1 eSATA port while NAS6220 has 2 SATA ports.
> 
> More information about the boards can be found here:
> 
> http://www.raidsonic.de/en/products/nas-systems.php?we_objectID=7036
> http://www.raidsonic.de/en/products/nas-systems.php?we_objectID=7515
> 
> Signed-off-by: Luka Perkov <uboot <at> lukaperkov.net>
> Signed-off-by: Gerald Kerma <dreagle <at> doukki.net>
> Signed-off-by: Simon Baatz <gmbnomis <at> gmail.com>
> ---
> 
> Changes from version v1:
> 
>  * use tools/checkpatch.pl to locate patch errors and fix them
>  * add two entries in boards.cfg, one for each board
>  * fixed CONFIG_RESET_PHY_R
>  * don't define values for macros that enable features only
>  * remove static RAM configuration
>  * fix comments
>  * use only CONFIG_ENV_OFFSET and remove CONFIG_ENV_ADDR
>  * clean coding style
>  * add entry in MAINTAINERS file
> 
> Changes from version v2:
> 
(Continue reading)

Luka Perkov | 15 Apr 16:08 2012
Picon

Re: [PATCH v7] kirkwood: add NAS62x0 board support

Hi Marek,

On Sun, Apr 15, 2012 at 12:41:10PM +0200, Marek Vasut wrote:
> > +#define CONFIG_ENV_SIZE		0x20000
> > +#define CONFIG_ENV_OFFSET	0x80000
> 
> The indent is weird in here?

No. Indentation is ok, the "+" moves it, when you apply the patch it
looks ok in include/configs/ib62x0.h

> > +#define CONFIG_DOS_PARTITION
> > +#define CONFIG_MVSATA_IDE_USE_PORT0
> > +# if defined(CONFIG_BOARD_IS_IB_NAS6210)
> > +#  undef CONFIG_SYS_IDE_MAXBUS
> > +#  define CONFIG_SYS_IDE_MAXBUS		1
> 
> undef
> define
> 
> Why ?

To avoid this warning while compiling:

include/configs/ib62x0.h:140:0: warning: "CONFIG_SYS_IDE_MAXBUS" redefined [enabled by default]
include/asm/arch/config.h:131:0: note: this is the location of the previous definition
include/configs/ib62x0.h:141:0: warning: "CONFIG_SYS_IDE_MAXDEVICE" redefined [enabled by default]
include/asm/arch/config.h:132:0: note: this is the location of the previous definition

> Also, why do you use "#   define" stuff (with these spaces)?
(Continue reading)

Simon Baatz | 17 Apr 01:03 2012
Picon

Re: [PATCH v7] kirkwood: add NAS62x0 board support

Hi,

Am 14.04.2012 19:25, schrieb Luka Perkov:
> NAS6210 eSATA port is not working from uboot... That is why there are 
> CONFIG_BOARD_IS_IB_NAS6210 and CONFIG_BOARD_IS_IB_NAS6220 in ib62x0.h
> config file.
>
>
I think I have found the reason why the eSATA port is not working on the
6210. I think the second port on the 6220 does not work either.
Surprisingly, the reason is completely unrelated to this board and has
also been described before (see for example
http://www.varkey.in/2011/06/boot-debian-from-sata-seagate-goflex-net/
which states:

Shutdown the GoFlex Net, connect the hard disk to the **right** side
SATA port. There seems to be a bug in Jeff’s uBoot for GoFlex Net, so
within uBoot only the right port works.
)

If you compile the patch for the 6220 and use it on the 6210, the first
hard disk is detected twice and the second one is not detected at all.
The problem is a mismatch in "include/ide.h" and "common/cmd_ide.c".
ide.h defines:

#define IDE_BUS(dev) (dev >> 1)

However, cmd_ide.c uses the following in ide_init():

for (bus = 0; bus < CONFIG_SYS_IDE_MAXBUS; ++bus) {
(Continue reading)

Prafulla Wadaskar | 17 Apr 11:14 2012

Re: [PATCH v7] kirkwood: add NAS62x0 board support


> -----Original Message-----
> From: u-boot-bounces <at> lists.denx.de [mailto:u-boot-
> bounces <at> lists.denx.de] On Behalf Of Simon Baatz
> Sent: 17 April 2012 04:34
> To: u-boot <at> lists.denx.de; dreagle <at> doukki.net; Luka Perkov
> Subject: Re: [U-Boot] [PATCH v7] kirkwood: add NAS62x0 board support
> 
> Hi,
> 
> Am 14.04.2012 19:25, schrieb Luka Perkov:
> > NAS6210 eSATA port is not working from uboot... That is why there
> are
> > CONFIG_BOARD_IS_IB_NAS6210 and CONFIG_BOARD_IS_IB_NAS6220 in
> ib62x0.h
> > config file.
> >
> >
> I think I have found the reason why the eSATA port is not working on
> the
> 6210. I think the second port on the 6220 does not work either.
> Surprisingly, the reason is completely unrelated to this board and has
> also been described before (see for example
> http://www.varkey.in/2011/06/boot-debian-from-sata-seagate-goflex-net/
> which states:
> 
> Shutdown the GoFlex Net, connect the hard disk to the **right** side
> SATA port. There seems to be a bug in Jeff's uBoot for GoFlex Net, so
> within uBoot only the right port works.
> )
(Continue reading)

Luka Perkov | 17 Apr 20:47 2012
Picon

Re: [PATCH v7] kirkwood: add NAS62x0 board support

Hi Simon! Hi Prafulla!

On Tue, Apr 17, 2012 at 02:14:23AM -0700, Prafulla Wadaskar wrote:
> > #define IDE_BUS(dev) (dev / (CONFIG_SYS_IDE_MAXDEVICE /
> > CONFIG_SYS_IDE_MAXBUS))
> > 
> > in ide.h fixes the problem for me and detects both the internal hard
> > disk and the hard disk at the eSATA port.

Yes, this does the trick.

> > This also means that the 6210/6220 patch should not make a difference
> > between the two boards.

You are right. I'll rewrite it.

> Hi Simon
> 
> This is a good findings indeed.

I agree :)

> Hi Luka
> May you please check the same and resubmit the clean patch, you may keep ide patch separate mentioning dependency.

Yes. I'll send patches soonish...

Luka
David Purdy | 17 Apr 21:19 2012
Picon

Re: [PATCH v7] kirkwood: add NAS62x0 board support

On Tue, Apr 17, 2012 at 1:47 PM, Luka Perkov <uboot <at> lukaperkov.net> wrote:
> Hi Simon! Hi Prafulla!
>
> On Tue, Apr 17, 2012 at 02:14:23AM -0700, Prafulla Wadaskar wrote:
>> > #define IDE_BUS(dev) (dev / (CONFIG_SYS_IDE_MAXDEVICE /
>> > CONFIG_SYS_IDE_MAXBUS))
>> >
>> > in ide.h fixes the problem for me and detects both the internal hard
>> > disk and the hard disk at the eSATA port.
>
> Yes, this does the trick.
>
>> > This also means that the 6210/6220 patch should not make a difference
>> > between the two boards.
>
> You are right. I'll rewrite it.
>
>> Hi Simon
>>
>> This is a good findings indeed.
>
> I agree :)
>
>> Hi Luka
>> May you please check the same and resubmit the clean patch, you may keep ide patch separate mentioning dependency.
>
> Yes. I'll send patches soonish...
>
> Luka
> _______________________________________________
(Continue reading)

Luka Perkov | 17 Apr 21:41 2012
Picon

Re: [PATCH v7] kirkwood: add NAS62x0 board support

On Tue, Apr 17, 2012 at 02:19:16PM -0500, David Purdy wrote:
> On Tue, Apr 17, 2012 at 1:47 PM, Luka Perkov <uboot <at> lukaperkov.net> wrote:
> Any chance this same patch would similarly help other Kirkwood boxes
> that have two SATA ports?

Yes. If you have another board to test please do so and give your
comment here:

http://lists.denx.de/pipermail/u-boot/2012-April/122594.html

Regards,
Luka

Gmane