Re: [U-Boot] [PATCH] arm: unify lds

2009-05-08 Thread Alessandro Rubini
> Due to ML limitation
> I've reduce the content of the patch to show only the Copyright
> [...]

Thanks. Could you please post Where the full patch is, in order to
try it?

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


Re: [U-Boot] Unable to debug UBOOT

2009-05-08 Thread Vivek DALAL
Thanks for your help guys.
I will looking into all the pointers you guys had given...

thanks alot

Vivek Dalal
On Fri, May 8, 2009 at 8:31 PM, alfred steele wrote:

> > Looks like you are reinitializing the DDR , when u are already executing
> > from it, you may want to comment out that code, which initializes DDR.
> To add to that, if you have cloned code for an already existing
> platform config file, See if the "CONFIG_SKIP_RELOCATE_UBOOT" and
> "CONFIG_SKIP_LOWLEVEL_INIT" flags in your config file(include/configs)
> are enabled. If these flags are not enabled, you might need to enable
> them,s o that the early initialization code is skipped.
>
> Thanks.
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/2 v2] OMAP3: Minor code clean up, no functional change

2009-05-08 Thread Dirk Behme
This patch series contains only minor code clean up, no functional changes.

Complete patch series boot tested on OMAP3 BeagleBoard and compile
tested with ./MAKEALL ARM_CORTEX_A8.

Note: The third patch [3] is removed from this series, as Jean-Christophe
  wants to do the rename interrupts.c -> timer.c and the Makefile
  fix for this in an overall patch.

Best regards

Dirk

[1] http://lists.denx.de/pipermail/u-boot/2009-May/052127.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2 v2] OMAP3: Reorganize Makefile style

2009-05-08 Thread Dirk Behme
Reformat COBJS handling.

From: Jean-Christophe PLAGNIOL-VILLARD 
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD 
Signed-off-by: Dirk Behme 
---

Changes in v2: Rebase to interrupts.o instead of timer.o

 cpu/arm_cortexa8/omap3/Makefile |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Index: u-boot-main/cpu/arm_cortexa8/omap3/Makefile
===
--- u-boot-main.orig/cpu/arm_cortexa8/omap3/Makefile
+++ u-boot-main/cpu/arm_cortexa8/omap3/Makefile
@@ -26,7 +26,13 @@ include $(TOPDIR)/config.mk
 LIB=  $(obj)lib$(SOC).a
 
 SOBJS  := lowlevel_init.o
-COBJS  := sys_info.o board.o clock.o interrupts.o mem.o syslib.o
+
+COBJS  += board.o
+COBJS  += clock.o
+COBJS  += mem.o
+COBJS  += syslib.o
+COBJS  += sys_info.o
+COBJS  += interrupts.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2 v2] OMAP3: Remove dublicated interrupt code

2009-05-08 Thread Dirk Behme
Remove duplicated interrupt code. Original, identical code can be found
in lib_arm/interrupts.c

From: Jean-Christophe PLAGNIOL-VILLARD 
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD 
Signed-off-by: Dirk Behme 
---
 cpu/arm_cortexa8/omap3/interrupts.c |  128 
 1 file changed, 128 deletions(-)

Index: u-boot-main/cpu/arm_cortexa8/omap3/interrupts.c
===
--- u-boot-main.orig/cpu/arm_cortexa8/omap3/interrupts.c
+++ u-boot-main/cpu/arm_cortexa8/omap3/interrupts.c
@@ -34,134 +34,6 @@
 
 #include 
 #include 
