Re: [U-Boot] [PATCH] Marvell MV88E1116 PHY Driver support

2009-05-30 Thread Ben Warren
Hi Prafulla,

On Fri, May 29, 2009 at 11:34 PM, Prafulla Wadaskar prafu...@marvell.comwrote:

 Hi Ben
 Thanks for accepting MV88E61xx driver code.
 Ping for mv88f1116 driver... :-)
 This is dependency for sheevaplug board support.

I've already commented on this one.  We don't currently have a framework for
PHYs and I don't want to add PHY support ad-hoc.  For now, PHY support needs
to go in whatever ethernet driver uses it.

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


[U-Boot] USB gadget interface from cdc branch into mainline

2009-05-30 Thread Ragha
Hello,

The gadget interface at cdc branch [1] sounds good.
Any plans for merging it into mainline?

Regards,
-Ragha

[1] http://git.denx.de/?p=u-boot/u-boot-usb.git;a=shortlog;h=refs/heads/cdc
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V2] board support patch for phyCORE-MPC5200B-tiny

2009-05-30 Thread Jon Smirl
Add support for the Phytec phyCORE-MPC5200B-tiny. Code originally from 
Pengutronix.de.
Added MAKEALL and MAINTAINER entry per last posting.

Signed-off-by: Jon Smirl jonsm...@gmail.com
---
 MAINTAINERS |4 
 MAKEALL |1 
 Makefile|   10 +
 board/phytec/pcm030/Makefile|   50 
 board/phytec/pcm030/config.mk   |   42 +++
 board/phytec/pcm030/mt46v32m16-75.h |   54 
 board/phytec/pcm030/pcm030.c|  206 +++
 cpu/mpc5xxx/ide.c   |3 
 include/configs/pcm030.h|  466 +++
 9 files changed, 836 insertions(+), 0 deletions(-)
 create mode 100644 board/phytec/pcm030/Makefile
 create mode 100644 board/phytec/pcm030/config.mk
 create mode 100644 board/phytec/pcm030/mt46v32m16-75.h
 create mode 100644 board/phytec/pcm030/pcm030.c
 create mode 100644 include/configs/pcm030.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 3d50668..1385ac1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -407,6 +407,10 @@ Andre Schwarz andre.schw...@matrix-vision.de
mvbc_p  MPC5200
mvblm7  MPC8343
 
+Jon Smirl jonsm...@gmail.com
+
+   pcm030  MPC5200
+
 Timur Tabi ti...@freescale.com
 
MPC8349E-mITX   MPC8349
diff --git a/MAKEALL b/MAKEALL
index 57dd425..659730f 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -60,6 +60,7 @@ LIST_5xxx=   \
munices \
MVBC_P  \
o2dnt   \
+   pcm030  \
pf5200  \
PM520   \
TB5200  \
diff --git a/Makefile b/Makefile
index 4f30560..c26cfeb 100644
--- a/Makefile
+++ b/Makefile
@@ -687,6 +687,16 @@ MVBC_P_config: unconfig
 o2dnt_config:  unconfig
@$(MKCONFIG) o2dnt ppc mpc5xxx o2dnt
 
+pcm030_config \
+pcm030_LOWBOOT_config: unconfig
+   @ include/config.h
+   @[ -z $(findstring LOWBOOT_,$@) ] || \
+   { echo TEXT_BASE = 0xFF00 board/phytec/pcm030/config.tmp 
; \
+ echo ... with LOWBOOT configuration ; \
+   }
+   @$(MKCONFIG) -a pcm030 ppc mpc5xxx pcm030 phytec
+   @ echo remember to set pcm030_REV to 0 for rev 1245.0 rev or to 1 for 
rev 1245.1
+
 pf5200_config: unconfig
@$(MKCONFIG) pf5200  ppc mpc5xxx pf5200 esd
 
