Re: [U-Boot] [PATCH] Kirkwood: Add support for OpenRD-Client OpenRD-Ultimate

2011-02-09 Thread Tanmay Upadhyay - Embedded

- Original Message - 
From: Prafulla Wadaskar prafu...@marvell.com 
To: Julian Pidancet julian.pidan...@citrix.com, u-boot@lists.denx.de 
Cc: tanmay upadhyay tanmay.upadh...@einfochips.com, Prabhanjan Sarnaik 
sarn...@marvell.com, Ashish Karkare akark...@marvell.com 
Sent: Wednesday, February 9, 2011 12:16:40 PM 
Subject: RE: [PATCH] Kirkwood: Add support for OpenRD-Client  OpenRD-Ultimate 



 -Original Message- 
 From: Julian Pidancet [mailto:julian.pidan...@citrix.com] 
 Sent: Tuesday, February 08, 2011 10:21 AM 
 To: u-boot@lists.denx.de 
 Cc: tanmay.upadh...@einfochips.com; Prafulla Wadaskar 
 Subject: [PATCH] Kirkwood: Add support for OpenRD-Client  OpenRD- 
 Ultimate 
 
 This patch modifies existing OpenRD-Base support to deal with all 
 the three OpenRD boards (OpenRD-Base, OpenRD-Client  OpenRD-Ultimate). 
 
 This is a rebase onto master from an original patch sent by Tanmay 
 Upadhyay a few months ago. 
 All credits goes to him. 
 It's been tested on my OpenRD-Ultimate and works perfectly fine. 
 
 Signed-off-by: Julian Pidancet julian.pidan...@citrix.com 
 mailto:julian.pidan...@citrix.com 
 --- 
 MAKEALL | 2 + 
 board/Marvell/openrd/Makefile | 56 ++ 
 board/Marvell/openrd/config.mk | 33 ++ 
 board/Marvell/openrd/kwbimage.cfg | 168 
 ++ 
 board/Marvell/openrd/openrd.c | 173 
 +++ 
 board/Marvell/openrd/openrd.h | 50 + 
 board/Marvell/openrd_base/Makefile | 56 -- 
 board/Marvell/openrd_base/kwbimage.cfg | 168  
 -- 
 board/Marvell/openrd_base/openrd_base.c | 153  
 --- 
 board/Marvell/openrd_base/openrd_base.h | 46  
 boards.cfg | 4 +- 
 include/configs/openrd.h | 115  
 include/configs/openrd_base.h | 92 +++-- 
 include/configs/openrd_client.h | 50 + 
 include/configs/openrd_ultimate.h | 50 + 
 15 files changed, 714 insertions(+), 502 deletions(-) 
 create mode 100644 board/Marvell/openrd/Makefile 
 create mode 100644 board/Marvell/openrd/config.mk 
 create mode 100644 board/Marvell/openrd/kwbimage.cfg 
 create mode 100644 board/Marvell/openrd/openrd.c 
 create mode 100644 board/Marvell/openrd/openrd.h 
 delete mode 100644 board/Marvell/openrd_base/Makefile 
 delete mode 100644 board/Marvell/openrd_base/kwbimage.cfg 
 delete mode 100644 board/Marvell/openrd_base/openrd_base.c 
 delete mode 100644 board/Marvell/openrd_base/openrd_base.h 
 create mode 100644 include/configs/openrd.h 
 create mode 100644 include/configs/openrd_client.h 
 create mode 100644 include/configs/openrd_ultimate.h 

Hi Julian 

I suggest not to delete old file, on the other hand you can rename or move them 
through git. 

Regards... 
Prafulla . . 




Hi Prafulla, 


In original patch I had moved files with 'git mv' command, but the patch showed 
up like this. Am I missing appropriate git command? 


Thanks, 


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


Re: [U-Boot] [PATCH] Kirkwood: Add support for OpenRD-Client OpenRD-Ultimate

2011-02-09 Thread Tanmay Upadhyay - Embedded

- Original Message - 
From: Julian Pidancet julian.pidan...@citrix.com 
To: u-boot@lists.denx.de 
Cc: tanmay upadhyay tanmay.upadh...@einfochips.com, prafu...@marvell.com 
Sent: Tuesday, February 8, 2011 11:50:54 PM 
Subject: [PATCH] Kirkwood: Add support for OpenRD-Client  OpenRD-Ultimate 

This patch modifies existing OpenRD-Base support to deal with all
the three OpenRD boards (OpenRD-Base, OpenRD-Client  OpenRD-Ultimate).

This is a rebase onto master from an original patch sent by Tanmay Upadhyay a 
few months ago.
All credits goes to him.
It's been tested on my OpenRD-Ultimate and works perfectly fine. 

