Re: [U-Boot] Reset command on u-boot command line not working

2009-01-27 Thread Roman Mashak
Hello

2009/1/27, Ajeesh Kumar aje...@tataelxsi.co.in:
[skip]
  But, when I give the command reset on the u-boot command line, system
  hangs printing
  The below on the console:

  /***/
 U-Boot 1.2.0 (Jan 27 2009 - 17:17:39)
[skip]

Probably the first thing you should do is grab the latest U-Boot. The
version you're experimenting is quite old, I'm afraid.

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


Re: [U-Boot] u-boot for ARM

2009-01-24 Thread Roman Mashak
2009/1/24, Jerry Zhang jerry.scofi...@gmail.com:
 Obviously you know nothing about the make.
 1)Read the Readme of the make tool first
 2) then figure out How the  u-boot building process  works; how the
 Makefile serve the building of your .bin
  3) Build your bin.

Obviously, either you're responding wrong person.

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


Re: [U-Boot] u-boot for ARM

2009-01-23 Thread Roman Mashak
Hello

2009/1/24 Amandeep Bhullar abhul...@techlinkentertainment.com:
 I was reading the README and it talks about configuring a large number
 of options. Where do I define these options? In which file?

 if i  just give the command
 $ make arm926ejs_config
 if comes with a message
 make: *** No rule to make target 'arm926ejs_config'. Stop.

That's correct, 'make' is unable to find such target. You must specify
the target corresponding to your board, for example make
davinci_dvevm_config, i.e. prefix preceding '_config' normally
indicate a platform's name.

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


Re: [U-Boot] Kernel loading and memory layout

2009-01-21 Thread Roman Mashak
Hello

2009/1/22 Vinay Venkataraghavan raghavanvi...@yahoo.com:

 How do I turn on debugs in uboot. Is there a compile time flag or is there 
 and #define that needs to be turned on. I looked in the code and could not 
 find how all the debugs are related and can be switched on?

You may define DEBUG right in your board's configuration file. Will
provide you with lots of useful debug messages.

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


Re: [U-Boot] Kernel loading and memory layout

2009-01-20 Thread Roman Mashak
Hello

2009/1/21 Vinay Venkataraghavan raghavanvi...@yahoo.com:
 I am new to using uboot but have gone through the code to a certain degree 
 but still have some questions.

 1. Where does uboot transfer control to the linux kernel. By this I mean 
 which file in the source code would I look for this.

Would it for example be in :  arch/powerpc/boot and in one of the assembly 
 language files?

Look at $(uboot)/common/cmd_bootm.c, cmd_boot.c. On ARM the process
also involves $(uboot)/lib_arm/bootm.c, I guess should be something
similar on PPC.

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


[U-Boot] ARM: set up endianess

2008-12-30 Thread Roman Mashak
Hello

my platform is ARM926EJS-based big-endian, therefore I have to
configure endianess via co-processor C15 registers as quickly as
possible. The best place I can see is in
$(uboot)/cpu/arm926ejs/start.s, as it is where co-processor is being
configured; here is what I came up with:

cpu_init_crit:
/*
 * flush v4 I/D caches
 */

/*
 * disable MMU stuff and caches
 */
mrc p15, 0, r0, c1, c0, 0
bic r0, r0, #0x2300 /* clear bits 13, 9:8 (--V- --RS) */
bic r0, r0, #0x0087 /* clear bits 7, 2:0 (B--- -CAM) */
orr r0, r0, #0x0002 /* set bit 2 (A) Align */
orr r0, r0, #0x1000 /* set bit 12 (I) I-Cache */
#ifdef CONFIG_ARCH_BIGENDIAN
orr r0, r0, #0x0080 /* set bit 7 (B) Endianism */
#endif
mcr p15, 0, r0, c1, c0, 0


where 'CONFIG_ARCH_BIGENDIAN' is defined in my platform's configuration.

I know that modifying platform's startup code is not encouraged. Is
there more correct approach?
Thanks.

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


[U-Boot] ARM926EJ-S: defining TEXT_BASE

2008-12-20 Thread Roman Mashak
Hello

I have a trouble defining a valid TEXT_BASE value. On my chip, after
reset 0x0 and before remap points at NOR flash, RAM is mapped to
0x1000_. Therefore, U-Boot image should be linked to 0x_
address to properly start off the flash, i.e. TEXT_BASE defined in
$(uboot)/board/my_board/config.mk should be 0x, right?

But uboot usually copies itself to RAM, which is at 0x1000_ in my
case -- it won't work as I understand, as my image is linked to
0x_. Then if we do remap first (making RAM at 0x_),
then copy image to  RAM, then there will no be a room for 'malloc'
area (which uboot allocates at lower addresses), as we specified
TEXT_BASE=0x0, and this is  the address U-Boot copies itself in memory
at.

How should I do then?

My guess is that ARM's startup code should be position independent,
but I have not found any compiler or linker options doing this (like
-fpic or -pie etc.). Perhaps I misunderstand something in a work of
U-Boot...

Thanks.

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


[U-Boot] timer interface

2008-12-14 Thread Roman Mashak
Hello

I'm in the process of porting U-Boot on arm926ej-s based board and now
approached to timer configuration. This is my understanding that
U-Boot has its timer interface, API, which shoudl be consistently used
across the boards:

timer_init() / reset_timer()
get_timer() / set_timer()
udelay()

This is what I observed in CPU-specific code. So my questions are:

- I have not found out how these routines are used in ARM part of
U-Boot. For instance, set_timer() defined in
$(UBOOT)/cpu//arm926ejs/versatile/timer.c is not invoked anywhere.
Does it mean  set_timer() is not mandatory part of timer's interface?

- Now, what are reset_timer_masked() and other *_masked() for?
- Is it required to customize 'udelay()' routine fo revery ARM-based
platform or there's a basic skeleton to use?

Thanks.

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


[U-Boot] U-Boot hangs in start_armboot()

2008-12-11 Thread Roman Mashak
Hello

