Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-10-07 Thread uboot
Hi Tom, Albert, Prafulla and others,

On Tue, Apr 17, 2012 at 09:06:49PM +0200, Luka Perkov wrote:
 IDE_BUS assumes that each bus has two devices and thus returns the first
 bus even when the second one should be probed.
 
 Signed-off-by: Simon Baatz gmbno...@gmail.com
 Tested-by: Luka Perkov ub...@lukaperkov.net
 ---
 
 Simon discovered this while adding support for new board IB NAS6210.
 
 More info can be found here:
 
 http://lists.denx.de/pipermail/u-boot/2012-April/122525.html
 
 When this is commited I will do a coding style cleanup. There are tabs
 after few #define parts in include/ide.h.
 
  include/ide.h |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/include/ide.h b/include/ide.h
 index 8ecc9dd..385e909 100644
 --- a/include/ide.h
 +++ b/include/ide.h
 @@ -24,7 +24,7 @@
  #ifndef  _IDE_H
  #define _IDE_H
  
 -#define  IDE_BUS(dev)(dev  1)
 +#define IDE_BUS(dev) (dev / (CONFIG_SYS_IDE_MAXDEVICE / 
 CONFIG_SYS_IDE_MAXBUS))
  
  #define  ATA_CURR_BASE(dev)  
 (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
  

I have assigned this patch to Tom in patchwork here:

http://patchwork.ozlabs.org/patch/159129/

From when it was submitted we have got confirmations that this patch
does the job for kirkwood boards on the u-boot mailing list:

http://lists.denx.de/pipermail/u-boot/2012-April/122684.html
http://lists.denx.de/pipermail/u-boot/2012-June/125658.html

It would be nice if this patch would enter v2012.10 release. At least
someone could pull it into his repo so it can find it's way into master
eventually.

Regards,
Luka
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-10-07 Thread Albert ARIBAUD
Hi ub...@lukaperkov.net,

On Sun, 7 Oct 2012 09:15:52 +0200, ub...@lukaperkov.net wrote:

 Hi Tom, Albert, Prafulla and others,
 
 On Tue, Apr 17, 2012 at 09:06:49PM +0200, Luka Perkov wrote:
  IDE_BUS assumes that each bus has two devices and thus returns the first
  bus even when the second one should be probed.
  
  Signed-off-by: Simon Baatz gmbno...@gmail.com
  Tested-by: Luka Perkov ub...@lukaperkov.net
  ---
  
  Simon discovered this while adding support for new board IB NAS6210.
  
  More info can be found here:
  
  http://lists.denx.de/pipermail/u-boot/2012-April/122525.html
  
  When this is commited I will do a coding style cleanup. There are tabs
  after few #define parts in include/ide.h.
  
   include/ide.h |2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/include/ide.h b/include/ide.h
  index 8ecc9dd..385e909 100644
  --- a/include/ide.h
  +++ b/include/ide.h
  @@ -24,7 +24,7 @@
   #ifndef_IDE_H
   #define _IDE_H
   
  -#defineIDE_BUS(dev)(dev  1)
  +#define IDE_BUS(dev)   (dev / (CONFIG_SYS_IDE_MAXDEVICE / 
  CONFIG_SYS_IDE_MAXBUS))
   
   #defineATA_CURR_BASE(dev)  
  (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
   
 
 I have assigned this patch to Tom in patchwork here:
 
 http://patchwork.ozlabs.org/patch/159129/
 
 From when it was submitted we have got confirmations that this patch
 does the job for kirkwood boards on the u-boot mailing list:
 
 http://lists.denx.de/pipermail/u-boot/2012-April/122684.html
 http://lists.denx.de/pipermail/u-boot/2012-June/125658.html
 
 It would be nice if this patch would enter v2012.10 release. At least
 someone could pull it into his repo so it can find it's way into master
 eventually.

As discussed on IRC, there are tests that actually cover the plaforms I
should have tested myself, so I personally think this can go in 2012.10.

 Regards,
 Luka

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-10-07 Thread Tom Rini
On Sun, Oct 7, 2012 at 2:28 AM, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:
 Hi ub...@lukaperkov.net,

 On Sun, 7 Oct 2012 09:15:52 +0200, ub...@lukaperkov.net wrote:

 Hi Tom, Albert, Prafulla and others,

 On Tue, Apr 17, 2012 at 09:06:49PM +0200, Luka Perkov wrote:
  IDE_BUS assumes that each bus has two devices and thus returns the first
  bus even when the second one should be probed.
 
  Signed-off-by: Simon Baatz gmbno...@gmail.com
  Tested-by: Luka Perkov ub...@lukaperkov.net
  ---
 
  Simon discovered this while adding support for new board IB NAS6210.
 
  More info can be found here:
 
  http://lists.denx.de/pipermail/u-boot/2012-April/122525.html
 
  When this is commited I will do a coding style cleanup. There are tabs
  after few #define parts in include/ide.h.
 
   include/ide.h |2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
 
  diff --git a/include/ide.h b/include/ide.h
  index 8ecc9dd..385e909 100644
  --- a/include/ide.h
  +++ b/include/ide.h
  @@ -24,7 +24,7 @@
   #ifndef_IDE_H
   #define _IDE_H
 
  -#defineIDE_BUS(dev)(dev  1)
  +#define IDE_BUS(dev)   (dev / (CONFIG_SYS_IDE_MAXDEVICE / 
  CONFIG_SYS_IDE_MAXBUS))
 
   #defineATA_CURR_BASE(dev)  
  (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
 

 I have assigned this patch to Tom in patchwork here:

 http://patchwork.ozlabs.org/patch/159129/

 From when it was submitted we have got confirmations that this patch
 does the job for kirkwood boards on the u-boot mailing list:

 http://lists.denx.de/pipermail/u-boot/2012-April/122684.html
 http://lists.denx.de/pipermail/u-boot/2012-June/125658.html

 It would be nice if this patch would enter v2012.10 release. At least
 someone could pull it into his repo so it can find it's way into master
 eventually.

 As discussed on IRC, there are tests that actually cover the plaforms I
 should have tested myself, so I personally think this can go in 2012.10.

OK, I'll pick this up Monday, thanks.

-- 
Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-08-14 Thread Albert ARIBAUD
On Mon, 13 Aug 2012 14:27:16 +0200, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:
 Hi Wolfgang,
 
 On Thu, 09 Aug 2012 22:36:33 +0200, Wolfgang Denk w...@denx.de wrote:
  Dear Albert ARIBAUD,
  
  In message
  cajhhwatayrt3gbzhrdcqhphrp5hbx3vd2xyuyymsled8xwe...@mail.gmail.com
  you wrote:
   Sorry Luka (and all), been tied up pretty heavily recently, had to
   adjust to find some free time again.
   
   I will test your patch today and post results tonight.
  
  What was the outcome of this?  I cannot find any further messages to
  this thread...
 
 Sorry, I was away from home for a few days with no or little Internet
 access.
 
 I wanted to test this on orion5x/edminiv2; I should be able to do this
 today in the course of regression-testing preparing an orion5x patch
 I want to submit in this window. 

... and of course I spent all my allotted time yesterday on catching up
about pull requests, sorry. I should be able to test this today, above
the current tip of u-boot-arm/master.

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-08-14 Thread DrEagle
Hi,

It works great for my IB-6220 (Dual Sata).

Without the patch, the same disk is seen twice, I have only checked
disks serial numbers :

ib62x0 = version

U-Boot 2012.07-00123-g4d3c95f-dirty (Aug 13 2012 - 11:30:58) RaidSonic
ICY BOX IB-NAS62x0
arm-linux-gnueabi-gcc (Debian 4.4.5-8) 4.4.5
GNU ld (GNU Binutils for Debian) 2.20.1.20100303
ib62x0 = ide reset

Reset IDE: Bus 0: OK Bus 1: OK
  Device 0: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2075392
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
  Device 1: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2075392
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
ib62x0 =

---
With the patch applied, the two disks are seen :
---
patch -p0 -i ../fix_ide.diff

File to patch: include/ide.h

ib62x0 = version

U-Boot 2012.07-00123-g4d3c95f-dirty (Aug 14 2012 - 14:22:49) RaidSonic
ICY BOX IB-NAS62x0
arm-linux-gnueabi-gcc (Debian 4.4.5-8) 4.4.5
GNU ld (GNU Binutils for Debian) 2.20.1.20100303
ib62x0 = ide reset

Reset IDE: Bus 0: OK Bus 1: OK
  Device 0: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2075392
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
  Device 1: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2083815
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
ib62x0 =
ib62x0 = ide device 0

IDE device 0: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2075392
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
... is now current device
ib62x0 = ide device 1

IDE device 1: Model: WDC WD20EARX-00MMMB0 Firm: 80.00A80 Ser#:
WD-WCAWZ2083815
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
... is now current device

---
For me this patch has fixed the detection bug of ide disks.

Hope this tests may help.

Le 13/08/2012 14:27, Albert ARIBAUD a écrit :
 Hi Wolfgang,
 
 On Thu, 09 Aug 2012 22:36:33 +0200, Wolfgang Denk w...@denx.de wrote:
 Dear Albert ARIBAUD,

 In message
 cajhhwatayrt3gbzhrdcqhphrp5hbx3vd2xyuyymsled8xwe...@mail.gmail.com
 you wrote:
 Sorry Luka (and all), been tied up pretty heavily recently, had to
 adjust to find some free time again.

 I will test your patch today and post results tonight.

 What was the outcome of this?  I cannot find any further messages to
 this thread...
 
 Sorry, I was away from home for a few days with no or little Internet
 access.
 
 I wanted to test this on orion5x/edminiv2; I should be able to do this
 today in the course of regression-testing preparing an orion5x patch
 I want to submit in this window. 
 
 Best regards,

 Wolfgang Denk
 
 Amicalement,
 

drEagle
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-08-13 Thread Albert ARIBAUD
Hi Wolfgang,

On Thu, 09 Aug 2012 22:36:33 +0200, Wolfgang Denk w...@denx.de wrote:
 Dear Albert ARIBAUD,
 
 In message
 cajhhwatayrt3gbzhrdcqhphrp5hbx3vd2xyuyymsled8xwe...@mail.gmail.com
 you wrote:
  Sorry Luka (and all), been tied up pretty heavily recently, had to
  adjust to find some free time again.
  
  I will test your patch today and post results tonight.
 
 What was the outcome of this?  I cannot find any further messages to
 this thread...

Sorry, I was away from home for a few days with no or little Internet
access.

I wanted to test this on orion5x/edminiv2; I should be able to do this
today in the course of regression-testing preparing an orion5x patch
I want to submit in this window. 

 Best regards,
 
 Wolfgang Denk

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-08-09 Thread Wolfgang Denk
Dear Albert ARIBAUD,

In message cajhhwatayrt3gbzhrdcqhphrp5hbx3vd2xyuyymsled8xwe...@mail.gmail.com 
you wrote:
 Sorry Luka (and all), been tied up pretty heavily recently, had to
 adjust to find some free time again.
 
 I will test your patch today and post results tonight.

What was the outcome of this?  I cannot find any further messages to
this thread...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
One possible reason that things aren't going  according  to  plan  is
that there never was a plan in the first place.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-06-20 Thread Albert ARIBAUD
Sorry Luka (and all), been tied up pretty heavily recently, had to
adjust to find some free time again.

I will test your patch today and post results tonight.

2012/6/7 Luka Perkov ub...@lukaperkov.net

 Hi Albert,

 On Tue, May 15, 2012 at 09:42:59PM +0200, Albert ARIBAUD wrote:
  On Sun, Apr 29, 2012 at 10:19:41PM +0200, Luka Perkov wrote:
  On Thu, Apr 19, 2012 at 08:38:19AM +0200, Albert ARIBAUD wrote:
  Not my main area of expertise here, but I am not sure how this plays
  on Marvell non-kirkwood platforms (e.g., orion5x).
  
  ISTR it is not the first time we deal with the whole IDE number of
  bus / number of ports [ / useable ports ] issue, and we may be
  running in circles here, fixing one platform and breaking another.
  
  I'll try this on EDMiniV2 in the coming days, and let people know
  the results in this thread.
  
  I was just wondering did you have the time to test this patch on your
  board?
  
  Albert, did you maybe have time to test this patch. I have included it
  bellow so you dont have to search for it...
  
  Signed-off-by: Simon Baatzgmbno...@gmail.com
  Tested-by: Luka Perkovub...@lukaperkov.net
  ---
  
  Simon discovered this while adding support for new board IB NAS6210.
  
  More info can be found here:
  
  http://lists.denx.de/pipermail/u-boot/2012-April/122525.html
  
    include/ide.h |    2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/include/ide.h b/include/ide.h
  index 8ecc9dd..385e909 100644
  --- a/include/ide.h
  +++ b/include/ide.h
  @@ -24,7 +24,7 @@
    #ifndef    _IDE_H
    #define _IDE_H
  
  -#define     IDE_BUS(dev)    (dev  1)
  +#define IDE_BUS(dev)        (dev / (CONFIG_SYS_IDE_MAXDEVICE / 
  CONFIG_SYS_IDE_MAXBUS))
  
    #define    ATA_CURR_BASE(dev)      
   (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
 
  Sorry, been busier than usual. I'll try and test this tomorrow
  night; if not, that'll be next week I'm afraid.

 It's me beeing boring again, sorry... Can we get your feedback on this one?

 Regards,
 Luka


Amicalement,
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-06-07 Thread Luka Perkov
Hi Albert,

On Tue, May 15, 2012 at 09:42:59PM +0200, Albert ARIBAUD wrote:
 On Sun, Apr 29, 2012 at 10:19:41PM +0200, Luka Perkov wrote:
 On Thu, Apr 19, 2012 at 08:38:19AM +0200, Albert ARIBAUD wrote:
 Not my main area of expertise here, but I am not sure how this plays
 on Marvell non-kirkwood platforms (e.g., orion5x).
 
 ISTR it is not the first time we deal with the whole IDE number of
 bus / number of ports [ / useable ports ] issue, and we may be
 running in circles here, fixing one platform and breaking another.
 
 I'll try this on EDMiniV2 in the coming days, and let people know
 the results in this thread.
 
 I was just wondering did you have the time to test this patch on your
 board?
 
 Albert, did you maybe have time to test this patch. I have included it
 bellow so you dont have to search for it...
 
 Signed-off-by: Simon Baatzgmbno...@gmail.com
 Tested-by: Luka Perkovub...@lukaperkov.net
 ---
 
 Simon discovered this while adding support for new board IB NAS6210.
 
 More info can be found here:
 
 http://lists.denx.de/pipermail/u-boot/2012-April/122525.html
 
   include/ide.h |2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/include/ide.h b/include/ide.h
 index 8ecc9dd..385e909 100644
 --- a/include/ide.h
 +++ b/include/ide.h
 @@ -24,7 +24,7 @@
   #ifndef_IDE_H
   #define _IDE_H
 
 -#define IDE_BUS(dev)(dev  1)
 +#define IDE_BUS(dev)(dev / (CONFIG_SYS_IDE_MAXDEVICE / 
 CONFIG_SYS_IDE_MAXBUS))
 
   #defineATA_CURR_BASE(dev)  
  (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
 
 Sorry, been busier than usual. I'll try and test this tomorrow
 night; if not, that'll be next week I'm afraid.

It's me beeing boring again, sorry... Can we get your feedback on this one?

Regards,
Luka
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-06-03 Thread Vágó Tibor

Hi,

I've tested this IDE patch on my NAS6220 and it works.

U-boot detect both HDD correctly and boot from them.

Cheers,
Tibor


 Original message 
IDE_BUS assumes that each bus has two devices and thus returns the first
bus even when the second one should be probed.

Signed-off-by: Simon Baatz gmbnomis at gmail.com
Tested-by: Luka Perkov uboot at lukaperkov.net
---

Simon discovered this while adding support for new board IB NAS6210.

More info can be found here:

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

When this is commited I will do a coding style cleanup. There are tabs
after few #define parts in include/ide.h.

 include/ide.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/ide.h b/include/ide.h
index 8ecc9dd..385e909 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -24,7 +24,7 @@
 #ifndef_IDE_H
 #define _IDE_H

-#defineIDE_BUS(dev)(dev  1)
+#define IDE_BUS(dev)	(dev / (CONFIG_SYS_IDE_MAXDEVICE / 
CONFIG_SYS_IDE_MAXBUS))


 #define	ATA_CURR_BASE(dev) 
(CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-06-03 Thread Vágó Tibor

Hi,

I've tested this IDE patch on my NAS6220 and it works.

U-boot detect both HDD correctly and boot from them.

Cheers,
Tibor


 Original message 
IDE_BUS assumes that each bus has two devices and thus returns the first
bus even when the second one should be probed.

Signed-off-by: Simon Baatz gmbnomis at gmail.com
Tested-by: Luka Perkov uboot at lukaperkov.net
---

Simon discovered this while adding support for new board IB NAS6210.

More info can be found here:

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

When this is commited I will do a coding style cleanup. There are tabs
after few #define parts in include/ide.h.

 include/ide.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/ide.h b/include/ide.h
index 8ecc9dd..385e909 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -24,7 +24,7 @@
 #ifndef_IDE_H
 #define _IDE_H

-#defineIDE_BUS(dev)(dev  1)
+#define IDE_BUS(dev)	(dev / (CONFIG_SYS_IDE_MAXDEVICE / 
CONFIG_SYS_IDE_MAXBUS))


 #define	ATA_CURR_BASE(dev) 
(CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-06-03 Thread Rogan Dawes

On 19/04/2012 08:38, Albert ARIBAUD wrote:

Hi Dave,

Le 18/04/2012 23:37, David Purdy a écrit :

On Tue, Apr 17, 2012 at 2:06 PM, Luka Perkovub...@lukaperkov.net wrote:

IDE_BUS assumes that each bus has two devices and thus returns the first
bus even when the second one should be probed.

Signed-off-by: Simon Baatzgmbno...@gmail.com
Tested-by: Luka Perkovub...@lukaperkov.net
---

Simon discovered this while adding support for new board IB NAS6210.

More info can be found here:

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

When this is commited I will do a coding style cleanup. There are tabs
after few #define parts in include/ide.h.

include/ide.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/ide.h b/include/ide.h
index 8ecc9dd..385e909 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -24,7 +24,7 @@
#ifndef _IDE_H


Simon, Luka, Prafulla, etal,

I've tested this out on the Seagate GoFlex Net (Kirkwood) device,
which also has dual SATA ports, and it resolved the long-standing (and
irritating) bug/unwanted-feature that required us to boot from _only_
the right side port.

I would guess that other Kirkwood dual-SATA-port boxes would be
happier because of this, as well.

Nice catch, Simon.


Not my main area of expertise here, but I am not sure how this plays on
Marvell non-kirkwood platforms (e.g., orion5x).

ISTR it is not the first time we deal with the whole IDE number of bus /
number of ports [ / useable ports ] issue, and we may be running in
circles here, fixing one platform and breaking another.

I'll try this on EDMiniV2 in the coming days, and let people know the
results in this thread.


regards,

Dave


Amicalement,


I had something similar for my DNS323 port (orion5x-based), which other 
people may be remembering.


http://lists.denx.de/pipermail/u-boot/2010-August/075589.html

I seem to recall Wolfgang was not terribly enthused about it for some 
reason, though.


Rogan


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-06-03 Thread Luka Perkov
Hi Tibor,

On Sun, Jun 03, 2012 at 05:03:13PM +0200, Vágó Tibor wrote:
 Hi,
 
 I've tested this IDE patch on my NAS6220 and it works.
 
 U-boot detect both HDD correctly and boot from them.

Thank you for testing.

Regards,
Luka
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-06-03 Thread Luka Perkov
Hi Rogan,

On Sun, Jun 03, 2012 at 10:23:15PM +0200, Rogan Dawes wrote:
 I had something similar for my DNS323 port (orion5x-based), which
 other people may be remembering.
 
 http://lists.denx.de/pipermail/u-boot/2010-August/075589.html
 
 I seem to recall Wolfgang was not terribly enthused about it for
 some reason, though.

I'm waiting for Albert to do testing on his boards. I was going to ping
him again about this one next week ;)