Signed-off-by: Julian Pidancet julian.pidan...@citrix.com Acked by: Tanmay 
Upadhyay tanmay.upadh...@einfochips.com ---
 MAKEALL |2 +
 board/Marvell/openrd/Makefile   |   56 ++
 board/Marvell/openrd/config.mk  |   33 ++
 board/Marvell/openrd/kwbimage.cfg   |  168 ++
 board/Marvell/openrd/openrd.c   |  173 +++
 board/Marvell/openrd/openrd.h   |   50 +
 board/Marvell/openrd_base/Makefile  |   56 --
 board/Marvell/openrd_base/kwbimage.cfg  |  168 --
 board/Marvell/openrd_base/openrd_base.c |  153 ---
 board/Marvell/openrd_base/openrd_base.h |   46 
 boards.cfg  |4 +-
 include/configs/openrd.h|  115 
 include/configs/openrd_base.h   |   92 +++--
 include/configs/openrd_client.h |   50 +
 include/configs/openrd_ultimate.h   |   50 +
 15 files changed, 714 insertions(+), 502 deletions(-)
 create mode 100644 board/Marvell/openrd/Makefile
 create mode 100644 board/Marvell/openrd/config.mk
 create mode 100644 board/Marvell/openrd/kwbimage.cfg
 create mode 100644 board/Marvell/openrd/openrd.c
 create mode 100644 board/Marvell/openrd/openrd.h
 delete mode 100644 board/Marvell/openrd_base/Makefile
 delete mode 100644 board/Marvell/openrd_base/kwbimage.cfg
 delete mode 100644 board/Marvell/openrd_base/openrd_base.c
 delete mode 100644 board/Marvell/openrd_base/openrd_base.h
 create mode 100644 include/configs/openrd.h
 create mode 100644 include/configs/openrd_client.h
 create mode 100644 include/configs/openrd_ultimate.h

diff --git a/MAKEALL b/MAKEALL
index a732e6a..4b6da98 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -361,6 +361,8 @@ LIST_ARM9= \
omap5912osk \
omap730p2   \
openrd_base \
+   openrd_client   \
+   openrd_ultimate \
rd6281a \
sbc2410x\
scb9328 \
diff --git a/board/Marvell/openrd/Makefile b/board/Marvell/openrd/Makefile
new file mode 100644
index 000..19020e4
--- /dev/null
+++ b/board/Marvell/openrd/Makefile
@@ -0,0 +1,56 @@
+#
+# (C) Copyright 2009
+# Net Insight  www.netinsight.net 
+# Written-by: Simon Kagstrom simon.kagst...@netinsight.net +#
+# Based on sheevaplug:
+# (C) Copyright 2009
+# Marvell Semiconductor  www.marvell.com 
+# Written-by: Prafulla Wadaskar prafu...@marvell.com +#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := openrd.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/Marvell/openrd/config.mk b/board/Marvell/openrd/config.mk
new file mode 100644
index 000..8ae355e
--- /dev/null
+++ b/board/Marvell/openrd/config.mk
@@ -0,0 +1,33 @@
+#
+# (C) Copyright 2009
+# Net Insight  www.netinsight.net 
+# Written-by: Simon

Re: [U-Boot] [PATCH] Kirkwood: Add support for OpenRD-Client OpenRD-Ultimate

2011-02-09 Thread Tanmay Upadhyay

On Wednesday 09 February 2011 03:47 PM, Wolfgang Denk wrote:
 Dear Tanmay Upadhyay - Embedded,

 In message726556893.71716.1297242968960.javamail.r...@ahm.einfochips.com  
 you wrote:
 --===1012086174==
 Content-Type: multipart/alternative;
  boundary==_Part_71715_1073465620.1297242968958

 --=_Part_71715_1073465620.1297242968958
 Content-Type: text/plain; charset=utf-8
 Content-Transfer-Encoding: 7bit


 - Original Message -
 From: Julian Pidancetjulian.pidan...@citrix.com
 To: u-boot@lists.denx.de
 Cc: tanmay upadhyaytanmay.upadh...@einfochips.com, prafu...@marvell.com
 Sent: Tuesday, February 8, 2011 11:50:54 PM
 Subject: [PATCH] Kirkwood: Add support for OpenRD-Client  OpenRD-Ultimate

 Why are you reposting this old patch?  And why in an attachment?

 Best regards,

 Wolfgang Denk


Sorry if I made a mess. This was my first email to this mailing list 
which wasn't sent from 'git send-email'.

I just wanted to ack Julian's mail. I simply replied his mail and added 
'Acked by' line. May be my webmail made a mess of it. Sending this mail 
from Thunderbird. Hope this time it goes ok.

Regards,

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


Re: [U-Boot] [PATCH v2] Kirkwood: bugfix: DRAM size initialization