I've just come across a problem. I have ARM-based board with its
originally shipped bootloader (not U-Boot, and having less
functionality) placed in NOR flash. However it initializes CPU, memory
controller, does remap.

Briefly about the memory map: before remap NOR flash is at 0x0 and
SDRAM 0x1000, after remap  -- SDRAM is mapped at 0x0.  I've built
a U-Boot image linked to 0x0, as I want to load it in RAM, so I linked
it to 0x0.

Loading this image via JTAG into target RAM goes fine, but hangs at
'start_armboot()', right after:

gd = (gd_t*)(_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t));
...
memset ((void*)gd, 0, sizeof (gd_t));

My investigations show that '_armboot_start' being equal to '_start'
is 0x0, CFG_MALLOC_LEN is defined in my board configuration:

#define CFG_ENV_SIZE0x1
#define CFG_MALLOC_LEN  (CFG_ENV_SIZE + 128*1024)

It turns out that (_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t))
is negative and converted to 0x which is certainly wrong.

Where's the mistake -- link address or something else?

Thanks in advance.

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


Re: [U-Boot] U-Boot hangs in start_armboot()

2008-12-11 Thread Roman Mashak
Hello

2008/12/11 Roman Mashak [EMAIL PROTECTED]:
 Briefly about the memory map: before remap NOR flash is at 0x0 and
 SDRAM 0x1000, after remap  -- SDRAM is mapped at 0x0.  I've built
 a U-Boot image linked to 0x0, as I want to load it in RAM, so I linked
 it to 0x0.

 Loading this image via JTAG into target RAM goes fine, but hangs at
 'start_armboot()', right after:

Oops, I've found the part of problem. I should have been linked to
0x0100. It's not hanging in 'start_armboot()', but it outputs
garbage on console instead of valid text messages. I've checked serial
port settings, seems to be correct. What else may be the issue?

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


Re: [U-Boot] U-Boot hangs in start_armboot()

2008-12-11 Thread Roman Mashak
Hello

2008/12/11 Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com:
[skip]
 First could you give us few information as which CPU, Target and U-Boot
 version do you work on?

Certainly.

* CPU is arm926ejs based processor with standard peripherals (UART,
I2C, timers etc.)
* our custom board
* U-Boot-1.3.4

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


Re: [U-Boot] U-Boot hangs in start_armboot()

2008-12-11 Thread Roman Mashak
Hello

2008/12/12 Roman Mashak romez...@gmail.com:
 Certainly.

 * CPU is arm926ejs based processor with standard peripherals (UART,
 I2C, timers etc.)
 * our custom board
 * U-Boot-1.3.4

Forgot to mention the serial settings in my board's configuration file:

#define CONFIG_BAUDRATE 115200
#define CFG_BAUDRATE_TABLE  { 9600, 19200, 38400, 57600, 115200 }
#define CFG_SERIAL0 0xFE00
#define CFG_SERIAL1 0xFE10

So I believe 'default_environment[]' has correct baudrate
environment set and on startup it will be picked up by
'init_baudrate()' from $(UBOOT)/lib_arm/board.c

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


Re: [U-Boot] U-Boot hangs in start_armboot()

2008-12-11 Thread Roman Mashak
Hello

2008/12/12 Roman Mashak romez...@gmail.com:
[skip]
 So I believe 'default_environment[]' has correct baudrate
 environment set and on startup it will be picked up by
 'init_baudrate()' from $(UBOOT)/lib_arm/board.c

Problem is fixed, it was due to a bug in the function configuring
clock frequency, which resulted in an invalid settings of serial port.

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


[U-Boot] Spansion S29JL032H and detecting problem

2008-12-11 Thread Roman Mashak
Hello

I'm porting U-Boot on ARM926EJ-S based board, which has one NOR flash
(specified in the subject line). For debug purpose I compiled U-Boot
to run from RAM via JTAG; therefore the configuration of flash is as
follows:

#define CFG_FLASH_BASE  0x2C00
#define CFG_MAX_FLASH_BANKS 1   /* max number of memory banks */
#define CFG_MAX_FLASH_SECT  (71)

As per http://www.spansion.com/datasheets/S29JL032H_00_B7_e.pdf
datasheet this chip contains 71 sectors and is CFI compliant.
Unfortunately U-Boot seems unable to detect this flash chip and
freezes eventually; here is the log:

U-Boot 1.3.4 (Dec 12 2008 - 15:46:25)

U-Boot code: 0100 - 0101F62C  BSS: - 01020B38
RAM Configuration:
Bank #0:  16 MB
flash detect cfi
fwc addr 2c00 cmd f0 f0 8bit x 8 bit
fwc addr 2c00 cmd ff ff 8bit x 8 bit
fwc addr 2c55 cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr 2c10 is= ea 51
fwc addr 2c000555 cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr 2c10 is= ea 51
fwc addr 2c00 cmd f0 f0f0 16bit x 8 bit
fwc addr 2c00 cmd ff  16bit x 8 bit
fwc addr 2caa cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr 2c20 is= 0051 5151
fwc addr 2c000aaa cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr 2c20 is= 0051 5151
fwc addr 2c00 cmd f0 00f0 16bit x 16 bit
fwc addr 2c00 cmd ff 00ff 16bit x 16 bit
fwc addr 2caa cmd 98 0098 16bit x 16 bit
is= cmd 51(Q) addr 2c20 is= 0051 0051
is= cmd 52(R) addr 2c22 is= 0052 0052
is= cmd 59(Y) addr 2c24 is= 0059 0059
device interface is 2
found port 2 chip 2 port 16 bits chip 16 bits
00 : 51 52 59 02 00 40 00 00 00 00 00 27 36 00 00 03  qr...@.'6...
10 : 00 09 00 05 00 04 00 16 02 00 00 00 02 07 00 20  ...
20 : 00 3e 00 00 01 00 00 00 00 00 00 00 00 01 01 f6  ...
fwc addr 2c00 cmd f0 00f0 16bit x 16 bit
fwc addr 2c000aaa cmd aa 00aa 16bit x 16 bit
fwc addr 2c000554 cmd 55 0055 16bit x 16 bit
fwc addr 2c000aaa cmd 90 0090 16bit x 16 bit