-#include 
-
-#ifdef CONFIG_USE_IRQ
-/* enable IRQ interrupts */
-void enable_interrupts(void)
-{
-   unsigned long temp;
-   __asm__ __volatile__("mrs %0, cpsr\n"
-"bic %0, %0, #0x80\n" "msr cpsr_c, %0":"=r"(temp)
-::"memory");
-}
-
-/*
- * disable IRQ/FIQ interrupts
- * returns true if interrupts had been enabled before we disabled them
- */
-int disable_interrupts(void)
-{
-   unsigned long old, temp;
-   __asm__ __volatile__("mrs %0, cpsr\n"
-"orr %1, %0, #0xc0\n"
-"msr cpsr_c, %1":"=r"(old), "=r"(temp)
-::"memory");
-   return (old & 0x80) == 0;
-}
-#else
-void enable_interrupts(void)
-{
-   return;
-}
-int disable_interrupts(void)
-{
-   return 0;
-}
-#endif
-
-void bad_mode(void)
-{
-   panic("Resetting CPU ...\n");
-   reset_cpu(0);
-}
-
-void show_regs(struct pt_regs *regs)
-{
-   unsigned long flags;
-   const char *processor_modes[] = {
-   "USER_26", "FIQ_26", "IRQ_26", "SVC_26",
-   "UK4_26", "UK5_26", "UK6_26", "UK7_26",
-   "UK8_26", "UK9_26", "UK10_26", "UK11_26",
-   "UK12_26", "UK13_26", "UK14_26", "UK15_26",
-   "USER_32", "FIQ_32", "IRQ_32", "SVC_32",
-   "UK4_32", "UK5_32", "UK6_32", "ABT_32",
-   "UK8_32", "UK9_32", "UK10_32", "UND_32",
-   "UK12_32", "UK13_32", "UK14_32", "SYS_32",
-   };
-
-   flags = condition_codes(regs);
-
-   printf("pc : [<%08lx>]lr : [<%08lx>]\n"
-   "sp : %08lx  ip : %08lx  fp : %08lx\n",
-   instruction_pointer(regs),
-   regs->ARM_lr, regs->ARM_sp, regs->ARM_ip, regs->ARM_fp);
-   printf("r10: %08lx  r9 : %08lx  r8 : %08lx\n",
-   regs->ARM_r10, regs->ARM_r9, regs->ARM_r8);
-   printf("r7 : %08lx  r6 : %08lx  r5 : %08lx  r4 : %08lx\n",
-   regs->ARM_r7, regs->ARM_r6, regs->ARM_r5, regs->ARM_r4);
-   printf("r3 : %08lx  r2 : %08lx  r1 : %08lx  r0 : %08lx\n",
-   regs->ARM_r3, regs->ARM_r2, regs->ARM_r1, regs->ARM_r0);
-   printf("Flags: %c%c%c%c",
-   flags & CC_N_BIT ? 'N' : 'n',
-   flags & CC_Z_BIT ? 'Z' : 'z',
-   flags & CC_C_BIT ? 'C' : 'c', flags & CC_V_BIT ? 'V' : 'v');
-   printf("  IRQs %s  FIQs %s  Mode %s%s\n",
-   interrupts_enabled(regs) ? "on" : "off",
-   fast_interrupts_enabled(regs) ? "on" : "off",
-   processor_modes[processor_mode(regs)],
-   thumb_mode(regs) ? " (T)" : "");
-}
-
-void do_undefined_instruction(struct pt_regs *pt_regs)
-{
-   printf("undefined instruction\n");
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_software_interrupt(struct pt_regs *pt_regs)
-{
-   printf("software interrupt\n");
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_prefetch_abort(struct pt_regs *pt_regs)
-{
-   printf("prefetch abort\n");
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_data_abort(struct pt_regs *pt_regs)
-{
-   printf("data abort\n");
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_not_used(struct pt_regs *pt_regs)
-{
-   printf("not used\n");
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_fiq(struct pt_regs *pt_regs)
-{
-   printf("fast interrupt request\n");
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_irq(struct pt_regs *pt_regs)
-{
-   printf("interrupt request\n");
-   show_regs(pt_regs);
-   bad_mode();
-}
-
 
 static ulong timestamp;
 static ulong lastinc;
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] arm: unify lds

2009-05-08 Thread Jean-Christophe PLAGNIOL-VILLARD
all arm boards except a few use the same cpu lds so move it to cpu/$(CPU)

that could be overwrite in following order
SOC
BOARD
via the corresponding config.mk

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD 
---
Due to ML limitation
I've reduce the content of the patch to show only the Copyright
of the removed file
btw all copyrights have been respected and now merged in the final lds


Best Regards,
J.
 arm_config.mk   |2 +
 board/actux1/config.mk  |2 +
 board/actux2/config.mk  |2 +
 board/actux3/config.mk  |2 +
 board/actux4/u-boot.lds |   66 --
 board/armadillo/u-boot.lds  |   55 --
 board/armltd/integratorap/config.mk |6 --
 board/armltd/integratorap/split_by_variant.sh   |4 -
 board/armltd/integratorap/u-boot.lds.template   |   53 -
 board/armltd/integratorcp/config.mk |6 --
 board/armltd/integratorcp/split_by_variant.sh   |4 -
 board/armltd/integratorcp/u-boot.lds.template   |   53 -
 board/armltd/versatile/u-boot.lds   |   51 -
 board/atmel/at91rm9200dk/u-boot.lds |   57 ---
 board/atmel/at91rm9200ek/u-boot.lds |   56 --
 board/cerf250/u-boot.lds|   56 --
 board/cm4008/u-boot.lds |   56 --
 board/cm41xx/u-boot.lds |   56 --
 board/cmc_pu2/u-boot.lds|   57 ---
 board/cradle/u-boot.lds |   56 --
 board/csb226/u-boot.lds |   56 --
 board/csb637/u-boot.lds |   56 --
 board/dave/B2/u-boot.lds|   58 ---
 board/davedenx/qong/u-boot.lds  |   58 ---
 board/delta/u-boot.lds  |   56 --
 board/dnp1110/u-boot.lds|   56 --
 board/ep7312/u-boot.lds |   56 --
 board/evb4510/u-boot.lds|   69 ---
 board/freescale/mx31ads/config.mk   |2 +
 board/gcplus/u-boot.lds |   58 ---
 board/impa7/u-boot.lds  |   56 --
 board/imx31_litekit/u-boot.lds  |   59 ---
 board/imx31_phycore/u-boot.lds  |   59 ---
 board/innokom/u-boot.lds|   56 --
 board/kb9202/u-boot.lds |   56 --
 board/lart/u-boot.lds   |   56 --
 board/logodl/u-boot.lds |   56 --
 board/lpc2292sodimm/u-boot.lds  |   55 --
 board/lubbock/u-boot.lds|   56 --
 board/m501sk/u-boot.lds |   55 --
 board/modnet50/u-boot.lds   |   69 ---
 board/mp2usb/u-boot.lds |   56 --
 board/mpl/vcma9/u-boot.lds  |   57 ---
 board/mx1ads/u-boot.lds |   58 ---
 board/netstar/u-boot.lds|   55 --
 board/ns9750dev/u-boot.lds  |   59 ---
 board/omap1510inn/u-boot.lds|   57 ---
 board/omap2420h4/u-boot.lds |   59 ---
 board/pleb2/u-boot.lds  |   56 --
 board/prodrive/pdnb3/u-boot.lds |   56 --
 board/samsung/smdk2400/u-boot.lds   |   57 ---
 board/samsung/smdk2410/u-boot.lds   |   57 ---
 board/samsung/smdk6400/config.mk|2 +
 board/sbc2410x/u-boot.lds   |   56 --
 board/shannon/u-boot.lds|   56 --
 board/siemens/SMN42/u-boot.lds  |   55 --
 board/sx1/u-boot.lds|   57 ---
 board/trab/config.mk|2 +
 board/trizepsiv/u-boot.lds  |   56 --
 board/voiceblue/u-boot.lds  |   56 --
 board/wepep250/u-boot.lds   |   56 --
 board/xaeniax/u-boot.lds|   56 --
 board/xsengine/u-boot.lds   |   56 --
 board/zylonite/u-boot.l

Re: [U-Boot] [PATCH 09/10] mmc: fix mmcinfo command

2009-05-08 Thread Andy Fleming
On Wed, May 6, 2009 at 1:30 PM, Ilya Yanok  wrote:
> cid field of stuct mmc stucture is char*, not u32*. so we need to
> convert the pointer for mmcinfo code to work correctly.

Yup, this one, too.  Already in my tree.

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


Re: [U-Boot] [PATCH 08/10] mmc: some endianess fixes for generic mmc subsystem

2009-05-08 Thread Andy Fleming
On Wed, May 6, 2009 at 1:30 PM, Ilya Yanok  wrote:
> We save response in the cpu order so we need to parse it in the
> cpu order too. Things fixed by this patch:
> 1. OCR_BUSY should be the highest bit in 32-bit response.
> 2. Proper "tran speed" calculation on LE systems (tran_exp and
>   tran_mant should be in 96..98 and 99..102 bits of 128-bit
>   response respectively).
> 3. Proper MMC version detection.

I believe all of these changes are in my tree, as well.

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


Re: [U-Boot] [PATCH 07/10] mmc: use lldiv() for 64-bit division

2009-05-08 Thread Andy Fleming
On Wed, May 6, 2009 at 1:30 PM, Ilya Yanok  wrote:
> Signed-off-by: Ilya Yanok 

This is actually already in my tree.  So I'll just take this
opportunity to shake my head at ARM ABI designers, who thought 64-bit
division was too hard to do in the compiler...

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


Re: [U-Boot] [PATCH 5/6] ZOOM2 Add serial support.

2009-05-08 Thread Tom
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 16:28 Thu 07 May , Tom Rix wrote:
>   
>> Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board.
>> The default serial is from the USB connector on left side of the debug board.
>> The USB connector will produce 2 of the 4 UARTS.  On your host pick the first
>> enumeration.
>>
>> The serial port set up is the same with Zoom1.
>> Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.
>>
>> The kernel bootargs are
>> console=ttyS3,115200n8
>>
>> Signed-off-by: Tom Rix 
>> ---
>>  board/omap3/zoom2/Makefile   |3 +-
>>  board/omap3/zoom2/zoom2.c|   35 ++
>>  board/omap3/zoom2/zoom2_serial.c |  130 
>> ++
>>  board/omap3/zoom2/zoom2_serial.h |   75 ++
>>  common/serial.c  |2 +
>>  drivers/serial/ns16550.c |4 +-
>>  include/configs/omap3_zoom2.h|   26 
>>  include/serial.h |7 ++
>>  8 files changed, 266 insertions(+), 16 deletions(-)
>>  create mode 100644 board/omap3/zoom2/zoom2_serial.c
>>  create mode 100644 board/omap3/zoom2/zoom2_serial.h
>>
>> diff --git a/board/omap3/zoom2/Makefile b/board/omap3/zoom2/Makefile
>> index b8fa5a7..d27990c 100644
>> --- a/board/omap3/zoom2/Makefile
>> +++ b/board/omap3/zoom2/Makefile
>> @@ -26,7 +26,8 @@ include $(TOPDIR)/config.mk
>>  LIB = $(obj)lib$(BOARD).a
>>  
>>  COBJS   := zoom2.o \
>> -debug_board.o
>> +debug_board.o \
>> +zoom2_serial.o
>>  
>>  SRCS:= $(COBJS:.o=.c)
>>  OBJS:= $(addprefix $(obj),$(COBJS))
>> diff --git a/board/omap3/zoom2/zoom2.c b/board/omap3/zoom2/zoom2.c
>> index 0700c56..dd0086c 100644
>> --- a/board/omap3/zoom2/zoom2.c
>> +++ b/board/omap3/zoom2/zoom2.c
>> @@ -30,10 +30,29 @@
>>   */
>>  #include 
>>  #include 
>> +#include 
>>  #include 
>>  #include 
>>  #include 
>>  #include "zoom2.h"
>> +#include "zoom2_serial.h"
>> +
>> +/*
>> + * This the the zoom2, board specific, gpmc configuration for the
>> + * quad uart on the debug board.   The more general gpmc configurations
>> + * are setup at the cpu level in cpu/arm_cortexa8/omap3/mem.c
>> + */
>> +extern void enable_gpmc_config(u32 *gpmc_config, gpmc_csx_t *gpmc_cs_base,
>> +   u32 base, u32 size);
>> +
>> +static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = {
>> +0x00011000,
>> +0x001F1F01,
>> +0x00080803,
>> +0x1D091D09,
>> +0x041D1F1F,
>> +0x1D0904C4, 0
>> +};
>>  
>> 
> Any chance to have comment at least about these value?
>   
Sorry. I was given these numbers. I asked and did not get a reply.
I will ask again.

> Best Regards,
> J.
>   

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


Re: [U-Boot] usbtty Support on AT91SAM9XXX chipsets

2009-05-08 Thread Remy Bohmer
Hello Daniel,

> I am interested in getting usbtty support running on an AT91SAM9G20
> board.  I have picked up the latest code on the CDC head on the
> u-boot-usb GIT tree and am currently attempting to get the CDC-Ether
> support up and running (merging various changes from the 9261 board to
> the 9260).

Great! If you have patches, please sent them in!

> 1.      usbtty.c uses a global function call based UDC framework
> (udc_init, udc_endpoint_read|write etc)
> 2.      This framework is implemented on the older UDC devices
> (omap1510_udc.c, pxa27x_udh.c & mpc8xx_udc.c) but is not implemented on
> at91_udc.c.
> 3.      drivers/usb/gadget/ether.c uses a new (Linux derived?) USB
> gadget framework based on registering function tables and accessing via
> helper functions in gadget.h.
> 4.      at91_udc.c is implemented to this framework.

It is indeed a Linux derived layer for getting USB-CDC going in U-boot.
The focus on the port was to get USB-CDC-Ethernet going, not _yet_
supporting serial terminals.
A serial console might behave somewhat different. Serial console needs
to be up all the time as long as u-boot is active, while the
CDC-ethernet connection only when there is network traffic. So, the
use of both pieces of code are somewhat different.

> Hence omap1510, pxa27x & mpc8xx support USB TTY operation and at91
> supports ethernet operation but other combinations are not currently
> possible.
> Please could someone advise on the best way forward, initially I can
> think of a couple of options as follows:

Okay.

> 1.      create a wrapper that implements the old framework functions
> (udc_init, udc_endpoint_read|write etc) and simply maps them on to the
> new framework.
> 2.      import the appropriate TTY gadget implementation from Linux (as
> for ether.c) and get it working and registered as a proper device.

The new framework was _not_ meant _yet_ as a replacement for usbtty code.
As mentioned above the goal was network traffic over USB. We choose to
integrate the complete gadget layer as well to make integration of
other class drivers easier, and to stay closer to the original code.

> I suspect 2 is the better option and the way that the project was
> moving, but I thought I'd check if this was the way to go and whether
> anyone else had made any progress in this area.

There are indeed 2 routes:
1. If you need a serial console, you can still use it with the older
usbtty code.
2. Adapt the new CDC layer such that it becomes suitable for console
purposes as well. I would be happy integrating patches for this in the
USB branch. That would allow us to migrate to 1 usb-gadget layer in
the future which can be kept close to the linux development.

> Also, if this is the
> way to go, could someone confirm which version of the Linux Gadget
> framework ether.c and friends are based on.  It appears to be completely
> different to the latest version.

It is a port from Linux 2.6.27 to U-boot.
Latest kernel changes are not integrated yet. But the port was kept
quite close to the original code to make it easier to upgrade later
on.

Kind Regards,

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


Re: [U-Boot] [PATCH 6/6] ZOOM2 Add led support.

2009-05-08 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:28 Thu 07 May , Tom Rix wrote:
> This patch controls the large LED on the top left of the zoom2.
> 
> Signed-off-by: Tom Rix 
> ---
ok

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


Re: [U-Boot] [PATCH 5/6] ZOOM2 Add serial support.

2009-05-08 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:28 Thu 07 May , Tom Rix wrote:
> Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board.
> The default serial is from the USB connector on left side of the debug board.
> The USB connector will produce 2 of the 4 UARTS.  On your host pick the first
> enumeration.
> 
> The serial port set up is the same with Zoom1.
> Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.
> 
> The kernel bootargs are
> console=ttyS3,115200n8
> 
> Signed-off-by: Tom Rix 
> ---
>  board/omap3/zoom2/Makefile   |3 +-
>  board/omap3/zoom2/zoom2.c|   35 ++
>  board/omap3/zoom2/zoom2_serial.c |  130 
> ++
>  board/omap3/zoom2/zoom2_serial.h |   75 ++
>  common/serial.c  |2 +
>  drivers/serial/ns16550.c |4 +-
>  include/configs/omap3_zoom2.h|   26 
>  include/serial.h |7 ++
>  8 files changed, 266 insertions(+), 16 deletions(-)
>  create mode 100644 board/omap3/zoom2/zoom2_serial.c
>  create mode 100644 board/omap3/zoom2/zoom2_serial.h
> 
> diff --git a/board/omap3/zoom2/Makefile b/board/omap3/zoom2/Makefile
> index b8fa5a7..d27990c 100644
> --- a/board/omap3/zoom2/Makefile
> +++ b/board/omap3/zoom2/Makefile
> @@ -26,7 +26,8 @@ include $(TOPDIR)/config.mk
>  LIB  = $(obj)lib$(BOARD).a
>  
>  COBJS:= zoom2.o \
> - debug_board.o
> + debug_board.o \
> + zoom2_serial.o
>  
>  SRCS := $(COBJS:.o=.c)
>  OBJS := $(addprefix $(obj),$(COBJS))
> diff --git a/board/omap3/zoom2/zoom2.c b/board/omap3/zoom2/zoom2.c
> index 0700c56..dd0086c 100644
> --- a/board/omap3/zoom2/zoom2.c
> +++ b/board/omap3/zoom2/zoom2.c
> @@ -30,10 +30,29 @@
>   */
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
>  #include "zoom2.h"
> +#include "zoom2_serial.h"
> +
> +/*
> + * This the the zoom2, board specific, gpmc configuration for the
> + * quad uart on the debug board.   The more general gpmc configurations
> + * are setup at the cpu level in cpu/arm_cortexa8/omap3/mem.c
> + */
> +extern void enable_gpmc_config(u32 *gpmc_config, gpmc_csx_t *gpmc_cs_base,
> +u32 base, u32 size);
> +
> +static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = {
> + 0x00011000,
> + 0x001F1F01,
> + 0x00080803,
> + 0x1D091D09,
> + 0x041D1F1F,
> + 0x1D0904C4, 0
> +};
>  
Any chance to have comment at least about these value?

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/3] OMAP3: Rename interrupts.c to timer.c

2009-05-08 Thread Wolfgang Denk
Dear Dirk,

In message <4a04540f.10...@googlemail.com> you wrote:
> 
> > Btw please use git to show that you only rename the file without change
> 
> I'm not sure that this works for non-custodians. Custodians can do 
> git-rename and then send a patch to the mailing list. When a custodian 
> sends such a patch, it is mainly for review only, and not to be 
> applied somewhere (because it is already in git).

In which way is this rtestricted to custodians? everybody can do the
same in his own git repositories and use this to provide patches and
statistics.

> (from [1]). But this is only what normally 'diffstat' generates and 
> what is totally ignored by 'patch' . I.e. in the part of the patch 

We don't use plain old "patch", we use git tools (like "git am"). And
these do understand about rename patches.

> which is handled by 'patch' this info is totally missing. As far as I 
> know 'patch' itself can't deal with file rename any other way than 
> remove one file and create the other one with

That's why we use git.

> So it's my understanding that non-custodians have to send a patch 
> which can be applied everywhere by everyone by 'patch' utility, i.e. 
> the part 'patch' deals with contains all information necessary.
> 
> Do I miss anything?

Yes, you are missing that we use git these days, and git is more
powerful.

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
In the beginning, there was nothing, which exploded.
- Terry Pratchett, _Lords and Ladies_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4] ARM DaVinci Adding DM357 Support

2009-05-08 Thread s-paulraj
Patch adds Support for DaVinci DM357.
It boots of a small page NAND on the EVM. It does not have NOR support.
This patch has been tested on the DM357 EVM.
The patch does not have Ethernet Support yet.
Ethernet Support will be added soon

Signed-off-by: Sandeep Paulraj 
---
 Makefile|3 +
 board/davinci/dm357_evm/Makefile|   50 
 board/davinci/dm357_evm/config.mk   |   39 +
 board/davinci/dm357_evm/dm357_evm.c |   69 
 include/configs/davinci_dm357_evm.h |  146 +++
 5 files changed, 307 insertions(+), 0 deletions(-)
 create mode 100644 board/davinci/dm357_evm/Makefile
 create mode 100644 board/davinci/dm357_evm/config.mk
 create mode 100644 board/davinci/dm357_evm/dm357_evm.c
 create mode 100644 include/configs/davinci_dm357_evm.h

diff --git a/Makefile b/Makefile
index 137c88f..6ee0562 100644
--- a/Makefile
+++ b/Makefile
@@ -2790,6 +2790,9 @@ davinci_sffsdr_config :   unconfig
 davinci_sonata_config :unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
+davinci_dm357_evm_config : unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs dm357_evm davinci davinci
+
 lpd7a400_config \
 lpd7a404_config:   unconfig
@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
diff --git a/board/davinci/dm357_evm/Makefile b/board/davinci/dm357_evm/Makefile
new file mode 100644
index 000..b10da38
--- /dev/null
+++ b/board/davinci/dm357_evm/Makefile
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# Copyright (C) 2007 Sergey Kubushyn 
+#
+# 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  := dm357_evm.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/dm357_evm/config.mk 
b/board/davinci/dm357_evm/config.mk
new file mode 100644
index 000..aa89d0e
--- /dev/null
+++ b/board/davinci/dm357_evm/config.mk
@@ -0,0 +1,39 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, 
+# David Mueller, ELSOFT AG, 
+#
+# (C) Copyright 2003
+# Texas Instruments, 
+# Swaminathan 
+#
+# Davinci EVM board (ARM925EJS) cpu
+# see http://www.ti.com/ for more information on Texas Instruments
+#
+# Davinci EVM has 1 bank of 256 MB DDR RAM
+# Physical Address:
+# 8000' to 9000'
+#
+# Copyright (C) 2007 Sergey Kubushyn 
+#
+# Visioneering Corp. Sonata board (ARM926EJS) cpu
+#
+# Sonata board has 1 bank of 128 MB DDR RAM
+# Physical Address:
+# 8000' to 8800'
+#
+# Razorstream, LLC. SCHMOOGIE board (ARM926EJS) cpu
+#
+# Schmoogie board has 1 bank of 128 MB DDR RAM
+# Physical Address:
+# 8000' to 8800'
+#
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+#
+# we load ourself to 8108 '
+#
+#
+
+#Provide at least 16MB spacing between us and the Linux Kernel image
+TEXT_BASE = 0x8108
diff --git a/board/davinci/dm357_evm/dm357_evm.c 
b/board/davinci/dm357_evm/dm357_evm.c
new file mode 100644
index 000..0d2f715
--- /dev/null
+++ b/board/davinci/dm357_evm/dm357_evm.c
@@ -0,0 +1,69 @@
+/*
+ *
+ * Copyright (C) 2009 Texas Instruments.
+ *
+ * 
+ * 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 Gen

Re: [U-Boot] [PATCH 2/3] OMAP3: Rename interrupts.c to timer.c

2009-05-08 Thread Scott Wood
Dirk Behme wrote:
> Scott Wood wrote:
>> It can be applied with "git am" (well, not the diffstat, but the special
>> rename diff hunk that git also generates).
> 
> Ok, thanks. But not with other tools, like plain 'patch', correct?

Right, until someone fixes that. :-)

Which I suppose could be a problem if "git am" refuses to accept the 
patch and the normal patch command needs to be used to resolve the 
conflict (I really wish git would treat it more like a merge from a UI 
perspective, even if it doesn't look that way internally).

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


Re: [U-Boot] [PATCH 2/3] OMAP3: Rename interrupts.c to timer.c

2009-05-08 Thread Dirk Behme
Scott Wood wrote:
> On Fri, May 08, 2009 at 05:47:27PM +0200, Dirk Behme wrote:
>> I'm not sure that this works for non-custodians. Custodians can do 
>> git-rename and then send a patch to the mailing list. When a custodian 
>> sends such a patch, it is mainly for review only, and not to be 
>> applied somewhere (because it is already in git).
>>
>> This results then in something
>>
>> cpu/sa1100/{interrupts.c => timer.c} |5 +-
>> rename cpu/arm925t/{interrupts.c => timer.c} (99%)
>>
>> (from [1]). But this is only what normally 'diffstat' generates and 
>> what is totally ignored by 'patch' .
> 
> It can be applied with "git am" (well, not the diffstat, but the special
> rename diff hunk that git also generates).

Ok, thanks. But not with other tools, like plain 'patch', correct?

Best regards

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


Re: [U-Boot] [PATCH 2/3] OMAP3: Rename interrupts.c to timer.c

2009-05-08 Thread Scott Wood
On Fri, May 08, 2009 at 05:47:27PM +0200, Dirk Behme wrote:
> I'm not sure that this works for non-custodians. Custodians can do 
> git-rename and then send a patch to the mailing list. When a custodian 
> sends such a patch, it is mainly for review only, and not to be 
> applied somewhere (because it is already in git).
> 
> This results then in something
> 
> cpu/sa1100/{interrupts.c => timer.c} |5 +-
> rename cpu/arm925t/{interrupts.c => timer.c} (99%)
> 
> (from [1]). But this is only what normally 'diffstat' generates and 
> what is totally ignored by 'patch' .

It can be applied with "git am" (well, not the diffstat, but the special
rename diff hunk that git also generates).

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


Re: [U-Boot] [PATCH 10/10] imx27lite: add support for imx27lite board from LogicPD

2009-05-08 Thread Magnus Lilja
Hi

I have now used the mxc_nand.c driver from patch 4 on a i.MX31 Litekit
board and have some add some more input, see below.

2009/5/6 Magnus Lilja :
>> +/*
>> + * NAND
>> + */
>> +#define CONFIG_NAND_MXC
>> +#define CONFIG_MXC_NAND_REGS_BASE      0xd800

It would be nice to have the REGS_BASE automatically set to whatever
is appropriate for the SoC the code that is selected. I.e. it should
be enough to specify CONFIG_MX31 in the board config file and then the
NFC register base is handled automatically (and the equivalent for
i.MX27).

Other than that, the only change to make it work on i.MX31 Litekit was
to disable the NAND bus width checking since that's currently i.MX27
specific code in mxc_nand.c so that would need some minor update for
i.MX31.


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


[U-Boot] [PATCH 3/6] OMAP3 Port kernel omap gpio interface.

2009-05-08 Thread Tom Rix
Port version 2.6.27 of the linux kernel's omap gpio interface to u-boot.
The orignal source is in linux/arch/arm/plat-omap/gpio.c

See doc/README.omap3 for instructions on use.

Signed-off-by: Tom Rix 
---
 cpu/arm_cortexa8/omap3/Makefile   |1 +
 cpu/arm_cortexa8/omap3/gpio.c |  185 +
 doc/README.omap3  |   32 +++
 include/asm-arm/arch-omap3/gpio.h |   86 +
 4 files changed, 304 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm_cortexa8/omap3/gpio.c
 create mode 100644 include/asm-arm/arch-omap3/gpio.h

diff --git a/cpu/arm_cortexa8/omap3/Makefile b/cpu/arm_cortexa8/omap3/Makefile
index edf5cb2..50176ee 100644
--- a/cpu/arm_cortexa8/omap3/Makefile
+++ b/cpu/arm_cortexa8/omap3/Makefile
@@ -29,6 +29,7 @@ SOBJS := lowlevel_init.o
 
 COBJS  += board.o
 COBJS  += clock.o
+COBJS  += gpio.o
 COBJS  += mem.o
 COBJS  += syslib.o
 COBJS  += sys_info.o
diff --git a/cpu/arm_cortexa8/omap3/gpio.c b/cpu/arm_cortexa8/omap3/gpio.c
new file mode 100644
index 000..aeb6066
--- /dev/null
+++ b/cpu/arm_cortexa8/omap3/gpio.c
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2009 Wind River Systems, Inc.
+ * Tom Rix 
+ *
+ * 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
+ *
+ * This work is derived from the linux 2.6.27 kernel source
+ * To fetch, use the kernel repository
+ * git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ * Use the v2.6.27 tag.
+ *
+ * Below is the original's header including its copyright
+ *
+ *  linux/arch/arm/plat-omap/gpio.c
+ *
+ * Support functions for OMAP GPIO
+ *
+ * Copyright (C) 2003-2005 Nokia Corporation
+ * Written by Juha Yrjölä 
+ *
+ * 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.
+ */
+#include 
+#include 
+#include 
+#include 
+
+static struct gpio_bank gpio_bank_34xx[6] = {
+   { (void *)OMAP34XX_GPIO1_BASE, METHOD_GPIO_24XX },
+   { (void *)OMAP34XX_GPIO2_BASE, METHOD_GPIO_24XX },
+   { (void *)OMAP34XX_GPIO3_BASE, METHOD_GPIO_24XX },
+   { (void *)OMAP34XX_GPIO4_BASE, METHOD_GPIO_24XX },
+   { (void *)OMAP34XX_GPIO5_BASE, METHOD_GPIO_24XX },
+   { (void *)OMAP34XX_GPIO6_BASE, METHOD_GPIO_24XX },
+};
+
+static struct gpio_bank *gpio_bank = &gpio_bank_34xx[0];
+
+static inline struct gpio_bank *get_gpio_bank(int gpio)
+{
+   return &gpio_bank[gpio >> 5];
+}
+
+static inline int get_gpio_index(int gpio)
+{
+   return gpio & 0x1f;
+}
+
+static inline int gpio_valid(int gpio)
+{
+   if (gpio < 0)
+   return -1;
+   if (gpio < 192)
+   return 0;
+   return -1;
+}
+
+static int check_gpio(int gpio)
+{
+   if (gpio_valid(gpio) < 0) {
+   printf("ERROR : check_gpio: invalid GPIO %d\n", gpio);
+   return -1;
+   }
+   return 0;
+}
+
+static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input)
+{
+   void *reg = bank->base;
+   u32 l;
+
+   switch (bank->method) {
+   case METHOD_GPIO_24XX:
+   reg += OMAP24XX_GPIO_OE;
+   break;
+   default:
+   return;
+   }
+   l = __raw_readl(reg);
+   if (is_input)
+   l |= 1 << gpio;
+   else
+   l &= ~(1 << gpio);
+   __raw_writel(l, reg);
+}
+
+void omap_set_gpio_direction(int gpio, int is_input)
+{
+   struct gpio_bank *bank;
+
+   if (check_gpio(gpio) < 0)
+   return;
+   bank = get_gpio_bank(gpio);
+   _set_gpio_direction(bank, get_gpio_index(gpio), is_input);
+}
+
+static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
+{
+   void *reg = bank->base;
+   u32 l = 0;
+
+   switch (bank->method) {
+   case METHOD_GPIO_24XX:
+   if (enable)
+   reg += OMAP24XX_GPIO_SETDATAOUT;
+   else
+   reg += OMAP24XX_GPIO_CLEARDATAOUT;
+   l = 1 << gpio;
+   break;
+   default:
+   printf("omap3-gpio unknown bank method %s %d\n",
+  __FILE__, __LINE__);
+   return;
+   }
+   __raw_writel(l, reg);
+}
+
+void omap_set_gpio_dataout(int gpio,

Re: [U-Boot] [PATCH 3/6] OMAP3 Port kernel omap gpio interface.

2009-05-08 Thread Tom
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 16:28 Thu 07 May , Tom Rix wrote:
>   
>> Port the linux kernel's omap gpio interface to u-boot.
>> The orignal source is in linux/arch/arm/plat-omap/gpio.c
>> 
> please specify which specific kernel revision your code is based on
>
> Otherwise fine
>
> Best Regards,
> J.
>   
I added it to the file headers.

I will add it to the commit message.
Tom

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


Re: [U-Boot] [PATCH 3/6] OMAP3 Port kernel omap gpio interface.

2009-05-08 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:28 Thu 07 May , Tom Rix wrote:
> Port the linux kernel's omap gpio interface to u-boot.
> The orignal source is in linux/arch/arm/plat-omap/gpio.c
please specify which specific kernel revision your code is based on

Otherwise fine

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/6] ZOOM2 Add initial support for Zoom2

2009-05-08 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:28 Thu 07 May , Tom Rix wrote:
> Zoom2 is a new board from Texas Instruments and LogicPD
> 
> The logicpd web site is a good source for general information on this board.
> Please start looking here if the below links are broken.
> http://www.logicpd.com
> 
> This is a pdf of the product
> http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf
> This is the product description web page
> http://www.logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap34x-ii-mdp
> 
> This patch provides a zoom2 base target by copying zoom1 and by making some
> obvious changes.
> 
> To configure, run
> make omap3_zoom2_config
> 
> Signed-off-by: Tom Rix 
> ---
Applied to arm/next

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/6] OMAP Consolidate common u-boot.lds to cpu layer.

2009-05-08 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:28 Thu 07 May , Tom Rix wrote:
> The u-boot.lds file is common for all omap boards.
> Move a cleaned up version to the cpu layer and add makefile logic to use it.
> 
> Signed-off-by: Tom Rix 
> ---
Applied to arm/next

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 DaVinci:Consolidate common u-boot.lds

2009-05-08 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:59 Fri 08 May , s-paul...@ti.com wrote:
> The u-boot.lds is common for all DaVinci boards. The patch removes
> multiple instances and moves the u-boot.lds to /cpu/arm926ejs/davinci
> folder. This addresses one of the comments i received while submitting
> patches for DM3xx
> 
> Signed-off-by: Sandeep Paulraj 
> ---
Applied to arm/next

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


[U-Boot] [PATCH] ARM DaVinci:Consolidate common u-boot.lds

2009-05-08 Thread s-paulraj
The u-boot.lds is common for all DaVinci boards. The patch removes
multiple instances and moves the u-boot.lds to /cpu/arm926ejs/davinci
folder. This addresses one of the comments i received while submitting
patches for DM3xx

Signed-off-by: Sandeep Paulraj 
---
 board/davinci/dvevm/u-boot.lds |   52 
 board/davinci/schmoogie/u-boot.lds |   52 
 board/davinci/sffsdr/u-boot.lds|   52 
 board/davinci/sonata/u-boot.lds|   52 
 cpu/arm926ejs/davinci/config.mk|   37 +
 cpu/arm926ejs/davinci/u-boot.lds   |   52 
 6 files changed, 89 insertions(+), 208 deletions(-)
 delete mode 100644 board/davinci/dvevm/u-boot.lds
 delete mode 100644 board/davinci/schmoogie/u-boot.lds
 delete mode 100644 board/davinci/sffsdr/u-boot.lds
 delete mode 100644 board/davinci/sonata/u-boot.lds
 create mode 100644 cpu/arm926ejs/davinci/config.mk
 create mode 100644 cpu/arm926ejs/davinci/u-boot.lds

diff --git a/board/davinci/dvevm/u-boot.lds b/board/davinci/dvevm/u-boot.lds
deleted file mode 100644
index 4d50f2c..000
--- a/board/davinci/dvevm/u-boot.lds
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, 
- *
- * 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
- */
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-   . = 0x;
-   . = ALIGN(4);
-   .text   :
-   {
- cpu/arm926ejs/start.o (.text)
- *(.text)
-   }
-   . = ALIGN(4);
-   .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-   . = ALIGN(4);
-   .data : { *(.data) }
-   . = ALIGN(4);
-   .got : { *(.got) }
-
-   . = .;
-   __u_boot_cmd_start = .;
-   .u_boot_cmd : { *(.u_boot_cmd) }
-   __u_boot_cmd_end = .;
-
-   . = ALIGN(4);
-   __bss_start = .;
-   .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
-   _end = .;
-}
diff --git a/board/davinci/schmoogie/u-boot.lds 
b/board/davinci/schmoogie/u-boot.lds
deleted file mode 100644
index 4d50f2c..000
--- a/board/davinci/schmoogie/u-boot.lds
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, 
- *
- * 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
- */
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-   . = 0x;
-   . = ALIGN(4);
-   .text   :
-   {
- cpu/arm926ejs/start.o (.text)
- *(.text)
-   }
-   . = ALIGN(4);
-   .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-   . = ALIGN(4);
-   .data : { *(.data) }
-   . = ALIGN(4);
-   .got : { *(.got) }
-
-   . = .;
-   __u_boot_cmd_start = .;
-   .u_boot_cmd : { *(.u_boot_cmd) }
-   __u_boot_cmd_end = .;
-
-   . = ALIGN(4);
-   __bss_start = .;
-   .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
-   _end = .;
-}
diff --git a/board/davinci/sffsdr/u-boot.lds b/board/davinci/sffsdr/u-boot.lds
deleted file mode 100644
index 4d50f2c..000
--- a/board/davinci/sffsdr/u-boot.lds
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, 
- *
- * See file CREDITS for list of people who contribute