2010-10-21 Thread Tanmay Upadhyay - Embedded
- Original Message -
From: Prafulla Wadaskar lt;prafu...@marvell.comgt;
To: Tanmay Upadhyay lt;tanmay.upadh...@einfochips.comgt;
Cc: u-boot@lists.denx.de, g remlin lt;g_rem...@rocketmail.comgt;, Ashish 
Karkare lt;akark...@marvell.comgt;, Prabhanjan Sarnaik 
lt;sarn...@marvell.comgt;
Sent: Thu, 21 Oct 2010 10:27:28 +0530 (IST)
Subject: RE: [PATCH v2] Kirkwood: bugfix: DRAM size initialization
 -Original Message-
 From: Tanmay Upadhyay [mailto:tanmay.upadh...@einfochips.com] 
 Sent: Friday, October 15, 2010 5:28 PM
 To: Prafulla Wadaskar
 Cc: u-boot@lists.denx.de; Tanmay Upadhyay
 Subject: [PATCH v2] Kirkwood: bugfix: DRAM size initialization
 
 If start of any DRAM bank is greater than total DDR size, remaining
 DDR banks' start address  size were left un-initialized in dram_init
 function. This could break other functions who uses array
 'gd-bd-bi_dram'. Kirkwood network driver is one example. This also
 stops Linux kernel from booting.
 
 v2 - Set start address also to 0. Without this Linux kernel couldn't
 boot up
 
 Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com
 ---
 arch/arm/cpu/arm926ejs/kirkwood/dram.c | 10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)
 
 diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c 
 b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
 index 7439c87..a4344b8 100644
 --- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
 +++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
 @@ -81,6 +81,16 @@ int dram_init(void)
 gd-ram_size += gd-bd-bi_dram[i].size;
 
 }
 +
 + for (; i  CONFIG_NR_DRAM_BANKS; i++) {
 + /* If above loop terminated prematurely, we need to set
 + * remaining banks' start address  size as 0. 
 Otherwise other
 + * u-boot functions and Linux kernel gets wrong 
 values which
 + * could result in crash */
 + gd-bd-bi_dram[i].start = 0;
 + gd-bd-bi_dram[i].size = 0;
 + }
 +
 return 0;
 }
Hi Tanmay
I hope you would not mind if I apply the below patch by Gray for similar fix
http://lists.denx.de/pipermail/u-boot/2010-October/079655.html
Regards..
Prafulla . .

Hi Prafulla,

Gray's patch takes care of ram size in u-boot. But still with his patch 
non-contiguous memory would be exposed -if it's there - to Linux kernel by 
start and size variables of bi_dram. My patch takes care of that by zeroing 
these variables. What's your opinion?

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


Re: [U-Boot] [PATCH] Kirkwood: bugfix: DRAM size initialization

2010-10-15 Thread Tanmay Upadhyay

Hi All,

I was a bit hasty in providing the patch. Given patch solves u-boot 
stuff, but Linux kernel still has some trouble. I am providing second 
version of this patch which takes care of start address also. This fixes 
Linux kernel issue.


Please ignore this version.

Sorry,

Tanmay

On 10/14/2010 06:17 PM, Tanmay Upadhyay wrote:

If start of any DRAM bank is greater than total DDR size, remaining
DDR bank sizes were left un-initialized in dram_init function. This
could break other functions who uses array 'gd-bd-bi_dram'.Kirkwood
network driver is one example.

Signed-off-by: Tanmay Upadhyaytanmay.upadh...@einfochips.com
---
  arch/arm/cpu/arm926ejs/kirkwood/dram.c |7 +++
  1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c 
b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
index 7439c87..cb396d1 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
@@ -81,6 +81,13 @@ int dram_init(void)
gd-ram_size += gd-bd-bi_dram[i].size;

}
+
+   for (; i  CONFIG_NR_DRAM_BANKS; i++) {
+   /* If above loop terminated prematurely, we need to set
+* remaining bank sizes as 0 */
+   gd-bd-bi_dram[i].size = 0;
+   }
+
return 0;
  }

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


[U-Boot] [PATCH v2] Kirkwood: bugfix: DRAM size initialization

2010-10-15 Thread Tanmay Upadhyay
If start of any DRAM bank is greater than total DDR size, remaining
DDR banks' start address  size were left un-initialized in dram_init
function. This could break other functions who uses array
'gd-bd-bi_dram'. Kirkwood network driver is one example. This also
stops Linux kernel from booting.

v2 - Set start address also to 0. Without this Linux kernel couldn't
 boot up

Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com
---
 arch/arm/cpu/arm926ejs/kirkwood/dram.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c 
b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
index 7439c87..a4344b8 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
@@ -81,6 +81,16 @@ int dram_init(void)
gd-ram_size += gd-bd-bi_dram[i].size;
 
}
+
+   for (; i  CONFIG_NR_DRAM_BANKS; i++) {
+   /* If above loop terminated prematurely, we need to set
+* remaining banks' start address  size as 0. Otherwise other
+* u-boot functions and Linux kernel gets wrong values which
+* could result in crash */
+   gd-bd-bi_dram[i].start = 0;
+   gd-bd-bi_dram[i].size = 0;
+   }
+
return 0;
 }
 
-- 
1.6.6.1

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


[U-Boot] [PATCH 1/2] Kirkwood: Add support for OpenRD-Client OpenRD-Ultimate