Does this indicate the problem with sectors number or this chip is not
supported by CFI drive?

Thanks.

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


[U-Boot] [PATCH] ARM926EJ-S: relocate OMAP specific 'cpuinfo.c' into OMAP directory (fixed patch)

2008-10-22 Thread Roman Mashak
OMAP identification is implemented in 'cpuinfo.c' and located in ARM926EJ-S 
directory.
It makes sense to place this file in OMAP specific subdirectory, i.e. 
cpu/arm926ejs/omap

Signed-off-by: Roman Mashak [EMAIL PROTECTED]
---
 cpu/arm926ejs/Makefile   |2 +-
 cpu/arm926ejs/cpuinfo.c  |  242 --
 cpu/arm926ejs/omap/Makefile  |2 +-
 cpu/arm926ejs/omap/cpuinfo.c |  242 ++
 4 files changed, 244 insertions(+), 244 deletions(-)

diff --git a/cpu/arm926ejs/Makefile b/cpu/arm926ejs/Makefile
index 0facce4..d5ac7d3 100644
--- a/cpu/arm926ejs/Makefile
+++ b/cpu/arm926ejs/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a
 
 START  = start.o
-COBJS  = interrupts.o cpu.o cpuinfo.o
+COBJS  = interrupts.o cpu.o
 
 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
diff --git a/cpu/arm926ejs/cpuinfo.c b/cpu/arm926ejs/cpuinfo.c
deleted file mode 100644
index 35ba7db..000
--- a/cpu/arm926ejs/cpuinfo.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * OMAP1 CPU identification code
- *
- * Copyright (C) 2004 Nokia Corporation
- * Written by Tony Lindgren [EMAIL PROTECTED]
- *
- * 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 common.h
-#include command.h
-#include arm926ejs.h
-
-#if defined(CONFIG_DISPLAY_CPUINFO)  defined(CONFIG_OMAP)
-
-#define omap_readw(x)  *(volatile unsigned short *)(x)
-#define omap_readl(x)  *(volatile unsigned long *)(x)
-
-#define OMAP_DIE_ID_0  0xfffe1800
-#define OMAP_DIE_ID_1  0xfffe1804
-#define OMAP_PRODUCTION_ID_0   0xfffe2000
-#define OMAP_PRODUCTION_ID_1   0xfffe2004
-#define OMAP32_ID_00xfffed400
-#define OMAP32_ID_10xfffed404
-
-struct omap_id {
-   u16 jtag_id;/* Used to determine OMAP type */
-   u8  die_rev;/* Processor revision */
-   u32 omap_id;/* OMAP revision */
-   u32 type;   /* Cpu id bits [31:08], cpu class bits [07:00] 
*/
-};
-
-/* Register values to detect the OMAP version */
-static struct omap_id omap_ids[] = {
-   { .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type = 
0x0310},
-   { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x0332, .type = 
0x07300100},
-   { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x0332, .type = 
0x07300300},
-   { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 
0x1510},
-   { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x0332, .type = 
0x1610},
-   { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 
0x1611},
-   { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type = 
0x16100c00},
-   { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type = 
0x16100d00},
-   { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 
0x1610ef00},
-   { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 
0x1610ef00},
-   { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type = 
0x1611},
-   { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type = 
0x16110b00},
-   { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type = 
0x16110c00},
-   { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type = 
0x16212300},
-   { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type = 
0x16212300},
-   { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type = 
0x16212300},
-   { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x0333, .type = 
0x1710},
-   { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type = 
0x1710},
-   { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 
0x1710},
-};
-
-/*
- * Get OMAP type from PROD_ID.
- * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM.
- * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense.
- * Undocumented register in TEST BLOCK is used as fallback; This seems to
- * work on 1510, 1610  1710. The official way hopefully will work in future
- * processors.
- */
-static u16 omap_get_jtag_id(void)
-{
-   u32 prod_id, omap_id;
-
-   prod_id = omap_readl(OMAP_PRODUCTION_ID_1);
-   omap_id = omap_readl(OMAP32_ID_1);
-
-   /* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730 */
-   if (((prod_id  20) == 0) || (prod_id == omap_id))
-   prod_id = 0;
-   else
-   prod_id = 0x;
-
-   if (prod_id)
-   return prod_id;
-
-   /* Use OMAP32_ID_1 as fallback */
-   prod_id = ((omap_id  12)  0x);
-
-   return prod_id;
-}
-
-/*
- * Get OMAP revision from DIE_REV.
- * Early 1710

Re: [U-Boot] booting the kernel

2008-10-21 Thread Roman Mashak
Hello Mathieu

2008/10/21 Mathieu Dube [EMAIL PROTECTED]:
 the kernel I use is for freescale imx31_litekit. I've booted it using the
 logicpd loader so I know it works.

 I use the arch/arm/boot/Image with mkimage like this:

 mkimage -A arm -O linux -T kernel -C none -a 8600 -e 8600 -d Image

   
Double check these addresses. The convention is to load the Linux
kernel at the base of physical RAM plus an offset of 0x8000 (32K),
which allows enough room for the parameters area (typically placed at
offset 0x100), page exception vectors and page tables.

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


[U-Boot] [PATCH] ARM/Versatile port: Removed unused functions

2008-10-20 Thread Roman Mashak
Removal of never used functions.

Signed-off-by: Roman Mashak [EMAIL PROTECTED]
---
 board/versatile/versatile.c |   22 --
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/board/versatile/versatile.c b/board/versatile/versatile.c
index 3b9b020..0f35caa 100644
--- a/board/versatile/versatile.c
+++ b/board/versatile/versatile.c
@@ -37,10 +37,6 @@

 DECLARE_GLOBAL_DATA_PTR;

-void flash__init (void);
-void ether__init (void);
-void peripheral_power_enable (void);
-
 #if defined(CONFIG_SHOW_BOOT_PROGRESS)
 void show_boot_progress(int progress)
 {
@@ -82,8 +78,6 @@ int board_init (void)

icache_enable ();

-   flash__init ();
-   ether__init ();
return 0;
 }

@@ -98,22 +92,6 @@ int misc_init_r (void)
  Routine:
  Description:
 **/
-void flash__init (void)
-{
-}
-/*
- Routine:ether__init
- Description: take the Ethernet controller out of reset and wait
-  for the EEPROM load to complete.
-*/
-void ether__init (void)
-{
-}
-
-/**
- Routine:
- Description:
-**/
 int dram_init (void)
 {
return 0;
-- 
1.4.4.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ARM926EJ-S: relocate OMAP specific 'cpuinfo.c' into OMAP directory

2008-10-14 Thread Roman Mashak
OMAP identification is implemented in 'cpuinfo.c' and located in
ARM926EJ-S directory. It makes sense to place this file in OMAP
specific subdirectory, i.e. cpu/arm926ejs/omap

Signed-off-by: Roman Mashak [EMAIL PROTECTED]
---
 cpu/arm926ejs/Makefile  |2 +-
 cpu/arm926ejs/cpuinfo.c |  242 ---
 cpu/arm926ejs/omap/Makefile |2 +-
 3 files changed, 2 insertions(+), 244 deletions(-)

diff --git a/cpu/arm926ejs/Makefile b/cpu/arm926ejs/Makefile
index 0facce4..d5ac7d3 100644
--- a/cpu/arm926ejs/Makefile
+++ b/cpu/arm926ejs/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a

 START  = start.o
-COBJS  = interrupts.o cpu.o cpuinfo.o
+COBJS  = interrupts.o cpu.o

 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
diff --git a/cpu/arm926ejs/cpuinfo.c b/cpu/arm926ejs/cpuinfo.c
deleted file mode 100644
index 35ba7db..000
--- a/cpu/arm926ejs/cpuinfo.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * OMAP1 CPU identification code
- *
- * Copyright (C) 2004 Nokia Corporation
- * Written by Tony Lindgren [EMAIL PROTECTED]
- *
- * 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 common.h
-#include command.h
-#include arm926ejs.h
-
-#if defined(CONFIG_DISPLAY_CPUINFO)  defined(CONFIG_OMAP)
-
-#define omap_readw(x)  *(volatile unsigned short *)(x)
-#define omap_readl(x)  *(volatile unsigned long *)(x)
-
-#define OMAP_DIE_ID_0  0xfffe1800
-#define OMAP_DIE_ID_1  0xfffe1804
-#define OMAP_PRODUCTION_ID_0   0xfffe2000
-#define OMAP_PRODUCTION_ID_1   0xfffe2004
-#define OMAP32_ID_00xfffed400
-#define OMAP32_ID_10xfffed404
-
-struct omap_id {
-   u16 jtag_id;/* Used to determine OMAP type */
-   u8  die_rev;/* Processor revision */
-   u32 omap_id;/* OMAP revision */
-   u32 type;   /* Cpu id bits [31:08], cpu class bits [07:00] 
*/
-};
-
-/* Register values to detect the OMAP version */
-static struct omap_id omap_ids[] = {
-   { .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type =
0x0310},
-   { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x0332, .type =
0x07300100},
-   { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x0332, .type =
0x07300300},
-   { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type =
0x1510},
-   { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x0332, .type =
0x1610},
-   { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type =
0x1611},
-   { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type =
0x16100c00},
-   { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type =
0x16100d00},
-   { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type =
0x1610ef00},
-   { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type =
0x1610ef00},
-   { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type =
0x1611},
-   { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type =
0x16110b00},
-   { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type =
0x16110c00},
-   { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type =
0x16212300},
-   { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type =
0x16212300},
-   { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type =
0x16212300},
-   { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x0333, .type =
0x1710},
-   { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type =
0x1710},
-   { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type =
0x1710},
-};
-
-/*
- * Get OMAP type from PROD_ID.
- * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM.
- * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense.
- * Undocumented register in TEST BLOCK is used as fallback; This seems to
- * work on 1510, 1610  1710. The official way hopefully will work in future
- * processors.
- */
-static u16 omap_get_jtag_id(void)
-{
-   u32 prod_id, omap_id;
-
-   prod_id = omap_readl(OMAP_PRODUCTION_ID_1);
-   omap_id = omap_readl(OMAP32_ID_1);
-
-   /* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730 */
-   if (((prod_id  20) == 0) || (prod_id == omap_id))
-   prod_id = 0;
-   else
-   prod_id = 0x;
-
-   if (prod_id)
-   return prod_id;
-
-   /* Use OMAP32_ID_1 as fallback */
-   prod_id = ((omap_id  12)  0x);
-
-   return prod_id;
-}
-
-/*
- * Get OMAP revision from DIE_REV.
- * Early 1710 processors may have broken OMAP_DIE_ID, it contains PROD_ID.
- * Undocumented register in the TEST BLOCK

[U-Boot] non-needed objects added to resulting U-Boot image

2008-10-14 Thread Roman Mashak
Hello

I was building u-boot for ARM based custom board and I found that
unused and no needed object files are built and linked to the
resulting U-Boot image. For example, my board doesn't have PCI,
PCMCIA, USB or Ethernet, but according to the build-log, corresponding
archives have been built and linked:

drivers/net/libnet.a
drivers/net/sk98lin/libsk98lin.a
drivers/pci/libpci.a
drivers/pcmcia/libpcmcia.a

and so on.

Don't think it is intended behavior, on the other hand I have not
included any support for this modules in my configuration. What can be
the reason, has anybody had this before?

Thanks.

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


Re: [U-Boot] non-needed objects added to resulting U-Boot image

2008-10-14 Thread Roman Mashak
Hello

2008/10/14 Wolfgang Denk [EMAIL PROTECTED]:
 drivers/net/libnet.a
 drivers/net/sk98lin/libsk98lin.a
 drivers/pci/libpci.a
 drivers/pcmcia/libpcmcia.a

 and so on.

 These libraries may be used in the link command of your image, but do
 you actually see any unused objects included in your linked image?
LIBS in Makefile incorporates all drivers, file systems etc., so
'make' command traverses through out the source tree and builds (in
many cases the binaries contain only debug information). Isn't it
reasonable to add a few variables, say in $(uboot)/config_user.mk,
which will more precisely define what to build. Further,
$(uboot)/config.mk includes config_local.mk, and later on Makefile
organizes LIBS something like that:

...
ifdef BUILD_NET
LIBS +=drivers/net/libnet.a
endif
...

It may slightly speed up a building process.

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


[U-Boot] ARM/Versatile - bootup

2008-10-09 Thread Roman Mashak
Hello

Studying the ARM/Versatile port of U-Boot in order to understand
booting and initialization nuances.

As per documentation from http://infocenter.arm.com/  SDRAM on this
platform is selected by CS#0 and gets mapped in 0x_ -
0x0800_. Versatile configuration defines TEXT_BASE=0x0100_, so
it is 16Mb away from 0x0; Linux port of Versatile defines loading
address of the kernel as 0x_8000, resulting in 32kB gap form the
beginning of RAM.

I understand that 16Mb gap is to let kernel image to fit in RAM, but
isn't it too large, seems a waste of space to me? Then why do we need
to keep 32KB space, what's the point?

As U-Boot image usually occupies ~200KB, wouldn't it be easier to
allocate ~8Mb room, which would be quite enough for the U-Boot, its
environment, malloc area, stack etc., Linux kKernel then starts and
reclaims the memory of U-Boot.

Would appreciate if someone explains me this nuance. Thanks in advance!

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


Re: [U-Boot] how can i change u-boot load address?

2008-10-07 Thread Roman Mashak
Hello

2008/10/7 Wolfgang Denk [EMAIL PROTECTED]:
 The advantage of the PowerPC implementation with relocation  is  that
 we  can  measure  the actual size of memory present on the board, and
 then relocate U-Boot to the very end of the RAM,  leaving  nearly  th
When you say end of the RAM', I think you mean higher addresses, i.e.
0x_ downwards or lower 0x000_ onwards? (this depends on
how to look at memory map, written on a sheet of paper -- straight or
upside down :-) ).

So the bottom line of PPC architecture is that it tries to have
unified booting/relocation process for every platform? For instance,
always copy itself in the upper addresses, occupying, say, 128kB or so
of RAM.

 whole  RAM  usable as one big contiguous area for applications like
 loading Linux kernel, ramdisk, etc.

[skip]
 Just try to imagine you have to install a new version of the BIOS  on
 your PC just because you add or remove a memory module. Would you buy
 such a PC?
Well, you convinced me; but despite its flaws and drawbacks the
current ARM port architecture exists and it is here to stay for quite
awhile, unless there will be some hero ready to break it up and build
a new from scratch.

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


Re: [U-Boot] how can i change u-boot load address?

2008-10-06 Thread Roman Mashak
Hello Andrew,

2008/10/6 Andrew Dyer [EMAIL PROTECTED]:
 If you want to build a version of u-boot that is linked to a start
 address that is in RAM for loading via a jtag debugger, then change
 the definition of TEXT_BASE in board/your board name here/config.mk.

Can the value of TEXT_BASE be arbitrary chosen for test purposes?

 If you want to make sure u-boot is still linked in ROM, but gets put
 at the top of memory during relocation, then you have to make sure the
 initdram() function in your code returns the correct ram size.

As I understand it's valid for MIPS or PPC based architectures, right?
On many MCUs built on arm7tdmi core (for example, SAM7 family from
Atmel) the process of starting up involves remapping, i.e. 0x0 address
points on ROM at reset and on RAM after remap. U-Boot usually resides
in ROM storage at startup, after reset relocates itself to RAM --
should not it involve remapping as well?

I didn't find how it's done in U-Boot (if it's done at all). Would
appreciate a lot for clarification.

I'm trying to understand how it's done on ARM --

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


Re: [U-Boot] NAND flash driver for Samsung K9F1G08

2008-10-03 Thread Roman Mashak
Hello

2008/10/2 Scott Wood [EMAIL PROTECTED]:
 On Wed, Oct 01, 2008 at 06:04:02PM -0700, Roman Mashak wrote:
 As far as I understand not all manufacturers adhere to CFI standards,
 so this is flash chip's problem rather then board itself.
 CFI is for both NAND and NOR flash devices (even though CFI stands for
 Common _Flash memory_ Interface)?

 No, CFI is just for NOR.
Thanks, now it's a bit easier to find my way around the deep jungles
of U-Boot :-)

Would you please elaborate on my previous statement:

 So the settings as follows mainly refer to NOR:
 CFG_MAX_FLASH_BANKS
 CFG_NO_FLASH
 CFG_MAX_FLASH_BANKS_DETECT
 CFG_FLASH_BASE
 CFG_FLASH_ERASE_TOUT
 CFG_FLASH_WRITE_TOUT
 CFG_FLASH_LOCK_TOUT
 CFG_FLASH_UNLOCK_TOUT

 while
 CFG_MAX_NAND_DEVICE
 CFG_NAND_SELECT_DEVICE

 are NAND-related

Is my understanding correct, if not - why?
Thanks again.

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


[U-Boot] ARM Versatile port - possibly inefficient code?

2008-09-30 Thread Roman Mashak
Hello

Investigating the code for ARM Versatile port, I've found this weird
piece of code. If you look in $(UBOOT)/board/versatile/flash.c, line
100, flash_init() :

unsigned long flash_init (void)
{
int i;
ulong size = 0;
for (i = 0; i  CFG_MAX_FLASH_BANKS; i++) {
switch (i) {
case 0:
flash_vpp(1);
flash_get_size ((FPW *) PHYS_FLASH_1, flash_info[i]);
flash_get_offsets (PHYS_FLASH_1, flash_info[i]);
flash_vpp(0);
break;
default:
panic (configured too many flash banks!\n);
break;
}
size += flash_info[i].size;
}
.

}

Regardless of CFG_MAX_FLASH_BANKS value, the only first bank is
configured. Was it done deliberately or it's logical flaw? I think
this code could cloned on a multiple of other platforms.

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


Re: [U-Boot] ARM Versatile port - possibly inefficient code?

2008-09-30 Thread Roman Mashak
Hello

2008/9/30 Hebbar [EMAIL PROTECTED]:
 ARM Versatile has only one flash bank.
 What if a user has configured an incorrect number for flash banks.

Hm, I didn't think of it.

 The driver should take care of this properly. Since CFG_MAX_FLASH_BANKS
 is in a different place  the flash.c is a different file, care is taken to
 see
 that an incorrect bank is not considered for initialization

Yes, that makes sense then. Thank you.

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


[U-Boot] NAND flash support

2008-09-30 Thread Roman Mashak
Hello

I didn't find mentions of this in the archives, so asking here. I have
Samsung NAND flash K9F1G08 and its ID is present in
$(UBOOT)/include/linux/mtd/nand_ids.h  Does this mean there's no need
to write any additional supporting code? If not, then what board
utilizing the same NAND flash can be taken as a reference?

Thanks.

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


[U-Boot] NAND flash driver for Samsung K9F1G08

2008-09-30 Thread Roman Mashak
Hello

I'm using 128Mb Samsung NAND flash K9F1G08 on our custom ARM-based
board. Flash ID is in $(UBOOT)/include/linux/mtd/nand_ids.h
Seems this chip is not CFI compliant (at least datasheet says nothing
of it), so the use of CFI driver falls away.

The problem I faced is how to calculate max number of sectors on a
flash chip, i.e. CFG_MAX_FLASH_SECT parameter. Does CFG_MAX_FLASH_SECT
mean total max number of sectors on the device, or max number of
sectors on a page? If I divide total flash size on bytes by sector
size I get weird numbers, obviously I'm on a wrong way.

Will appreciate any comments.
Thanks.

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


Re: [U-Boot] NAND flash driver for Samsung K9F1G08

2008-09-30 Thread Roman Mashak
Hello

2008/9/30 Roman Mashak [EMAIL PROTECTED]:
 Flash ID is in $(UBOOT)/include/linux/mtd/nand_ids.h
 Seems this chip is not CFI compliant (at least datasheet says nothing
 of it), so the use of CFI driver falls away.

After some investigations I see that $(uboot)/drivers/mtd/nand/nand.c
is compiled in with CONFIG_CMD_NAND defined and CFG_NAND_LEGACY
undefined -- these two macros are mutually exclusive. Why do then some
platforms define both of them, for instance
$(uboot)/include/configs/at91rm9200dk.h  and what is the proper use of
these macros?

To make things more clear: NAND flash Samsung K9F1G08U is defined in
both $(uboot)/drivers/mtd/nand/nand_ids.c and
$(uboot)/include/linux/mtd/nand_ids.h, latter is included with
CFG_NAND_LEGACY defined. It confuses me, I don't understand is my
flash legacy device or rather new one? :-)

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


[U-Boot] question about environment variables

2008-09-26 Thread Roman Mashak
Hello

(1) I don't quite understand what README means about CFG_MONITOR_BASE
-- is it supposed to reflect the actual physical address, where u-boot
resides, i.e. either flash or SDRAM, or it deals with flash only? Why
I'm in doubts, because some targets in include/configs/boards do not
define this macro.

(2) do I understand right that when CFG_ENV_IS_NOWHERE defined,
environment variables are not changeable and always default values are
used.?

Thanks in advance!

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


[U-Boot] U-Boot's memory configuration

2008-09-26 Thread Roman Mashak
Hello

I was reading the U-Boot's README, section Memory management. I
don't quite understand, so please help me out:
1) does this section embrace various platforms and describe generic
behavior of U-boot or PPC-specific?
2) it presents memory configuration, as I understand, for the case of
booting from flash. How will it look when u-boot is loaded in RAM by
preliminary boot code?

I specifically want to understand how memory is organized by U-Boot on
ARM platform.

Sorry if question sounds silly.

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


Re: [U-Boot] platform configuration

2008-09-25 Thread Roman Mashak
Hello,

2008/9/25 Wolfgang Denk [EMAIL PROTECTED]:
 (2) this question is a consequence of the first.
 'struct bd_info' from $(UBOOT)/include/asm-arm/u-boot.h is a structure
 holding board's specific information, am I right?

 Not really. bd_info is passing boot information ot old (arch/ppc)
 PowerPC Linux kernels.

On the other hand this structure is used on many other platforms --
for example, in 'board_init()' functions presenting in
$(UBOOT)/board/board_name/...  Is this for compatibility or this
structure was later enhanced to support other target as well?

 (3) can't yet figure out how CONFIG_BOOTARGS  is pulled in. Somwhow it
 should get into board's information structure?

 No, not at all. It becomes part of the default U-Boot environment. See
 common/env_common.c

Alright -- 'default_environment' is populated with environment
variables and values. Environment is stored either in FLASH, NAND,
EEPROM etc. (depending on CFG_ENV_IS_IN_*).

'env_relocate()' is invoked from lib_arch/board.c. For instance, for
ARM it will be start_armboot() right after initialization gets done
(i.e. CPU, board, memory are ready) = therefore possible to put
environment in RAM.

The process also involves CRC checking and if it's faulty, then
restore configuration.

Well, something like that :) Correct me if I'm wrong.

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


Re: [U-Boot] platform configuration

2008-09-25 Thread Roman Mashak
Hello,

2008/9/25 Andrew Dyer [EMAIL PROTECTED]:
 Many (most?) ARM kernel ports use a format called ATAGS to pass
 information to the linux kernel at startup.CONFIG_CMDLINE_TAG tells
 u-boot to include ATAGS support, there are a variety of tags that can

Oh, I see now. The TAG structures are defined in
$(u-boot)/include/asm-arm/setup.h --- great deal of various tags
(video, memory, initrd and so on).

 be included with different CONFIG options.  Have a look at
 lib_arm/bootm.c - where the kernel actually gets called is in line
 125, like so:
 theKernel(0, machid, bd-bi_boot_params)

 where the arguments get put into registers r0, r1, r2 and are 0, the
 machine ID, and a pointer to the ATAGS structure respectively.
Thanks a lot for such a useful and clear explanation.

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


Re: [U-Boot] PrimeCell Peripherals

2008-09-24 Thread Roman Mashak
Hello,

2008/9/23 Gururaja Hebbar K R [EMAIL PROTECTED]:

[skip]
 Then the user has to also define a do_irq command to support the same

 Kindly look at below file for do_irq function definitions  its usage.

 uboot\cpu\arm720t\interrupts.c
 uboot\cpu\arm920t\interrupts.c

 i havent seen this function definitions for arm926ej-s except

 #ifndef CONFIG_USE_IRQ
 void do_irq (struct pt_regs *pt_regs)
 {
 ...

I'm a bit confused: 'do_irq' is defined in several files, including
CPU-specific (arm920t, 720t etc.) and ARM architecture library
($(U_BOOT)/lib_arm). So if we build for arm920t-based platform
(provided that CONFIG_USE_IRQ is defined), then which one will be
actually compiled in resulting image?

Thanks.

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


Re: [U-Boot] PrimeCell Peripherals

2008-09-24 Thread Roman Mashak
Hello,

2008/9/24 Gururaja Hebbar K R [EMAIL PROTECTED]:
 I'm a bit confused: 'do_irq' is defined in several files,
 including CPU-specific (arm920t, 720t etc.) and ARM
 architecture library ($(U_BOOT)/lib_arm). So if we build for
 arm920t-based platform (provided that CONFIG_USE_IRQ is
 defined), then which one will be actually compiled in resulting image?
[skip]

I must've confused you with the question. Let me try again: suppose we
build U-Boot for arm920t based target, in such a case, two files
defining 'do_irq' routine will be in compiled in --
$(UBOOT)/lib_arm/interrupts.c and $(UBOOT)/cpu/arm920t/interrupts.c.
Therefore I was wondering how it turns out that in the target image
one 'do_irq' function exists? Perhaps it's u-boot irrelevant question
and rather concern GNU toolchains behavior?

Thanks.

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


Re: [U-Boot] PrimeCell Peripherals

2008-09-24 Thread Roman Mashak
Hello,

2008/9/24 Gururaja Hebbar K R [EMAIL PROTECTED]:

[skip]
 So both are mutual exclusive and finally only one will be compiled.

Exactly! Really I didn't spot that subtle difference -- #ifdef, #ifndef.
Thanks for pointing out.

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


Re: [U-Boot] U-Boot on ARM9

2008-09-23 Thread Roman Mashak
Hello.

Thank you for your quick response.

2008/9/22 Hebbar [EMAIL PROTECTED]:
[skip]

 Generally bootloader doesnt use IRQ for running. But if u need to use
 IRQ/FIQ u need to setup stacks for the Same.

Right, because U-Boot is basically needed to initialize hardware and
prepaare it to launch OS on it. IRQ/FIQ may be necessary to run
standalone code within bootlloader ?

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


[U-Boot] PrimeCell Peripherals

2008-09-23 Thread Roman Mashak
Hello all,

the board I'm porting U-Boot on, has several peripheral devices, which
are, according to datasheet, are based on PrimeCell PLxx blocks (for
example, vector interrupt controller is PL190 based; GPIOs are based
on PL061 block and so on). I understand that PrimeCells are IP cores,
which build up a variety of controllers for peripherals.

Therefore I wonder, how well does U-Boot support ARM's PrimeCell
peripherals? Greping sources gave only a couple of hits. I think these
basic controllers like GPIO, interrupt controller etc., which are
widely used on many ARM based platforms (i.e. (AMBA bus-compliant),
but marked in U-Boot sources with different names or so ?

Thanks in advance.

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


Re: [U-Boot] PrimeCell Peripherals

2008-09-23 Thread Roman Mashak
Hello,

2008/9/23 Hebbar [EMAIL PROTECTED]:
 I use U-booot as The Primary Bootloader on arm926ej-s based Board.

 By Default U-boot supports few Primecell peripherals drivers like PL0x1
 UART.

Right, that's what I've found in the U-Boot sources. How come that
widely used interrupt controllers like PL19x are not supported by
default?

 I developed few others my self, like pl18x mmc, rtc, gpio.

 I recently sent a patch for RTC pl031.
Yes, I saw that patch. Are you planning to send patch for GPIO as well?

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


Re: [U-Boot] PrimeCell Peripherals

2008-09-23 Thread Roman Mashak
Hello,

2008/9/23 Gururaja Hebbar K R [EMAIL PROTECTED]:
 Thats because Most of the ARM based boards doesnt use Interrupts. Atleast as 
 far as i have seen.
 IIRC U-boot is a single process bootloader  hence Interrupts are not so much 
 supported.
 Is there any interrupt related drivers in U-boot for other platforms?

In U-Boot source tree there are number of drivers with interrupt
service routines running (for example,
$(U_BOOT)/drivers/net/bcm570x.c) as well as various interrupts related
macros (some of them not used thought), if this is what you mean.
Perhaps these definitions are for future ?

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


Re: [U-Boot] PrimeCell Peripherals

2008-09-23 Thread Roman Mashak
To add a bit to my previous message.

2008/9/23 Gururaja Hebbar K R [EMAIL PROTECTED]:
 Thats because Most of the ARM based boards doesnt use Interrupts. Atleast as 
 far as i have seen.

As far as I understood from U-Boot's README, a standalone mode can and
may want to use interrupts -- so it'd reasonable to have interrupts
controllers support, isn't it? Correct me if I'm wrong, just trying to
understand the architecture of U-Boot more deeply.

 IIRC U-boot is a single process bootloader  hence Interrupts are not so much 
 supported.
 Is there any interrupt related drivers in U-boot for other platforms?

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


Re: [U-Boot] PrimeCell Peripherals

2008-09-23 Thread Roman Mashak
Hi,

2008/9/23 Gururaja Hebbar K R [EMAIL PROTECTED]:

 At $(U_BOOT)/drivers/net/bcm570x.c files header, it says

  * Broadcom BCM570x Ethernet Driver for U-Boot.
  * Support 5701, 5702, 5703, and 5704. Single instance driver.

 -- Single Instance Driver. Does this mean it doesn't handle Interrupt.
 Sorry I cannot say more as I don't have any knowledge abt this

 Also,

 CONFIG_BCM570x is used in $(U_BOOT)/include/configs/BMW.h which is a MPC 
 based Board.

 May be MPC uses interrupts for its operation inside U-Boot.

Probably you're right and interrupts related stuff is meanugful on PPC
platform; moreover README says about interrupts mainly in PPC or
PowerPC marked sections.

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


[U-Boot] U-Boot on ARM9

2008-09-22 Thread Roman Mashak
Hello.

I have a few questions on arm926 initialization code, located in
${U_BOOT}/cpu/arm926ejs/start.S:
1) what is the point of deliberately setting up SVC mode, as it's
already in this mode right upon the reset?
2) I can't quite understand what 'CONFIG_USE_IRQ' is used for. It is
defined on just a few targets.
3) The stack set up -- commonly startup code initializes stacks for
all modes, but it's not clear how it's done in 'start.S'. Seems like
somehow stacks are run-time configured, but I didn't perceive  how.

Thanks in advance for comments.

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


Re: [U-Boot] U-Boot and ELDK

2008-09-17 Thread Roman Mashak
Hello,

2008/9/12 Wolfgang Denk [EMAIL PROTECTED]:
 What version would you recommend for arm9 development? The latest is
 4.2, is it fine?

 ELDK 4.2 for ARM has not been released yet; that will take a few mnore
 weeks (4...5, I think). Please use ELDK 4.1 for now.

One more question to clarify my doubts: it's valid to use ELDK
toolchain for both building bootloader and linux kernel? I ever
encountered cases where two distinct toolchains were used to compile
u-boot and kernel, target was ARM9. Does it make sense, and what might
be the reasons for that?

Thanks.

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


[U-Boot] U-Boot and ELDK

2008-09-12 Thread Roman Mashak
Hello.

I apologize if my question sounds silly :)

There are numerous toolchains and kits out there -- head's spinning.
ELDK is one of them. In my understanding ELDK focuses on PowerPC
architecture, but toolchains for ARM/MIPS architectures are also
available. How reasonable is it to take it and use it for, let's say,
ARM9 based platform ?

How necessary is it to install ELDK in order to be able to compile
U-Boot for non-PPC platform?

Thanks.

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


Re: [U-Boot] running u-boot from SDRAM

2008-09-05 Thread Roman Mashak
Hello Wolfgang,

2008/9/4 Wolfgang Denk [EMAIL PROTECTED]:
 I guess you are aware that SRDAM cannot just be used, instead it must
 initialized correctly before you can access it. Your master  is  also
 performing this initialization procedure, then?

Yes, it is.

 Therefore I'm wondering -- will U-Boot be fine with such a boot mode,
 usually systems start from flash (NOR or NAND), but here it's in RAM.
 I believe it should be OK, but just want to make sure.

 It doesn't hurt when the device  where  U-Boot  is  booting  from  is
 writable.  You  have to take care not to try tF12o re-initialize the RAM
 in U-Boot, though.

This is my understanding that I have to define these optioins:
CONFIG_SKIP_LOWLEVEL_INIT and CONFIG_SKIP_RELOCATE_UBOOT in order to
avoid re-initialization of RAM and copying U-Boot image in to RAM.

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


[U-Boot] running u-boot from SDRAM

2008-09-04 Thread Roman Mashak
Hello,

I need to port U-Boot on the platform, consisting of master and
daughter boards. Master boards runs WinCE; daughter board features
SoC, based on ARM926EJ-S, on-chip SDRAM and ROM. Master launches
daughter board by downloading binary image of bootcode in to the
on-chip SDRAM, then does remap (i.e. 0x0 points at SDRAM) and boot
loader starts off.

Therefore I'm wondering -- will U-Boot be fine with such a boot mode,
usually systems start from flash (NOR or NAND), but here it's in RAM.
I believe it should be OK, but just want to make sure.

Looking forward to receiving feedback from you.
Thanks.

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


[U-Boot] U-Boot version for a new port

2008-09-02 Thread Roman Mashak
Hello,

I'm planning to make a port on a ARM926EJ-S based board. What is the
recommended way: take release or GIT version as a base ?
Thanks.

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


Re: [U-Boot] U-Boot version for a new port

2008-09-02 Thread Roman Mashak
Hi,

2008/9/2 Gururaja Hebbar K R [EMAIL PROTECTED]:
 Depends on what processor you are using, atmel at91sam9 series or omap
 or ti davinci

It's LG's system-on-chip, consisting of main CPU (ARM926EJ-S based),
running at 216MHz, mpeg2/mpeg4/audio decoding engines, LCD interface,
UART. On-chip ROM available serves for preliminary bootloader, which
copies NAND flash content in to SDRAM.

 If s, then check if your board/processor configs match with any of
 these.

 Try to port their configuration  files to your board.

 Look at arm versatile board, ti davinci boards for reference.

I was considering this, but thought there would probably be something
more specific. Anyway, I need to investigate H/W more thoroughly.

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


Re: [U-Boot] U-Boot version for a new port

2008-09-02 Thread Roman Mashak
Hello,

2008/9/2 Jerry Van Baren [EMAIL PROTECTED]:

[skip]

I didn't work with 'git' before, mainly subversion and CVS -- need
time to master up this tool. Is it correct to issue

git clone git://www.denx.de/git/u-boot.git u-boot/

in order to obtain local copy of the current sources ?

 The current window for changes is (almost) closed: there will be a period of
 stabilization.  The ToT is generally stable despite the change

What is ToT ?

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