diff --git a/board/phytec/pcm030/Makefile b/board/phytec/pcm030/Makefile
new file mode 100644
index 000..22ce8e6
--- /dev/null
+++ b/board/phytec/pcm030/Makefile
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2003-2007
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/phytec/pcm030/config.mk b/board/phytec/pcm030/config.mk
new file mode 100644
index 000..5d3469c
--- /dev/null
+++ b/board/phytec/pcm030/config.mk
@@ -0,0 +1,42 @@
+#
+# (C) Copyright 2003
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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
+# 

Re: [U-Boot] Reply:Re: hi,guys,about the nand flash driver

2009-05-30 Thread xiangfu
lanmanck wrote:
 hi scott:
 thank you for replying.
 because i am not familiar with the framework of uboot's nand driver ,do you 
 think i should read all of the source code about the nand driver?
 BTW,i have not found the diretory drivers/mtd/nand/fsl_elbc.c,is it the 
 latest version?
 best regards. 
the u-boot 1.1.6 don't have fsl_elb.c.
as Wolfgang said:
 Forget it. U-Boot 1.1.6 is dead and buried and totally unsupported.

 Please use recent code (top of tree or at minimum the latest release =
 v2009.03) for recent development.


I also have a u-boot 1.1.6, it's work with Pi (ingenic CPU device)
now I am try to move to u-boot V2009.03. :-)
-- 
Best Regards
Xiangfu Liu

jabber : xiangf...@gmail.com
skype  : xiangfu.z

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


Re: [U-Boot] [U-BOot] new cpu(Ingenic), new board(PI)

2009-05-30 Thread xiangfu
Hi
Wolfgang Denk wrote:
  Dear xiangfu_gmail,
 
  In message 49e5a2ed.2060...@gmail.com you wrote:
  there is a device name PI,
  the CPU is Ingenic 4740 [1],
  now we have the u-boot-1.1.6 patch.[2]
 
  I want the u-boot Integrate with 'upstream'
  what am I got do.
  just give some advice or step.
 
  Please see http://www.denx.de/wiki/U-Boot/CodingStyle and
  http://www.denx.de/wiki/U-Boot/Patches .
 
  We appreciate if you submit your patches following the above
  guidelines - but you got to spend a lot of work before being able to
  do that. U-Boot 1.1.6 is extremely old, so you must rebase your code
  first against current top of tree.
 
Thanks Wolfgang.
Sorry for so later to reply your email.
those weeks I follow the CodingStyle, and also merge ingenic u-boot to
V2009.06.

for now it can not boot the kernel. but it's boot the device and output
something from the serial console.

there is two branch in my git[2].
[xiangfu] this one , I try to merge with the upstream.
[u-boot] is the upstream.

I use git diff u-boot..xiangfu  ~/pi_project.patch to generate the
patch[1].

what am I got do next?
thanks.


[1] http://www.openmobilefree.net/other/xiangfu/file/pi_project.patch
[2] http://github.com/xiangfu/pi-u-boot/tree/xiangfu

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


[U-Boot] [PATCH v2] Marvell Sheevaplug Board support

2009-05-30 Thread Prafulla Wadaskar
Reference:
http://plugcomputer.org/
http://openplug.org/plugwiki/index.php/Das_U-boot_plug_support

This patch is tested for-
1. Boot from DRAM/NAND flash
2. File transfer using tftp
3. NAND flash read/write/erase
4. Linux kernel and RFS Boot from NAND

Signed-off-by: Prafulla Wadaskar prafu...@marvell.com
---
Change log:
updated as per feedback for v1

 MAKEALL   |1 +
 Makefile  |4 +-
 board/Marvell/sheevaplug/Makefile |   51 +
 board/Marvell/sheevaplug/config.mk|   25 +
 board/Marvell/sheevaplug/sheevaplug.c |  135 +++
 board/Marvell/sheevaplug/sheevaplug.h |   37 +++
 include/configs/sheevaplug.h  |  191 +
 7 files changed, 443 insertions(+), 1 deletions(-)
 create mode 100644 board/Marvell/sheevaplug/Makefile
 create mode 100644 board/Marvell/sheevaplug/config.mk
 create mode 100644 board/Marvell/sheevaplug/sheevaplug.c
 create mode 100644 board/Marvell/sheevaplug/sheevaplug.h
 create mode 100644 include/configs/sheevaplug.h

diff --git a/MAKEALL b/MAKEALL
index 6719d7b..e9b3fa7 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -517,6 +517,7 @@ LIST_ARM9= \
omap730p2   \
sbc2410x\
scb9328 \
+   sheevaplug  \
smdk2400\
smdk2410\
trab\
diff --git a/Makefile b/Makefile
index 8144ecd..daebc59 100644
--- a/Makefile
+++ b/Makefile
@@ -2882,6 +2882,9 @@ sbc2410x_config: unconfig
 scb9328_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx
 
+sheevaplug_config: unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) Marvell kirkwood
+
 smdk2400_config:   unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t smdk2400 samsung s3c24x0
 
@@ -3110,7 +3113,6 @@ omap2420h4_config : unconfig
 qong_config: unconfig
@$(MKCONFIG) $(@:_config=) arm arm1136 qong davedenx mx31
 
-
 #
 ## ARM1176 Systems
 #
diff --git a/board/Marvell/sheevaplug/Makefile 
b/board/Marvell/sheevaplug/Makefile
new file mode 100644
index 000..e378b5b
--- /dev/null
+++ b/board/Marvell/sheevaplug/Makefile
@@ -0,0 +1,51 @@
+#
+# (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  := sheevaplug.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/sheevaplug/config.mk 
b/board/Marvell/sheevaplug/config.mk
new file mode 100644
index 000..a4ea769
--- /dev/null
+++ b/board/Marvell/sheevaplug/config.mk
@@ -0,0 +1,25 @@
+#
+# (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 

Re: [U-Boot] [PATCH] Marvell Sheevaplug Board support

2009-05-30 Thread Prafulla Wadaskar
Please do not review/accept this patch, I have send v2 for this.
Sorry for inconvenience

Regards..
Prafulla . .

 -Original Message-
 From: Prafulla Wadaskar [mailto:prafu...@marvell.com] 
 Sent: Saturday, May 30, 2009 1:14 AM
 To: u-boot@lists.denx.de
 Cc: Nicolas Pitre; Manas Saksena; Lennert Buijtenhek; 
 Prabhanjan Sarnaik; Ronen Shitrit; Ashish Karkare; Prafulla Wadaskar
 Subject: [PATCH] Marvell Sheevaplug Board support
 
 Reference:
 http://plugcomputer.org/
 http://openplug.org/plugwiki/index.php/Das_U-boot_plug_support
 
 This patch is tested for-
 1. Boot from DRAM/NAND flash
 2. File transfer using tftp
 3. NAND flash read/write/erase
 4. Linux kernel and RFS Boot from NAND
 
 Signed-off-by: Prafulla Wadaskar prafu...@marvell.com
 ---
  MAKEALL   |1 +
  Makefile  |4 +-
  board/Marvell/sheevaplug/Makefile |   51 +
  board/Marvell/sheevaplug/config.mk|   25 +
  board/Marvell/sheevaplug/sheevaplug.c |  135 +++
  board/Marvell/sheevaplug/sheevaplug.h |   37 +++
  include/configs/sheevaplug.h  |  192 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] net: Add Marvell Kirkwood gigabit ethernet driver

2009-05-30 Thread Prafulla Wadaskar
 

 -Original Message-
 From: Ben Warren [mailto:biggerbadder...@gmail.com] 
 Sent: Saturday, May 30, 2009 4:51 AM
 To: Jean-Christophe PLAGNIOL-VILLARD
 Cc: Prafulla Wadaskar; u-boot@lists.denx.de; Manas Saksena; 
 Ronen Shitrit; Nicolas Pitre; Ashish Karkare; Prabhanjan 
 Sarnaik; Lennert Buijtenhek
 Subject: Re: [U-Boot] [PATCH] net: Add Marvell Kirkwood 
 gigabit ethernet driver
 
 Jean-Christophe PLAGNIOL-VILLARD wrote:
  On 01:13 Sat 30 May , Prafulla Wadaskar wrote:

  This patch adds a egiga driver for the Marvell Kirkwood SoC's.
 
  Contributors:
  Yotam Admon yo...@marvell.com
  Michael Blostein michae...@marvell.com
 
  Reviewed-by: Ronen Shitrit rshit...@marvell.com
  Acked-by: Stefan Rose s...@denx.de
  Signed-off-by: Prafulla Wadaskar prafu...@marvell.com
  
  Ben if it's ok for you I'll apply with rest of the series
 
  Best Regards,
  J.

 I'll look at it this weekend.
Hi Ben,
I have put the huge efforts to tune it specially for code size reduction.
Whereas I have lost only network statistics and packet info print debugging 
features.
Now it looks more simpler and cleaner :-)
Hopefully it will stand as per your suggestions. 

See the difference
New driver..
 drivers/net/Makefile |1 +
 drivers/net/kirkwood_egiga.c |  674 ++
 drivers/net/kirkwood_egiga.h |  561 +++
 include/netdev.h |1 +
 4 files changed, 1237 insertions(+), 0 deletions(-)  create mode 100644 

Old driver
 cpu/arm926ejs/kirkwood/cpu.c |8 +
 drivers/net/Makefile |1 +
 drivers/net/kirkwood_egiga.c | 1670 ++
 drivers/net/kirkwood_egiga.h |  828 +
 include/netdev.h |1 +
 5 files changed, 2508 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/kirkwood_egiga.c
 create mode 100644 drivers/net/kirkwood_egiga.h

Regards..
Prafulla . 

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


Re: [U-Boot] [PATCH] arm: Kirkwood: Basic SOCs support

2009-05-30 Thread Prafulla Wadaskar
 

 -Original Message-
 From: Jean-Christophe PLAGNIOL-VILLARD [mailto:plagn...@jcrosoft.com] 
 Sent: Saturday, May 30, 2009 3:52 AM
 To: Prafulla Wadaskar
 Cc: u-boot@lists.denx.de; Manas Saksena; Ronen Shitrit; 
 Nicolas Pitre; Ashish Karkare; Prabhanjan Sarnaik; Lennert Buijtenhek
 Subject: Re: [U-Boot] [PATCH] arm: Kirkwood: Basic SOCs support
 
  + *
  + * Reference Documentation:
  + * Mbus-L to Mbus Bridge Registers Configuration.
  + * (Sec 25.1 and 25.3 of Datasheet)
  + */
  +int kw_config_adr_windows(void)
  +{
  +   struct kwwin_registers *winregs =
  +   (struct kwwin_registers *)KW_CPU_WIN_BASE;
  +
  +   writel(KWCPU_WIN_CTRL_DATA(0xc, KWCPU_TARGET_PCIE,
  +   KWCPU_ATTR_PCIE_MEM, KWCPU_WIN_ENABLE),
  +   winregs[0].ctrl);
  +
  +   writel(0x9000, winregs[0].base);
 any chance to have some macro for the 0x9000  co...
Hi Jean,
Base address, remap address high, remap address low are the registers need to 
be programmed
with some address value.
Making it macro will not make much sense since the code line itself is readable 
for objective
 
 
 other fine
Please make it everything fine :-)
Waiting eagerly for acceptance

Regards..
Prafulla ..

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


[U-Boot] [PATCH] ARM Cortex A8: Move OMAP3 specific reset handler to OMAP3 code

2009-05-30 Thread Dirk Behme
Reset is SoC specific and not ARM Cortex A8 generic. Move it from generic
code to OMAP3 SoC specific file.

CC: Kim, Heung Jun river...@gmail.com
Signed-off-by: Dirk Behme dirk.be...@googlemail.com

---

This patches fixes the second issue found by riverful in

http://lists.denx.de/pipermail/u-boot/2009-May/053433.html

The first issue is fixed by

http://lists.denx.de/pipermail/u-boot/2009-May/053444.html

 cpu/arm_cortexa8/omap3/lowlevel_init.S |   12 
 cpu/arm_cortexa8/start.S   |   14 --
 2 files changed, 12 insertions(+), 14 deletions(-)

Index: u-boot-arm/cpu/arm_cortexa8/omap3/lowlevel_init.S
===
--- u-boot-arm.orig/cpu/arm_cortexa8/omap3/lowlevel_init.S
+++ u-boot-arm/cpu/arm_cortexa8/omap3/lowlevel_init.S
@@ -181,6 +181,18 @@ lowlevel_init:
/* back to arch calling code */
mov pc, lr
 
+.global reset_cpu
+reset_cpu:
+   ldr r1, rstctl  @ get addr for global reset
+   @ reg
+   mov r3, #0x2@ full reset pll + mpu
+   str r3, [r1]@ force reset
+   mov r0, r0
+_loop_forever:
+   b   _loop_forever
+rstctl:
+   .word   PRM_RSTCTRL
+
/* the literal pools origin */
.ltorg
 
Index: u-boot-arm/cpu/arm_cortexa8/start.S
===
--- u-boot-arm.orig/cpu/arm_cortexa8/start.S
+++ u-boot-arm/cpu/arm_cortexa8/start.S
@@ -500,17 +500,3 @@ finished_inval:
@ but we compile with armv5
 
ldmfd   r13!, {r0 - r5, r7, r9 - r12, pc}
-
-
-   .align  5
-.global reset_cpu
-reset_cpu:
-   ldr r1, rstctl  @ get addr for global reset
-   @ reg
-   mov r3, #0x2@ full reset pll + mpu
-   str r3, [r1]@ force reset
-   mov r0, r0
-_loop_forever:
-   b   _loop_forever
-rstctl:
-   .word   PRM_RSTCTRL
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/3] MX31: Add NAND SPL for i.MX31.

2009-05-30 Thread Magnus Lilja
2009/5/29 Scott Wood scottw...@freescale.com:
 On Sun, May 03, 2009 at 09:56:57PM +0200, Magnus Lilja wrote:
 This patch adds the NAND SPL framework needed to boot i.MX31 boards
 from NAND.

 Sorry for the delay...

Well, better now than the next time I post these patches.

 diff --git a/include/asm-arm/arch-mx31/mx31-regs.h 
 b/include/asm-arm/arch-mx31/mx31-regs.h
 index a8a05c8..3d811d7 100644
 --- a/include/asm-arm/arch-mx31/mx31-regs.h
 +++ b/include/asm-arm/arch-mx31/mx31-regs.h
 @@ -194,4 +194,94 @@
  #define CS5_BASE     0xB600
  #define PCMCIA_MEM_BASE      0xC000

 +/*
 + * NAND controller
 + */
 +#define NFC_BASE_ADDR        0xB800
 +
 +/*
 + * Addresses for NFC registers
 + */
 +#define NFC_BUF_SIZE         (NFC_BASE_ADDR + 0xE00)
 +#define NFC_BUF_ADDR         (NFC_BASE_ADDR + 0xE04)
 +#define NFC_FLASH_ADDR               (NFC_BASE_ADDR + 0xE06)
 +#define NFC_FLASH_CMD                (NFC_BASE_ADDR + 0xE08)

 The NFC register info should go in its own header, as it exists on more
 than just MX31 (e.g. mpc5xxx).  Should probably use register structs
 rather than #defines.

Yes, will do that. I'm converting the #define's to struct {} and all
accesses will be in the readl/writel(nfc-flash_cmd) format.

 diff --git a/nand_spl/nand_boot_mx31.c b/nand_spl/nand_boot_mx31.c
 new file mode 100644
 index 000..d698d2a
 --- /dev/null
 +++ b/nand_spl/nand_boot_mx31.c

 What in this file is MX31-specific?  Even if you don't have other chips
 to test on, please try to provide a framework for generic NFC support so
 the next chip only needs to tweak the details.  That may be as simple as
 s/mx31/nfc/.

I'll look into that.

 +static void mx31_wait_ready(void)
 +{
 +     while (1) {
 +             if (readw(NFC_CONFIG2)  NFC_INT) {
 +                     uint32_t tmp;
 +                     /* Reset interrupt flag */
 +                     tmp = readw(NFC_CONFIG2);
 +                     tmp = ~NFC_INT;
 +                     writew(tmp, NFC_CONFIG2);
 +                     break;
 +             }
 +     }
 +}

 while (!(readw(NFC_CONFIG2)  NFC_INT))
        ;

 tmp = readw(NFC_CONFIG2);
 ...


Ok.

 +static void mx31_nand_page_address(unsigned int page_address)
 +{
 +     unsigned int page_count;
 +
 +     writew(0x00, NFC_FLASH_ADDR);
 +     writew(NFC_ADDR, NFC_CONFIG2);
 +     mx31_wait_ready();
 +
 +     /* code only for 2kb flash */
 +     if (CFG_NAND_PAGE_SIZE == 0x800) {
 +             writew(0x00, NFC_FLASH_ADDR);
 +             writew(NFC_ADDR, NFC_CONFIG2);
 +             mx31_wait_ready();
 +     }
 +
 +     page_count = CFG_NAND_CHIP_SIZE / CFG_NAND_PAGE_SIZE;
 +
 +     if (page_address = page_count) {
 +             page_count--; /* transform 0x0100 to 0x00ff */
 +             do {
 +                     writew(page_address  0xff, NFC_FLASH_ADDR);
 +                     writew(NFC_ADDR, NFC_CONFIG2);
 +                     mx31_wait_ready();
 +                     page_address = page_address  8;
 +                     page_count = page_count  8;
 +             } while (page_count);
 +     }

 Does the number of address bytes really need to depend on the size of the
 flash chip, or can you base it on the number of non-zero bytes in
 page_address (the chip will know when the address phase is over because
 ALE drops)?

Ok, will try to look into it.

 +static int mx31_nand_check_ecc(void)
 +{
 +     unsigned short ecc_status_register;
 +
 +     ecc_status_register = readw(NFC_ECC_STATUS_RESULT);
 +
 +     if (ecc_status_register != 0)
 +             return 1; /* error */
 +     return 0;
 +}

 How about just return readw(NFC_ECC_STATUS_RESULT);?

ok

 +static int mx31_read_page(unsigned int page_address, unsigned char *buf)
 +{
 +     int i;
 +     volatile u32 *p1;
 +     volatile u32 *p2;
 +     u32 a;

 s/p1/src/
 s/p2/dest/

 s/a/something (just a little) more descriptive/ -- my first guess was
 address, but that doesn't seem right...

Ok

 No volatile; use I/O accessors.

Yes, already on todo-list.

 +     writew(0, NFC_BUF_ADDR); /* read in first 0 buffer */
 +     mx31_nand_command(NAND_CMD_READ0);
 +     mx31_nand_page_address(page_address);
 +
 +     if (CFG_NAND_CHIP_SIZE = 0x0800)
 +             mx31_nand_command(NAND_CMD_READSTART);

 Is it guaranteed that all NAND chips above that size will be large page
 and all chips below that size will be small page?

No, I'll change to use the CONFIG_SYS_NAND_PAGE_SIZE to do different
stuff depending on the page size.

 +     /* it is hardware specific code for 8-bit 512B NAND-flash spare area */
 +     p1++;
 +     a = *p1;
 +     a = (a  0xff00)  8;
 +
 +     if (a != 0xff) /* bad block marker verify */
 +             return 1; /* potential bad block */
 +
 +     return 0;

 The bad block location is typically different (offset 0 rather than 5)
 with large page flash.

I think that's because of the non-standard imlementation of large page
support in the i.MX31 NFC.

 +             /* checking first page of each 

Re: [U-Boot] [PATCH] Move L2-cache enable/disable function to soc dependent code

2009-05-30 Thread HeungJun, Kim
Ok. Jean.
Very thanks to review. 
I have a question about one thing you pointed out.

===
as it's nearly only in asm implement it in assembly olny will be better
 + /* ES2 onwards we can disable/enable L2 ourselves */
 + if (get_cpu_rev() = CPU_3XX_ES20) {
 + __asm__ __volatile__(mrc p15, 0, %0, c1, c0, 1:=r(i));
 + __asm__ __volatile__(orr %0, %0, #0x2:=r(i));
===

I think you tell me the position is in the assembly code like lowlevel_init.S. 
Is it right?
Can you explain more detailed about this part, plz? :)

If my thinking is alright, I'll re-update this patch soon. 

Best Regards,
Riverful

- 원본 메시지 -
보낸 사람: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
보낸 날짜: 2009년 5월 30일 토요일 오전 6:46
받는 사람: Kim, Heung Jun river...@gmail.com
참조: u-boot@lists.denx.de; Dirk Behme dirk.be...@googlemail.com; 
riverful@samsung.com; inki@samsung.com; mk7.k...@samsung.com; 
kyungmin.p...@samsung.com; bh...@samsung.com; jh106.c...@samsung.com
제목: Re: [U-Boot] [PATCH] Move L2-cache enable/disable function to soc   
dependent code

On 20:27 Fri 29 May , Kim, Heung Jun wrote:
 The L2 cache enable/disable function in the cpu/arm_cortexa8/cpu.c moved
 to cpu/arm_cortexa8/omap3/cache.c.
please mention omap3 in the title too
 
 Signed-off-by: HeungJun, Kim riverful@samsung.com
 ---
 + * (C) Copyright 2002
 + * Gary Jennejohn, DENX Software Engineering, g...@denx.de
 + *
 + * 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., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +/*
 + * L2 cache specific code
 + */
 +
 +#include common.h
 +#include command.h
 +#include asm/arch/sys_proto.h
 +
 +void l2_cache_enable()
 +{
 + unsigned long i;
 + volatile unsigned int j;
 +
as it's nearly only in asm implement it in assembly olny will be better
 + /* ES2 onwards we can disable/enable L2 ourselves */
 + if (get_cpu_rev() = CPU_3XX_ES20) {
 + __asm__ __volatile__(mrc p15, 0, %0, c1, c0, 1:=r(i));
 + __asm__ __volatile__(orr %0, %0, #0x2:=r(i));
snip
 diff --git a/include/asm-arm/arch-omap3/sys_proto.h
 b/include/asm-arm/arch-omap3/sys_proto.h
 index 7361d08..4f43aef 100644
 --- a/include/asm-arm/arch-omap3/sys_proto.h
 +++ b/include/asm-arm/arch-omap3/sys_proto.h
 @@ -63,5 +63,7 @@ void make_cs1_contiguous(void);
  void omap_nand_switch_ecc(int);
  void power_init_r(void);
  void dieid_num_r(void);
 +void l2_cache_disable();
 +void l2_cache_enable();
please move these two funtcions in
include/asm-arm/cache.h

please rebase it against the u-boot-arm/next

Best Regards,
J.

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