Regards,
Luka
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-05-15 Thread Albert ARIBAUD

Hi Luka,

Le 14/05/2012 21:29, Luka Perkov a écrit :

Hi Albert,

On Sun, Apr 29, 2012 at 10:19:41PM +0200, Luka Perkov wrote:

On Thu, Apr 19, 2012 at 08:38:19AM +0200, Albert ARIBAUD wrote:

Not my main area of expertise here, but I am not sure how this plays
on Marvell non-kirkwood platforms (e.g., orion5x).

ISTR it is not the first time we deal with the whole IDE number of
bus / number of ports [ / useable ports ] issue, and we may be
running in circles here, fixing one platform and breaking another.

I'll try this on EDMiniV2 in the coming days, and let people know
the results in this thread.


I was just wondering did you have the time to test this patch on your
board?


Albert, did you maybe have time to test this patch. I have included it
bellow so you dont have to search for it...

Signed-off-by: Simon Baatzgmbno...@gmail.com
Tested-by: Luka Perkovub...@lukaperkov.net
---

Simon discovered this while adding support for new board IB NAS6210.

More info can be found here:

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

  include/ide.h |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/ide.h b/include/ide.h
index 8ecc9dd..385e909 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -24,7 +24,7 @@
  #ifndef   _IDE_H
  #define _IDE_H