2010-10-15 Thread Tanmay Upadhyay
This patch modifies existing OpenRD-Base support to deal with all
the three OpenRD boards (OpenRD-Base, OpenRD-Client  OpenRD-Ultimate).

Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com
---
 MAKEALL |2 +
 board/Marvell/openrd/Makefile   |   56 ++
 board/Marvell/openrd/config.mk  |   33 ++
 board/Marvell/openrd/kwbimage.cfg   |  168 ++
 board/Marvell/openrd/openrd.c   |  169 +++
 board/Marvell/openrd/openrd.h   |   50 +
 board/Marvell/openrd_base/Makefile  |   56 --
 board/Marvell/openrd_base/config.mk |   33 --
 board/Marvell/openrd_base/kwbimage.cfg  |  168 --
 board/Marvell/openrd_base/openrd_base.c |  149 ---
 board/Marvell/openrd_base/openrd_base.h |   46 -
 boards.cfg  |4 +-
 include/configs/openrd.h|  113 +
 include/configs/openrd_base.h   |   92 +++--
 include/configs/openrd_client.h |   50 +
 include/configs/openrd_ultimate.h   |   50 +
 16 files changed, 708 insertions(+), 531 deletions(-)
 create mode 100644 board/Marvell/openrd/Makefile
 create mode 100644 board/Marvell/openrd/config.mk
 create mode 100644 board/Marvell/openrd/kwbimage.cfg
 create mode 100644 board/Marvell/openrd/openrd.c
 create mode 100644 board/Marvell/openrd/openrd.h
 delete mode 100644 board/Marvell/openrd_base/Makefile
 delete mode 100644 board/Marvell/openrd_base/config.mk
 delete mode 100644 board/Marvell/openrd_base/kwbimage.cfg
 delete mode 100644 board/Marvell/openrd_base/openrd_base.c
 delete mode 100644 board/Marvell/openrd_base/openrd_base.h
 create mode 100644 include/configs/openrd.h
 create mode 100644 include/configs/openrd_client.h
 create mode 100644 include/configs/openrd_ultimate.h

diff --git a/MAKEALL b/MAKEALL
index 1b506d6..11fbf48 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -431,6 +431,8 @@ LIST_ARM9= \
omap5912osk \
omap730p2   \
openrd_base \
+   openrd_client   \
+   openrd_ultimate \
rd6281a \
sbc2410x\
scb9328 \
diff --git a/board/Marvell/openrd/Makefile b/board/Marvell/openrd/Makefile
new file mode 100644
index 000..aad05d8
--- /dev/null
+++ b/board/Marvell/openrd/Makefile
@@ -0,0 +1,56 @@
+#
+# (C) Copyright 2009
+# Net Insight www.netinsight.net
+# Written-by: Simon Kagstrom simon.kagst...@netinsight.net
+#
+# Based on sheevaplug:
+# (C) Copyright 2009
+# Marvell Semiconductor www.marvell.com
+# Written-by: Prafulla Wadaskar prafu...@marvell.com
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  := openrd.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/Marvell/openrd/config.mk b/board/Marvell/openrd/config.mk
new file mode 100644
index 000..8ae355e
--- /dev/null
+++ b/board/Marvell/openrd/config.mk
@@ -0,0 +1,33 @@
+#
+# (C) Copyright 2009
+# Net Insight www.netinsight.net
+# Written-by: Simon Kagstrom simon.kagst...@netinsight.net
+#
+# Based on sheevaplug:
+# (C) Copyright 2009
+# Marvell Semiconductor www.marvell.com
+# Written-by: Prafulla Wadaskar prafu...@marvell.com
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either

[U-Boot] [PATCH 2/2] Kirkwood: OpenRD: Initialize MPPs during early init

2010-10-15 Thread Tanmay Upadhyay
This patch adds board_early_init_f function for OpenRD boards. The
function initializes MPPs so that peripherals can work at early
stage.

Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com
---
 board/Marvell/openrd/openrd.c |6 +-
 include/configs/openrd.h  |2 ++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
index 3953282..2d34a24 100644
--- a/board/Marvell/openrd/openrd.c
+++ b/board/Marvell/openrd/openrd.c
@@ -41,7 +41,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init(void)
+int board_early_init_f(void)
 {
/*
 * default gpio configuration
@@ -108,7 +108,11 @@ int board_init(void)
};
 
kirkwood_mpp_conf(kwmpp_config);
+   return 0;
+}
 
+int board_init(void)
+{
/*
 * arch number of board
 */
diff --git a/include/configs/openrd.h b/include/configs/openrd.h
index c4dcad6..850dbae 100644
--- a/include/configs/openrd.h
+++ b/include/configs/openrd.h
@@ -110,4 +110,6 @@
 #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
 #endif /*CONFIG_MVSATA_IDE*/
 
+/* board_early_init_f function in openrd.c initializes all MPP settings */
+#define CONFIG_BOARD_EARLY_INIT_F
 #endif /* _CONFIG_OPENRD_H */
-- 
1.6.6.1

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


[U-Boot] [PATCH] Kirkwood: bugfix: DRAM size initialization

2010-10-14 Thread Tanmay Upadhyay
If start of any DRAM bank is greater than total DDR size, remaining
DDR bank sizes were left un-initialized in dram_init function. This
could break other functions who uses array 'gd-bd-bi_dram'.Kirkwood
network driver is one example.

Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com
---
 arch/arm/cpu/arm926ejs/kirkwood/dram.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c 
b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
index 7439c87..cb396d1 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
@@ -81,6 +81,13 @@ int dram_init(void)
gd-ram_size += gd-bd-bi_dram[i].size;
 
}
+
+   for (; i  CONFIG_NR_DRAM_BANKS; i++) {
+   /* If above loop terminated prematurely, we need to set
+* remaining bank sizes as 0 */
+   gd-bd-bi_dram[i].size = 0;
+   }
+
return 0;
 }
 
-- 
1.6.6.1

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


Re: [U-Boot] [PATCH] ARM: Kirkwood: Add support for OpenRD-Client OpenRD-Ultimate

2010-06-14 Thread Tanmay Upadhyay


On 06/11/2010 12:33 AM, Prafulla Wadaskar wrote:



   

-Original Message-
From: Simon Kagstrom [mailto:simon.kagst...@netinsight.net]
Sent: Thursday, June 10, 2010 3:56 PM
To: Tanmay Upadhyay
Cc: Prafulla Wadaskar; u-boot@lists.denx.de
Subject: Re: [PATCH] ARM: Kirkwood: Add support for
OpenRD-Client  OpenRD-Ultimate

On Thu, 10 Jun 2010 15:08:00 +0530
Tanmay Upadhyaytanmay.upadh...@einfochips.com  wrote:

 

+#define MACH_TYPE_OPENRD_ULTIMATE  2884

   

I don't think this file is supposed to be edited in
 

patches, but rather
 

synched from arm-linux by Wolfgang from time to time.
 

Sorry, I didn't know about that. However, as the number is already
registered, is that ok to have it here?
   

Probably Wolfgang or Tom Rix (the ARM maintainer) can synch it if you
ask them to.
 

Tom Does this frequently, Hi Tom, can you pls do the needful?
   
Tom has synched it, but unfortunately the code for ultimate hasn't been 
in yet. It's stuck somewhere 
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-June/017535.html.


Shall I wait for this patch to get into the kernel before I send mine 
for u-boot? Otherwise my patch won't get compiled. However, I can send 
my patch for review. I have operd.h, openrd_base.h, openrd_client.h  
openrd_ultimate.h in 'include/configs' as suggested.


Please suggest.

Thanks,

Tanmay
   
 

I agree with you. But auto-generated 'config.h' file includes
board_name.h. So there has to be one for each board.
   

Yes, This is correct approach, lets have three files for three boards (like 
other added)
Abstract common part in openrd.h and include it in respective board config 
header files.

   

However, there
 

could be one 'openrd.h'  in the configs and three board
   

specific files
 

include it. This will increase the number of files, but
   

would decrease
 

LOC. What do you think?
   

As suggested above, let's keep code clean and simple.
Adding new board support in future to the same family will keep on increasing 
code complexity.
I prefer adding few files instead of modifying existing.
Secondly kwimage.cfg in your port may have common settings for all three board 
which may not be the case always.
And file parsing does not support conditional code for this file.

So I suggest, you should keep common code under openrd.c/h, and board specific 
inboard_name.c/h
Even I don't mind keeping existing openrd_base board support as it is and 
adding new board support for two other boards.

Regards..
Prafulla . .


Email Scanned for Virus  Dangerous Content by : www.CleanMailGateway.com


Disclaimer: This e-mail message and all attachments transmitted with it are 
intended solely for the use of the addressee and may contain legally privileged 
and confidential information. If the reader of this message is not the intended 
recipient, or an employee or agent responsible for delivering this message to 
the intended recipient, you are hereby notified that any dissemination, 
distribution, copying, or other use of this message or its attachments is 
strictly prohibited. If you have received this message in error, please notify 
the sender immediately by replying to this message and please delete it from 
your computer. Any views expressed in this message are those of the individual 
sender unless otherwise stated.Company has taken enough precautions to prevent 
the spread of viruses. However the company accepts no liability for any damage 
caused by any virus transmitted by this email.


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


[U-Boot] [PATCH] ARM: Kirkwood: Add support for OpenRD-Client OpenRD-Ultimate

2010-06-10 Thread Tanmay Upadhyay
This patch modifies existing OpenRD-Base support to deal with all
the three OpenRD boards (OpenRD-Base, OpenRD-Client  OpenRD-Ultimate).

Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com
---
 Makefile|9 +-
 arch/arm/include/asm/mach-types.h   |   13 ++
 board/Marvell/openrd/Makefile   |   65 +
 board/Marvell/openrd/config.mk  |   33 +
 board/Marvell/openrd/kwbimage.cfg   |  168 +++
 board/Marvell/openrd/openrd.c   |  180 +
 board/Marvell/openrd/openrd.h   |   67 ++
 board/Marvell/openrd_base/Makefile  |   56 
 board/Marvell/openrd_base/config.mk |   33 -
 board/Marvell/openrd_base/kwbimage.cfg  |  168 ---
 board/Marvell/openrd_base/openrd_base.c |  160 --
 board/Marvell/openrd_base/openrd_base.h |   46 ---
 include/configs/openrd_client.h |  219 +++
 include/configs/openrd_ultimate.h   |  219 +++
 14 files changed, 972 insertions(+), 464 deletions(-)
 create mode 100644 board/Marvell/openrd/Makefile
 create mode 100644 board/Marvell/openrd/config.mk
 create mode 100644 board/Marvell/openrd/kwbimage.cfg
 create mode 100644 board/Marvell/openrd/openrd.c
 create mode 100644 board/Marvell/openrd/openrd.h
 delete mode 100644 board/Marvell/openrd_base/Makefile
 delete mode 100644 board/Marvell/openrd_base/config.mk
 delete mode 100644 board/Marvell/openrd_base/kwbimage.cfg
 delete mode 100644 board/Marvell/openrd_base/openrd_base.c
 delete mode 100644 board/Marvell/openrd_base/openrd_base.h
 create mode 100644 include/configs/openrd_client.h
 create mode 100644 include/configs/openrd_ultimate.h

diff --git a/Makefile b/Makefile
index c26e491..f12214b 100644
--- a/Makefile
+++ b/Makefile
@@ -3007,8 +3007,15 @@ omap1610h2_cs_autoboot_config:   unconfig
 omap5912osk_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs omap5912osk ti omap
 
+openrd_ultimate_config \
+openrd_client_config \
 openrd_base_config: unconfig
-   @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) Marvell kirkwood
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs openrd Marvell kirkwood
+ifneq ($(SRCTREE),$(OBJTREE))
+   @echo VARIANT= $(@:_config=)  $(OBJTREE)/include/config.mk
+else
+   @echo VARIANT= $(@:_config=)  ./include/config.mk
+endif
 
 xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
 
diff --git a/arch/arm/include/asm/mach-types.h 
b/arch/arm/include/asm/mach-types.h
index 940d814..19114b0 100644
--- a/arch/arm/include/asm/mach-types.h
+++ b/arch/arm/include/asm/mach-types.h
@@ -2862,6 +2862,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_MATRIX5182879
 #define MACH_TYPE_TINY_GURNARD 2880
 #define MACH_TYPE_SPEAR13102881
+#define MACH_TYPE_OPENRD_ULTIMATE  2884
 
 #ifdef CONFIG_ARCH_EBSA110
 # ifdef machine_arch_type
@@ -37063,6 +37064,18 @@ extern unsigned int __machine_arch_type;
 # define machine_is_spear1310()(0)
 #endif
 
+#ifdef CONFIG_MACH_OPENRD_ULTIMATE
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type__machine_arch_type
+# else
+#  define machine_arch_typeMACH_TYPE_OPENRD_ULTIMATE
+# endif
+# define machine_is_openrd_ultimate()  (machine_arch_type == 
MACH_TYPE_OPENRD_ULTIMATE)
+#else
+# define machine_is_openrd_ultimate()  (0)
+#endif
+
 /*
  * These have not yet been registered
  */
diff --git a/board/Marvell/openrd/Makefile b/board/Marvell/openrd/Makefile
new file mode 100644
index 000..96328e7
--- /dev/null
+++ b/board/Marvell/openrd/Makefile
@@ -0,0 +1,65 @@
+#
+# (C) Copyright 2009
+# Net Insight www.netinsight.net
+# Written-by: Simon Kagstrom simon.kagst...@netinsight.net
+#
+# Based on sheevaplug:
+# (C) Copyright 2009
+# Marvell Semiconductor www.marvell.com
+# Written-by: Prafulla Wadaskar prafu...@marvell.com
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+# Get the board variant (base/client/ultimate) from the .mk file
+ifneq ($(SRCTREE),$(OBJTREE))
+include $(OBJTREE)/include/config.mk

Re: [U-Boot] [PATCH] ARM: Kirkwood: Add support for OpenRD-Client OpenRD-Ultimate

2010-06-10 Thread Tanmay Upadhyay


On 06/10/2010 02:46 PM, Simon Kagstrom wrote:

On Thu, 10 Jun 2010 14:42:24 +0530
Tanmay Upadhyaytanmay.upadh...@einfochips.com  wrote:

   

This patch modifies existing OpenRD-Base support to deal with all
the three OpenRD boards (OpenRD-Base, OpenRD-Client  OpenRD-Ultimate).
 

Yes, that's a good change!

   

diff --git a/arch/arm/include/asm/mach-types.h 
b/arch/arm/include/asm/mach-types.h
index 940d814..19114b0 100644
--- a/arch/arm/include/asm/mach-types.h
+++ b/arch/arm/include/asm/mach-types.h
@@ -2862,6 +2862,7 @@ extern unsigned int __machine_arch_type;
  #define MACH_TYPE_MATRIX5182879
  #define MACH_TYPE_TINY_GURNARD 2880
  #define MACH_TYPE_SPEAR13102881
+#define MACH_TYPE_OPENRD_ULTIMATE  2884
 

I don't think this file is supposed to be edited in patches, but rather
synched from arm-linux by Wolfgang from time to time.

   
Sorry, I didn't know about that. However, as the number is already 
registered, is that ok to have it here?

diff --git a/include/configs/openrd_client.h b/include/configs/openrd_client.h
new file mode 100644
index 000..d936ffa
 

Perhaps common parts of this...

   

diff --git a/include/configs/openrd_ultimate.h 
b/include/configs/openrd_ultimate.h
new file mode 100644
index 000..a0e0417
 

and this and openrd_base.h can be merged into a common file. Most stuff
should be identical, right?
   
I agree with you. But auto-generated 'config.h' file includes 
board_name.h. So there has to be one for each board. However, there 
could be one 'openrd.h'  in the configs and three board specific files 
include it. This will increase the number of files, but would decrease 
LOC. What do you think?


Thanks,

Tanmay

// Simon


Email Scanned for Virus  Dangerous Content by : www.CleanMailGateway.com


Disclaimer: This e-mail message and all attachments transmitted with it are 
intended solely for the use of the addressee and may contain legally privileged 
and confidential information. If the reader of this message is not the intended 
recipient, or an employee or agent responsible for delivering this message to 
the intended recipient, you are hereby notified that any dissemination, 
distribution, copying, or other use of this message or its attachments is 
strictly prohibited. If you have received this message in error, please notify 
the sender immediately by replying to this message and please delete it from 
your computer. Any views expressed in this message are those of the individual 
sender unless otherwise stated.Company has taken enough precautions to prevent 
the spread of viruses. However the company accepts no liability for any damage 
caused by any virus transmitted by this email.

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


[U-Boot] [PATCH] OpenRD: Reset PCIe endpoint while boot-up through PERST#

2010-05-04 Thread Tanmay Upadhyay
As per PCIe specifications PERST# line (A11 on the PCIe connector)
should be asserted for minimum 100us. PCIe endpoint comes out of
reset when this line is high.

In case of OpenRD, this line was in tri-state. This might prevent
PCIe devices to appear on the PCIe bus. This patch holds PERST#
line low for 100 us and then sets high while booting.

XGI Vollari Z11 GPU and Intel WiFi 4965 works fine without this fix.
Where as Broadcom's BCM970012 doesn't appear on the PCIe bus without
the fix. There might be few other devices as well which require this.

Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com
Signed-off-by: Dhaval Vasa dhaval.v...@einfochips.com
---
 board/Marvell/openrd_base/openrd_base.c |4 
 board/Marvell/openrd_base/openrd_base.h |8 
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/board/Marvell/openrd_base/openrd_base.c 
b/board/Marvell/openrd_base/openrd_base.c
index c00a08a..b76047a 100644
--- a/board/Marvell/openrd_base/openrd_base.c
+++ b/board/Marvell/openrd_base/openrd_base.c
@@ -103,6 +103,10 @@ int board_init(void)
 
kirkwood_mpp_conf(kwmpp_config);
 
+   /* PERST# should be asserted for at least 100 us */
+   udelay(100);
+   writel(readl(KW_GPIO0_BASE) | (17), KW_GPIO0_BASE);
+
/*
 * arch number of board
 */
diff --git a/board/Marvell/openrd_base/openrd_base.h 
b/board/Marvell/openrd_base/openrd_base.h
index f3daf17..1655c12 100644
--- a/board/Marvell/openrd_base/openrd_base.h
+++ b/board/Marvell/openrd_base/openrd_base.h
@@ -30,10 +30,10 @@
 #ifndef __OPENRD_BASE_H
 #define __OPENRD_BASE_H
 
-#define OPENRD_OE_LOW  (~(128))/* RS232 / RS485 */
-#define OPENRD_OE_HIGH (~(12)) /* SD / UART1 */
-#define OPENRD_OE_VAL_LOW  (0)   /* Sel RS232 */
-#define OPENRD_OE_VAL_HIGH (1  2)  /* Sel SD */
+#define OPENRD_OE_LOW  (~((128) | (17)))  /* RS232 / RS485, PCIe */
+#define OPENRD_OE_HIGH (~(12))  /* SD / UART1 */
+#define OPENRD_OE_VAL_LOW  0 /* Sel RS232, PCIe reset */
+#define OPENRD_OE_VAL_HIGH (1  2)  /* Sel SD */
 
 /* PHY related */
 #define MV88E1116_LED_FCTRL_REG10
-- 
1.6.6.1

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


[U-Boot] [PATCH] OpenRD: Bring PCIe endpoint out of reset

2010-04-19 Thread Tanmay Upadhyay
There exists PCIe endpoints(not all) that remains in reset state till
PERST# line (A11 on the PCIe connector) is hold low. They come out of
reset only when this line is high.

In case of OpenRD, this line was in tri-state. So, some of the PCIe
devices would never appear on the PCIe bus. This patch makes PERST#
line high while booting to bring such PCIe devices out of reset.

XGI Vollari Z11 GPU and Intel WiFi 4965 are the ones who doesn't care
about this line. Where as Broadcom's BCM970012 won't appear on the PCIe
bus until PERST# is high. With this patch both kinds of device would
appear on the PCIe bus.

Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com
Signed-off-by: Dhaval Vasa dhaval.v...@einfochips.com
---
 board/Marvell/openrd_base/openrd_base.h |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/board/Marvell/openrd_base/openrd_base.h 
b/board/Marvell/openrd_base/openrd_base.h
index f3daf17..bf75fc6 100644
--- a/board/Marvell/openrd_base/openrd_base.h
+++ b/board/Marvell/openrd_base/openrd_base.h
@@ -30,10 +30,10 @@
 #ifndef __OPENRD_BASE_H
 #define __OPENRD_BASE_H
 
-#define OPENRD_OE_LOW  (~(128))/* RS232 / RS485 */
-#define OPENRD_OE_HIGH (~(12)) /* SD / UART1 */
-#define OPENRD_OE_VAL_LOW  (0)   /* Sel RS232 */
-#define OPENRD_OE_VAL_HIGH (1  2)  /* Sel SD */
+#define OPENRD_OE_LOW  (~((128) | (17)))  /* RS232 / RS485, PCIe */
+#define OPENRD_OE_HIGH (~(12))  /* SD / UART1 */
+#define OPENRD_OE_VAL_LOW  (17)/* Sel RS232, PCIe out of reset */
+#define OPENRD_OE_VAL_HIGH (1  2)  /* Sel SD */
 
 /* PHY related */
 #define MV88E1116_LED_FCTRL_REG10
-- 
1.6.6.1

-- 
_
Disclaimer: This e-mail message and all attachments transmitted with it
are intended solely for the use of the addressee and may contain legally
privileged and confidential information. If the reader of this message
is not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution, copying, or other use of
this message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender immediately by
replying to this message and please delete it from your computer. Any
views expressed in this message are those of the individual sender
unless otherwise stated.Company has taken enough precautions to prevent
the spread of viruses. However the company accepts no liability for any
damage caused by any virus transmitted by this email.
_
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] OpenRD: Bring PCIe endpoint out of reset

2010-04-15 Thread Tanmay Upadhyay
There exists PCIe endpoints(not all) that remains in reset state till
PERST# line (A11 on the PCIe connector) is hold low. They come out of
reset only when this line is high.

In case of OpenRD, this line was in tri-state. So, some of the PCIe
devices would never appear on the PCIe bus. This patch makes PERST#
line high while booting to bring such PCIe devices out of reset.

XGI Vollari Z11 GPU and Intel WiFi 4965 are the ones who doesn't care
about this line. Where as Broadcom's BCM970012 won't appear on the PCIe
bus until PERST# is high. With this patch both kinds of device would
appear on the PCIe bus.

Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com
Signed-off-by: Dhaval Vasa dhaval.v...@einfochips.com
---
 board/Marvell/openrd_base/openrd_base.h |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/board/Marvell/openrd_base/openrd_base.h 
b/board/Marvell/openrd_base/openrd_base.h
index f3daf17..965bd50 100644
--- a/board/Marvell/openrd_base/openrd_base.h
+++ b/board/Marvell/openrd_base/openrd_base.h
@@ -30,10 +30,10 @@
 #ifndef __OPENRD_BASE_H
 #define __OPENRD_BASE_H
 
-#define OPENRD_OE_LOW  (~(128))/* RS232 / RS485 */
-#define OPENRD_OE_HIGH (~(12)) /* SD / UART1 */
-#define OPENRD_OE_VAL_LOW  (0)   /* Sel RS232 */
-#define OPENRD_OE_VAL_HIGH (1  2)  /* Sel SD */
+#define OPENRD_OE_LOW  (~((128) | (17)))  /* RS232 / RS485 */
+#define OPENRD_OE_HIGH (~(12))  /* SD / UART1 */
+#define OPENRD_OE_VAL_LOW  (17) /* Sel RS232 */
+#define OPENRD_OE_VAL_HIGH (1  2)   /* Sel SD */
 
 /* PHY related */
 #define MV88E1116_LED_FCTRL_REG10
-- 
1.6.6.1

-- 
_
Disclaimer: This e-mail message and all attachments transmitted with it
are intended solely for the use of the addressee and may contain legally
privileged and confidential information. If the reader of this message
is not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution, copying, or other use of
this message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender immediately by
replying to this message and please delete it from your computer. Any
views expressed in this message are those of the individual sender
unless otherwise stated.Company has taken enough precautions to prevent
the spread of viruses. However the company accepts no liability for any
damage caused by any virus transmitted by this email.
_
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot