Re: [U-Boot] Question regarding FPGA firmware load in u-boot

2009-06-20 Thread André Schwarz
Dieter,

On Fri, 2009-06-19 at 17:46 +0200, Dieter Kiermaier wrote:
 Hello List,
 
 I want to boot a (Lattice) FPGA from u-boot by using Slave Serial 
 configuration on a Marvell Kirkwood device.

Should be no problem as long as you'll have access to GPIO.

 As seen there is an (Xilinx and Altera) FPGA loader driver allready available 
 in u-boot.
 Please can somebody explain how I have to provide a FPGA bitstream
 image to u-boot?

The easiest way is to reserve some unused flash sectors and use the
first sector's start adress as arg for fpga load.

 It seems I have to create a image with mkimage?

no - Lattice specififc bitstream can be stored in raw format.
mkimage may be useful for update, but personally I prefer update via
dedicated linux mtd partition.

 This image have to be loaded into ram and the address has to be provided to 
 the load command?

Usually an FPGA is *very* board specific. I'd suggest to use flash and
create a corresponding mtd partition for linux, i.e. make it
maintainable.

 Is there a maintainer for the FPGA code inside u-boot?
 I'm willing to contribute some extensions for Lattice FPGAs if I'm successful!
excellent - all you'll need is the Lattice specific bit toggle sequence.

submitting a proper patch will surely do.


Regards,

André

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



MATRIX VISION GmbH, Talstra�e 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch�ftsf�hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim 
Reich
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request u-boot-blackfin.git

2009-06-20 Thread Wolfgang Denk
Dear Mike Frysinger,

In message 1245223428-26841-1-git-send-email-vap...@gentoo.org you wrote:
 The following changes since commit 57fe30194d3c15c37d9ff06dbd2a4c1ffccda018:
   Wolfgang Denk (1):
 Merge branch 'master' of /home/wd/git/u-boot/custodians
 
 are available in the git repository at:
 
   git://www.denx.de/git/u-boot-blackfin.git master
 
 Mike Frysinger (4):
   Blackfin: bf548-ezkit: bump up monitor size
   Blackfin: enable -O2 in lib_generic/ for ADI/Bluetechnix boards
   Blackfin: fix SPI flash speed define name
   Blackfin: move ALL += u-boot.ldr to blackfin_config.mk
 
 Vivi Li (2):
   Blackfin: bump up default JTAG console timeout
   Blackfin: bf533-stamp/bf537-stamp: fix env settings for SPI flash
 
  Makefile |4 +---
  blackfin_config.mk   |6 --
  board/bf518f-ezbrd/config.mk |3 +++
  board/bf526-ezbrd/config.mk  |3 +++
  board/bf527-ezkit/config.mk  |3 +++
  board/bf533-ezkit/config.mk  |3 +++
  board/bf533-stamp/config.mk  |3 +++
  board/bf537-stamp/config.mk  |3 +++
  board/bf538f-ezkit/config.mk |3 +++
  board/bf548-ezkit/config.mk  |3 +++
  board/bf561-ezkit/config.mk  |3 +++
  board/cm-bf527/config.mk |3 +++
  board/cm-bf533/config.mk |3 +++
  board/cm-bf537e/config.mk|3 +++
  board/cm-bf548/config.mk |3 +++
  board/cm-bf561/config.mk |3 +++
  board/tcm-bf537/config.mk|3 +++
  cpu/blackfin/jtag-console.c  |2 +-
  include/configs/bf518f-ezbrd.h   |2 +-
  include/configs/bf526-ezbrd.h|2 +-
  include/configs/bf527-ezkit.h|2 +-
  include/configs/bf533-stamp.h|6 +++---
  include/configs/bf537-minotaur.h |2 +-
  include/configs/bf537-pnav.h |2 +-
  include/configs/bf537-srv1.h |2 +-
  include/configs/bf537-stamp.h|6 +++---
  include/configs/bf538f-ezkit.h   |2 +-
  include/configs/bf548-ezkit.h|4 ++--
  include/configs/blackstamp.h |2 +-
  29 files changed, 67 insertions(+), 22 deletions(-)

Applied. Thanks.

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
Where a calculator on the ENIAC is equipped with 18,000 vacuum  tubes
and  weighs  30  tons,  computers  in  the future may have only 1,000
vacuum tubes and weigh only 1/2 tons. - Popular Mechanics, March 1949
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [STATUS] Summer break

2009-06-20 Thread Wolfgang Denk
Hi,

just a short update on the release status:

- The merge window for v2009.08 is open until Sun Jul 19, 2009,
  = 29 days remaining. 
- At the moment, there are no outstanding pull requests.
- I'm on the verge of leaving for 2 weeks of vacation, so please don't
  expect any reviewing / merging / pulling from me in this time.
  I will be back on July 06.

Enjoy the time.

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
He was so narrow minded he could see through  a  keyhole  with  both
eyes ...
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mtd: Update MTD infrastructure to support 64bit device size

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
 
 2. C++ style comment. Found by Wolfgang ;)
 
 3. The major one: By the new 64bit variables, depending on tool chain, 
 there are now calls to libgcc introduced. Depending on tool chain, 
 this might work, or fail. As it does with one of my tool chains, which 
 worked totally fine until here. It was my understanding that U-Boot 
 shall not rely on libgcc, i.e. proper tool chain libraries.
 
 Having CONFIG_SYS_64BIT_VSPRINTF not defined, the linker needs 
 _lshrdi3, which comes from nand_base.o and nand_bbt.o. E.g. from 
 len = mtd-size  (this-bbt_erase_shift + 2); from nand_bbt.c.
 
 Having CONFIG_SYS_64BIT_VSPRINTF enabled, the linker requests 
 _lshrdi3, _udivdi3, _umoddi3 and _clz from libgcc.
 
 Looking into U-Boot's lib_arm/ directory, we have already some low 
 level math functions there to avoid libgcc. E.g. nand_bbt.c has 
 references to _ashrdi3, too, but this is resolved by lib_arm's version 
 what is fine.
 
 I'd like that NAND code is modified that only math is used which 
 U-Boot provides and no libgcc is needed.
this is a already known problem by Stefan and I and solved

two patchs was send to the ML and now we are independant of the libgcc

please test the testing branch of the u-boot-arm tree

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


Re: [U-Boot] [PATCH 1/3] OMAP3 I2C Fix the sampling clock.

2009-06-20 Thread Menon, Nishanth
 -Original Message-
 From: Tom Rix [mailto:tom@windriver.com]
 Sent: Thursday, June 18, 2009 11:14 PM
 To: u-boot@lists.denx.de; Menon, Nishanth; dirk.be...@googlemail.com
 Cc: Tom Rix
 Subject: [PATCH 1/3] OMAP3 I2C Fix the sampling clock.

Acked-by: Nishanth Menonn...@ti.com

There is one comment below though..
 
 
 Signed-off-by: Tom Rix tom@windriver.com
 ---
  drivers/i2c/omap24xx_i2c.c   |   34 +++-
  include/asm-arm/arch-omap3/i2c.h |   54
 +-
  2 files changed, 74 insertions(+), 14 deletions(-)
 
 diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
 index 6784603..ecdf1f2 100644
 --- a/drivers/i2c/omap24xx_i2c.c
 +++ b/drivers/i2c/omap24xx_i2c.c
 @@ -31,7 +31,29 @@ static void flush_fifo(void);
 
  void i2c_init (int speed, int slaveadd)
  {
 - u16 scl;
 + int psc, scll, sclh;
 +
 + /* Only handle standard and fast speeds */
 + if ((speed != OMAP_I2C_STANDARD) 
 + (speed != OMAP_I2C_FAST_MODE)) {
 + printf(Error : I2C unsupported speed %d\n, speed);
 + return;
 + }
 +

We may want to bring the HSI2C support back in though

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


Re: [U-Boot] [PATCH 3/3] TWL4030 Add power reset button

2009-06-20 Thread Menon, Nishanth


 -Original Message-
 From: Tom Rix [mailto:tom@windriver.com]
 Sent: Thursday, June 18, 2009 11:14 PM
 To: u-boot@lists.denx.de; Menon, Nishanth; dirk.be...@googlemail.com
 Cc: Tom Rix
 Subject: [PATCH 3/3] TWL4030 Add power reset button
Acked-by: Nishanth Menon n...@ti.com

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


Re: [U-Boot] [PATCH 2/3] I2C Add initial support for TWL4030

2009-06-20 Thread Menon, Nishanth

 -Original Message-
 From: Tom Rix [mailto:tom@windriver.com]
 Sent: Thursday, June 18, 2009 11:14 PM
 To: u-boot@lists.denx.de; Menon, Nishanth; dirk.be...@googlemail.com
 Cc: Tom Rix
 Subject: [PATCH 2/3] I2C Add initial support for TWL4030
 
 +++ b/include/twl4030.h
snip
 +/* POWER */
 +#define TWL4030_CHIP_BACKUP  0x4b
 +#define TWL4030_CHIP_INT 0x4b
 +#define TWL4030_CHIP_PM_MASTER   0x4b
 +#define TWL4030_CHIP_PM_RECEIVER 0x4b
 +#define TWL4030_CHIP_RTC 0x4b
 +#define TWL4030_CHIP_SECURED_REG 0x4b
 +
 +/* Register base addresses */
 +
 +/* USB */
 +#define TWL4030_BASEADD_USB  0x
 +/* AUD */
 +#define TWL4030_BASEADD_AUDIO_VOICE  0x
 +#define TWL4030_BASEADD_GPIO 0x0098
 +#define TWL4030_BASEADD_INTBR0x0085
 +#define TWL4030_BASEADD_PIH  0x0080
 +#define TWL4030_BASEADD_TEST 0x004C
 +/* AUX */
 +#define TWL4030_BASEADD_INTERRUPTS   0x00B9
 +#define TWL4030_BASEADD_LED  0x00EE
 +#define TWL4030_BASEADD_MADC 0x
 +#define TWL4030_BASEADD_MAIN_CHARGE  0x0074
snip

 +static inline int twl4030_i2c_write_u8(u8 chip_no, u8 val, u8 reg)
 +{
Could you add a little more documentation what I should use for chip_no etc?
My main problem when I think as a first time looker, is trying to understand
Which #defines should I be using where? I really do not want to see half a 
dozen repeated emails on the list asking for this info

snip

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


[U-Boot] [PATCH 2/2 V2] ARM: Don't include libgcc anymore

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
This patch removes the inclusion of libgcc functions into U-Boot on the ARM
architecture. Only the really needed functions are provided in the lib_arm
directory. Those implementations are copied from Linux where they are well
proven related to reliably, performance.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
Rebased against current HEAD

Best Regards,
J.
 Makefile  |   11 +-
 arm_config.mk |2 +-
 board/trab/u-boot.lds |2 +-
 include/asm-arm/assembler.h   |  112 
 include/asm-arm/linkage.h |   11 ++
 include/linux/linkage.h   |   95 ++
 lib_arm/Makefile  |   10 +-
 lib_arm/_divsi3.S |  140 ---
 lib_arm/_modsi3.S |   99 ---
 lib_arm/_udivsi3.S|   77 
 lib_arm/_umodsi3.S|   88 --
 lib_arm/{_ashldi3.S = ashldi3.S} |9 +-
 lib_arm/{_ashrdi3.S = ashrdi3.S} |9 +-
 lib_arm/lib1funcs.S   |  348 +
 lib_arm/{_ashrdi3.S = lshrdi3.S} |   13 +-
 15 files changed, 603 insertions(+), 423 deletions(-)
 create mode 100644 include/asm-arm/assembler.h
 create mode 100644 include/asm-arm/linkage.h
 create mode 100644 include/linux/linkage.h
 delete mode 100644 lib_arm/_divsi3.S
 delete mode 100644 lib_arm/_modsi3.S
 delete mode 100644 lib_arm/_udivsi3.S
 delete mode 100644 lib_arm/_umodsi3.S
 rename lib_arm/{_ashldi3.S = ashldi3.S} (93%)
 copy lib_arm/{_ashrdi3.S = ashrdi3.S} (93%)
 create mode 100644 lib_arm/lib1funcs.S
 rename lib_arm/{_ashrdi3.S = lshrdi3.S} (90%)

diff --git a/Makefile b/Makefile
index 8035831..4cc2be7 100644
--- a/Makefile
+++ b/Makefile
@@ -228,7 +228,6 @@ endif
 ifeq ($(CPU),ixp)
 LIBS += cpu/ixp/npe/libnpe.a
 endif
-LIBS += lib_$(ARCH)/lib$(ARCH).a
 LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a 
fs/jffs2/libjffs2.a \
fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a \
fs/ubifs/libubifs.a
@@ -287,6 +286,9 @@ LIBS := $(addprefix $(obj),$(LIBS))
 LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
 LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
 
+LIBARCH = lib_$(ARCH)/lib$(ARCH).a
+LIBARCH := $(addprefix $(obj),$(LIBARCH))
+
 # Add GCC lib
 PLATFORM_LIBS += $(PLATFORM_LIBGCC)
 
@@ -301,7 +303,7 @@ U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
 endif
 
 __OBJS := $(subst $(obj),,$(OBJS))
-__LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
+__LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD)) $(subst 
$(obj),,$(LIBARCH))
 
 #
 #
@@ -362,13 +364,16 @@ endif
 $(OBJS):   depend
$(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@))
 
+$(LIBARCH):depend
+   $(MAKE) -C $(dir $(subst $(obj),,$@))
+
 $(LIBS):   depend $(SUBDIRS)
$(MAKE) -C $(dir $(subst $(obj),,$@))
 
 $(LIBBOARD):   depend $(LIBS)
$(MAKE) -C $(dir $(subst $(obj),,$@))
 
-$(SUBDIRS):depend
+$(SUBDIRS):depend $(LIBARCH)
$(MAKE) -C $@ all
 
 $(LDSCRIPT):   depend
diff --git a/arm_config.mk b/arm_config.mk
index b88a3f2..0d6cd24 100644
--- a/arm_config.mk
+++ b/arm_config.mk
@@ -25,4 +25,4 @@ PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
 LDSCRIPT := $(SRCTREE)/cpu/$(CPU)/u-boot.lds
 
-PLATFORM_LIBGCC += -L $(shell dirname `$(CC) $(CFLAGS) 
-print-libgcc-file-name`) -lgcc
+PLATFORM_LIBGCC += -L$(OBJTREE)/lib_arm -larm
diff --git a/board/trab/u-boot.lds b/board/trab/u-boot.lds
index d8bcfa4..a83853e 100644
--- a/board/trab/u-boot.lds
+++ b/board/trab/u-boot.lds
@@ -33,7 +33,7 @@ SECTIONS
.text  :
{
  cpu/arm920t/start.o   (.text)
- lib_arm/_umodsi3.o(.text)
+ lib_arm/lib1funcs.o   (.text)
  lib_generic/zlib.o(.text)
  lib_generic/crc32.o   (.text)
  lib_generic/string.o  (.text)
diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h
new file mode 100644
index 000..c7916d1
--- /dev/null
+++ b/include/asm-arm/assembler.h
@@ -0,0 +1,112 @@
+/*
+ *  arch/arm/include/asm/assembler.h
+ *
+ *  Copyright (C) 1996-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  This file contains arm architecture specific defines
+ *  for the different processors.
+ *
+ *  Do not include any C declarations in this file - it is included by
+ *  assembler source.
+ */
+#include asm/ptrace.h
+
+/*
+ * Endian independent macros for shifting bytes within registers.
+ */
+#ifndef __ARMEB__
+#define pulllsr
+#define pushlsl
+#define get_byte_0  lsl #0
+#define get_byte_1 lsr #8
+#define 

[U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
This patch moves the libgcc Makefile inclusion from the toplevel Makefile to
the arch_config.mk files. This is in preparation for the ARM architecture to
move away from including libgcc function and only using self-contained U-Boot
functions as done in Linux.

Currently in the next branch all the ARM boards that use the nand are broken due
to the adding of the 64 Bit device size support. In the past we have seen
problems with different toolchains due to EABI, FPU as example.
With this patch and the following one we move away from all these problems and
we will be able to have full control to have a functions embedded into u-boot.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
Rebased against current HEAD

Best Regards,
J.
 Makefile |2 +-
 api_examples/Makefile|4 +---
 arm_config.mk|2 ++
 avr32_config.mk  |2 ++
 blackfin_config.mk   |2 ++
 board/netstar/Makefile   |4 +---
 board/sl8245/config.mk   |1 -
 board/trab/Makefile  |2 --
 board/voiceblue/Makefile |4 +---
 examples/Makefile|2 +-
 i386_config.mk   |2 ++
 m68k_config.mk   |2 ++
 microblaze_config.mk |2 ++
 mips_config.mk   |2 ++
 nios2_config.mk  |2 ++
 nios_config.mk   |2 ++
 ppc_config.mk|2 ++
 sh_config.mk |2 ++
 sparc_config.mk  |2 ++
 19 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index 6a2dd9f..8035831 100644
--- a/Makefile
+++ b/Makefile
@@ -288,7 +288,7 @@ LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
 LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
 
 # Add GCC lib
-PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) 
-lgcc
+PLATFORM_LIBS += $(PLATFORM_LIBGCC)
 
 ifeq ($(CONFIG_NAND_U_BOOT),y)
 NAND_SPL = nand_spl
diff --git a/api_examples/Makefile b/api_examples/Makefile
index 4c01437..4bfa7e6 100644
--- a/api_examples/Makefile
+++ b/api_examples/Makefile
@@ -56,8 +56,6 @@ OBJS  := $(addprefix $(obj),$(COBJS))
 ELF:= $(addprefix $(obj),$(ELF))
 BIN:= $(addprefix $(obj),$(BIN))
 
-gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
-
 CPPFLAGS += -I..
 
 all:   $(obj).depend $(OBJS) $(LIB) $(ELF) $(BIN)
@@ -70,7 +68,7 @@ $(ELF):
 $(obj)%:   $(obj)%.o $(LIB)
$(LD) $(obj)crt0.o -Ttext $(LOAD_ADDR) \
-o $@ $ $(LIB) \
-   -L$(gcclibdir) -lgcc
+   $(PLATFORM_LIBGCC)
 
 $(BIN):
 $(obj)%.bin:   $(obj)%
diff --git a/arm_config.mk b/arm_config.mk
index c4cf99d..b88a3f2 100644
--- a/arm_config.mk
+++ b/arm_config.mk
@@ -24,3 +24,5 @@
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
 LDSCRIPT := $(SRCTREE)/cpu/$(CPU)/u-boot.lds
+
+PLATFORM_LIBGCC += -L $(shell dirname `$(CC) $(CFLAGS) 
-print-libgcc-file-name`) -lgcc
diff --git a/avr32_config.mk b/avr32_config.mk
index 441caa4..8569d5f 100644
--- a/avr32_config.mk
+++ b/avr32_config.mk
@@ -23,3 +23,5 @@
 
 PLATFORM_RELFLAGS  += -ffixed-r5 -fPIC -mno-init-got -mrelax
 PLATFORM_LDFLAGS   += --relax
+
+PLATFORM_LIBGCC += -L $(shell dirname `$(CC) $(CFLAGS) 
-print-libgcc-file-name`) -lgcc
diff --git a/blackfin_config.mk b/blackfin_config.mk
index 989e976..1534c0d 100644
--- a/blackfin_config.mk
+++ b/blackfin_config.mk
@@ -60,3 +60,5 @@ LDR_FLAGS += $(LDR_FLAGS-y)
 ifeq ($(wildcard $(TOPDIR)/board/$(BOARD)/u-boot.lds*),)
 LDSCRIPT = $(obj)lib_$(ARCH)/u-boot.lds
 endif
+
+PLATFORM_LIBGCC += -L $(shell dirname `$(CC) $(CFLAGS) 
-print-libgcc-file-name`) -lgcc
diff --git a/board/netstar/Makefile b/board/netstar/Makefile
index 91bac38..1cc2722 100644
--- a/board/netstar/Makefile
+++ b/board/netstar/Makefile
@@ -36,8 +36,6 @@ SRCS  := $(SOBJS:.o=.S) $(COBJS:.o=.c) eeprom.c \
 OBJS   := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
-gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
-
 LOAD_ADDR = 0x1040
 LDSCRIPT = $(TOPDIR)/board/$(BOARDDIR)/eeprom.lds
 lnk = $(if $(obj),$(obj),.)
@@ -55,7 +53,7 @@ $(obj)eeprom.srec:$(obj)eeprom.o $(obj)eeprom_start.o
-o $(:.o=) -e eeprom eeprom.o eeprom_start.o \
-L$(obj)../../examples -lstubs \
-L$(obj)../../lib_generic -lgeneric \
-   -L$(gcclibdir) -lgcc
+   $(PLATFROM_LIBGCC)
$(OBJCOPY) -O srec $(:.o=) $@
 
 $(obj)eeprom.bin:  $(obj)eeprom.srec
diff --git a/board/sl8245/config.mk b/board/sl8245/config.mk
index 022512b..299fc6c 100644
--- a/board/sl8245/config.mk
+++ b/board/sl8245/config.mk
@@ -28,4 +28,3 @@
 TEXT_BASE = 0xFFF0
 
 PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
-PLATFORM_LIBS += $(shell $(CC) -print-libgcc-file-name)
diff --git a/board/trab/Makefile b/board/trab/Makefile
index 30e5fbb..a3661c4 100644
--- a/board/trab/Makefile
+++ b/board/trab/Makefile
@@ -36,8 +36,6 @@ SOBJS := $(addprefix $(obj),$(SOBJS))
 
 OBJS_FKT := 

[U-Boot] [PATCH] config.mk: Remove $(PCI_CLOCK) reference

2009-06-20 Thread Shinya Kuribayashi
The following commit introduced $(PCI_CLOCK) reference so that
we could tweak `PCI_66M' definition via an environment variable.

 commit f046ccd15c8bc9613bfd72916b761a127d36e5c6
 Author: Eran Liberty libe...@freescale.com
 Date:   Thu Jul 28 10:08:46 2005 -0500

 * Patch by Eran Liberty
   Add support for the Freescale MPC8349ADS board.

But I suggest a removal of it for the following reasons:

* In 2006, MPC8349ADS was merged into MPC8349EMDS port,
  and it seems that MPC8349EMDS port is PCI_66M free.

* OTOH, PCI_66M is used by MPC832XEMDS an MPC8360EMDS ports,
  but they don't need $(PCI_CLOCK) environment variable at all.
  PCI_66M is automatically configured via $(BOARD)_config names
  with the help of $(findstring _66_,$@).

* Unfortunately $(PCI_CLOCK) has been undocumented anywhere,
  so only a few people know the existence of it these days.

* Keep config.mk independent from $(BOARD) as much as possible.

Signed-off-by: Shinya Kuribayashi skuri...@pobox.com
---
 config.mk |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/config.mk b/config.mk
index 7fc0453..f2c2c6c 100644
--- a/config.mk
+++ b/config.mk
@@ -194,10 +194,6 @@ BFD_ROOT_DIR = /opt/powerpc
 endif
 endif
 
-ifeq ($(PCI_CLOCK),PCI_66M)
-CFLAGS := $(CFLAGS) -DPCI_66M
-endif
-
 #
 
 export HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE \
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] config.mk: Remove unused HPATH

2009-06-20 Thread Shinya Kuribayashi
This variable is not unused anywhere.

Signed-off-by: Shinya Kuribayashi skuri...@pobox.com
---
 config.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config.mk b/config.mk
index f2c2c6c..a9973a4 100644
--- a/config.mk
+++ b/config.mk
@@ -196,7 +196,7 @@ endif
 
 #
 
-export HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE \
+export HOSTCC HOSTCFLAGS CROSS_COMPILE \
AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP MAKE
 export TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Mike Frysinger
On Saturday 20 June 2009 05:33:26 Jean-Christophe PLAGNIOL-VILLARD wrote:
 This patch moves the libgcc Makefile inclusion from the toplevel Makefile
 to the arch_config.mk files. This is in preparation for the ARM
 architecture to move away from including libgcc function and only using
 self-contained U-Boot functions as done in Linux.

why not change the top level Makefile to read:
PLATFORM_LIBGCC ?= ...

then any board/arch that doesnt want it can simply do:
PLATFORM_LIBGCC = # dont want it
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] OMAP3 I2C Fix the sampling clock.

2009-06-20 Thread Tom
Menon, Nishanth wrote:
 -Original Message-
 From: Tom Rix [mailto:tom@windriver.com]
 Sent: Thursday, June 18, 2009 11:14 PM
 To: u-boot@lists.denx.de; Menon, Nishanth; dirk.be...@googlemail.com
 Cc: Tom Rix
 Subject: [PATCH 1/3] OMAP3 I2C Fix the sampling clock.
 

 Acked-by: Nishanth Menonn...@ti.com

 There is one comment below though..
   
 Signed-off-by: Tom Rix tom@windriver.com
 ---
  drivers/i2c/omap24xx_i2c.c   |   34 +++-
  include/asm-arm/arch-omap3/i2c.h |   54
 +-
  2 files changed, 74 insertions(+), 14 deletions(-)

 diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
 index 6784603..ecdf1f2 100644
 --- a/drivers/i2c/omap24xx_i2c.c
 +++ b/drivers/i2c/omap24xx_i2c.c
 @@ -31,7 +31,29 @@ static void flush_fifo(void);

  void i2c_init (int speed, int slaveadd)
  {
 -u16 scl;
 +int psc, scll, sclh;
 +
 +/* Only handle standard and fast speeds */
 +if ((speed != OMAP_I2C_STANDARD) 
 +(speed != OMAP_I2C_FAST_MODE)) {
 +printf(Error : I2C unsupported speed %d\n, speed);
 +return;
 +}
 +
 

 We may want to bring the HSI2C support back in though

   
How about I do this in a later patch?
The configs I looked at only used the much slower standard speed.
Tom

 Regards,
 Nishanth Menon
   

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


Re: [U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 06:18 Sat 20 Jun , Mike Frysinger wrote:
 On Saturday 20 June 2009 05:33:26 Jean-Christophe PLAGNIOL-VILLARD wrote:
  This patch moves the libgcc Makefile inclusion from the toplevel Makefile
  to the arch_config.mk files. This is in preparation for the ARM
  architecture to move away from including libgcc function and only using
  self-contained U-Boot functions as done in Linux.
 
 why not change the top level Makefile to read:
 PLATFORM_LIBGCC ?= ...
 
 then any board/arch that doesnt want it can simply do:
 PLATFORM_LIBGCC = # dont want it
because you need to provide the equivalent functions for standalone
application and api and U-Boot ofcourse

so as as for arm we will provide self-contained functions

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


Re: [U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Mike Frysinger
On Saturday 20 June 2009 06:40:07 Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 06:18 Sat 20 Jun , Mike Frysinger wrote:
  On Saturday 20 June 2009 05:33:26 Jean-Christophe PLAGNIOL-VILLARD wrote:
   This patch moves the libgcc Makefile inclusion from the toplevel
   Makefile to the arch_config.mk files. This is in preparation for the
   ARM architecture to move away from including libgcc function and only
   using self-contained U-Boot functions as done in Linux.
 
  why not change the top level Makefile to read:
  PLATFORM_LIBGCC ?= ...
 
  then any board/arch that doesnt want it can simply do:
  PLATFORM_LIBGCC = # dont want it

 because you need to provide the equivalent functions for standalone
 application and api and U-Boot ofcourse

so move it to config.mk.  this doesnt change the important point: leave 
PLATFORM_LIBGCC default in the toplevel common files.  what i proposed doesnt 
limit what you want to do with arm in any way.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 07:08 Sat 20 Jun , Mike Frysinger wrote:
 On Saturday 20 June 2009 06:40:07 Jean-Christophe PLAGNIOL-VILLARD wrote:
  On 06:18 Sat 20 Jun , Mike Frysinger wrote:
   On Saturday 20 June 2009 05:33:26 Jean-Christophe PLAGNIOL-VILLARD wrote:
This patch moves the libgcc Makefile inclusion from the toplevel
Makefile to the arch_config.mk files. This is in preparation for the
ARM architecture to move away from including libgcc function and only
using self-contained U-Boot functions as done in Linux.
  
   why not change the top level Makefile to read:
   PLATFORM_LIBGCC ?= ...
  
   then any board/arch that doesnt want it can simply do:
   PLATFORM_LIBGCC = # dont want it
 
  because you need to provide the equivalent functions for standalone
  application and api and U-Boot ofcourse
 
 so move it to config.mk.  this doesnt change the important point: leave 
 PLATFORM_LIBGCC default in the toplevel common files.  what i proposed doesnt 
 limit what you want to do with arm in any way.
I think it's better to let it at arch level and force any new arch adding to
manage it instead provide a default one

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


Re: [U-Boot] [PATCH v4 1/6] ARM1136: Introduce CONFIG_PRELOADER macro.

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:50 Sat 13 Jun , Magnus Lilja wrote:
 Currently CONFIG_ONENAND_IPL is used in a number of #ifdef's
 in start.S. In preparation for adding support for NAND SPL
 the macro CONFIG_PRELOADER is introducted and replaces the
 CONFIG_ONENAND_IPL in start.S.
 
 Signed-off-by: Magnus Lilja lilja.mag...@gmail.com
 ---
Applied to u-boot-arm

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


Re: [U-Boot] [PATCH v4 2/6] MX31: Add NAND SPL for i.MX31.

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:50 Sat 13 Jun , Magnus Lilja wrote:
 This patch adds the NAND SPL framework needed to boot i.MX31 boards
 from NAND.
 
 It has been tested on a i.MX31 PDK board with large page NAND. Small
 page NANDs should work as well, but this has not been tested.
 
 Note: The i.MX31 NFC uses a non-standard layout for large page NANDs,
 whether this is compatible with a particular setup depends on how
 the NAND device is programmed by the flash programmer (e.g. JTAG
 debugger).
 
 The patch is based on the work by Maxim Artamonov.
 
 Signed-off-by: Maxim Artamonov scn1...@yandex.ru
 Signed-off-by: Magnus Lilja lilja.mag...@gmail.com
 ---
Applied to u-boot-arm

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


Re: [U-Boot] [PATCH v4 3/6] ARM: Add macros.h to be used in assembler file.

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:50 Sat 13 Jun , Magnus Lilja wrote:
 From: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
 
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
 ---
Applied to u-boot-arm

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


Re: [U-Boot] [PATCH v4 4/6] i.MX31: Create a common device file.

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:50 Sat 13 Jun , Magnus Lilja wrote:
 Signed-off-by: Magnus Lilja lilja.mag...@gmail.com
 ---
  cpu/arm1136/mx31/Makefile|1 +
  cpu/arm1136/mx31/devices.c   |   56 
 ++
  include/asm-arm/arch-mx31/mx31.h |3 ++
  3 files changed, 60 insertions(+), 0 deletions(-)
  create mode 100644 cpu/arm1136/mx31/devices.c
 
Applied to u-boot-arm

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


Re: [U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Mike Frysinger
On Saturday 20 June 2009 07:30:41 Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 07:08 Sat 20 Jun , Mike Frysinger wrote:
  On Saturday 20 June 2009 06:40:07 Jean-Christophe PLAGNIOL-VILLARD wrote:
   On 06:18 Sat 20 Jun , Mike Frysinger wrote:
On Saturday 20 June 2009 05:33:26 Jean-Christophe wrote:
 This patch moves the libgcc Makefile inclusion from the toplevel
 Makefile to the arch_config.mk files. This is in preparation for
 the ARM architecture to move away from including libgcc function
 and only using self-contained U-Boot functions as done in Linux.
   
why not change the top level Makefile to read:
PLATFORM_LIBGCC ?= ...
   
then any board/arch that doesnt want it can simply do:
PLATFORM_LIBGCC = # dont want it
  
   because you need to provide the equivalent functions for standalone
   application and api and U-Boot ofcourse
 
  so move it to config.mk.  this doesnt change the important point: leave
  PLATFORM_LIBGCC default in the toplevel common files.  what i proposed
  doesnt limit what you want to do with arm in any way.

 I think it's better to let it at arch level and force any new arch adding
 to manage it instead provide a default one

considering most arches want this code, i dont think so.  you're proposing we 
duplicate the same common code in all arches to support one deviating arch -- 
arm.  the defaults should reflect the common state while the deviating ones 
change the behavior as they like.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 5/6] MX31: Add basic support for Freescale i.MX31 PDK board.

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:50 Sat 13 Jun , Magnus Lilja wrote:
 Add support for Freescale's i.MX31 PDK board (a.k.a. 3 stack board).
 
 This patch assumes that some other program performs the actual
 NAND boot.
 
 Signed-off-by: Magnus Lilja lilja.mag...@gmail.com
 ---
  MAINTAINERS   |4 +
  MAKEALL   |1 +
  Makefile  |3 +
  board/freescale/mx31pdk/Makefile  |   52 +++
  board/freescale/mx31pdk/config.mk |1 +
  board/freescale/mx31pdk/mx31pdk.c |   63 +
  include/asm-arm/arch-mx31/mx31-regs.h |2 +
  include/configs/mx31pdk.h |  162 
 +
  8 files changed, 288 insertions(+), 0 deletions(-)
  create mode 100644 board/freescale/mx31pdk/Makefile
  create mode 100644 board/freescale/mx31pdk/config.mk
  create mode 100644 board/freescale/mx31pdk/mx31pdk.c
  create mode 100644 include/configs/mx31pdk.h
 
 diff --git a/MAINTAINERS b/MAINTAINERS
 index 1f6008f..8eb54e1 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -528,6 +528,10 @@ Thomas Elste i...@elste.org
  
   modnet50ARM720T (NET+50)
  
 +Fabio Estevam fabio.este...@freescale.com
 +
 + mx31pdk i.MX31
 +
Fabio could you ack it please
  Peter Figuli pep...@etc.sk
  
   wepep250xscale
 diff --git a/MAKEALL b/MAKEALL
 index f48a08e..0757064 100755
 --- a/MAKEALL
 +++ b/MAKEALL
 @@ -552,6 +552,7 @@ LIST_ARM11=  \
   imx31_phycore   \
   imx31_phycore_eet   \
   mx31ads \
 + mx31pdk \
   qong\
   smdk6400\
  
 diff --git a/Makefile b/Makefile
 index aa4646f..e445e51 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -3115,6 +3115,9 @@ imx31_phycore_config: unconfig
  mx31ads_config   : unconfig
   @$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads freescale mx31
  
 +mx31pdk_config   : unconfig
 + @$(MKCONFIG) $(@:_config=) arm arm1136 mx31pdk freescale mx31
 +
  omap2420h4_config: unconfig
   @$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 NULL omap24xx
  

 --- /dev/null
 +++ b/board/freescale/mx31pdk/mx31pdk.c
 @@ -0,0 +1,63 @@
 +/*
 + *
 + * (C) Copyright 2009 Magnus Lilja lilja.mag...@gmail.com
 + *
 + * (c) 2007 Pengutronix, Sascha Hauer s.ha...@pengutronix.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 common.h
 +#include asm/arch/mx31.h
 +#include asm/arch/mx31-regs.h
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +
 +int dram_init(void)
 +{
 + gd-bd-bi_dram[0].start = PHYS_SDRAM_1;
 + gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 +
 + return 0;
 +}
 +
 +int board_init(void)
 +{
 + /* CS5: CPLD incl. network controller */
 + __REG(CSCR_U(5)) = 0xd843;
we need to remove this __REG
ok for this time but a clean up is really needed

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


Re: [U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 08:57 Sat 20 Jun , Mike Frysinger wrote:
 On Saturday 20 June 2009 07:30:41 Jean-Christophe PLAGNIOL-VILLARD wrote:
  On 07:08 Sat 20 Jun , Mike Frysinger wrote:
   On Saturday 20 June 2009 06:40:07 Jean-Christophe PLAGNIOL-VILLARD wrote:
On 06:18 Sat 20 Jun , Mike Frysinger wrote:
 On Saturday 20 June 2009 05:33:26 Jean-Christophe wrote:
  This patch moves the libgcc Makefile inclusion from the toplevel
  Makefile to the arch_config.mk files. This is in preparation for
  the ARM architecture to move away from including libgcc function
  and only using self-contained U-Boot functions as done in Linux.

 why not change the top level Makefile to read:
 PLATFORM_LIBGCC ?= ...

 then any board/arch that doesnt want it can simply do:
 PLATFORM_LIBGCC = # dont want it
   
because you need to provide the equivalent functions for standalone
application and api and U-Boot ofcourse
  
   so move it to config.mk.  this doesnt change the important point: leave
   PLATFORM_LIBGCC default in the toplevel common files.  what i proposed
   doesnt limit what you want to do with arm in any way.
 
  I think it's better to let it at arch level and force any new arch adding
  to manage it instead provide a default one
 
 considering most arches want this code, i dont think so.  you're proposing we 
 duplicate the same common code in all arches to support one deviating arch -- 
 arm.  the defaults should reflect the common state while the deviating ones 
 change the behavior as they like.
This is where I disagree other arch as mips and other will also need to move 
away
from the needs to include libgcc to be really toolchain independant

I do think it's really important for U-Boot be able to have full control to
have a functions embedded into.

So stop to have libgcc include by default will really reflect it

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


Re: [U-Boot] [PATCH 1/7] mx27: basic cpu support

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
 +
 +#ifndef __ASM_ARCH_CLOCK_H
 +#define __ASM_ARCH_CLOCK_H
 +unsigned int imx_decode_pll(unsigned int pll, unsigned int f_ref);
 +
 +ulong imx_get_mpllclk(void);
I want to have common api scheme so I'll like to have this clock
as the folling scheme (already for at91 as example)

get_arm_clk_rate()
get_spm_clk_rate()
etc...

this could be done in a later patch
I'll add a note in the arm readme
 +ulong imx_get_armclk(void);
 +ulong imx_get_spllclk(void);
 +ulong imx_get_fclk(void);
 +ulong imx_get_hclk(void);
 +ulong imx_get_bclk(void);
 +ulong imx_get_perclk1(void);
 +ulong imx_get_perclk2(void);
 +ulong imx_get_perclk3(void);
 +ulong imx_get_ahbclk(void);

applied to u-boot-arm

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


Re: [U-Boot] [PATCH 2/7] serial_mx31: allow it to work with mx27 too and rename to serial_mxc

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 04:12 Mon 08 Jun , Ilya Yanok wrote:
 UART hardware on i.MX27 is the same as on the i.MX31 so we just
 need to provide the driver with correct address of the registers.
 
IIRC the imx1 share the same too
 Signed-off-by: Ilya Yanok ya...@emcraft.com
 ---
  drivers/serial/Makefile|2 +-
  drivers/serial/{serial_mx31.c = serial_mxc.c} |   21 +
  include/configs/imx31_litekit.h|2 +-
  include/configs/imx31_phycore.h|2 +-
  include/configs/mx31ads.h  |2 +-
  include/configs/qong.h |2 +-
  6 files changed, 26 insertions(+), 5 deletions(-)
  rename drivers/serial/{serial_mx31.c = serial_mxc.c} (94%)
 
 diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
 index 14c818d..9a572e9 100644
 --- a/drivers/serial/Makefile
 +++ b/drivers/serial/Makefile
 @@ -40,7 +40,7 @@ COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
  COBJS-$(CONFIG_KS8695_SERIAL) += serial_ks8695.o
  COBJS-$(CONFIG_LPC2292_SERIAL) += serial_lpc2292.o
  COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 -COBJS-$(CONFIG_MX31_UART) += serial_mx31.o
 +COBJS-$(CONFIG_MXC_UART) += serial_mxc.o
  COBJS-$(CONFIG_NETARM_SERIAL) += serial_netarm.o
  COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
  COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
 diff --git a/drivers/serial/serial_mx31.c b/drivers/serial/serial_mxc.c
 similarity index 94%
 rename from drivers/serial/serial_mx31.c
 rename to drivers/serial/serial_mxc.c
 index 7c0682a..acc5b7d 100644
 --- a/drivers/serial/serial_mx31.c
 +++ b/drivers/serial/serial_mxc.c
 @@ -18,7 +18,12 @@
   */
  
  #include common.h
 +#ifdef CONFIG_MX31
  #include asm/arch/mx31.h
 +#else
 +#include asm/arch/imx-regs.h
 +#include asm/arch/clock.h
 +#endif
  
  #define __REG(x) (*((volatile u32 *)(x)))
  
 @@ -32,6 +37,18 @@
  #define UART_PHYS 0x43fb
  #elif defined(CONFIG_SYS_MX31_UART5)
  #define UART_PHYS 0x43fb4000
 +#elif defined(CONFIG_SYS_MX27_UART1)
 +#define UART_PHYS 0x1000a000
 +#elif defined(CONFIG_SYS_MX27_UART2)
 +#define UART_PHYS 0x1000b000
 +#elif defined(CONFIG_SYS_MX27_UART3)
 +#define UART_PHYS 0x1000c000
 +#elif defined(CONFIG_SYS_MX27_UART4)
 +#define UART_PHYS 0x1000d000
 +#elif defined(CONFIG_SYS_MX27_UART5)
 +#define UART_PHYS 0x1001b000
 +#elif defined(CONFIG_SYS_MX27_UART6)
 +#define UART_PHYS 0x1001c000
  #else
  #error define CONFIG_SYS_MX31_UARTx to use the mx31 UART driver
  #endif
 @@ -149,7 +166,11 @@ DECLARE_GLOBAL_DATA_PTR;
  
  void serial_setbrg (void)
  {
 +#ifdef CONFIG_MX31
   u32 clk = mx31_get_ipg_clk();
 +#else
 + u32 clk = imx_get_perclk1();
 +#endif
here we need to have a common clock rate function name as we do for avr32 
at91

this could done in a next patch but mandatory for other board adding

applied to u-boot-arm

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


Re: [U-Boot] [PATCH 6/7] arm: add support for CONFIG_GENERIC_MMC

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 04:12 Mon 08 Jun , Ilya Yanok wrote:
 Signed-off-by: Ilya Yanok ya...@emcraft.com
 ---
  lib_arm/board.c |7 +++
  1 files changed, 7 insertions(+), 0 deletions(-)
applied to u-boot-arm

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


Re: [U-Boot] [PATCH 4/7] mxc_nand: add nand driver for MX2/MX3

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 04:12 Mon 08 Jun , Ilya Yanok wrote:
 Driver for NFC NAND controller found on Freescale's MX2 and MX3
 processors. Ported from Linux. Tested only with i.MX27 but should
 works with other MX2 and MX3 processors too.
 
 Signed-off-by: Ilya Yanok ya...@emcraft.com
 ---
  drivers/mtd/nand/Makefile   |1 +
  drivers/mtd/nand/mxc_nand.c |  932 
 +++
  2 files changed, 933 insertions(+), 0 deletions(-)
  create mode 100644 drivers/mtd/nand/mxc_nand.c
Scott could you take a look on it?

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


Re: [U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Mike Frysinger
On Saturday 20 June 2009 09:01:36 Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 08:57 Sat 20 Jun , Mike Frysinger wrote:
  On Saturday 20 June 2009 07:30:41 Jean-Christophe PLAGNIOL-VILLARD wrote:
   On 07:08 Sat 20 Jun , Mike Frysinger wrote:
On Saturday 20 June 2009 06:40:07 Jean-Christophe wrote:
 On 06:18 Sat 20 Jun , Mike Frysinger wrote:
  On Saturday 20 June 2009 05:33:26 Jean-Christophe wrote:
   This patch moves the libgcc Makefile inclusion from the
   toplevel Makefile to the arch_config.mk files. This is in
   preparation for the ARM architecture to move away from
   including libgcc function and only using self-contained U-Boot
   functions as done in Linux.
 
  why not change the top level Makefile to read:
  PLATFORM_LIBGCC ?= ...
 
  then any board/arch that doesnt want it can simply do:
  PLATFORM_LIBGCC = # dont want it

 because you need to provide the equivalent functions for standalone
 application and api and U-Boot ofcourse
   
so move it to config.mk.  this doesnt change the important point:
leave PLATFORM_LIBGCC default in the toplevel common files.  what i
proposed doesnt limit what you want to do with arm in any way.
  
   I think it's better to let it at arch level and force any new arch
   adding to manage it instead provide a default one
 
  considering most arches want this code, i dont think so.  you're
  proposing we duplicate the same common code in all arches to support one
  deviating arch -- arm.  the defaults should reflect the common state
  while the deviating ones change the behavior as they like.

 This is where I disagree other arch as mips and other will also need to
 move away from the needs to include libgcc to be really toolchain
 independant

 I do think it's really important for U-Boot be able to have full control to
 have a functions embedded into.

 So stop to have libgcc include by default will really reflect it

so you have two arches (mips/arm) that you dont want to use libgcc.  that is 
still vastly the minority.  if we ever do get most ports not using libgcc, 
then pushing it to the arch configs makes sense.  but we havent and we arent 
even close.

how you want to manage libgcc dependency is your prerogative ... it doesnt 
mean you should be forcing other people to follow suit.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] OMAP3 I2C Fix the sampling clock.

2009-06-20 Thread Nishanth Menon
Tom said the following on 06/20/2009 01:22 PM:
 Menon, Nishanth wrote:
   
 -Original Message-
 From: Tom Rix [mailto:tom@windriver.com]
 Sent: Thursday, June 18, 2009 11:14 PM
 To: u-boot@lists.denx.de; Menon, Nishanth; dirk.be...@googlemail.com
 Cc: Tom Rix
 Subject: [PATCH 1/3] OMAP3 I2C Fix the sampling clock.
 
   
 Acked-by: Nishanth Menonn...@ti.com

 There is one comment below though..
   
 
 Signed-off-by: Tom Rix tom@windriver.com
 ---
  drivers/i2c/omap24xx_i2c.c   |   34 +++-
  include/asm-arm/arch-omap3/i2c.h |   54
 +-
  2 files changed, 74 insertions(+), 14 deletions(-)

 diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
 index 6784603..ecdf1f2 100644
 --- a/drivers/i2c/omap24xx_i2c.c
 +++ b/drivers/i2c/omap24xx_i2c.c
 @@ -31,7 +31,29 @@ static void flush_fifo(void);

  void i2c_init (int speed, int slaveadd)
  {
 -   u16 scl;
 +   int psc, scll, sclh;
 +
 +   /* Only handle standard and fast speeds */
 +   if ((speed != OMAP_I2C_STANDARD) 
 +   (speed != OMAP_I2C_FAST_MODE)) {
 +   printf(Error : I2C unsupported speed %d\n, speed);
 +   return;
 +   }
 +
 
   
 We may want to bring the HSI2C support back in though

   
 
 How about I do this in a later patch?
 The configs I looked at only used the much slower standard speed.
   
Sounds good as long as it is in TODO somewhere.. kinda sad if we talk
400khz to TWL5030 which could go upto 2.4mhz or so..
Regards,
Nishanth Menon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v6] board support patch for phyCORE-MPC5200B-tiny

2009-06-20 Thread Jon Smirl
What is the merge status of this patch?  Can we please get it applied
to the 5xxx tree?

On Sun, Jun 14, 2009 at 6:21 PM, Jon Smirljonsm...@gmail.com wrote:
 Add support for the Phytec phyCORE-MPC5200B-tiny. Code originally from 
 Pengutronix.de.
 Created CONFIG_SYS_ATA_CS_ON_TIMER01 define for when IDE CS is on Timer 0/1

 Signed-off-by: Jon Smirl jonsm...@gmail.com
 ---
  MAINTAINERS                         |    4
  MAKEALL                             |    1
  Makefile                            |    9 +
  board/phytec/pcm030/Makefile        |   50 
  board/phytec/pcm030/config.mk       |   41 +++
  board/phytec/pcm030/mt46v32m16-75.h |   37 +++
  board/phytec/pcm030/pcm030.c        |  220 +
  cpu/mpc5xxx/ide.c                   |    3
  doc/README.phytec.pcm030            |   46 
  include/configs/pcm030.h            |  444 
 +++
  10 files changed, 855 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 doc/README.phytec.pcm030
  create mode 100644 include/configs/pcm030.h

 diff --git a/MAINTAINERS b/MAINTAINERS
 index bba6ce9..bfcd991 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -409,6 +409,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 fd31252..d6b6599 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 4bf4442..8cd99ce 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -696,6 +696,15 @@ 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 
 $(obj)board/phytec/pcm030/config.tmp ; \
 +                 echo ... with LOWBOOT configuration ; \
 +               }
 +       @$(MKCONFIG) -a pcm030 ppc mpc5xxx pcm030 phytec
 +
  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..92fecc6
 --- /dev/null
 +++ b/board/phytec/pcm030/config.mk
 @@ -0,0 +1,41 @@
 +#
 +# (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.
 +#
 

Re: [U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Mike Frysinger
On Saturday 20 June 2009 09:57:51 Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 09:33 Sat 20 Jun , Mike Frysinger wrote:
  On Saturday 20 June 2009 09:01:36 Jean-Christophe PLAGNIOL-VILLARD wrote:
   On 08:57 Sat 20 Jun , Mike Frysinger wrote:
On Saturday 20 June 2009 07:30:41 Jean-Christophe wrote:
 On 07:08 Sat 20 Jun , Mike Frysinger wrote:
  On Saturday 20 June 2009 06:40:07 Jean-Christophe wrote:
   On 06:18 Sat 20 Jun , Mike Frysinger wrote:
On Saturday 20 June 2009 05:33:26 Jean-Christophe wrote:
 This patch moves the libgcc Makefile inclusion from the
 toplevel Makefile to the arch_config.mk files. This is in
 preparation for the ARM architecture to move away from
 including libgcc function and only using self-contained
 U-Boot functions as done in Linux.
   
why not change the top level Makefile to read:
PLATFORM_LIBGCC ?= ...
   
then any board/arch that doesnt want it can simply do:
PLATFORM_LIBGCC = # dont want it
  
   because you need to provide the equivalent functions for
   standalone application and api and U-Boot ofcourse
 
  so move it to config.mk.  this doesnt change the important point:
  leave PLATFORM_LIBGCC default in the toplevel common files.  what
  i proposed doesnt limit what you want to do with arm in any way.

 I think it's better to let it at arch level and force any new arch
 adding to manage it instead provide a default one
   
considering most arches want this code, i dont think so.  you're
proposing we duplicate the same common code in all arches to support
one deviating arch -- arm.  the defaults should reflect the common
state while the deviating ones change the behavior as they like.
  
   This is where I disagree other arch as mips and other will also need to
   move away from the needs to include libgcc to be really toolchain
   independant
  
   I do think it's really important for U-Boot be able to have full
   control to have a functions embedded into.
  
   So stop to have libgcc include by default will really reflect it
 
  so you have two arches (mips/arm) that you dont want to use libgcc.  that
  is still vastly the minority.  if we ever do get most ports not using
  libgcc, then pushing it to the arch configs makes sense.  but we havent
  and we arent even close.

 which minoroty?

the majority use libgcc

 I just give you example but you will see arm, mips, sh, powerpc etc...
 toolchains problem just because we use the libgcc

4 is still the minority, but this is Woflgang's call

 I've patch in qualification for mips and sh so it will not be so long
 maybe 2 or 3 weeks

considering my proposed change is much simpler, and would allow for trivial 
migration as you converted things, it still makes more sense.

  how you want to manage libgcc dependency is your prerogative ... it
  doesnt mean you should be forcing other people to follow suit.

 you can do your own choice but I steel think it's a good improvement

it depends on the arch.  for ones doing stupid things (like arm), thats one 
thing.  but for others, it's simply a waste of time and unnecessary overhead.  
i'm not about to *copy* the exact sources from gcc just to avoid -lgcc.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2 V2] Move libgcc inclusion from common Makefile to platform configs files

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
   
This is where I disagree other arch as mips and other will also need to
move away from the needs to include libgcc to be really toolchain
independant
   
I do think it's really important for U-Boot be able to have full
control to have a functions embedded into.
   
So stop to have libgcc include by default will really reflect it
  
   so you have two arches (mips/arm) that you dont want to use libgcc.  that
   is still vastly the minority.  if we ever do get most ports not using
   libgcc, then pushing it to the arch configs makes sense.  but we havent
   and we arent even close.
 
  which minoroty?
 
 the majority use libgcc
 
  I just give you example but you will see arm, mips, sh, powerpc etc...
  toolchains problem just because we use the libgcc
 
 4 is still the minority, but this is Woflgang's call
 
  I've patch in qualification for mips and sh so it will not be so long
  maybe 2 or 3 weeks
 
 considering my proposed change is much simpler, and would allow for trivial
 migration as you converted things, it still makes more sense.
it's not the size of the change, it's just I do not agree with it

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


Re: [U-Boot] [PATCH 1/3] OMAP3 I2C Fix the sampling clock.

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi,

I'll add a mandatory condition
this code MUST be test on omap2 too

I think the TI's dev could help on this

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


Re: [U-Boot] V3 Zoom hw reset

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:21 Fri 19 Jun , Heiko Schocher wrote:
 Hello Tom,
 
 Tom Rix wrote:
  The i2c patch is a cleaned up version of the one I RFC-ed to the list
  earlier.  It addresses Nishanth's concerns by using the kernel's algorithm
  and by making the major parameters overridable by a board config. 
  Jean's request for no weak function is addressed by this being done only
  with #defines.  I have reverified on the hw listed in the commit. 
  
  The twl4030 patch I don't think anyone had a problem with. 
  
  The twl4030 hw reset has been generalized.  After analyzing beagle 
  schematics, I believe this can be used by anyone with supporting hw.
  So the function stays in power.c and the #ifdef's are removed. 
 
 I think your 3 patches are OK, and if Jean-Christophe give his
 Acked-by, I can add this to the i2c tree and send a pull request
 to Wolfgang, or if Jean-Christophe wants to add this to the arm
 tree I give my Acked-by to your patches.
if it's confirm that it's also work on omap2 Ack

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


Re: [U-Boot] [PATCH-ARM 1/2] Add support for the Embest SBC2440-II Board

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 17:42 Fri 19 Jun , kevin.morf...@fearnside-systems.co.uk wrote:
 This is the first of two patches that will add support for the Embest 
 SBC2440-II Board. This one adds generic support for the S3C2440 CPU. Tested 
 by 
 running MAKEALL for ARM9 boards - no new warnings or errors were found.
 
 This patch set assumes that the following patches have already been applied:
 
 - Clean-up of ARM920T S3C24x0 code, submitted on 5th June
 - Clean-up of ARM920T S3C24x0 drivers code, submitted on 5th June
 - Bug-fix in drivers mtd nand Makefile, submitted on 18th June
 
 Signed-off-by: Kevin Morfitt kevin.morf...@fearnside-systems.co.uk
 ---
  common/serial.c |4 +-
  cpu/arm920t/s3c24x0/speed.c |   38 ++-
  cpu/arm920t/s3c24x0/timer.c |8 +-
  cpu/arm920t/s3c24x0/usb.c   |9 +-
  cpu/arm920t/start.S |   29 -
  drivers/i2c/s3c24x0_i2c.c   |   12 +-
  drivers/mtd/nand/Makefile   |1 +
  drivers/mtd/nand/s3c2410_nand.c |8 +-
  drivers/mtd/nand/s3c2440_nand.c |  241 
 +++
  drivers/rtc/s3c24x0_rtc.c   |2 +
  drivers/serial/serial_s3c24x0.c |2 +
  include/common.h|3 +-
  include/s3c2440.h   |  232 +
  include/s3c24x0.h   |  186 +-
  14 files changed, 745 insertions(+), 30 deletions(-)
  create mode 100644 drivers/mtd/nand/s3c2440_nand.c
  create mode 100644 include/s3c2440.h
first general comment

Please split this patch as something like this
patch 1 add the s3c24x0 support
patch 2 add the nand
patch 3 your boards
 
 diff --git a/common/serial.c b/common/serial.c
 index dd80e7c..6548b8b 100644
 --- a/common/serial.c
 +++ b/common/serial.c
 @@ -58,7 +58,7 @@ struct serial_device *__default_serial_console (void)
  #else
   return serial0_device;
  #endif
 -#elif defined(CONFIG_S3C2410)
 +#elif defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
if it's really s3c24x0 please use a correspondig macro IIRC yes
  #if defined(CONFIG_SERIAL1)
   return s3c24xx_serial0_device;
  #elif defined(CONFIG_SERIAL2)
 @@ -133,7 +133,7 @@ void serial_initialize (void)
  #if defined (CONFIG_STUART)
   serial_register(serial_stuart_device);
  #endif
 -#if defined(CONFIG_S3C2410)
 +#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
ditto
   serial_register(s3c24xx_serial0_device);
   serial_register(s3c24xx_serial1_device);
   serial_register(s3c24xx_serial2_device);
 diff --git a/cpu/arm920t/s3c24x0/speed.c b/cpu/arm920t/s3c24x0/speed.c
 index 3d7c8cf..b8b183e 100644
 --- a/cpu/arm920t/s3c24x0/speed.c
 +++ b/cpu/arm920t/s3c24x0/speed.c
 @@ -30,7 +30,8 @@
   */
  
  #include common.h
 -#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined 
 (CONFIG_TRAB)
 +#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || \
 +defined(CONFIG_S3C2440) || defined(CONFIG_TRAB)
  
  #include asm/io.h
  
 @@ -38,6 +39,8 @@
  #include s3c2400.h
  #elif defined(CONFIG_S3C2410)
  #include s3c2410.h
 +#elif defined(CONFIG_S3C2440)
 +#include s3c2440.h
  #endif
please create a cpu.h file to avoid those ifdef
  
  #define MPLL 0
 @@ -69,6 +72,11 @@ static ulong get_PLLCLK(int pllreg)
   p = ((r  0x003F0)  4) + 2;
   s = r  0x3;
  
 +#ifdef CONFIG_S3C2440
 + if (pllreg == MPLL)
 + return (2 * CONFIG_SYS_CLK_FREQ * m) / (p  s);
 + else
 +#endif
   return (CONFIG_SYS_CLK_FREQ * m) / (p  s);
  }
  
 @@ -83,7 +91,23 @@ ulong get_HCLK(void)
  {
   S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER();
  
 +#ifdef CONFIG_S3C2440
 + switch (clk_power-CLKDIVN  0x6) {
 + default:
 + case 0:
 + return get_FCLK();
 + case 2:
 + return get_FCLK() / 2;
 + case 4:
 + return (readl(clk_power-CAMDIVN)  (1  9)) ?
 + get_FCLK() / 8 : get_FCLK() / 4;
 + case 6:
 + return (readl(clk_power-CAMDIVN)  (1  8)) ?
 + get_FCLK() / 6 : get_FCLK() / 3;
 + }
 +#else
   return (readl(clk_power-CLKDIVN)  2) ? get_FCLK() / 2 : get_FCLK();
 +#endif
  }
  


 diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S
 index 810d402..5f7aa33 100644
 --- a/cpu/arm920t/start.S
 +++ b/cpu/arm920t/start.S
 @@ -132,8 +132,9 @@ copyex:
   bne copyex
  #endif
  
 -#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410)
 - /* turn off the watchdog */
 +#if defined(CONFIG_S3C2400) || \
 +defined(CONFIG_S3C2410) || \
 +defined(CONFIG_S3C2440)
  
please move this code to cpu/arm920t/s3c24x0/

the start.S need to generic but you can call arch code from it
a branch or if not possible a assembly macro

please call it arch_pre_lowlevel_init
tks

  # if defined(CONFIG_S3C2400)
  #  define pWTCON 0x1530
 @@ -146,6 +147,15 @@ copyex:
  #  define CLKDIVN0x4C14  /* clock divisor register */
  # endif
  
 +# if 

Re: [U-Boot] [PATCH] mtd: Update MTD infrastructure to support 64bit device size

2009-06-20 Thread Dirk Behme
Jean-Christophe PLAGNIOL-VILLARD wrote:
 2. C++ style comment. Found by Wolfgang ;)

 3. The major one: By the new 64bit variables, depending on tool chain, 
 there are now calls to libgcc introduced. Depending on tool chain, 
 this might work, or fail. As it does with one of my tool chains, which 
 worked totally fine until here. It was my understanding that U-Boot 
 shall not rely on libgcc, i.e. proper tool chain libraries.

 Having CONFIG_SYS_64BIT_VSPRINTF not defined, the linker needs 
 _lshrdi3, which comes from nand_base.o and nand_bbt.o. E.g. from 
 len = mtd-size  (this-bbt_erase_shift + 2); from nand_bbt.c.

 Having CONFIG_SYS_64BIT_VSPRINTF enabled, the linker requests 
 _lshrdi3, _udivdi3, _umoddi3 and _clz from libgcc.

 Looking into U-Boot's lib_arm/ directory, we have already some low 
 level math functions there to avoid libgcc. E.g. nand_bbt.c has 
 references to _ashrdi3, too, but this is resolved by lib_arm's version 
 what is fine.

 I'd like that NAND code is modified that only math is used which 
 U-Boot provides and no libgcc is needed.
 this is a already known problem by Stefan and I and solved
 
 two patchs was send to the ML 

Thanks for the hint! Do you kindly have the subjects or better links 
to mailing list archive?

Many thanks

Dirk

 and now we are independant of the libgcc
 
 please test the testing branch of the u-boot-arm tree
 
 Best Regards,
 J.
 

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


Re: [U-Boot] [PATCH 1/3] OMAP3 I2C Fix the sampling clock.

2009-06-20 Thread Menon, Nishanth
 -Original Message-
 From: Jean-Christophe PLAGNIOL-VILLARD [mailto:plagn...@jcrosoft.com]
 Sent: Saturday, June 20, 2009 8:19 PM
 To: Tom Rix
 Cc: u-boot@lists.denx.de; Menon, Nishanth; dirk.be...@googlemail.com
 Subject: Re: [U-Boot] [PATCH 1/3] OMAP3 I2C Fix the sampling clock.
   I'll add a mandatory condition
   this code MUST be test on omap2 too
 
   I think the TI's dev could help on this
Would have been great if we had functional omap2 support in mainline - 
2420/2430.. I don't even have one of those boards around :(

Regards,
Nishanth Menon

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


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

2009-06-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 02:32 Fri 19 Jun , Prafulla Wadaskar wrote:
 
  -Original Message-
  From: Prafulla Wadaskar [mailto:prafu...@marvell.com] 
  Sent: Monday, June 08, 2009 5:35 PM
  To: u-boot@lists.denx.de
  Cc: Nicolas Pitre; Manas Saksena; Lennert Buijtenhek; 
  Prabhanjan Sarnaik; Ronen Shitrit; Ashish Karkare; Prafulla Wadaskar
  Subject: [PATCH v4 3/3] 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
  ---
  Change log:
  v2: updated as per feedback for v1
  
  v3: updated as per feedback for v2
  
  v4: removed PHY driver dependency, coded in sheevaplug.c
 
 Hi Jean,
 
 Network driver dependency (2/3) in this patch series is accepted by Ben
 Anther dependency (1/3), the nand driver is all done, waiting for reply from 
 scott.
 Since this is arm board- who will be custodian to accept this patch? are you? 
 :-)
the board I the others as you point Ben and Scott

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


Re: [U-Boot] [PATCH-ARM 1/2] Add support for the Embest SBC2440-II Board

2009-06-20 Thread kevin.morf...@fearnside-systems.co.uk
 @@ static ulong get_PLLCLK(int pllreg)
  p = ((r  0x003F0)  4) + 2;
  s = r  0x3;
  
 +#ifdef CONFIG_S3C2440
 +if (pllreg == MPLL)
 +return (2 * CONFIG_SYS_CLK_FREQ * m) / (p  s);
 +else
 +#endif
  return (CONFIG_SYS_CLK_FREQ * m) / (p  s);
  }
  
 @@ -83,7 +91,23 @@ ulong get_HCLK(void)
  {
  S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER();
  
 +#ifdef CONFIG_S3C2440
 +switch (clk_power-CLKDIVN  0x6) {
 +default:
 +case 0:
 +return get_FCLK();
 +case 2:
 +return get_FCLK() / 2;
 +case 4:
 +return (readl(clk_power-CAMDIVN)  (1  9)) ?
 +get_FCLK() / 8 : get_FCLK() / 4;
 +case 6:
 +return (readl(clk_power-CAMDIVN)  (1  8)) ?
 +get_FCLK() / 6 : get_FCLK() / 3;
 +}
 +#else
  return (readl(clk_power-CLKDIVN)  2) ? get_FCLK() / 2 : get_FCLK();
 +#endif
  }
  
 


   
 diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S
 index 810d402..5f7aa33 100644
 --- a/cpu/arm920t/start.S
 +++ b/cpu/arm920t/start.S
 @@ -132,8 +132,9 @@ copyex:
  bne copyex
  #endif
  
 -#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410)
 -/* turn off the watchdog */
 +#if defined(CONFIG_S3C2400) || \
 +defined(CONFIG_S3C2410) || \
 +defined(CONFIG_S3C2440)
  
 
 please move this code to cpu/arm920t/s3c24x0/

 the start.S need to generic but you can call arch code from it
 a branch or if not possible a assembly macro

 please call it arch_pre_lowlevel_init
 tks
   
OK. I can do something similar to the existing arch-specific
'lowlevel_init'
function call.
   
  # if defined(CONFIG_S3C2400)
  #  define pWTCON0x1530
 @@ -146,6 +147,15 @@ copyex:
  #  define CLKDIVN   0x4C14  /* clock divisor register */
  # endif
  
 +# if defined(CONFIG_S3C2440)
 +#  define INTSMASK  0x
 +#  define CLKDIVVAL 0x5
 +#else
 +#  define INTSMASK  0x3ff
 +#  define CLKDIVVAL 0x3
 +# endif
 +
 +/* turn off the watchdog */
  ldr r0, =pWTCON
  mov r1, #0x0
  str r1, [r0]
 

   
 @@ -156,8 +166,8 @@ copyex:
 
 snip
   
 +
 +/* AC97 INTERFACE (see S3C2440 manual chapter 24) */
 +typedef struct {
 +S3C24X0_REG32 ACGLBCTRL;
 +S3C24X0_REG32 ACGLBSTAT;
 +S3C24X0_REG32 AC_CODEC_CMD;
 +S3C24X0_REG32 AC_CODEC_STAT;
 +S3C24X0_REG32 AC_PCMADDR;
 +S3C24X0_REG32 AC_MICADDR;
 +S3C24X0_REG32 AC_PCMDATA;
 +S3C24X0_REG32 AC_MICDATA;
 +} /*__attribute__((__packed__))*/ S3C2440_AC97;
 
 if no need please remove
   
OK. The ADC isn't used either so I'll remove that as well.

Wolfgang has also asked me to make the CONFIG_SYS_HZ change in the current
s3c2400 and s3c2410 boards before I add support for the s3c2440. I've
already
submitted 5 patches as part of the s3c24x0 clean up and Embest
SBC2440-II Board
so this would make a 6th and it's getting difficult to track them all.

If you agree, I'd like to withdraw the following patches for now as they
all
need changes:

- [U-Boot] [PATCH-ARM] Clean-up of ARM920T S3C24x0 code, submitted on
5th June
- [U-Boot] [PATCH-ARM] Clean-up of ARM920T S3C24x0 drivers code,
submitted on
  5th June
- [U-Boot] [PATCH-ARM 1/2] Add support for the Embest SBC2440-II Board
(ie this
  patch)
- [U-Boot] [PATCH-ARM 2/2] Add support for the Embest SBC2440-II Board,
  submitted on 19th June

I'll create the new CONFIG_SYS_HZ patch and submit it, then make the
required
changes to the 4 patches above, then re-submit these 4 together, probably
marked 1/4, 2/4, 3/4 and 4/4, all version 2.

However, the following patch doesn't need any changes so I'd like to
leave it
out for comment:

- [U-Boot] [PATCH-ARM] Bug-fix in drivers mtd nand Makefile, submitted
on 18th
  June
 
Best Regards
Kevin
 Best Regards,
 J.

 __ Information from ESET NOD32 Antivirus, version of virus signature 
 database 4173 (20090620) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com




   



__ Information from ESET NOD32 Antivirus, version of virus signature 
database 4174 (20090620) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


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


[U-Boot] [PATCH-ARM] CONFIG_SYS_HZ fix for ARM920T S3C24X0 Boards

2009-06-20 Thread kevin.morf...@fearnside-systems.co.uk
This sets CONFIG_SYS_HZ to 1000 for all boards that use the s3c2400 and 
s3c2410 cpu's.

Tested on an Embest SBC2440-II Board with local u-boot patches as I don't 
have any s3c2400 or s3c2410 boards but need this patch applying before I can 
submit patches for thge SBC2440-II Board.

Also, ran MAKEALL for all ARM9 targets and no new warnings or errors were found.

Note that the existing code modified by this patch does not meet the u-boot 
coding style but I'd like to handle this separately and submit patches to fix 
this later.

Signed-off-by: Kevin Morfitt kevin.morf...@fearnside-systems.co.uk
---
 cpu/arm920t/s3c24x0/timer.c |   42 ++
 include/configs/sbc2410x.h  |4 +---
 include/configs/smdk2400.h  |4 +---
 include/configs/smdk2410.h  |4 +---
 include/configs/trab.h  |   12 +---
 5 files changed, 30 insertions(+), 36 deletions(-)
 mode change 100644 = 100755 cpu/arm920t/s3c24x0/timer.c
 mode change 100644 = 100755 include/configs/sbc2410x.h
 mode change 100644 = 100755 include/configs/smdk2400.h
 mode change 100644 = 100755 include/configs/smdk2410.h
 mode change 100644 = 100755 include/configs/trab.h

diff --git a/cpu/arm920t/s3c24x0/timer.c b/cpu/arm920t/s3c24x0/timer.c
old mode 100644
new mode 100755
index f0a09cd..8ea2e4b
--- a/cpu/arm920t/s3c24x0/timer.c
+++ b/cpu/arm920t/s3c24x0/timer.c
@@ -38,7 +38,9 @@
 #include s3c2410.h
 #endif
 
+static unsigned long get_timer_raw(void);
 int timer_load_val = 0;
+static ulong timer_clk;
 
 /* macro to read the 16 bit timer */
 static inline ulong READ_TIMER(void)
@@ -66,6 +68,7 @@ int timer_init (void)
 * @33.25MHz and 15625 @ 50 MHz
 */
timer_load_val = get_PCLK()/(2 * 16 * 100);
+   timer_clk = get_PCLK() / (2 * 16);
}
/* load value for 10 ms timeout */
lastdec = timers-TCNTB4 = timer_load_val;
@@ -100,13 +103,13 @@ void set_timer (ulong t)
 void udelay (unsigned long usec)
 {
ulong tmo;
-   ulong start = get_timer(0);
+   ulong start = get_timer_raw();
 
tmo = usec / 1000;
tmo *= (timer_load_val * 100);
tmo /= 1000;
 
-   while ((ulong)(get_timer_masked () - start)  tmo)
+   while ((ulong) (get_timer_raw() - start)  tmo)
/*NOP*/;
 }
 
@@ -119,18 +122,9 @@ void reset_timer_masked (void)
 
 ulong get_timer_masked (void)
 {
-   ulong now = READ_TIMER();
+   ulong tmr = get_timer_raw();
 
-   if (lastdec = now) {
-   /* normal mode */
-   timestamp += lastdec - now;
-   } else {
-   /* we have an overflow ... */
-   timestamp += lastdec + timer_load_val - now;
-   }
-   lastdec = now;
-
-   return timestamp;
+   return tmr / (timer_clk / CONFIG_SYS_HZ);
 }
 
 void udelay_masked (unsigned long usec)
@@ -148,21 +142,37 @@ void udelay_masked (unsigned long usec)
tmo /= (1000*1000);
}
 
-   endtime = get_timer_masked () + tmo;
+   endtime = get_timer_raw() + tmo;
 
do {
-   ulong now = get_timer_masked ();
+   ulong now = get_timer_raw();
diff = endtime - now;
} while (diff = 0);
 }
 
+static unsigned long get_timer_raw(void)
+{
+   ulong now = READ_TIMER();
+
+   if (lastdec = now) {
+   /* normal mode */
+   timestamp += lastdec - now;
+   } else {
+   /* we have an overflow ... */
+   timestamp += lastdec + timer_load_val - now;
+   }
+   lastdec = now;
+
+   return timestamp;
+}
+
 /*
  * This function is derived from PowerPC code (read timebase as long long).
  * On ARM it just returns the timer value.
  */
 unsigned long long get_ticks(void)
 {
-   return get_timer(0);
+   return get_timer_raw();
 }
 
 /*
diff --git a/include/configs/sbc2410x.h b/include/configs/sbc2410x.h
old mode 100644
new mode 100755
index eab9629..e8afa50
--- a/include/configs/sbc2410x.h
+++ b/include/configs/sbc2410x.h
@@ -138,9 +138,7 @@
 
 #defineCONFIG_SYS_LOAD_ADDR0x3300  /* default load 
address */
 
-/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */
-/* it to wrap 100 times (total 1562500) to get 1 sec. */
-#defineCONFIG_SYS_HZ   1562500
+#defineCONFIG_SYS_HZ   1000
 
 /* valid baudrates */
 #define CONFIG_SYS_BAUDRATE_TABLE  { 9600, 19200, 38400, 57600, 115200 }
diff --git a/include/configs/smdk2400.h b/include/configs/smdk2400.h
old mode 100644
new mode 100755
index b712db4..22b88ae
--- a/include/configs/smdk2400.h
+++ b/include/configs/smdk2400.h
@@ -140,9 +140,7 @@
 
 #defineCONFIG_SYS_LOAD_ADDR0x0cf0  /* default load 
address */
 
-/* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */
-/* it to wrap 100 times (total 1562500) to get 1 sec. */
-#defineCONFIG_SYS_HZ   

[U-Boot] Problem building tools directory

2009-06-20 Thread Gary Carlson
Hello,

I am having a problem building the u-boot tools directory on a Mac.  I have
been doing some troubleshooting this afternoon but haven't quite been able
to find a solution that doesn't break somewhere else.

The make utility and I have a long distaste for each other, even though I
realize it is a necessary evil.  I hoping that someone can follow several
tests I generated below to help explain the behavior.

If I run Œmake tools¹ (with gnu make version 3.81) it hums along shortly and
then bombs out:

make -C tools all
cc -Wall -pedantic -idirafter
/Users/garycarlson/Documents/Embedded/u-boot-at91/include -idirafter
/Users/garycarlson/Documents/Embedded/u-boot-at91/include2 -idirafter
/Users/garycarlson/Documents/Embedded/u-boot-at91/include -I
/Users/garycarlson/Documents/Embedded/u-boot-at91/libfdt -I
/Users/garycarlson/Documents/Embedded/u-boot-at91/tools
-DTEXT_BASE=0x23f0 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o crc32.o
crc32.c
i686-apple-darwin9-gcc-4.0.1: crc32.c: No such file or directory

No big surprise there, since crc32.c is not in the tools directory but
rather in the lib_generic directory.  I would expect the compiler syntax as
emitted above to fail.  However the make file located in the tools directory
has a rule to address this that seems to be ignored:

$(obj)%.o: $(SRCTREE)/lib_generic/%.c
$(CC) -g $(CFLAGS) -c -o $@ $

Now if I create a test rule for troubleshooting purposes that replaces the
pattern substitution with a hardcoded rule, it works differently:

$(obj)crc32.o: $(SRCTREE)/lib_generic/crc32.c
$(CC) -g $(CFLAGS) -c -o $@ $

This results in at least the crc32.c file compiling cleanly (the remaining
files like md5, etc. that are not covered by the test rule still fail of
course):

make -C tools all
cc -g -Wall -pedantic -idirafter
/Users/garycarlson/Documents/Embedded/u-boot-at91/include -idirafter
/Users/garycarlson/Documents/Embedded/u-boot-at91/include2 -idirafter
/Users/garycarlson/Documents/Embedded/u-boot-at91/include -I
/Users/garycarlson/Documents/Embedded/u-boot-at91/libfdt -I
/Users/garycarlson/Documents/Embedded/u-boot-at91/tools
-DTEXT_BASE=0x23f0 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o crc32.o
/Users/garycarlson/Documents/Embedded/u-boot-at91/lib_generic/crc32.c

Note that the crc32.c file is now referenced to the correct directory.  My
first instinct is to want to blame this as bug in the make tool, but given
that it isn't one of my strengths, maybe someone else will see something
that I don't!  :)

Thanks,


Gary






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