-#defineIDE_BUS(dev)(dev  1)
+#define IDE_BUS(dev)   (dev / (CONFIG_SYS_IDE_MAXDEVICE / 
CONFIG_SYS_IDE_MAXBUS))

  #define   ATA_CURR_BASE(dev)  
(CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])


Sorry, been busier than usual. I'll try and test this tomorrow night; if 
not, that'll be next week I'm afraid.


Amicalement,
--
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-05-15 Thread Luka Perkov
Hi Albert,

On Tue, May 15, 2012 at 09:42:59PM +0200, Albert ARIBAUD wrote:
 diff --git a/include/ide.h b/include/ide.h
 index 8ecc9dd..385e909 100644
 --- a/include/ide.h
 +++ b/include/ide.h
 @@ -24,7 +24,7 @@
   #ifndef_IDE_H
   #define _IDE_H
 
 -#define IDE_BUS(dev)(dev  1)
 +#define IDE_BUS(dev)(dev / (CONFIG_SYS_IDE_MAXDEVICE / 
 CONFIG_SYS_IDE_MAXBUS))
 
   #defineATA_CURR_BASE(dev)  
  (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
 
 Sorry, been busier than usual. I'll try and test this tomorrow
 night; if not, that'll be next week I'm afraid.

It's no hurry... I was pinging you so this does not end up forgotten.

If this does not work for your boards we can always use #ifdef's.

Regards,
Luka
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-05-14 Thread Luka Perkov
Hi Albert,

On Sun, Apr 29, 2012 at 10:19:41PM +0200, Luka Perkov wrote:
 On Thu, Apr 19, 2012 at 08:38:19AM +0200, Albert ARIBAUD wrote:
  Not my main area of expertise here, but I am not sure how this plays
  on Marvell non-kirkwood platforms (e.g., orion5x).
  
  ISTR it is not the first time we deal with the whole IDE number of
  bus / number of ports [ / useable ports ] issue, and we may be
  running in circles here, fixing one platform and breaking another.
  
  I'll try this on EDMiniV2 in the coming days, and let people know
  the results in this thread.
 
 I was just wondering did you have the time to test this patch on your
 board?

Albert, did you maybe have time to test this patch. I have included it
bellow so you dont have to search for it...

Signed-off-by: Simon Baatz gmbno...@gmail.com
Tested-by: Luka Perkov ub...@lukaperkov.net
---

Simon discovered this while adding support for new board IB NAS6210.

More info can be found here:

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

 include/ide.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/ide.h b/include/ide.h
index 8ecc9dd..385e909 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -24,7 +24,7 @@
 #ifndef_IDE_H
 #define _IDE_H
 
-#defineIDE_BUS(dev)(dev  1)
+#define IDE_BUS(dev)   (dev / (CONFIG_SYS_IDE_MAXDEVICE / 
CONFIG_SYS_IDE_MAXBUS))
 
 #defineATA_CURR_BASE(dev)  
(CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-04-29 Thread Luka Perkov
Hi Albert,

On Thu, Apr 19, 2012 at 08:38:19AM +0200, Albert ARIBAUD wrote:
 Not my main area of expertise here, but I am not sure how this plays
 on Marvell non-kirkwood platforms (e.g., orion5x).
 
 ISTR it is not the first time we deal with the whole IDE number of
 bus / number of ports [ / useable ports ] issue, and we may be
 running in circles here, fixing one platform and breaking another.
 
 I'll try this on EDMiniV2 in the coming days, and let people know
 the results in this thread.

I was just wondering did you have the time to test this patch on your
board?

Regards,
Luka
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-04-21 Thread David Purdy
On Thu, Apr 19, 2012 at 1:38 AM, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:
 Hi Dave,




 Not my main area of expertise here, but I am not sure how this plays on
 Marvell non-kirkwood platforms (e.g., orion5x).

 ISTR it is not the first time we deal with the whole IDE number of bus /
 number of ports [ / useable ports ] issue, and we may be running in circles
 here, fixing one platform and breaking another.

I, too, remember remember reading some discussions about changes to
that very line.


 I'll try this on EDMiniV2 in the coming days, and let people know the
 results in this thread.



 Amicalement,
 --
 Albert.

After further testing, I've found a possible (minor?) anomaly, but not
on a supported (official) Kirkwood device.  The device I tested it on
is a Seagate GoFlex Net (dual SATA).

The behavior I see is this:

With  Toshiba 160GB and Seagate 320GB hdd's in ports 0 and 1 (right 
left) respectively, I get perfect results.  I can access both drives
from U-Boot, and boot from both.

If I switch the drives around  (ie.  swap them) so the Toshiba is is
port 1 (left), I can no longer probe it.   It could very well be a
timing problem, or it could be simply a quirk that is simply
attributable to this hdd (which seems to check out completely
healthy).

If I place _just_ the Seagate drive in port 1 (left), it is still
correctly recognized.  This is true whether it is the lone hdd, or if
another hdd is in port 0.

Just thought I'd let you know.  Maybe this is a _specific_ behavior
subset that you all can test on your respective boxes.

My feeling is that the patch is nevertheless still valid  -  for what
I've seen on Kirkwood, it is an improvement over the previous
situation.  Just my 2 cents.

Dave
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-04-19 Thread Albert ARIBAUD

Hi Dave,

Le 18/04/2012 23:37, David Purdy a écrit :

On Tue, Apr 17, 2012 at 2:06 PM, Luka Perkovub...@lukaperkov.net  wrote:

IDE_BUS assumes that each bus has two devices and thus returns the first
bus even when the second one should be probed.

Signed-off-by: Simon Baatzgmbno...@gmail.com
Tested-by: Luka Perkovub...@lukaperkov.net
---

Simon discovered this while adding support for new board IB NAS6210.

More info can be found here:

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

When this is commited I will do a coding style cleanup. There are tabs
after few #define parts in include/ide.h.

  include/ide.h |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/ide.h b/include/ide.h