Re: [U-Boot] [PATCH 2/3] OMAP3: Rename interrupts.c to timer.c

2009-05-08 Thread Dirk Behme
Dear Jean-Christophe,

Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:41 Tue 05 May , Dirk Behme wrote:
>> After removal of dublicated interrupt code, rename file to what it
>> really does now.
> I prefer to rename all files at the same time

Then, please don't complain that you have "to do everything on your 
own and nobody helps you" ;) I would prefer that changes are done by 
the board maintainers and not by the custodian, though.

> Btw please use git to show that you only rename the file without change

I'm not sure that this works for non-custodians. Custodians can do 
git-rename and then send a patch to the mailing list. When a custodian 
sends such a patch, it is mainly for review only, and not to be 
applied somewhere (because it is already in git).

This results then in something

cpu/sa1100/{interrupts.c => timer.c} |5 +-
rename cpu/arm925t/{interrupts.c => timer.c} (99%)

(from [1]). But this is only what normally 'diffstat' generates and 
what is totally ignored by 'patch' . I.e. in the part of the patch 
which is handled by 'patch' this info is totally missing. As far as I 
know 'patch' itself can't deal with file rename any other way than 
remove one file and create the other one with

--- u-boot-main.orig/cpu/arm_cortexa8/omap3/interrupts.c
+++ /dev/null

--- /dev/null
+++ u-boot-main/cpu/arm_cortexa8/omap3/timer.c

So it's my understanding that non-custodians have to send a patch 
which can be applied everywhere by everyone by 'patch' utility, i.e. 
the part 'patch' deals with contains all information necessary.

Do I miss anything?

Best regards

Dirk

[1] http://lists.denx.de/pipermail/u-boot/2009-May/051921.html

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


Re: [U-Boot] [PATCH 3/3] OMAP3: Reorganize Makefile style

2009-05-08 Thread Dirk Behme
Dear Jean-Christophe,

Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:41 Tue 05 May , Dirk Behme wrote:
>> Reformat COBJS handling.
> please rebase against you first patch as the 2 will be handle by an otherone

Sorry, but I don't understand what you want here. All three patches 
are fine in this order and apply cleanly on each other. What rebase 
will be neccesary?

Best regards

Dirk

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


Re: [U-Boot] [PATCH] OMAP3: Introduce CONFIG option for power code

2009-05-08 Thread Dirk Behme
Dear Jean-Christophe,

Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:21 Wed 06 May , Dirk Behme wrote:
>> Some OMAP3 boards need control for external power companion
>> chips. Introduce a CONFIG option for this, to avoid Makefile
>> changes for each board.
> 
> please also move it to cpu/arm_cortexa8/omap3/
> 
> omap3 and davinci is not a vendor
> so common code will need to go to drivers or cpu//

No, this wouldn't be correct. We used board/omap3/common/ for this 
intentionally.

We talk about *board* specific code here, it is totally unrelated to 
 or the  we use. This board specific code configures an 
OMAP3 (SoC) external companion chip which is on the board (or not). 
Some boards which share the basic layout have this companion chip, 
some not. Please note that original config options (we remove with 
this patch) were the *board* config options (e.g. CONFIG_OMAP3_BEAGLE) 
to enable the compilation of power.c, too.

> Best Regards,
> J.

I nearly missed your comment below because of this ;)

>> Signed-off-by: Dirk Behme 
>> ---
>>
>> Compile tested with ./MAKEALL ARM_CORTEX_A8, boot tested on
>> OMAP3 based BeagleBoard.
>>
>> Note: This patch trys to fix the first comment of
>>
>> http://lists.denx.de/pipermail/u-boot/2009-April/051383.html
>>
>>  board/omap3/common/Makefile |5 +
>>  doc/README.omap3|   11 +++
>>  include/configs/omap3_beagle.h  |1 +
>>  include/configs/omap3_overo.h   |1 +
>>  include/configs/omap3_pandora.h |1 +
>>  include/configs/omap3_zoom1.h   |1 +
>>  6 files changed, 16 insertions(+), 4 deletions(-)
>>
>> Index: u-boot-main/doc/README.omap3
>> ===
>> --- u-boot-main.orig/doc/README.omap3
>> +++ u-boot-main/doc/README.omap3
>> @@ -77,6 +77,17 @@ For all other commands see
>>  
>>  help
>>  
>> +Custom configs
>> +==
>> +
>> +CONFIG_OMAP3_POWER
>> +
>> +Some OMAP3 boards use external power companion chips to be configured. 
>> Enable
>> +this CONFIG option in your board specific configuration file if your board
>> +uses such a companion chip.
> could you name it ine the config and the file name

Sorry, I don't understand what you want here. What should I name 
where? Which file name?

Dirk

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


Re: [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6

2009-05-08 Thread Dirk Behme
Dear Matthias,

Matthias Ludwig wrote:
> Wolfgang, Dirk,
> 
> cause for this patch was originally the plan to bring my company's new
> omap3-based platform into U-Boot. As we do use other CS for a network
> chip this patch was intended to be the starting point (otherwise our
> patchset will not apply).
> 
> I can prepare a big #define -> c_struct patch for omap next week.
> The only problem i see, my following patches will be rebased onto that
> and will only apply after the transition #define -> c_struct is done.
> 
> If this is ok for you i will submit this mid/end of next week.

If you do it for all OMAP3 boards currently in mainline and don't 
break anything, I'm fine with this, too.

Many thanks

Dirk

> On Thu, May 07, 2009 at 08:58:17PM +0200, Wolfgang Denk wrote:
>> Dear Dirk,
>>
>> In message <4a02fb34.2090...@googlemail.com> you wrote:
 Please provide proper C structs!
>>> Would you like to have a look to the code snippet visible in Matthias' 
>>> patch
>>>
>>> http://lists.denx.de/pipermail/u-boot/2009-May/052157.html
>>>
>>> ?
>> Done.
>>
>>> It's my understanding that what's in code
>>>
>>> writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
>>>
>>> is what you want? I.e. as I understand it, the code is correct (we use 
>> It is only part of what I want to see. There are still deficiencies.
>>
>> Yes, we have a struct gpmc_csx, that's good.
>>
>> Note though that using such typedef's not in line with the Coding
>> Style, which says: "It's a _mistake_ to use typedef for structures
>> and pointers." Also, checkpatch.pl complains about this.
>>
>> The next problem is that the entries in these structs are declared as
>> "unsigned int", which just happens to work by chance. "u32" would be
>> more reliable.
>>
>> Finally, and this is what I really compalin about, is that there is no
>> big structure which includes all the blocks that make up the CPU into
>> one big structure (as it's done for example for PowerPC systems in the
>> include/asm-ppc/*immap* files) - you still use code like
>>
>> gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
>>
>> to locate each of the individual C structs in the memory map; instead,
>> onle one single pointer to the internal memory should be needed.
>>
>>> Sorry if I missed something, just correct then ;)
>> Done.  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
>> Winners never talk about glorious victories. That's  because  they're
>> the  ones  who  see  what the battlefield looks like afterwards. It's
>> only the losers who have glorious victories.
>>   - Terry Pratchett, _Small Gods_
> 

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


Re: [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6

2009-05-08 Thread Dirk Behme
Hi,

Detlev Zundel wrote:
> Hi,
> 
>> Wolfgang Denk wrote:
>>> Dear Scott Wood,
>>>
>>> In message <4a034b09.7030...@freescale.com> you wrote:
> Or what replaced the "immr" structs?
 The device tree, mainly...
>>> Right, of course.
>>>
  ...  But #defines can work for u-boot.
>>> Of course they _can_ work. But they can easily fail (as we just see
>>> in this patch), and we don't have typechecking. So until DT's are
>>> omnipresent, let's use structs in U-Boot, please.
>> You *do* have typechecking as long as the individual blocks are 
>> described with structs.
>>
>> We could take immap to extremes by defining one big 4GiB struct that 
>> shows where memory, immr, flash, desired PCI bars, FPGAs, etc. are -- 
>> but that would be silly.  IMHO, so is doing it at the immr level. :-)
>>
>> How would you deal with blocks being at different locations in different 
>> chips?  It's a lot easier to ifdef (or have the config file specify) a 
>> couple addresses than to ifdef the locations of fields in a struct, 
>> especially when you have more than a couple variations.
> 
> For what its worth, I'm with Scott here.  Structures for register blocks
> is very nice and should be mandated and it seems they are maintainable.
> Locations of individual blocks (or number of incarnations thereof) seem
> to change frequently and thus tend to be less friendly to "whole
> internal address space" structures.  So the latter may better be mapped
> by single defines.  The correctness of them is easily validated and an
> incorrect value will immediatley be discovered.

I tend to agree with Scott and Detlev, too. At least from practical 
point of view

http://www.ti.com/litv/pdf/spruf98b

(attention: ~40MB) ;)

Best regards

Dirk

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


Re: [U-Boot] Unable to debug UBOOT

2009-05-08 Thread alfred steele
> Looks like you are reinitializing the DDR , when u are already executing
> from it, you may want to comment out that code, which initializes DDR.
To add to that, if you have cloned code for an already existing
platform config file, See if the "CONFIG_SKIP_RELOCATE_UBOOT" and
"CONFIG_SKIP_LOWLEVEL_INIT" flags in your config file(include/configs)
are enabled. If these flags are not enabled, you might need to enable
them,s o that the early initialization code is skipped.

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


Re: [U-Boot] Add a new command to U-Boot

2009-05-08 Thread Jerry Van Baren
Excellent, but...

Deepak Gopalakrishnan wrote:

[snip]

> this is the content of firrst u-boot command i wrote:
> 
> cmd_dgprint.c
> 
> /*
>  * (C) Copyright 2005
>  * 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.

...you should put your own copyright with the correct year in it.

Note also that u-boot is licensed using the GPLv2 so, if you distribute 
u-boot with your modifications linked into it, you must use a GPLv2 
compatible license for your code.
   
   

Welcome and enjoy your stay in u-boot-land,  :-)
gvb
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Add a new command to U-Boot

2009-05-08 Thread Deepak Gopalakrishnan
thanks to everyone first.
im able to write a new command for the u-boot and load it on to the board 
and it works like a charm.
Im explaining the steps here so that it would be helpful in the future:
im using a MPC8313e RDB and u-boot-1.3.0.
1) First of all the commands are defined in files present in u-boot/common 
folder and are the files that start with cmd_*.c
2) now to add a new command create a file in the same format
3) include the necessary header file (depends on what the command would 
do)
4) "do_" function. This is the function where you have to do what 
your command intends to do.
5) U_BOOT_CMD( ) function will include your command to the list of 
commands of u-boot
6) compile it and get the u-boot.bin file
7) load this on to the board.
8) TADAur function is up and running

this is the content of firrst u-boot command i wrote:

cmd_dgprint.c

/*
 * (C) Copyright 2005
 * 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 
 #include 


int do_dgprint(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
printf("Hi this is a test\n");
return 0;
}

U_BOOT_CMD(
dgprint,1,  1,  do_dgprint,
"dgprint takes no arguments",
"this is just to test a function"
);


hope this is useful to atleast one person

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


[U-Boot] coldFire: net: Question about the use of MCFFEC_TOUT_LOOP

2009-05-08 Thread Richard Retanubun
Hi TC,

I am trying to understand the use of MCFFEC_TOUT_LOOP, when I grep for it is 
used in mcffec, counting udelay(1)
and in mcfmii counting udelay(500). I think the udelay(500) one is causing 
extra long delays when trying to boot when the link is not up.
can the mcfmii udelay(500) be udelay(1) to maintain consistency? I can work out 
a patch if you agree.

Thanks for your time

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


Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-08 Thread Detlev Zundel
Hi Stefan,

>> > So what should I do now? Should I revert to another #ifdef in the
>> > variable declaration? Or is the current version ok?
>>
>> I'm not too sure myself.  What really tickles me, and what speaks
>> against using this attribute, is the fact that the "unused" attribute is
>> itself not part of an #ifdef, whereas the intention clearly is that this
>> attribute should only be applied when the ifdefs erases code.
>
> BTW: The resulting code/data length is the same, comparing a version with 
> #ifdef's, the attribute version or a version with the variable declaration 
> intact and the warnings.

Actually my argument was never about resulting code or data size, but
about maintainability.

My clear view here is to put as much information as possible into the
sources.  So if at all possible, let the compiler know.  If this is not
possible then let the user know by using constructs that at least show a
connection to the human reader - i.e. using ifdef blocks with the same
name.  If that is also not possible then the least we should do is to
write a comment with the original intent.

>> Now currently this connection maybe clear for the writer of the patch,
>> but it is in no way obvious in the code.  So theoretically, when the
>> #ifdef gets removed, nobody will think about the "unused" attributes,
>> forget them and then we have effectively lost correct warnings.
>
> This could be the case. But this could happen to the #ifdef version as well. 
> That the #ifdef'ed variable declaration stays in the code after removing the 
> code referencing the variables.

Someone touching one block with ifdefs will surely - or better should
and *can* - check other blocks with the same condition.  Using an
__unused attribute breaks this connection.

Cheers
  Detlev

-- 
By all means let's be open-minded, but not so open-minded that our
brains drop out.
-- Richard Dawkins
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6

2009-05-08 Thread Detlev Zundel
Hi,

> Wolfgang Denk wrote:
>> Dear Scott Wood,
>> 
>> In message <4a034b09.7030...@freescale.com> you wrote:
 Or what replaced the "immr" structs?
>>> The device tree, mainly...
>> 
>> Right, of course.
>> 
>>>  ...  But #defines can work for u-boot.
>> 
>> Of course they _can_ work. But they can easily fail (as we just see
>> in this patch), and we don't have typechecking. So until DT's are
>> omnipresent, let's use structs in U-Boot, please.
>
> You *do* have typechecking as long as the individual blocks are 
> described with structs.
>
> We could take immap to extremes by defining one big 4GiB struct that 
> shows where memory, immr, flash, desired PCI bars, FPGAs, etc. are -- 
> but that would be silly.  IMHO, so is doing it at the immr level. :-)
>
> How would you deal with blocks being at different locations in different 
> chips?  It's a lot easier to ifdef (or have the config file specify) a 
> couple addresses than to ifdef the locations of fields in a struct, 
> especially when you have more than a couple variations.

For what its worth, I'm with Scott here.  Structures for register blocks
is very nice and should be mandated and it seems they are maintainable.
Locations of individual blocks (or number of incarnations thereof) seem
to change frequently and thus tend to be less friendly to "whole
internal address space" structures.  So the latter may better be mapped
by single defines.  The correctness of them is easily validated and an
incorrect value will immediatley be discovered.

Cheers
  Detlev

-- 
config LGUEST
If unsure, say N.  If curious, say M.  If masochistic, say Y.
 -- linux/drivers/lguest/Kconfig
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6

2009-05-08 Thread Wolfgang Denk
Dear Matthias,

In message <20090508084234.ga6...@ultratronik.de> you wrote:
> 
> cause for this patch was originally the plan to bring my company's new
> omap3-based platform into U-Boot. As we do use other CS for a network
> chip this patch was intended to be the starting point (otherwise our
> patchset will not apply).
> 
> I can prepare a big #define -> c_struct patch for omap next week.
> The only problem i see, my following patches will be rebased onto that
> and will only apply after the transition #define -> c_struct is done.
> 
> If this is ok for you i will submit this mid/end of next week.

It's fine with me.

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
I have yet to add the ESP-driver to the kernel to read  the  mind  of
the user...   - Linus Torvalds in
  
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Auto Boot ELF image using NFS

2009-05-08 Thread Wolfgang Denk
Dear "Zvi Vered",

In message <6a95bae688c1447da98e48fbb2e43...@userd662364e58> you wrote:
> 
> How can I do it upon completion of countdown after running uboot like
> with "tftpboot".
> 
> I tried the following:
> 
> #define CONFIG_BOOTDELAY 3
> #define CONFIG_BOOTCOMMAND "nfs"
> 
> But this is not enough. I should also run bootelf. How can I add
> "bootelf" to CONFIG_BOOTCOMMAND  ?

I recommend the use of an editor; popular ones are emacs and vi ...

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
While most peoples' opinions change, the conviction of their correct-
ness never does.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2009-05-08 Thread Magnus Lilja
Hi

2009/5/8 Ivo Clarysse :
> Ilya,
>
> On Wed, May 6, 2009 at 8:30 PM, 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.
> [..]
>> --- /dev/null
>> +++ b/drivers/mtd/nand/mxc_nand.c
>> @@ -0,0 +1,891 @@
> [...]
>> +/* This function polls the NANDFC to wait for the basic operation to
>> + * complete by checking the INT bit of config2 register.
>> + */
>> +static void wait_op_done(struct mxc_nand_host *host, int max_retries,
>> +                               uint16_t param, int useirq)
>> +{
>> +       uint32_t tmp;
>> +
>> +       while (max_retries-- > 0) {
>> +               if (readw(host->regs + NFC_CONFIG2) & NFC_INT) {
>> +                       tmp = readw(host->regs + NFC_CONFIG2);
>> +                       tmp  &= ~NFC_INT;
>> +                       writew(tmp, host->regs + NFC_CONFIG2);
>> +                       break;
>> +               }
>> +               udelay(1);
>> +       }
>> +       if (max_retries <= 0)
>> +               MTDDEBUG(MTD_DEBUG_LEVEL0, "%s(%d): INT not set\n",
>> +                               __func__, param);
>> +}
>
> As you don't have an interrupt handler (as opposed to the Linux
> driver), why keep the 'useirq' parameter ?
>
> [...]
>> +static void send_cmd(struct mxc_nand_host *host, uint16_t cmd, int useirq)
>
> Same comment (also renders all 'islast' parameters obsolete).

I think it's a good idea to keep the code as close as possible to the
original linux driver. That way it's easy to make a diff and update
the U-boot driver with whatever changes are done in Linux.

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


Re: [U-Boot] Unable to debug UBOOT

2009-05-08 Thread Wolfgang Denk
Dear Vivek DALAL,

In message <7c7ce0c60905072312i74ad8bb8vbc8693e829fc4...@mail.gmail.com> you 
wrote:
>
> I am putting it in RAM using Trace 32 debugger. But unable to get prompt.
> Code hangs but giving message *"DRAM: 64MB" ...*

You are running into exactly the type of problems tha cause us to add
the FAQ entry:

http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM

The summary of this is: unless you know *exactly* what you are doing
(which seems not to be the case for you), you better don't attempt
doing this.

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
An optimist believes we live in the best world possible; a  pessimist
fears this is true.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6

2009-05-08 Thread Matthias Ludwig
Wolfgang, Dirk,

cause for this patch was originally the plan to bring my company's new
omap3-based platform into U-Boot. As we do use other CS for a network
chip this patch was intended to be the starting point (otherwise our
patchset will not apply).

I can prepare a big #define -> c_struct patch for omap next week.
The only problem i see, my following patches will be rebased onto that
and will only apply after the transition #define -> c_struct is done.

If this is ok for you i will submit this mid/end of next week.

best regards,
Matthias

On Thu, May 07, 2009 at 08:58:17PM +0200, Wolfgang Denk wrote:
> Dear Dirk,
> 
> In message <4a02fb34.2090...@googlemail.com> you wrote:
> > 
> > > Please provide proper C structs!
> > 
> > Would you like to have a look to the code snippet visible in Matthias' 
> > patch
> > 
> > http://lists.denx.de/pipermail/u-boot/2009-May/052157.html
> > 
> > ?
> 
> Done.
> 
> > It's my understanding that what's in code
> > 
> > writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
> > 
> > is what you want? I.e. as I understand it, the code is correct (we use 
> 
> It is only part of what I want to see. There are still deficiencies.
> 
> Yes, we have a struct gpmc_csx, that's good.
> 
> Note though that using such typedef's not in line with the Coding
> Style, which says: "It's a _mistake_ to use typedef for structures
> and pointers." Also, checkpatch.pl complains about this.
> 
> The next problem is that the entries in these structs are declared as
> "unsigned int", which just happens to work by chance. "u32" would be
> more reliable.
> 
> Finally, and this is what I really compalin about, is that there is no
> big structure which includes all the blocks that make up the CPU into
> one big structure (as it's done for example for PowerPC systems in the
> include/asm-ppc/*immap* files) - you still use code like
> 
> gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
> 
> to locate each of the individual C structs in the memory map; instead,
> onle one single pointer to the internal memory should be needed.
> 
> > Sorry if I missed something, just correct then ;)
> 
> Done.  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
> Winners never talk about glorious victories. That's  because  they're
> the  ones  who  see  what the battlefield looks like afterwards. It's
> only the losers who have glorious victories.
>   - Terry Pratchett, _Small Gods_

-- 
Matthias Ludwig, Software Development
Ultratronik Entwicklungs GmbH, Gewerbestrasse 52, 82211 Herrsching, Germany
http://www.ultratronik.de  Tel: +49 8152 3709-356  Fax: +49 8152 5183
Registergericht Muenchen, HRB 55584
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2009-05-08 Thread Ivo Clarysse
Ilya,

On Wed, May 6, 2009 at 8:30 PM, 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.
[..]
> --- /dev/null
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -0,0 +1,891 @@
[...]
> +/* This function polls the NANDFC to wait for the basic operation to
> + * complete by checking the INT bit of config2 register.
> + */
> +static void wait_op_done(struct mxc_nand_host *host, int max_retries,
> +                               uint16_t param, int useirq)
> +{
> +       uint32_t tmp;
> +
> +       while (max_retries-- > 0) {
> +               if (readw(host->regs + NFC_CONFIG2) & NFC_INT) {
> +                       tmp = readw(host->regs + NFC_CONFIG2);
> +                       tmp  &= ~NFC_INT;
> +                       writew(tmp, host->regs + NFC_CONFIG2);
> +                       break;
> +               }
> +               udelay(1);
> +       }
> +       if (max_retries <= 0)
> +               MTDDEBUG(MTD_DEBUG_LEVEL0, "%s(%d): INT not set\n",
> +                               __func__, param);
> +}

As you don't have an interrupt handler (as opposed to the Linux
driver), why keep the 'useirq' parameter ?

[...]
> +static void send_cmd(struct mxc_nand_host *host, uint16_t cmd, int useirq)

Same comment (also renders all 'islast' parameters obsolete).

[...]
> +int board_nand_init(struct nand_chip *this)
> +{
[...]
> +
> +       tmp = readw(host->regs + NFC_CONFIG1);
> +       tmp |= NFC_INT_MSK;
> +       writew(tmp, host->regs + NFC_CONFIG1);

I don't think this is needed on i.MX27, since you don't have an
interrupt handler.
Setting NFC_INT_MSK on i.MX21 will cause NFC_INT in NFC_CONFIG2 to
never get set (and wait_op_done() to always time out)

You might want to have a look at u-boot-v2's MXC nand driver, that one
works on both i.MX21 and i.MX27, without setting NFC_INT_MSK:

  
http://git.denx.de/?p=u-boot/u-boot-v2.git;a=blob;f=drivers/nand/nand_imx.c;hb=HEAD

Also, see my post on linux-arm-kernel, "[RFC][PATCH] MXC NAND i.MX21 support":

  http://www.spinics.net/lists/arm-kernel/msg64970.html



Best regards,

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


[U-Boot] Auto Boot ELF image using NFS

2009-05-08 Thread Zvi Vered
Hello,

I want to boot vxworks with uboot 1.3.4 using nfs.

After I got the prompt I wrote + and then +

and vxworks was launched. 

How can I do it upon completion of countdown after running uboot like with 
"tftpboot".

I tried the following:

#define CONFIG_BOOTDELAY 3
#define CONFIG_BOOTCOMMAND "nfs"

But this is not enough. I should also run bootelf. How can I add "bootelf" to 
CONFIG_BOOTCOMMAND  ?

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


Re: [U-Boot] How to change the entry point for standalone Applications same as the text section base address

2009-05-08 Thread ffmm rrcc
Dear Wolfgang:

2009/5/7 Wolfgang Denk :
> Dear ffmm rrcc,
>
> In message  you 
> wrote:
>> Hi all:
>>
>> I have write a standalone application on U-Boot,it works well.but i
>> have to get the entry point address follow this article:
>>
>> http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork
>>
>> I use -Ttext option for ${CROSS_COMPILE}ld to set the text section
>> base address,and -e option to set the entry point function,is there
>> any way to let the compiler and linker put the entry point function on
>> the text section base address?
>
> Change your code so that your entry point function is  the  first  or
> only  function  in  a  source  file (and thus in the resulting object
> file), and change the linker script so that this object  gets  linked
> first, starting at the text section base address.
>
> 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
> The light at the end of the tunnel is usually a "No Exit" sign.
>

Thanks,follow your suggestion,my problem has been fixed.

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


Re: [U-Boot] Unable to debug UBOOT

2009-05-08 Thread Nishanth Menon
Vivek DALAL said the following on 05/08/2009 01:12 AM:
> I am newbie in bootloader.
> I am trying to port latest uboot on omap2430(poseidon board). Currently
> support for omap2430 is not present in uboot; so I made changes accordingly.
>
>   
would be nice to see your patches when you are ready :).. it might even
pave way to get sdp2430 support in place..
> I am putting it in RAM using Trace 32 debugger. But unable to get prompt.
> Code hangs but giving message *"DRAM: 64MB" ...*
> Please suggest me different ways of debugging uboot.
> I tried using Trace 32(LAUTERBACH JTAG debugger). Loaded uboot elf
> file(u-boot) into RAM. I am getting symbols and function names. But unable
> to put breakpoints. Also C code is not visible even after changing mode.
>
> Please suggest me ways to debug uboot
I would recommend you start with reading Lauterbach user manual(hitting
F1 key when trace32 runs will help). IMHO, Lauterbach will be the best
tool to go ahead and use esp for OMAP2-3 processors.
When you read the user manual, pay close attention to 'd.load.elf ...
/strippart /lowerpath' option also s.path..

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