index 8ecc9dd..385e909 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -24,7 +24,7 @@
  #ifndef_IDE_H


Simon, Luka, Prafulla, etal,

I've tested this out on the Seagate GoFlex Net (Kirkwood) device,
which also has dual SATA ports, and it resolved the long-standing (and
irritating) bug/unwanted-feature that required us to boot from _only_
the right side port.

I would guess that other Kirkwood dual-SATA-port boxes would be
happier because of this, as well.

Nice catch, Simon.


Not my main area of expertise here, but I am not sure how this plays on 
Marvell non-kirkwood platforms (e.g., orion5x).


ISTR it is not the first time we deal with the whole IDE number of bus / 
number of ports [ / useable ports ] issue, and we may be running in 
circles here, fixing one platform and breaking another.


I'll try this on EDMiniV2 in the coming days, and let people know the 
results in this thread.



regards,

Dave


Amicalement,
--
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-04-19 Thread Prafulla Wadaskar


 -Original Message-
 From: u-boot-boun...@lists.denx.de [mailto:u-boot-
 boun...@lists.denx.de] On Behalf Of Luka Perkov
 Sent: 18 April 2012 00:37
 To: u-boot@lists.denx.de
 Subject: [U-Boot] [PATCH] fix IDE_BUS(dev) macro
 
 IDE_BUS assumes that each bus has two devices and thus returns the
 first
 bus even when the second one should be probed.
 
 Signed-off-by: Simon Baatz gmbno...@gmail.com
 Tested-by: Luka Perkov ub...@lukaperkov.net
 ---
 
 Simon discovered this while adding support for new board IB NAS6210.
 
 More info can be found here:
 
 http://lists.denx.de/pipermail/u-boot/2012-April/122525.html
 
 When this is commited I will do a coding style cleanup. There are tabs
 after few #define parts in include/ide.h.
 
  include/ide.h |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/include/ide.h b/include/ide.h
 index 8ecc9dd..385e909 100644
 --- a/include/ide.h
 +++ b/include/ide.h
 @@ -24,7 +24,7 @@
  #ifndef  _IDE_H
  #define _IDE_H
 
 -#define  IDE_BUS(dev)(dev  1)
 +#define IDE_BUS(dev) (dev / (CONFIG_SYS_IDE_MAXDEVICE /
 CONFIG_SYS_IDE_MAXBUS))
 
  #define  ATA_CURR_BASE(dev)
   (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])


Dear Wolfgang

This is generic patch to IDE framework, this patch is dependency for (being 
pulled) Kirkwood based boards.

Will you please kindly pull it? OR I should do the needful?

Regards..
Prafulla . . .
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-04-18 Thread David Purdy
On Tue, Apr 17, 2012 at 2:06 PM, Luka Perkov ub...@lukaperkov.net wrote:
 IDE_BUS assumes that each bus has two devices and thus returns the first
 bus even when the second one should be probed.

 Signed-off-by: Simon Baatz gmbno...@gmail.com
 Tested-by: Luka Perkov ub...@lukaperkov.net
 ---

 Simon discovered this while adding support for new board IB NAS6210.

 More info can be found here:

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

 When this is commited I will do a coding style cleanup. There are tabs
 after few #define parts in include/ide.h.

  include/ide.h |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/include/ide.h b/include/ide.h
 index 8ecc9dd..385e909 100644
 --- a/include/ide.h
 +++ b/include/ide.h
 @@ -24,7 +24,7 @@
  #ifndef        _IDE_H

Simon, Luka, Prafulla, etal,

I've tested this out on the Seagate GoFlex Net (Kirkwood) device,
which also has dual SATA ports, and it resolved the long-standing (and
irritating) bug/unwanted-feature that required us to boot from _only_
the right side port.

I would guess that other Kirkwood dual-SATA-port boxes would be
happier because of this, as well.

Nice catch, Simon.

regards,

Dave
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] fix IDE_BUS(dev) macro

2012-04-17 Thread Luka Perkov
IDE_BUS assumes that each bus has two devices and thus returns the first
bus even when the second one should be probed.

Signed-off-by: Simon Baatz gmbno...@gmail.com
Tested-by: Luka Perkov ub...@lukaperkov.net
---

Simon discovered this while adding support for new board IB NAS6210.

More info can be found here:

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

When this is commited I will do a coding style cleanup. There are tabs
after few #define parts in include/ide.h.

 include/ide.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/ide.h b/include/ide.h
index 8ecc9dd..385e909 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -24,7 +24,7 @@
 #ifndef_IDE_H
 #define _IDE_H
 
-#defineIDE_BUS(dev)(dev  1)
+#define IDE_BUS(dev)   (dev / (CONFIG_SYS_IDE_MAXDEVICE / 
CONFIG_SYS_IDE_MAXBUS))
 
 #defineATA_CURR_BASE(dev)  
(CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot