[U-Boot] how to use a function provided by u-boot in linux driver

2009-05-18 Thread Kartheek N S

Hi All,
 I would like to use miiphy_read and miiphy_write functions provided by
u-boot in the linux kernel driver.
 This is required for reading the link status of each of the phys
associated with a switch.

I added miiphy_read and miiphy_write to the exports.h and tried to use
it in the kernel. But we get lots of multiple reference errors as some
libraries will be there both in u-boot and linux kernel.

Could I do something like a dll or lib for these functions and use them
in the linux kernel driver ?
Please guide me on this.

Thanks,
Kartheek N S
-- 
View this message in context: 
http://www.nabble.com/how-to-use-a-function-provided-by-u-boot-in-linux-driver-tp23610373p23610373.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

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


[U-Boot] my u-boot freezing at Uncompress Linux...

2009-05-18 Thread SlinceArm

Hi. dear all

my u-boot-2008.03 use tftp download my kernel , 

but my u-boot was frezzing at Uncompressing Linux ...

and show nothing anymore in my console

i try another way to start my kernel : nfs , but there is the same issue in
my u-boot .


//here are is u-boot information in my console 

TFTP from server 192.168.1.3; our IP address is 192.168.1.8 
Filename 'uImage'.  
Load address: 0x3100
Loading: #  
 ###
done
Bytes transferred = 1403736 (156b58 hex)
## Booting kernel from Legacy Image at 3100 ... 
   Image Name:   slincearm_bootloader   
   Created:  2009-05-19   5:11:32 UTC   
   Image Type:   ARM Linux Kernel Image (uncompressed)  
   Data Size:1403672 Bytes =  1.3 MB
   Load Address: 3100   
   Entry Point:  3140   
   Verifying Checksum ... OK
   XIP Kernel Image ... OK  
OK  

Starting kernel ... 

Uncompressing
Linux.

-- 
View this message in context: 
http://www.nabble.com/my-u-boot-freezing-at-Uncompress-Linux...-tp23610073p23610073.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

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


[U-Boot] [PATCH] Add a + prefix form to nand commands.

2009-05-18 Thread Josh Karabin
Permit the use of a + prefix to sizes in nand commands to extend operations
to multiples of the appropriate page or erase block size.

Signed-off-by: Josh Karabin 
---
 common/cmd_nand.c |  122 +++--
 1 files changed, 99 insertions(+), 23 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 1992531..516363e 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -102,14 +102,23 @@ static inline int str2long(char *p, ulong *num)
 }
 
 static int
-arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t 
*size)
+arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, 
+   size_t *size, size_t *headsize, size_t *tailsize)
 {
int idx = nand_curr_device;
+   char *ps = argv[1];
+   size_t max_tailsize;
 #if defined(CONFIG_CMD_MTDPARTS)
struct mtd_device *dev;
struct part_info *part;
u8 pnum;
+#endif
+   max_tailsize = *tailsize;
+
+   if (argc >= 1 && *ps == '+')
+   ps++;
 
+#if defined(CONFIG_CMD_MTDPARTS)
if (argc >= 1 && !(str2long(argv[0], off))) {
if ((mtdparts_init() == 0) &&
(find_dev_and_part(argv[0], &dev, &pnum, &part) == 0)) {
@@ -119,8 +128,8 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, 
ulong *off, size_t *size
}
*off = part->offset;
if (argc >= 2) {
-   if (!(str2long(argv[1], (ulong *)size))) {
-   printf("'%s' is not a number\n", 
argv[1]);
+   if (!(str2long(ps, (ulong *)size))) {
+   printf("'%s' is not a number\n", ps);
return -1;
}
if (*size > part->size)
@@ -145,8 +154,8 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, 
ulong *off, size_t *size
}
 
if (argc >= 2) {
-   if (!(str2long(argv[1], (ulong *)size))) {
-   printf("'%s' is not a number\n", argv[1]);
+   if (!(str2long(ps, (ulong *)size))) {
+   printf("'%s' is not a number\n", ps);
return -1;
}
} else {
@@ -156,6 +165,16 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, 
ulong *off, size_t *size
 #if defined(CONFIG_CMD_MTDPARTS)
 out:
 #endif
+   if (ps != argv[1]) {
+   *tailsize = *size & (max_tailsize - 1);
+   *headsize = *size - *tailsize;
+   if (*tailsize)
+   *size = *headsize + max_tailsize;
+   } else {
+   *tailsize = 0;
+   *headsize = *size;
+   }
+
printf("device %d ", idx);
if (*size == nand->size)
puts("whole chip\n");
@@ -229,6 +248,8 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
int quiet = 0;
 #endif
const char *quiet_str = getenv("quiet");
+   size_t tailsize = 0;
+   size_t headsize = 0;
 
/* at least two arguments please */
if (argc < 2)
@@ -317,12 +338,14 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
 
printf("\nNAND %s: ", scrub ? "scrub" : "erase");
/* skip first two or three arguments, look for offset and size 
*/
-   if (arg_off_size(argc - o, argv + o, nand, &off, &size) != 0)
+   tailsize = nand->erasesize;
+   if (arg_off_size(argc - o, argv + o, nand, &off, &size,
+   &headsize, &tailsize) != 0)
return 1;
 
memset(&opts, 0, sizeof(opts));
opts.offset = off;
-   opts.length = size;
+   opts.length = headsize;
opts.jffs2  = clean;
opts.quiet  = quiet;
 
@@ -346,7 +369,18 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
return -1;
}
}
-   ret = nand_erase_opts(nand, &opts);
+
+   if (headsize)
+   ret = nand_erase_opts(nand, &opts);
+   else
+   ret = 0;
+   
+   if (!ret && tailsize) {
+   opts.offset = off + headsize;
+   opts.length = nand->erasesize;
+   ret = nand_erase_opts(nand, &opts);
+   }
+
printf("%s\n", ret ? "ERROR" : "OK");
 
return ret == 0 ? 0 : 1;
@@ -378,23 +412,52 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
 
read = strncmp(cmd, "read", 4) == 0; /* 1 = read, 0 = write */
printf("\nNAND %s: ", read ? "read" : "write");
-   if (arg_off_size(argc - 3, ar

Re: [U-Boot] [PATCH v2 05/10] Rename ads5121 board into mpc5121ads

2009-05-18 Thread Kim Phillips
On Sat, 16 May 2009 10:47:41 +0200
Wolfgang Denk  wrote:

> 
> We rename the board so we use a consistent name in U-Boot and in
> Linux.  Also, we use this opportunity to move the board into the
> Freecale vendor directory.
> 
> Signed-off-by: Wolfgang Denk 
> Cc: John Rigby 
> ---
>  MAKEALL |2 +-
>  Makefile|6 +-
>  board/ads5121/Makefile  |   53 ---
>  board/ads5121/README|7 -
>  board/ads5121/ads5121.c |  331 ---
>  board/ads5121/config.mk |   23 --
>  board/freescale/mpc5121ads/Makefile |   53 +++
>  board/freescale/mpc5121ads/README   |7 +
>  board/freescale/mpc5121ads/config.mk|   23 ++
>  board/freescale/mpc5121ads/mpc5121ads.c |  331 +++
>  include/configs/ads5121.h   |  550 
> ---
>  include/configs/mpc5121ads.h|  550 
> +++

great consolidating so many patches - much easier to review.

it's just that we get into the habit of using git format-patch -B -M -
it greatly facilitates reviewing mass-rename patches such as this one.

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


Re: [U-Boot] [PATCH v7] Marvell Kirkwood family SOC support

2009-05-18 Thread Wolfgang Denk
Dear Prafulla Wadaskar,


> +unsigned char get_random_hex(void)
> +{
> + int i;
> + u32 inbuf[16];
> + u8 outbuf[16];
> +
> + /*
> +  * in case of 88F6281/88F6192 A0,
> +  * Bit7 need to reset to generate random values in KW_REG_UNDOC_0x1470
> +  * Soc reg offsets KW_REG_UNDOC_0x1470 and KW_REG_UNDOC_0x1478 are 
> reserved regs and
> +  * Does not have names at this moment (no errata available)
> +  */
> + writel(readl(KW_REG_UNDOC_0x1478) & ~(1 << 7), KW_REG_UNDOC_0x1478);
> + for (i = 0; i < 16; i++) {

either use a #define'd name instead of the repeated 16, or use
sizeof(inbuf), but don't hard-code the same constant in multiple
places. This is calling for inconsistency.

> --- /dev/null
> +++ b/drivers/serial/kirkwood_serial.c
> @@ -0,0 +1,129 @@
...
...
> +static void kw_uart_putc(u8 c)
> +{
> + while ((p_uart_port->lsr & LSR_THRE) == 0) ;
> + p_uart_port->thr = c;
> + return;
> +}
> +
> +void serial_putc(const char c)
> +{
> + if (c == '\n')
> + kw_uart_putc('\r');
> +
> + kw_uart_putc(c);
> +}
> +
> +int serial_getc(void)
> +{
> + while ((p_uart_port->lsr & LSR_DR) == 0) ;
> + return (p_uart_port->rbr);
> +}
> +
> +int serial_tstc(void)
> +{
> + return ((p_uart_port->lsr & LSR_DR) != 0);
> +}
> +
> +void serial_setbrg(void)
> +{
> + DECLARE_GLOBAL_DATA_PTR;
> +
> + int clock_divisor = (CONFIG_SYS_TCLK / 16) / gd->baudrate;
> +
> + p_uart_port->ier = 0x00;
> + p_uart_port->lcr = LCR_DIVL_EN; /* Access baud rate */
> + p_uart_port->dll = clock_divisor & 0xff;/* 9600 baud */
> + p_uart_port->dlm = (clock_divisor >> 8) & 0xff;
> + p_uart_port->lcr = LCR_8N1; /* 8 data, 1 stop, no parity */
> + /* Clear & enable FIFOs */
> + p_uart_port->fcr = FCR_FIFO_EN | FCR_RXSR | FCR_TXSR;
> + return;

Please use I/O accessors instead of all trhese raw register accesses.

> +/* SOC specific definations */
> +#define INTREG_BASE  0xd000
> +#define KW_REGISTER(x)   (KW_REGS_PHY_BASE | x)
> +#define KW_OFFSET_REG(INTREG_BASE | 0x20080)

You want to perform a "base + offset" addition, so please write this
as an addition and not as a logical operation! But...

> +/* undocumented registers */
> +#define KW_REG_UNDOC_0x1470  (KW_REGISTER(0x1470))
> +#define KW_REG_UNDOC_0x1478  (KW_REGISTER(0x1478))
> +
> +#define KW_UART0_BASE(KW_REGISTER(0x12000))  /* UArt 
> 0 */
> +#define KW_UART1_BASE(KW_REGISTER(0x13000))  /* UArt 
> 1 */
> +
> +/* Controler environment registers offsets */
> +#define KW_REG_MPP_CONTROL0  (KW_REGISTER(0x1))
> +#define KW_REG_MPP_CONTROL1  (KW_REGISTER(0x10004))
> +#define KW_REG_MPP_CONTROL2  (KW_REGISTER(0x10008))
> +#define KW_REG_MPP_CONTROL3  (KW_REGISTER(0x1000C))
> +#define KW_REG_MPP_CONTROL4  (KW_REGISTER(0x10010))
> +#define KW_REG_MPP_CONTROL5  (KW_REGISTER(0x10014))
> +#define KW_REG_MPP_CONTROL6  (KW_REGISTER(0x10018))
> +#define KW_REG_MPP_SMPL_AT_RST   (KW_REGISTER(0x10030))
> +#define KW_REG_DEVICE_ID (KW_REGISTER(0x10034))
> +#define KW_REG_MPP_OUT_DRV_REG   (KW_REGISTER(0x100E0))
> +
> +#define KW_REG_GPP0_DATA_OUT (KW_REGISTER(0x10100))
> +#define KW_REG_GPP0_DATA_OUT_EN  (KW_REGISTER(0x10104))
> +#define KW_REG_GPP0_BLINK_EN (KW_REGISTER(0x10108))
> +#define KW_REG_GPP0_DATA_IN_POL  (KW_REGISTER(0x1010C))
> +#define KW_REG_GPP0_DATA_IN  (KW_REGISTER(0x10110))
> +#define KW_REG_GPP0_INT_CAUSE(KW_REGISTER(0x10114))
> +#define KW_REG_GPP0_INT_MASK (KW_REGISTER(0x10118))
> +#define KW_REG_GPP0_INT_LVL  (KW_REGISTER(0x1011c))
> +
> +#define KW_REG_GPP1_DATA_OUT (KW_REGISTER(0x10140))
> +#define KW_REG_GPP1_DATA_OUT_EN  (KW_REGISTER(0x10144))
> +#define KW_REG_GPP1_BLINK_EN (KW_REGISTER(0x10148))
> +#define KW_REG_GPP1_DATA_IN_POL  (KW_REGISTER(0x1014C))
> +#define KW_REG_GPP1_DATA_IN  (KW_REGISTER(0x10150))
> +#define KW_REG_GPP1_INT_CAUSE(KW_REGISTER(0x10154))
> +#define KW_REG_GPP1_INT_MASK (KW_REGISTER(0x10158))
> +#define KW_REG_GPP1_INT_LVL  (KW_REGISTER(0x1015c))
> +
> +#define KW_REG_NAND_READ_PARAM   (KW_REGISTER(0x10418))
> +#define KW_REG_NAND_WRITE_PARAM  (KW_REGISTER(0x1041c))
> +#define KW_REG_NAND_CTRL (KW_REGISTER(0x10470))
> +
> +#define KW_REG_WIN_CTRL(x)   (KW_REGISTER((0x2 + (x * 0x10
> +#define KW_REG_WIN_BASE(x)   (KW_REGISTER((0x20004 + (x * 0x10
> +#define KW_REG_WIN_REMAP_LOW(x)  (KW_REGISTER((0x20008 + (x * 
> 0x10
> +#define KW_REG_WIN_REMAP_HIGH(x) (KW_REGISTER((0x2000c + (x * 0x10
> +
> +#define KW_REG_CPU_CONFIG(KW_REGISTER(0x20100))
> +#define K

Re: [U-Boot] [PATCH] ARM DaVinci Leopard Board Support

2009-05-18 Thread Paulraj, Sandeep


From: Jean-Christophe PLAGNIOL-VILLARD [plagn...@jcrosoft.com]
Sent: Monday, May 18, 2009 5:25 PM
To: Wolfgang Denk
Cc: Paulraj, Sandeep; u-boot@lists.denx.de
Subject: Re: [U-Boot] [PATCH] ARM DaVinci Leopard Board Support

On 22:47 Mon 18 May , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
>
> In message <20090518202149.gg17...@game.jcrosoft.org> you wrote:
> >
> > > +#ifndef __CONFIG_H
> > > +#define __CONFIG_H
> > > +#include 
> > > +
> > > +
> > > +#define DAVINCI_LEOPARD
> > please CONFIG_
>
> Or rather CONFIG_SYS_DAVINCI_LEOPARD
>
> This is not a user-0selectable parameter, and such are fobidden
> outside the board config files anyway.
>
> > > +#define CONFIG_SYS_NAND_SMALLPAGE
> > > +#define CONFIG_SYS_NAND_BASE_LIST{ 0x0200, }
> > please use macro
>
> ??? Please explain what you mean here. This is a macro, isn't it?
replase 0x0200 by DAVINCI_ASYNC_EMIF_DATA_CE0_BASE

will do. depends on whether you accept another patch that i sent. That is 
required to include
the hardware.h file
>
> > > +/* U-Boot general configuration */
> > > +#undef CONFIG_USE_IRQ/* No IRQ/FIQ in U-Boot 
> > > */
> > > +#define CONFIG_BOOTFILE  "uImage"/* Boot file name */
> > > +#define CONFIG_SYS_PROMPT"LEOPARD EVM # "
> > > +#define CONFIG_SYS_CBSIZE1024/* Console I/O Buffer 
> > > Size  */
> > why 1k?
>
> Why not? That's a config option...
just ask to known why they need 1K?
we have very long bootargs that can be passed to the video drivers

Best Regards,
J.

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


Re: [U-Boot] [RFC] API Licence

2009-05-18 Thread Wolfgang Denk
Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <20090518212049.gj17...@game.jcrosoft.org> you wrote:
>
> I've to write an application that need to use the mmc and net but can not
> be under GPL

MMC is not exported to API, is it?

And why cannot your application be under GPL?

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
If you think the problem is bad now, just wait until we've solved it.
Epstein's Law
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC] API Licence

2009-05-18 Thread Mike Frysinger
On Monday 18 May 2009 17:20:49 Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:16 Mon 18 May , Mike Frysinger wrote:
> > On Monday 18 May 2009 16:31:39 Jean-Christophe PLAGNIOL-VILLARD wrote:
> > >   I'd like to known if it's possible to update the COPYING
> > >
> > > NOTE! This copyright does *not* cover the so-called "standalone"
> > > applications that use U-Boot services by means of the jump table
> > > provided by U-Boot exactly for this purpose - this is merely
> > > considered normal use of U-Boot, and does *not* fall under the
> > > heading of "derived work".
> > >
> > >   to also include the API as a non derived work as the standalone?
> >
> > that sounds like a bad idea.  then people could add all the API hooks
> > they wanted rather than just the ones we deemed they could use. 
> > basically you're opening up all of u-boot for direct access.
>
> The idea is not to open every think but allow as in the kernel allow just a
> part of it

which is a loop hole that i dont think we should follow

> > what exactly are you trying to accomplish ?
>
> I've to write an application that need to use the mmc and net but can not
> be under GPL

so ask for the API to be extended.  we dont have any functions for working 
with file systems and i think that's reasonable.
-mike
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCHv2 1/4] omap3: embedd gpmc_cs into gpmc config struct

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 09:25 Fri 15 May , Matthias Ludwig wrote:
> Dear Jean-Christophe
> 
> > >  #ifndef __ASSEMBLY__
> > > +struct gpmc_cs {
> > > + unsigned int config1;   /* 0x00 */
> > > + unsigned int config2;   /* 0x04 */
> > > + unsigned int config3;   /* 0x08 */
> > > + unsigned int config4;   /* 0x0C */
> > > + unsigned int config5;   /* 0x10 */
> > > + unsigned int config6;   /* 0x14 */
> > > + unsigned int config7;   /* 0x18 */
> > why not an array so can use a loop as in enable_gpmc_cs_config()
> 
> i also thought about that. Config 1 to 7 are the names used by TI's
> processor manuals, replacing by an array would lead to 0 - 6. If this
> would only be used in enable_gpmc_cs_config that wouldn't bother much,
> but as it is also used in evm/evm.h for example i think it will bring
> more confusion than it helps to simplify the code.
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 v2] OMAP3: Introduce CONFIG option for power code

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 07:56 Sat 16 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.
> 
> Signed-off-by: Dirk Behme 
> ---
IIRC the Revc Change it's companion chip is this code still compatible?

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


Re: [U-Boot] [PATCH] OMAP3: Fix CKE1 MUX setting to allow self-refresh

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 08:39 Sat 16 May , Dirk Behme wrote:
> The Beagle rev Cx and Overo boards are using both SDRC CSes. The MUX
> setting is needed for the second CS clock signal to allow the 2 RAM
> parts to be put in self-refresh correctly. This also works on rev B
> Beagle boards with 128M of RAM.
> 
> From: Steve Sakoman 
> From: Jean Pihet 
> Signed-off-by: Jean Pihet 
> Signed-off-by: Steve Sakoman 
> Signed-off-by: Dirk Behme 
> ---
apply to next
> 
>  board/omap3/beagle/beagle.h |2 +-
>  board/omap3/overo/overo.h   |2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Index: u-boot-main/board/omap3/overo/overo.h
> ===
please use git
> --- u-boot-main.orig/board/omap3/overo/overo.h
> +++ u-boot-main/board/omap3/overo/overo.h
> @@ -376,6 +376,6 @@ const omap3_sysinfo sysinfo = {
>   MUX_VAL(CP(D2D_MBUSFLAG),   (IEN  | PTD | DIS | M0)) /*d2d_mbusflag*/\
>   MUX_VAL(CP(D2D_SBUSFLAG),   (IEN  | PTD | DIS | M0)) /*d2d_sbusflag*/\
>   MUX_VAL(CP(SDRC_CKE0),  (IDIS | PTU | EN  | M0)) /*sdrc_cke0*/\
> - MUX_VAL(CP(SDRC_CKE1),  (IDIS | PTD | DIS | M7)) /*sdrc_cke1*/
> + MUX_VAL(CP(SDRC_CKE1),  (IDIS | PTU | EN  | M0)) /*sdrc_cke1*/
it really time to use a better mux api + a device init framework
to simplify this
(not requiered for this patch)

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


Re: [U-Boot] [PATCH v8] Marvell MV88F6281GTW_GE Board support

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
> + * Each MPP functionality can be configuration by a 4bit value
> + * of MPP control reg, the value and associated functionality is SoC
> + * varient dependent
> + */
> +#define MV88F6281GTW_GE_MPP0_7   0x0111
> +#define MV88F6281GTW_GE_MPP8_15  0x11103311
> +#define MV88F6281GTW_GE_MPP16_23 0x
> +#define MV88F6281GTW_GE_MPP24_31 0x
> +#define MV88F6281GTW_GE_MPP32_39 0x40440222
> +#define MV88F6281GTW_GE_MPP40_47 0x
> +#define MV88F6281GTW_GE_MPP48_55 0x
could you use a more details macros
and I think we can use a device init framework
to simply it
> +
> +#endif /* __MV88F6281GTW_GE_H */
> diff --git a/include/configs/mv88f6281gtw_ge.h 
> b/include/configs/mv88f6281gtw_ge.h
> new file mode 100644
> index 000..6ec59f7
> --- /dev/null
> +++ b/include/configs/mv88f6281gtw_ge.h
> @@ -0,0 +1,180 @@
> +/*
> + * (C) Copyright 2009
> + * Marvell Semiconductor 
> + * Prafulla Wadaskar 
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> + * MA 02110-1301 USA
> + */
> +
> +#ifndef _CONFIG_MV88F6281GTW_GE_H
> +#define _CONFIG_MV88F6281GTW_GE_H
> +
> +/*
> + * Version number information
> + */
> +#define CONFIG_IDENT_STRING  "\nMarvell-MV88F6281GTW_GE-A0"
> +
> +/*
> + * High Level Configuration Options (easy to change)
> + */
> +#define CONFIG_MARVELL   1
> +#define CONFIG_ARM926EJS 1   /* Basic Architecture */
> +#define CONFIG_FEROCEON_88FR131  1   /* CPU Core subversion */
> +#define CONFIG_KIRKWOOD  1   /* SOC Family Name */
> +#define CONFIG_KW88F6281 1   /* SOC Name */
> +#define CONFIG_MACH_MV88F6281GTW_GE  /* Machine type */
> +
> +#define CONFIG_MD5   /* get_random_hex on krikwood needs MD5 support */
> +#define CONFIG_ARCH_LOWLEVEL_INIT/* enable arch_lowlevel_init */
> +#define CONFIG_SKIP_LOWLEVEL_INIT/* disable board lowlevel_init */
NACK
If you so skip the lowlevel init you will skip *ALL* lowlevel_init arch
include
> +#define CONFIG_KIRKWOOD_EGIGA_INIT   /* Enable GbePort0/1 for kernel */
> +#define CONFIG_KIRKWOOD_PCIE_INIT/* Enable PCIE Port0 for kernel */
> +#define CONFIG_KIRKWOOD_RGMII_PAD_1V8/* Set RGMII Pad voltage to 
> 1.8V */
> +
Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7.1] Marvell Kirkwood family SOC support

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
> 
> v7.1: u-boot.lds moved from board specific to kirkwood
> 
you can remove the u-boot.lds
and it's reference in cpu/arm926ejs/config.mk as you use the same as the
cpu/arm926ejs/u-boot.lds

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


Re: [U-Boot] [PATCH v7] Marvell Kirkwood family SOC support

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
> +
> + icache_enable();
> + /* Change reset vector to address 0x0 */
> + temp = get_cr();
> + set_cr(temp & ~CR_V);
> +
> + return 0;
> +}
> +#endif /* CONFIG_ARCH_MISC_INIT */
> diff --git a/cpu/arm926ejs/kirkwood/cpu.h b/cpu/arm926ejs/kirkwood/cpu.h
please move to include/asm-arm/arch-kirkwood/
> new file mode 100644
> index 000..d36835b
> --- /dev/null
> +++ b/cpu/arm926ejs/kirkwood/cpu.h
> @@ -0,0 +1,103 @@
> +/*
> + * (C) Copyright 2009
> + * Marvell Semiconductor 
> + * Prafulla Wadaskar 
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> + * MA 02110-1301 USA
> + */
> +
> +#ifndef _KWCPU_H
> +#define _KWCPU_H
> +
> +#include 
> +
> +#ifndef __ASSEMBLY__
> +
> +#define KWGBE_PORT_SERIAL_CONTROL1_REG(_x)   \
> + ((_x ? KW_EGIGA0_BASE : KW_EGIGA1_BASE) + 0x44c)
> +
> +enum memory_bank {
> + BANK0,

> +void serial_putc(const char c)
> +{
> + if (c == '\n')
> + kw_uart_putc('\r');
> +
> + kw_uart_putc(c);
> +}
> +
> +int serial_getc(void)
> +{
> + while ((p_uart_port->lsr & LSR_DR) == 0) ;
while(!serial_tstc());
> + return (p_uart_port->rbr);
> +}
> +
> +int serial_tstc(void)
> +{
> + return ((p_uart_port->lsr & LSR_DR) != 0);
> +}
> +
> +void serial_setbrg(void)
> +{
> + DECLARE_GLOBAL_DATA_PTR;
> +
> + int clock_divisor = (CONFIG_SYS_TCLK / 16) / gd->baudrate;
> +
> + p_uart_port->ier = 0x00;
> + p_uart_port->lcr = LCR_DIVL_EN; /* Access baud rate */
> + p_uart_port->dll = clock_divisor & 0xff;/* 9600 baud */
> + p_uart_port->dlm = (clock_divisor >> 8) & 0xff;
> + p_uart_port->lcr = LCR_8N1; /* 8 data, 1 stop, no parity */
> + /* Clear & enable FIFOs */
> + p_uart_port->fcr = FCR_FIFO_EN | FCR_RXSR | FCR_TXSR;
> + return;
> +}
> +
> +void serial_puts(const char *s)
> +{
> + while (*s) {
> + serial_putc(*s++);
> + }
> +}
> +
> +#ifdef CONFIG_CMD_KGDB
> +void kgdb_serial_init(void)
> +{
> +}
> +
> +void putDebugChar(int c)
> +{
> + serial_putc(c);
> +}
> +
> +void putDebugStr(const char *str)
> +{
> + serial_puts(str);
> +}
> +
> +int getDebugChar(void)
> +{
> + return serial_getc();
> +}
> +
> +void kgdb_interruptible(int yes)
> +{
> + return;
> +}
> +#endif /* CONFIG_CMD_KGDB */
no need please remove the KGBD support as the does not support it
> diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
> index 1350f3e..7ffa47d 100644
> --- a/drivers/spi/Makefile
> +++ b/drivers/spi/Makefile
> @@ -28,6 +28,7 @@ LIB := $(obj)libspi.a
>  COBJS-$(CONFIG_ATMEL_DATAFLASH_SPI) += atmel_dataflash_spi.o
>  COBJS-$(CONFIG_ATMEL_SPI) += atmel_spi.o
>  COBJS-$(CONFIG_BFIN_SPI) += bfin_spi.o
> +COBJS-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o
>  COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o
>  COBJS-$(CONFIG_MXC_SPI) += mxc_spi.o
>  COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o
...
> diff --git a/include/asm-arm/arch-kirkwood/kirkwood.h 
> b/include/asm-arm/arch-kirkwood/kirkwood.h
> new file mode 100644
> index 000..0e6e0be
> --- /dev/null
> +++ b/include/asm-arm/arch-kirkwood/kirkwood.h
> @@ -0,0 +1,117 @@
> +/*
> + * (C) Copyright 2009
> + * Marvell Semiconductor 
> + * Prafulla Wadaskar 
> + *
> + * Header file for the Marvell's Feroceon CPU core.
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> + * MA 02110-1301 USA
> + */
> +
> +#ifndef _ASM_ARCH_KIRKWOOD_H
> +#define _ASM_ARCH_KIRKWOOD_H
> +
> +#ifndef __ASSEMBLY__
> +#in

Re: [U-Boot] [PATCH] ARM DaVinci Leopard Board Support

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 22:47 Mon 18 May , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> In message <20090518202149.gg17...@game.jcrosoft.org> you wrote:
> >
> > > +#ifndef __CONFIG_H
> > > +#define __CONFIG_H
> > > +#include 
> > > +
> > > +
> > > +#define DAVINCI_LEOPARD
> > please CONFIG_
> 
> Or rather CONFIG_SYS_DAVINCI_LEOPARD
> 
> This is not a user-0selectable parameter, and such are fobidden
> outside the board config files anyway.
> 
> > > +#define CONFIG_SYS_NAND_SMALLPAGE
> > > +#define CONFIG_SYS_NAND_BASE_LIST{ 0x0200, }
> > please use macro
> 
> ??? Please explain what you mean here. This is a macro, isn't it?
replase 0x0200 by DAVINCI_ASYNC_EMIF_DATA_CE0_BASE
> 
> > > +/* U-Boot general configuration */
> > > +#undef CONFIG_USE_IRQ/* No IRQ/FIQ in U-Boot 
> > > */
> > > +#define CONFIG_BOOTFILE  "uImage"/* Boot file name */
> > > +#define CONFIG_SYS_PROMPT"LEOPARD EVM # "
> > > +#define CONFIG_SYS_CBSIZE1024/* Console I/O Buffer 
> > > Size  */
> > why 1k?
> 
> Why not? That's a config option...
just ask to known why they need 1K?

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


Re: [U-Boot] [RFC] API Licence

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 17:16 Mon 18 May , Mike Frysinger wrote:
> On Monday 18 May 2009 16:31:39 Jean-Christophe PLAGNIOL-VILLARD wrote:
> > I'd like to known if it's possible to update the COPYING
> >
> >   NOTE! This copyright does *not* cover the so-called "standalone"
> >   applications that use U-Boot services by means of the jump table
> >   provided by U-Boot exactly for this purpose - this is merely
> >   considered normal use of U-Boot, and does *not* fall under the
> >   heading of "derived work".
> >
> > to also include the API as a non derived work as the standalone?
> 
> that sounds like a bad idea.  then people could add all the API hooks they 
> wanted rather than just the ones we deemed they could use.  basically you're 
> opening up all of u-boot for direct access.
The idea is not to open every think but allow as in the kernel allow just a 
part of it

> what exactly are you trying to accomplish ?
I've to write an application that need to use the mmc and net but can not
be under GPL

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


Re: [U-Boot] [RFC] API Licence

2009-05-18 Thread Mike Frysinger
On Monday 18 May 2009 16:31:39 Jean-Christophe PLAGNIOL-VILLARD wrote:
>   I'd like to known if it's possible to update the COPYING
>
> NOTE! This copyright does *not* cover the so-called "standalone"
> applications that use U-Boot services by means of the jump table
> provided by U-Boot exactly for this purpose - this is merely
> considered normal use of U-Boot, and does *not* fall under the
> heading of "derived work".
>
>   to also include the API as a non derived work as the standalone?

that sounds like a bad idea.  then people could add all the API hooks they 
wanted rather than just the ones we deemed they could use.  basically you're 
opening up all of u-boot for direct access.

what exactly are you trying to accomplish ?
-mike


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


[U-Boot] Uboot porting Cloning an existing board/processor configuration : Link errors

2009-05-18 Thread alfred steele
Hi All,
 I am trying to clone the configuration of a board already exiting in
U-boot in an effort to port u-boot to  this board.

I changed the following files
Makefile - To copy the config rule  for the corresponding board.
created a directory for the new board in the "board" directory and
copied over all the files in the directory(cp -a).

The issue is although the compile  works fine, during linking,  the
linker tries to look for the cloned boardfile name when it searches
for the corresponding board library -lib. The following error
is thrown:

arm-none-linux-gnueabi-ld: cannot find
board/freescale/mx31_3stack/libmx31ads.a

Here mx31ads is my cloned board not my board. i know this is done by
the $BOARD variable but i was unable to quickly track where in the
config.mk's/Makefile it still tries to look for the cloned boards
library.
Any quick hints will be appreciated.

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


Re: [U-Boot] [PATCH] ARM DaVinci Leopard Board Support

2009-05-18 Thread Paulraj, Sandeep
Wolfgang, 
I think what JC means is to use something like

#define  CONFIG_SYS_NAND_BASE_LIST { DAVINCI_NAND_BASE, }

Now this info is available in the hardware.h file for DaVinci but it
requires a little tweak. I just sent another patch to address that

[PATCH] ARM DaVinci Minor Change to header file

Let me know if this is OK. Then I can use MACROs in the config.h file.

Jean-Christophe,
Is this new patch OK with you?

Thanks,
Sandeep


> -Original Message-
> From: Wolfgang Denk [mailto:w...@denx.de] 
> Sent: Monday, May 18, 2009 4:47 PM
> To: Jean-Christophe PLAGNIOL-VILLARD
> Cc: Paulraj, Sandeep; u-boot@lists.denx.de
> Subject: Re: [U-Boot] [PATCH] ARM DaVinci Leopard Board Support
> 
> Dear Jean-Christophe PLAGNIOL-VILLARD,
> 
> In message <20090518202149.gg17...@game.jcrosoft.org> you wrote:
> >
> > > +#ifndef __CONFIG_H
> > > +#define __CONFIG_H
> > > +#include 
> > > +
> > > +
> > > +#define DAVINCI_LEOPARD
> > please CONFIG_
> 
> Or rather CONFIG_SYS_DAVINCI_LEOPARD
> 
> This is not a user-0selectable parameter, and such are fobidden
> outside the board config files anyway.
> 
> > > +#define CONFIG_SYS_NAND_SMALLPAGE
> > > +#define CONFIG_SYS_NAND_BASE_LIST{ 0x0200, }
> > please use macro
> 
> ??? Please explain what you mean here. This is a macro, isn't it?
> 
> > > +/* U-Boot general configuration */
> > > +#undef CONFIG_USE_IRQ/* No 
> IRQ/FIQ in U-Boot */
> > > +#define CONFIG_BOOTFILE  "uImage"/* Boot 
> file name */
> > > +#define CONFIG_SYS_PROMPT"LEOPARD EVM # "
> > > +#define CONFIG_SYS_CBSIZE1024/* 
> Console I/O Buffer Size  */
> > why 1k?
> 
> Why not? That's a config option...
> 
> 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
> A Freudian slip is when you say one thing but mean your mother.
> 
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ARM DaVinci Minor Change to header file

2009-05-18 Thread s-paulraj
WE want to use MACROS in the config files for various DaVinci boards.
At the moment this is not possible because we get compilation error
when we include the hardware.h header file in the config file
for various SOC's and then try to compile.
This patch addresses comments received while submitting patches 
for the Leopard board.

Signed-off-by: Sandeep Paulraj 
---
 include/asm-arm/arch-davinci/hardware.h |   21 +
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/include/asm-arm/arch-davinci/hardware.h 
b/include/asm-arm/arch-davinci/hardware.h
index 313b3f3..2e941e2 100644
--- a/include/asm-arm/arch-davinci/hardware.h
+++ b/include/asm-arm/arch-davinci/hardware.h
@@ -34,6 +34,9 @@
 #define __ASM_ARCH_HARDWARE_H
 
 #include 
+
+#ifndef __ASSEMBLY__
+
 #include 
 
 #defineREG(addr)   (*(volatile unsigned int *)(addr))
@@ -42,6 +45,16 @@
 typedef volatile unsigned int  dv_reg;
 typedef volatile unsigned int *dv_reg_p;
 
+void lpsc_on(unsigned int id);
+void dsp_on(void);
+
+void davinci_enable_uart0(void);
+void davinci_enable_emac(void);
+void davinci_enable_i2c(void);
+void davinci_errata_workarounds(void);
+
+#endif
+
 /*
  * Base register addresses
  *
@@ -153,14 +166,6 @@ typedef volatile unsigned int *dv_reg_p;
 #define DAVINCI_LPSC_GEM   39
 #define DAVINCI_LPSC_IMCOP 40
 
-void lpsc_on(unsigned int id);
-void dsp_on(void);
-
-void davinci_enable_uart0(void);
-void davinci_enable_emac(void);
-void davinci_enable_i2c(void);
-void davinci_errata_workarounds(void);
-
 /* Some PSC defines */
 #define PSC_CHP_SHRTSW (0x01c40038)
 #define PSC_GBLCTL (0x01c41010)
-- 
1.6.0.4

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


Re: [U-Boot] [PATCH] ARM DaVinci Leopard Board Support

2009-05-18 Thread Wolfgang Denk
Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <20090518202149.gg17...@game.jcrosoft.org> you wrote:
>
> > +#ifndef __CONFIG_H
> > +#define __CONFIG_H
> > +#include 
> > +
> > +
> > +#define DAVINCI_LEOPARD
> please CONFIG_

Or rather CONFIG_SYS_DAVINCI_LEOPARD

This is not a user-0selectable parameter, and such are fobidden
outside the board config files anyway.

> > +#define CONFIG_SYS_NAND_SMALLPAGE
> > +#define CONFIG_SYS_NAND_BASE_LIST  { 0x0200, }
> please use macro

??? Please explain what you mean here. This is a macro, isn't it?

> > +/* U-Boot general configuration */
> > +#undef CONFIG_USE_IRQ  /* No IRQ/FIQ in U-Boot 
> > */
> > +#define CONFIG_BOOTFILE"uImage"/* Boot file name */
> > +#define CONFIG_SYS_PROMPT  "LEOPARD EVM # "
> > +#define CONFIG_SYS_CBSIZE  1024/* Console I/O Buffer Size  */
> why 1k?

Why not? That's a config option...

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
A Freudian slip is when you say one thing but mean your mother.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [RFC] API Licence

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi,

I'd like to known if it's possible to update the COPYING

  NOTE! This copyright does *not* cover the so-called "standalone"
  applications that use U-Boot services by means of the jump table
  provided by U-Boot exactly for this purpose - this is merely
  considered normal use of U-Boot, and does *not* fall under the
  heading of "derived work".

to also include the API as a non derived work as the standalone?

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


Re: [U-Boot] [patch] Add display cpuinfo for Atmel at91sam9261 Cores

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 22:06 Sat 02 May , Remy Bohmer wrote:
> This patch adds support for displaying CPU type information
> about Atmel AT91 cores during boot. It currently only configures it for the
> at91sam9261ek board, but it can easily be configured for all at91 based cores.
please do this in two seperate patch
please ask Stelian
CC
btw please use git
> 
> This patch also provides at91_dbgu.h which is also used by the upcoming
> USB CDC-ethernet and USB-gadget support for this board.
> 
> Signed-off-by: Remy Böhmer 
> ---
>  cpu/arm926ejs/at91/Makefile   |1 
>  cpu/arm926ejs/at91/cpuinfo.c  |   83 
>  include/asm-arm/arch-at91/at91_dbgu.h |   69 +++
>  include/asm-arm/arch-at91/cpu.h   |   99 
> ++
>  include/configs/at91sam9261ek.h   |2 
>  5 files changed, 254 insertions(+)
>  create mode 100644 cpu/arm926ejs/at91/cpuinfo.c
>  create mode 100644 include/asm-arm/arch-at91/at91_dbgu.h
>  create mode 100644 include/asm-arm/arch-at91/cpu.h
> 
> Index: u-boot-usb.tmp/cpu/arm926ejs/at91/Makefile
> ===
> --- u-boot-usb.tmp.orig/cpu/arm926ejs/at91/Makefile   2009-05-02 
> 21:43:41.0 +0200
> +++ u-boot-usb.tmp/cpu/arm926ejs/at91/Makefile2009-05-02 
> 22:01:46.0 +0200
> @@ -55,6 +55,7 @@ COBJS-y += at91sam9rl_serial.o
>  COBJS-$(CONFIG_HAS_DATAFLASH)+= at91sam9rl_spi.o
>  endif
>  COBJS-$(CONFIG_AT91_LED) += led.o
> +COBJS-$(CONFIG_DISPLAY_CPUINFO) +=cpuinfo.o
>  COBJS-y += clock.o
>  COBJS-y += cpu.o
>  COBJS-y  += timer.o
> Index: u-boot-usb.tmp/cpu/arm926ejs/at91/cpuinfo.c
> ===
> --- /dev/null 1970-01-01 00:00:00.0 +
> +++ u-boot-usb.tmp/cpu/arm926ejs/at91/cpuinfo.c   2009-05-02 
> 22:01:46.0 +0200
> @@ -0,0 +1,83 @@
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +int print_cpuinfo(void)
> +{
> + unsigned long cidr;
> + const char *txt;
> +
> + cidr = at91_sys_read(AT91_DBGU_CIDR);
> +
could you use the CONFIG_ARM926EJS and other configs to reduce the size impact
> + switch ((cidr & AT91_CIDR_EPROC) >> 5) {
> + case 0x1: txt = "ARM946ES"; break;
> + case 0x2: txt = "ARM7TDMI"; break;
> + case 0x4: txt = "ARM920T";  break;
> + case 0x5: txt = "ARM926EJS";break;
> + default:  txt = "undefined";break;
> + }
> + printf("Embedded Processor: %s\n", txt);
otherwise 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] ARM DaVinci Leopard Board Support

2009-05-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:32 Wed 13 May , s-paul...@ti.com wrote:
> The patch applies to arm/next. It was tested on a leopard board.
> After testing had to change the MACH TYPE as this board is not present
> in the list of mach types at the moment. So the patch itself is going
> to give a compilation failure.
which number?
> 
> Further details on this board can be found at www.leopardboard.org
> 
> This patch does not do the NAND initialization yet. Will send an update
> to this patch after David Brownell's NAND updates get merged
> 
> Jean-Christophe can you please do a new sync for this board
> 
> Signed-off-by: Sandeep Paulraj 
> ---

> --- /dev/null
> +++ b/include/configs/davinci_leopard.h
> @@ -0,0 +1,130 @@
> +/*
> + * 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 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
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +#include 
> +
> +
> +#define DAVINCI_LEOPARD
please CONFIG_
> +
> +#define CONFIG_SKIP_LOWLEVEL_INIT
> +#define CONFIG_SKIP_RELOCATE_UBOOT
> +#define CONFIG_SYS_NO_FLASH  /* no *NOR* flash */
> +#define CONFIG_SYS_CONSOLE_INFO_QUIET
> +#define CONFIG_DISPLAY_CPUINFO
> +
> +/* SoC Configuration */
> +#define CONFIG_ARM926EJS /* arm926ejs CPU */
> +#define CONFIG_SYS_TIMERBASE 0x01c21400  /* use timer 0 */
> +#define CONFIG_SYS_HZ_CLOCK  2400/* TIMER 0 */
> +#define CONFIG_SYS_HZ1000
> +#define CONFIG_SOC_DM355
> +
> +/* Memory Info */
> +#define CONFIG_NR_DRAM_BANKS 1
> +#define PHYS_SDRAM_1 0x8000
> +#define PHYS_SDRAM_1_SIZESZ_128M
> +
> +/* Serial Driver info: UART0 for console  */
> +#define CONFIG_SYS_NS16550
> +#define CONFIG_SYS_NS16550_SERIAL
> +#define CONFIG_SYS_NS16550_REG_SIZE  -4
> +#define CONFIG_SYS_NS16550_COM1  0x01c2
> +#define CONFIG_SYS_NS16550_CLK   CONFIG_SYS_HZ_CLOCK
> +#define CONFIG_SYS_BAUDRATE_TABLE{ 9600, 19200, 38400, 57600, 115200 }
> +#define CONFIG_CONS_INDEX1
> +#define CONFIG_BAUDRATE  115200
> +
> +/* Ethernet:  external DM9000 just like DM355 EVM */
> +#define CONFIG_DRIVER_DM9000 1
> +#define CONFIG_DM9000_BASE   0x0400
> +#define DM9000_IOCONFIG_DM9000_BASE
> +#define DM9000_DATA  (CONFIG_DM9000_BASE + 16)
> +
> +/* I2C */
> +#define CONFIG_HARD_I2C
> +#define CONFIG_DRIVER_DAVINCI_I2C
> +#define CONFIG_SYS_I2C_SPEED 40
> +#define CONFIG_SYS_I2C_SLAVE 0x10
> +
> +/* NYET -- #define CONFIG_NAND_DAVINCI */
> +#define CONFIG_SYS_NAND_HW_ECC
> +#define CONFIG_SYS_NAND_USE_FLASH_BBT
> +
> +#define CONFIG_SYS_NAND_SMALLPAGE
> +#define CONFIG_SYS_NAND_BASE_LIST{ 0x0200, }
please use macro
> +#define CONFIG_SYS_MAX_NAND_DEVICE   1
> +#define CONFIG_SYS_NAND_MAX_CHIPS1
> +
> +/* U-Boot command configuration */
> +#include 
> +
> +#undef CONFIG_CMD_BDI
> +#undef CONFIG_CMD_FLASH
> +#undef CONFIG_CMD_FPGA
> +#undef CONFIG_CMD_SETGETDCR
> +#define CONFIG_CMD_ASKENV
> +#define CONFIG_CMD_DHCP
> +#define CONFIG_CMD_I2C
> +#define CONFIG_CMD_PING
> +#define CONFIG_CMD_SAVES
> +
> +/* TEMPORARY -- no safe place to save env, yet */
> +#define CONFIG_ENV_IS_NOWHERE
> +#undef CONFIG_CMD_SAVEENV
> +
> +#define CONFIG_CRC32_VERIFY
> +#define CONFIG_MX_CYCLIC
> +
> +/* U-Boot general configuration */
> +#undef CONFIG_USE_IRQ/* No IRQ/FIQ in U-Boot 
> */
> +#define CONFIG_BOOTFILE  "uImage"/* Boot file name */
> +#define CONFIG_SYS_PROMPT"LEOPARD EVM # "
> +#define CONFIG_SYS_CBSIZE1024/* Console I/O Buffer Size  */
why 1k?

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


Re: [U-Boot] Out-of-tree build of API code fails

2009-05-18 Thread Rafal Jaworowski

On 2009-05-15, at 23:19, Wolfgang Denk wrote:

> In message <0ad43a8e-402b-41f0-bab1-e6d7f7537...@semihalf.com> you  
> wrote:
>> Dear Wolfgang,
>>
>> On 2009-03-29, at 00:03, Wolfgang Denk wrote:
>>
>>> Dear Rafal,
>>>
>>> it seems the api_examples/ code fails when building out of tree:
>>
>> ...
>>
>>> Could you please have a look?   Thanks in advance.
>>
>> Sure, I'll take a look.
>
> Did your 'having a look' result in any results, like a patch that
> fixes the problem?

At the time I looked at this the main line build was broken due to  
other issues, so I need to see to it again.

kind regards,
Rafal

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


Re: [U-Boot] [PATCH 01/10] mx27: basic cpu support

2009-05-18 Thread Wolfgang Denk
Dear Magnus,

In message <59b21cf20905180959p4e736d52g566b0e826e17c...@mail.gmail.com> you 
wrote:
> 
> After having browsed some powerpc code I can find two different ways
> the struct-thing is used:
> Variant A, all members declared volatile:
> struct controller_reg {
>   volatile uint32_t reg1;
>   volatile uint32_t reg2;
> }

This is probably older code.

> struct controller_reg *controller = 0xCAFE;
> 
> Or variant B:
> struct controller_reg {
>   uint32_t reg1;
>   uint32_t reg2;
> }

This is OK.

> volatile struct controller_reg *controller = 0xCAFE;
> 
> Also, is it OK to access the registers using reg = controller->reg1 or

No.

> should we use reg = readl(&controller->reg1)?

Yes. All device acesses should use proper I/O accessor calls.

Note though that readl() is not considered to be portable; at least
not across architectures. In Linux the ioread() / iowrite() are
considered portable and should be used, i. e. ioread16(),
ioread16be(), ioread32(), ioread32be() etc. - the plain ioread*()
[i. e. without the "be" part] being little-endian on all
architectures.


I am aware that we don't have appropriate support for all of this in
the standard header files yet (actually I don't think Linu xhas this
yet, either).

But that's the theory. Or at least the intersection of what I've been
told, what I understood and what I still remember ;-)

> I ask this since I don't want to iterate the patches on the mailing
> list too many times...

Good luck!

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


Re: [U-Boot] Not getting the Uboot prompt for sbc2410x using u-boot1.1.6

2009-05-18 Thread Wolfgang Denk
Dear vishalD,

In message <23596126.p...@talk.nabble.com> you wrote:
> 
> 
> I am using the sbc2410x board. I successfully compiled the uboot-1.1.6 for
> this board. But after downloading the uboot.bin to the flash, i am not
> getting the uboot prompt on serial terminal.

U-Boot 1.1.6 is obsolete. Please use current code.

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
Looks clean and obviously correct to me, but then _everything_ I
write always looks obviously correct to me.  - Linus Torvalds in

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


Re: [U-Boot] [PATCH 2/2] KB9202: Add NAND support

2009-05-18 Thread Scott Wood
Matthias Kaehlcke wrote:
>>> +#ifdef CONFIG_KB9202B_ATL
>>> +#define CFG_MAX_FLASH_BANKS0
>>> +#else
>> Is this really the recommended way of turning off flash support?
> 
> thanks for your review and your comments.
> 
> i'm new to u-boot development, could you point me to the correct way
> of turning of flash support? i found this in the original patch
> provided by kwikbyte and just ported it to the current u-boot version.

To disable NOR flash support, do not define CONFIG_FLASH_CFI_* or 
CONFIG_CMD_FLASH, and do define CONFIG_SYS_NO_FLASH.

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


Re: [U-Boot] [PATCH 01/10] mx27: basic cpu support

2009-05-18 Thread Scott Wood
On Mon, May 18, 2009 at 06:59:18PM +0200, Magnus Lilja wrote:
> After having browsed some powerpc code I can find two different ways
> the struct-thing is used:
> Variant A, all members declared volatile:
> struct controller_reg {
>   volatile uint32_t reg1;
>   volatile uint32_t reg2;
> }
> 
> struct controller_reg *controller = 0xCAFE;
> 
> Or variant B:
> struct controller_reg {
>   uint32_t reg1;
>   uint32_t reg2;
> }
> 
> volatile struct controller_reg *controller = 0xCAFE;

Those are both deprecated.  There should be no volatile, and you should
use I/O accessors instead.

> Also, is it OK to access the registers using reg = controller->reg1 or
> should we use reg = readl(&controller->reg1)?

The latter.  Note that readl is supposed to be little-endian regardless
of host endianness, though ARM's io.h looks a bit weird (there are
multiple definitions of readl protected by ifdefs, and the normal one
does no swapping -- and __mem_pci looks like it would result in a name
conflict).  On powerpc we have accessors with explicit endianness.

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


Re: [U-Boot] Ethernet not working on OMAP3 board with

2009-05-18 Thread Ben Warren
Wolfgang Denk wrote:
> Dear Matthias Ludwig,
>
> In message <20090518081724.ga19...@ultratronik.de> you wrote:
>   
>> Dear Mani,
>>
>> 
>>> I was testing the latest tip of u-boot and v2009.06-rc1,
>>> I find that the Ethernet is not working.
>>>   
>> i assume you are using a board with SMSC911x ethernet chip? If so, this
>> discussion may help you:
>>  http://lists.denx.de/pipermail/u-boot/2009-April/050687.html
>>
>> SMSC911x (and others) do not work in mainline if no eeprom with MAC
>> address is present. A patch solving this issue is (afaik) in net/next.
>>
>> @Wolfgang/Ben: shouldn't this be in 2009.6?
>> 
>
> I consider this a bug fix for 2009.06. Ben?
>   
Sounds reasonable.  Please apply directly and I'll take it out of net/next.
> Best regards,
>
> Wolfgang Denk
>
>   
regards,
Ben
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/10] mx27: basic cpu support

2009-05-18 Thread Magnus Lilja
Dear Wolfgang,

2009/5/14 Wolfgang Denk :
>> I see. PowerPC in Linux uses C structs too. But there are still a lot of
>> code that uses registers offsets in Linux, so my arguments are the same:
>> requirement to convert offsets to C struct brings additional
>> difficulties to porting (and maintaining already ported) drivers from Linux.
>
> I understand your argument, but the decision has been made. We want to
> get rid of this pointer stuff in U-Boot, and do not accept any new
> code like this any more.

After having browsed some powerpc code I can find two different ways
the struct-thing is used:
Variant A, all members declared volatile:
struct controller_reg {
  volatile uint32_t reg1;
  volatile uint32_t reg2;
}

struct controller_reg *controller = 0xCAFE;

Or variant B:
struct controller_reg {
  uint32_t reg1;
  uint32_t reg2;
}

volatile struct controller_reg *controller = 0xCAFE;

Also, is it OK to access the registers using reg = controller->reg1 or
should we use reg = readl(&controller->reg1)?

I ask this since I don't want to iterate the patches on the mailing
list too many times...

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


[U-Boot] [PATCH v8] Marvell MV88F6281GTW_GE Board support

2009-05-18 Thread Prafulla Wadaskar
From: prafulla_wadaskar 

This is Marvell's 88F6281_A0 based custom board developed
for wireless access point product

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

Reviewed-by: Ronen Shitrit 
Signed-off-by: Prafulla Wadaskar 
---
Change log
v2: updated as per first review comments
debug_prints updated to debug

v3: updaed as per review comments for v2
added mv88f6281gtw_ge.h file
removed BITxx macros

v4: updated as per review comments for v3
arch_misc_init support is added and used from kirkwood

v5: updated as per review comments for v4
CONFIG_MACH_MV88F6281GTW_GE added
more comments added and
serial configuration removed from mv88f6281gtw_ge.c

V6: clean switch configuration using netdev.h

v7: Marvell copyright removed from u-boot.lds
Maintainer added for this board

v8: u-boot.lds removed
finetuned for cosmetic and switch related changes

 MAKEALL |1 +
 Makefile|3 +
 board/Marvell/mv88f6281gtw_ge/Makefile  |   51 +++
 board/Marvell/mv88f6281gtw_ge/config.mk |   25 +++
 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c |   91 
 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h |   51 +++
 include/configs/mv88f6281gtw_ge.h   |  180 +++
 7 files changed, 402 insertions(+), 0 deletions(-)
 create mode 100644 board/Marvell/mv88f6281gtw_ge/Makefile
 create mode 100644 board/Marvell/mv88f6281gtw_ge/config.mk
 create mode 100644 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c
 create mode 100644 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.h
 create mode 100644 include/configs/mv88f6281gtw_ge.h

diff --git a/MAKEALL b/MAKEALL
index 57dd425..431187a 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -505,6 +505,7 @@ LIST_ARM9=" \
cp946es \
cp966   \
lpd7a400\
+   mv88f6281gtw_ge \
mx1ads  \
mx1fs2  \
netstar \
diff --git a/Makefile b/Makefile
index 24e6410..60ca711 100644
--- a/Makefile
+++ b/Makefile
@@ -2794,6 +2794,9 @@ lpd7a400_config \
 lpd7a404_config:   unconfig
@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
 
+mv88f6281gtw_ge_config: unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) Marvell kirkwood
+
 mx1ads_config  :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t mx1ads NULL imx
 
diff --git a/board/Marvell/mv88f6281gtw_ge/Makefile 
b/board/Marvell/mv88f6281gtw_ge/Makefile
new file mode 100644
index 000..8c49a3e
--- /dev/null
+++ b/board/Marvell/mv88f6281gtw_ge/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor 
+# Prafulla Wadaskar 
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  := mv88f6281gtw_ge.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/Marvell/mv88f6281gtw_ge/config.mk 
b/board/Marvell/mv88f6281gtw_ge/config.mk
new file mode 100644
index 000..fb29a1b
--- /dev/null
+++ b/board/Marvell/mv88f6281gtw_ge/config.mk
@@ -0,0 +1,25 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor 
+# Prafulla Wadaskar 
+#
+# 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 p

[U-Boot] [PATCH v7.1] Marvell Kirkwood family SOC support

2009-05-18 Thread Prafulla Wadaskar
Kirkwood family controllers are highly integrated SOCs
based on Feroceon-88FR131/Sheeva-88SV131 cpu core.

SOC versions supported:-
1) 88F6281-A0   define CONFIG_KW88F6281_A0
2) 88F6192-A0   define CONFIG_KW88F6192_A0

Other supported features:-
1) get_random_hex() fucntion
2) SPI port controller driver
3) PCI Express port initialization

Contributors:
Yotam Admon 
Michael Blostein 
Signed-off-by: Prafulla Wadaskar 
---
Change log:
v2: crated arch-kirkwood and moved some header files there
renamed and moved spi.c to drivers/spi/
renamed and moved serial.c to drivers/serial/
doimage utility removed
soc_init.S renamed as lowlevel_init.S
debug prints removed

v3: lowlevel_init.S converted to lowlevel_init.c
removed BITxx macros, removed entire assembly code
Added CONFIG_ARCH_LOWLEVE_INIT support for arm926ejs core
updated as per review commens for v2

v4: updated as per review comments for v3
print_cpuinfo used to display Soc info
arch_misc_init support created and used for lib_arm
mandatory readl/write macros used
asm/cache.h asm/arch/spi.h asm//arch/serial.h created and used

v5: updated as per review comments for v4
cosmetic updates, arch_misc_init and arch_cpu_init used
start.S updated to call arch_lowlevel_init in case if lowlevl_init is skipped
bug fix in cpu.c

v6: lowlevel_init.S removed code moved under arch_cpu_init

v7: include  added to each c file
reference removed from include/asm/config.h
arch_misc_init defination kept as it is in include/common.h
bugfixed in get_random_hex function

v7.1: u-boot.lds moved from board specific to kirkwood

 cpu/arm926ejs/kirkwood/Makefile   |   48 +
 cpu/arm926ejs/kirkwood/config.mk  |2 +
 cpu/arm926ejs/kirkwood/cpu.c  |  297 +
 cpu/arm926ejs/kirkwood/cpu.h  |  103 ++
 cpu/arm926ejs/kirkwood/dram.c |   58 ++
 cpu/arm926ejs/kirkwood/timer.c|  160 
 cpu/arm926ejs/kirkwood/u-boot.lds |   51 +
 drivers/serial/Makefile   |1 +
 drivers/serial/kirkwood_serial.c  |  129 +
 drivers/spi/Makefile  |1 +
 drivers/spi/kirkwood_spi.c|  168 
 include/asm-arm/arch-kirkwood/kirkwood.h  |  117 +++
 include/asm-arm/arch-kirkwood/kw88f6192.h |   37 
 include/asm-arm/arch-kirkwood/kw88f6281.h |   37 
 include/asm-arm/arch-kirkwood/serial.h|   89 +
 include/asm-arm/arch-kirkwood/spi.h   |   39 
 include/asm-arm/cache.h   |   41 
 include/common.h  |1 +
 lib_arm/board.c   |4 +
 19 files changed, 1383 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm926ejs/kirkwood/Makefile
 create mode 100644 cpu/arm926ejs/kirkwood/config.mk
 create mode 100644 cpu/arm926ejs/kirkwood/cpu.c
 create mode 100644 cpu/arm926ejs/kirkwood/cpu.h
 create mode 100644 cpu/arm926ejs/kirkwood/dram.c
 create mode 100644 cpu/arm926ejs/kirkwood/timer.c
 create mode 100644 cpu/arm926ejs/kirkwood/u-boot.lds
 create mode 100644 drivers/serial/kirkwood_serial.c
 create mode 100644 drivers/spi/kirkwood_spi.c
 create mode 100644 include/asm-arm/arch-kirkwood/kirkwood.h
 create mode 100644 include/asm-arm/arch-kirkwood/kw88f6192.h
 create mode 100644 include/asm-arm/arch-kirkwood/kw88f6281.h
 create mode 100644 include/asm-arm/arch-kirkwood/serial.h
 create mode 100644 include/asm-arm/arch-kirkwood/spi.h
 create mode 100644 include/asm-arm/cache.h

diff --git a/cpu/arm926ejs/kirkwood/Makefile b/cpu/arm926ejs/kirkwood/Makefile
new file mode 100644
index 000..ef1176e
--- /dev/null
+++ b/cpu/arm926ejs/kirkwood/Makefile
@@ -0,0 +1,48 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor 
+# Prafulla Wadaskar 
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(SOC).a
+
+COBJS-y= dram.o
+COBJS-y+= cpu.o
+COBJS-y+= timer.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+

[U-Boot] [PATCH v7] Marvell Kirkwood family SOC support

2009-05-18 Thread Prafulla Wadaskar
Kirkwood family controllers are highly integrated SOCs
based on Feroceon-88FR131/Sheeva-88SV131 cpu core.

SOC versions supported:-
1) 88F6281-A0   define CONFIG_KW88F6281_A0
2) 88F6192-A0   define CONFIG_KW88F6192_A0

Other supported features:-
1) get_random_hex() fucntion
2) SPI port controller driver
3) PCI Express port initialization

Contributors:
Yotam Admon 
Michael Blostein 
Signed-off-by: Prafulla Wadaskar 
---
Change log:
v2: crated arch-kirkwood and moved some header files there
renamed and moved spi.c to drivers/spi/
renamed and moved serial.c to drivers/serial/
doimage utility removed
soc_init.S renamed as lowlevel_init.S
debug prints removed

v3: lowlevel_init.S converted to lowlevel_init.c
removed BITxx macros, removed entire assembly code
Added CONFIG_ARCH_LOWLEVE_INIT support for arm926ejs core
updated as per review commens for v2

v4: updated as per review comments for v3
print_cpuinfo used to display Soc info
arch_misc_init support created and used for lib_arm
mandatory readl/write macros used
asm/cache.h asm/arch/spi.h asm//arch/serial.h created and used

v5: updated as per review comments for v4
cosmetic updates, arch_misc_init and arch_cpu_init used
start.S updated to call arch_lowlevel_init in case if lowlevl_init is skipped
bug fix in cpu.c

v6: lowlevel_init.S removed code moved under arch_cpu_init

v7: include  added to each c file
reference removed from include/asm/config.h
arch_misc_init defination kept as it is in include/common.h
bugfixed in get_random_hex function

 cpu/arm926ejs/kirkwood/Makefile   |   48 +
 cpu/arm926ejs/kirkwood/config.mk  |   25 +++
 cpu/arm926ejs/kirkwood/cpu.c  |  297 +
 cpu/arm926ejs/kirkwood/cpu.h  |  103 ++
 cpu/arm926ejs/kirkwood/dram.c |   58 ++
 cpu/arm926ejs/kirkwood/timer.c|  160 
 drivers/serial/Makefile   |1 +
 drivers/serial/kirkwood_serial.c  |  129 +
 drivers/spi/Makefile  |1 +
 drivers/spi/kirkwood_spi.c|  168 
 include/asm-arm/arch-kirkwood/kirkwood.h  |  117 +++
 include/asm-arm/arch-kirkwood/kw88f6192.h |   37 
 include/asm-arm/arch-kirkwood/kw88f6281.h |   37 
 include/asm-arm/arch-kirkwood/serial.h|   89 +
 include/asm-arm/arch-kirkwood/spi.h   |   39 
 include/asm-arm/cache.h   |   41 
 include/common.h  |1 +
 lib_arm/board.c   |4 +
 18 files changed, 1355 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm926ejs/kirkwood/Makefile
 create mode 100644 cpu/arm926ejs/kirkwood/config.mk
 create mode 100644 cpu/arm926ejs/kirkwood/cpu.c
 create mode 100644 cpu/arm926ejs/kirkwood/cpu.h
 create mode 100644 cpu/arm926ejs/kirkwood/dram.c
 create mode 100644 cpu/arm926ejs/kirkwood/timer.c
 create mode 100644 drivers/serial/kirkwood_serial.c
 create mode 100644 drivers/spi/kirkwood_spi.c
 create mode 100644 include/asm-arm/arch-kirkwood/kirkwood.h
 create mode 100644 include/asm-arm/arch-kirkwood/kw88f6192.h
 create mode 100644 include/asm-arm/arch-kirkwood/kw88f6281.h
 create mode 100644 include/asm-arm/arch-kirkwood/serial.h
 create mode 100644 include/asm-arm/arch-kirkwood/spi.h
 create mode 100644 include/asm-arm/cache.h

diff --git a/cpu/arm926ejs/kirkwood/Makefile b/cpu/arm926ejs/kirkwood/Makefile
new file mode 100644
index 000..ef1176e
--- /dev/null
+++ b/cpu/arm926ejs/kirkwood/Makefile
@@ -0,0 +1,48 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor 
+# Prafulla Wadaskar 
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(SOC).a
+
+COBJS-y= dram.o
+COBJS-y+= cpu.o
+COBJS-y+= timer.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+##

[U-Boot] [PATCH v10] Marvell MV88E61XX Switch Driver support

2009-05-18 Thread Prafulla Wadaskar
Chips supported:-
1. 88E6161 6 port gbe swtich with 5 integrated PHYs
2. 88E6165 6 port gbe swtich with 5 integrated PHYs
2. 88E6132 3 port gbe swtich with 2 integrated PHYs
Platform specific configuration supported for:-
default or router port vlan configuration
led_init configuration
mdip/n polarity reversal configuration

Note: This driver is supported and tested against
kirkwood egiga interface

Contributors:
Yotam Admon 
Michael Blostein 
Signed-off-by: Prafulla Wadaskar 
---
Change log:-
v2: updated as per review comments for v1
removed other two drivers form earlier patch
debug_prints removed
driver moved to drivers/net/

v3: updated as per review comments for v2
miiphy interface used, platform specific dependency resolved
Chip id detection and printing added
common code forked out
some cosmetic and magic number fixes

v4: updated as per review comments for v3
mv88e61xx.h added
platform specific configuration support added
some more documentation references provided
cleaned rgmii delay enable related code

v5: updated as per review comments for v3
code moved to drivers/net/phy/
vlan_init changed to vlan_config and platform specific

v6: mutichip related alias moved to header file
vlan_config functions renamed as port_vlan_config
mv_switch_88f61xx_init renamed as mv88f61xx_switch_initialization
the function prototype for same is added in netdev.h

v7: minor updates as per v6 review feedback
RD_PHY/WR_PHY macros defined and used in the code

v8: BITxx macros replaced by 1<
+ * Prafulla Wadaskar 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include 
+#include 
+#include "mv88e61xx.h"
+
+#ifdef CONFIG_MV88E61XX_MULTICHIP_ADRMODE
+/* Chip Address mode
+ * The Switch support two modes of operation
+ * 1. single chip mode and
+ * 2. Multi-chip mode
+ * Refer section 9.2 &9.3 in chip datasheet-02 for more details
+ *
+ * By default single chip mode is configured
+ * multichip mode operation can be configured in board header
+ */
+static int mv88e61xx_busychk_multic(u32 devaddr)
+{
+   u32 reg = 0;
+   u32 timeout = MV88E61XX_PHY_TIMEOUT;
+
+   /* Poll till SMIBusy bit is clear */
+   do {
+   miiphy_read(name, devaddr, 0x0, ®);
+   if (timeout-- == 0) {
+   printf("SMI busy timeout\n");
+   return -1;
+   }
+   } while (reg & (1 << 15));
+   return 0;
+}
+
+static void mv88e61xx_wr_phy(char *name, u32 phy_adr, u32 reg_ofs, u16 data)
+{
+   u16 reg;
+   u32 mii_dev_addr;
+
+   /* command to read PHY dev address */
+   if (!miiphy_read(name, 0xEE, 0xEE, &mii_dev_addr)) {
+   printf("Error..could not read PHY dev address\n");
+   return;
+   }
+   mv88e61xx_busychk_multic(mii_dev_addr);
+   /* Write data to Switch indirect data register */
+   miiphy_write(name, mii_dev_addr, 0x1, data);
+   /* Write command to Switch indirect command register (write) */
+   miiphy_write(name, mii_dev_addr, 0x0,
+reg_ofs | (phy_adr << 5) | (1 << 10) | (1 << 12) | (1 <<
+15));
+}
+
+static void mv88e61xx_rd_phy(char *name, u32 phy_adr, u32 reg_ofs, u16 * data)
+{
+   u16 reg;
+   u32 mii_dev_addr;
+
+   /* command to read PHY dev address */
+   if (!miiphy_read(name, 0xEE, 0xEE, &mii_dev_addr)) {
+   printf("Error..could not read PHY dev address\n");
+   return;
+   }
+   mv88e61xx_busychk_multic(mii_dev_addr);
+   /* Write command to Switch indirect command register (read) */
+   miiphy_write(name, mii_dev_addr, 0x0,
+reg_ofs | (phy_adr << 5) | (1 << 10) | (1 << 12) | (1 <<
+15));
+   mv88e61xx_busychk_multic(mii_dev_addr);
+   /* Read data from Switch indirect data register */
+   miiphy_read(name, mii_dev_addr, 0x1, (u16 *) & data);
+}
+#endif /* CONFIG_MV88E61XX_MULTICHIP_ADRMODE */
+
+static void mv88e61xx_port_vlan_config(struct mv88e61xx_config *swconfig,
+  u32 max_prtnum, u32 ports_ofs)
+{
+   u32 

[U-Boot] Not getting the Uboot prompt for sbc2410x using u-boot1.1.6

2009-05-18 Thread vishal dahiwal
Hi All,

I am new to uBoot.

I am using the sbc2410x board. I successfully compiled the uboot-1.1.6 for
this board. But after downloading the uboot.bin to the flash, i am not
getting the uboot prompt on serial terminal.

I am using the NAND flash. Do i have to make the changes for NAND flash and
recompile the uboot?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Not getting the Uboot prompt for sbc2410x using u-boot1.1.6

2009-05-18 Thread vishalD

Hi All,

I am new to uBoot.

I am using the sbc2410x board. I successfully compiled the uboot-1.1.6 for
this board. But after downloading the uboot.bin to the flash, i am not
getting the uboot prompt on serial terminal.

I am using the NAND flash. Do i have to make the changes for NAND flash and
recompile the uboot?


-- 
View this message in context: 
http://www.nabble.com/Not-getting-the-Uboot-prompt-for-sbc2410x-using-u-boot1.1.6-tp23596126p23596126.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

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


[U-Boot] [PATCH][u-boot arm/next] ARM DaVinci DM365 Support

2009-05-18 Thread s-paulraj
This patch adds support for new TI DaVinci SOC DM365. Further details
and user guides can be found at 
http://focus.ti.com/docs/prod/folders/print/tms320dm365.html

The DM365 EVM is from Spectrum Digital and details are at
http://support.spectrumdigital.com/boards/evmdm365/revc/

This patch does NOT have
1) EMAC Support as the EMAC module is different from DM644x
   and i will have to submit updated patch to u-boot-net GIT
2) NAND is disabled as it will required David Brownell's
   NAND updates.

The resulting binary was tested on a DM365 EVM.

Signed-off-by: Sandeep Paulraj 
---
 Makefile   |3 +
 board/davinci/dm365evm/Makefile|   52 +++
 board/davinci/dm365evm/config.mk   |2 +
 board/davinci/dm365evm/dm365evm.c  |   67 ++
 cpu/arm926ejs/davinci/Makefile |1 +
 cpu/arm926ejs/davinci/dm365.c  |   38 
 include/configs/davinci_dm365evm.h |  175 
 7 files changed, 338 insertions(+), 0 deletions(-)
 create mode 100644 board/davinci/dm365evm/Makefile
 create mode 100644 board/davinci/dm365evm/config.mk
 create mode 100644 board/davinci/dm365evm/dm365evm.c
 create mode 100644 cpu/arm926ejs/davinci/dm365.c
 create mode 100644 include/configs/davinci_dm365evm.h

diff --git a/Makefile b/Makefile
index 81a5cd0..69324cd 100644
--- a/Makefile
+++ b/Makefile
@@ -2804,6 +2804,9 @@ davinci_sonata_config :   unconfig
 davinci_dm355evm_config :  unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs dm355evm davinci davinci
 
+davinci_dm365evm_config :  unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs dm365evm davinci davinci
+
 lpd7a400_config \
 lpd7a404_config:   unconfig
@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
diff --git a/board/davinci/dm365evm/Makefile b/board/davinci/dm365evm/Makefile
new file mode 100644
index 000..26b0705
--- /dev/null
+++ b/board/davinci/dm365evm/Makefile
@@ -0,0 +1,52 @@
+#
+# (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  := $(BOARD).o
+SOBJS  :=
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/davinci/dm365evm/config.mk b/board/davinci/dm365evm/config.mk
new file mode 100644
index 000..ca801c2
--- /dev/null
+++ b/board/davinci/dm365evm/config.mk
@@ -0,0 +1,2 @@
+#Provide at least 16MB spacing between us and the Linux Kernel image
+TEXT_BASE = 0x8108
diff --git a/board/davinci/dm365evm/dm365evm.c 
b/board/davinci/dm365evm/dm365evm.c
new file mode 100644
index 000..f384905
--- /dev/null
+++ b/board/davinci/dm365evm/dm365evm.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2009 Sandeep Paulraj
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "../common/misc.h"
+
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+   gd->bd->bi_ar

[U-Boot] [PATCH 2/2] nand_spl: read environment early, when booting from NAND using nand_spl

2009-05-18 Thread Guennadi Liakhovetski
Currently, when booting from NAND using nand_spl, in the beginning the default
environment is used until later in boot process the dynamic environment is read
out. This way environment variables that must be interpreted early, like the
baudrate or "silent", cannot be modified dynamically and remain at their
default values. Fix this problem by reading out main and redundand (if used)
copies of the environment in the nand_spl code.

Signed-off-by: Guennadi Liakhovetski 
---
 README |6 ++
 common/env_nand.c  |   43 ++-
 include/configs/smdk6400.h |3 +++
 nand_spl/nand_boot.c   |   10 ++
 4 files changed, 49 insertions(+), 13 deletions(-)

diff --git a/README b/README
index 142dbcc..060b676 100644
--- a/README
+++ b/README
@@ -2422,6 +2422,12 @@ to save the current settings.
to a block boundary, and CONFIG_ENV_SIZE must be a multiple of
the NAND devices block size.
 
+- CONFIG_NAND_ENV_DST
+
+   Defines address in RAM to which the nand_spl code should copy the
+   environment. If redundant environment is used, it will be copied to
+   CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE.
+
 - CONFIG_SYS_SPI_INIT_OFFSET
 
Defines offset to the initial SPI buffer area in DPRAM. The
diff --git a/common/env_nand.c b/common/env_nand.c
index 21bce25..90a1c45 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -68,9 +68,11 @@ extern int default_environment_size;
 char * env_name_spec = "NAND";
 
 
-#ifdef ENV_IS_EMBEDDED
+#if defined(ENV_IS_EMBEDDED)
 extern uchar environment[];
 env_t *env_ptr = (env_t *)(&environment[0]);
+#elif defined(CONFIG_NAND_ENV_DST)
+env_t *env_ptr = (env_t *)CONFIG_NAND_ENV_DST;
 #else /* ! ENV_IS_EMBEDDED */
 env_t *env_ptr = 0;
 #endif /* ENV_IS_EMBEDDED */
@@ -102,23 +104,33 @@ uchar env_get_char_spec (int index)
  */
 int env_init(void)
 {
-#if defined(ENV_IS_EMBEDDED)
+#if defined(ENV_IS_EMBEDDED) || defined(CONFIG_NAND_ENV_DST)
int crc1_ok = 0, crc2_ok = 0;
-   env_t *tmp_env1, *tmp_env2;
+   env_t *tmp_env1;
+
+#ifdef CONFIG_ENV_OFFSET_REDUND
+   env_t *tmp_env2;
 
-   tmp_env1 = env_ptr;
tmp_env2 = (env_t *)((ulong)env_ptr + CONFIG_ENV_SIZE);
+   crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc);
+#endif
+
+   tmp_env1 = env_ptr;
 
crc1_ok = (crc32(0, tmp_env1->data, ENV_SIZE) == tmp_env1->crc);
-   crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc);
 
-   if (!crc1_ok && !crc2_ok)
+   if (!crc1_ok && !crc2_ok) {
+   gd->env_addr  = 0;
gd->env_valid = 0;
-   else if(crc1_ok && !crc2_ok)
+
+   return 0;
+   } else if (crc1_ok && !crc2_ok) {
gd->env_valid = 1;
-   else if(!crc1_ok && crc2_ok)
+   }
+#ifdef CONFIG_ENV_OFFSET_REDUND
+   else if (!crc1_ok && crc2_ok) {
gd->env_valid = 2;
-   else {
+   } else {
/* both ok - check serial */
if(tmp_env1->flags == 255 && tmp_env2->flags == 0)
gd->env_valid = 2;
@@ -132,14 +144,19 @@ int env_init(void)
gd->env_valid = 1;
}
 
+   if (gd->env_valid == 2)
+   env_ptr = tmp_env2;
+   else
+#endif
if (gd->env_valid == 1)
env_ptr = tmp_env1;
-   else if (gd->env_valid == 2)
-   env_ptr = tmp_env2;
-#else /* ENV_IS_EMBEDDED */
+
+   gd->env_addr = (ulong)env_ptr->data;
+
+#else /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */
gd->env_addr  = (ulong)&default_environment[0];
gd->env_valid = 1;
-#endif /* ENV_IS_EMBEDDED */
+#endif /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */
 
return (0);
 }
diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h
index cac58cf..018f576 100644
--- a/include/configs/smdk6400.h
+++ b/include/configs/smdk6400.h
@@ -209,6 +209,9 @@
 /* total memory available to uboot */
 #define CONFIG_SYS_UBOOT_SIZE  (1024 * 1024)
 
+/* Put environment copies after the end of U-Boot owned RAM */
+#define CONFIG_NAND_ENV_DST(CONFIG_SYS_UBOOT_BASE + CONFIG_SYS_UBOOT_SIZE)
+
 #ifdef CONFIG_ENABLE_MMU
 #define CONFIG_SYS_MAPPED_RAM_BASE 0xc000
 #define CONFIG_BOOTCOMMAND "nand read 0xc0018000 0x6 0x1c;" \
diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
index c7eadad..be2e69c 100644
--- a/nand_spl/nand_boot.c
+++ b/nand_spl/nand_boot.c
@@ -246,6 +246,16 @@ void nand_boot(void)
ret = nand_load(&nand_info, CONFIG_SYS_NAND_U_BOOT_OFFS, 
CONFIG_SYS_NAND_U_BOOT_SIZE,
(uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
 
+#ifdef CONFIG_NAND_ENV_DST
+   nand_load(&nand_info, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
+ (uchar *)CONFIG_NAND_ENV_DST);
+
+#ifdef CONFIG_ENV_OFFSET_REDUND
+   nand_load(&nand_info, CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
+ (uchar *)CONFIG_NAND_EN

[U-Boot] [PATCH 1/2] env_nand: remove unused variable.

2009-05-18 Thread Guennadi Liakhovetski
Remove an unused "total" variable in multiple functions.

Signed-off-by: Guennadi Liakhovetski 
---
 common/env_nand.c |   10 --
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/common/env_nand.c b/common/env_nand.c
index 76569da..21bce25 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -103,12 +103,9 @@ uchar env_get_char_spec (int index)
 int env_init(void)
 {
 #if defined(ENV_IS_EMBEDDED)
-   size_t total;
int crc1_ok = 0, crc2_ok = 0;
env_t *tmp_env1, *tmp_env2;
 
-   total = CONFIG_ENV_SIZE;
-
tmp_env1 = env_ptr;
tmp_env2 = (env_t *)((ulong)env_ptr + CONFIG_ENV_SIZE);
 
@@ -183,12 +180,10 @@ int writeenv(size_t offset, u_char *buf)
 #ifdef CONFIG_ENV_OFFSET_REDUND
 int saveenv(void)
 {
-   size_t total;
int ret = 0;
nand_erase_options_t nand_erase_options;
 
env_ptr->flags++;
-   total = CONFIG_ENV_SIZE;
 
nand_erase_options.length = CONFIG_ENV_RANGE;
nand_erase_options.quiet = 0;
@@ -226,7 +221,6 @@ int saveenv(void)
 #else /* ! CONFIG_ENV_OFFSET_REDUND */
 int saveenv(void)
 {
-   size_t total;
int ret = 0;
nand_erase_options_t nand_erase_options;
 
@@ -243,7 +237,6 @@ int saveenv(void)
return 1;
 
puts ("Writing to Nand... ");
-   total = CONFIG_ENV_SIZE;
if (writeenv(CONFIG_ENV_OFFSET, (u_char *) env_ptr)) {
puts("FAILED!\n");
return 1;
@@ -287,12 +280,9 @@ int readenv (size_t offset, u_char * buf)
 void env_relocate_spec (void)
 {
 #if !defined(ENV_IS_EMBEDDED)
-   size_t total;
int crc1_ok = 0, crc2_ok = 0;
env_t *tmp_env1, *tmp_env2;
 
-   total = CONFIG_ENV_SIZE;
-
tmp_env1 = (env_t *) malloc(CONFIG_ENV_SIZE);
tmp_env2 = (env_t *) malloc(CONFIG_ENV_SIZE);
 
-- 
1.6.2.4

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


Re: [U-Boot] uboot kernel rejects filesystem

2009-05-18 Thread Bharat Bhushan
Hi Detlev,

Seems there was an issue with my kernel code that you correctly
pointed out in previous mail.

Now  I could pass bootarg board='myboard'. For myboard, I have done
relevent changes in kernel code, so kernel does init for my hardware.
Earlier while choosing mips machine, it was choosing generic mips
machine which did not mtdpartitions defined. Now with added support of
myboard, everything seems to be good.

Thanks for the promptly helps you have given.

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


Re: [U-Boot] u-boot version

2009-05-18 Thread Wolfgang Denk
Dear Deepak Gopalakrishnan,

In message 
 you 
wrote:
>
> this time i want to know is there anywat i can get a application in linux 
> to fetch the bootstrap and u-boot version and display it
> i have no idea how this can be done
> could someone give a start.im using AT91Bootstrap and 
> u-boot-1.1.5_atmel_1.2

You can use the "fw_printenv" tool in Linux to print U-Boot
environment variables, including the "vers" variable (assuming you
used "saveenv" at least once).

I have no idea if there is any version information in what you call
"the bootstrap" nor how to access it.

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
To the systems programmer,  users  and  applications  serve  only  to
provide a test load.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] u-boot version

2009-05-18 Thread Deepak Gopalakrishnan
Hi all
this time i want to know is there anywat i can get a application in linux 
to fetch the bootstrap and u-boot version and display it
i have no idea how this can be done
could someone give a start.im using AT91Bootstrap and 
u-boot-1.1.5_atmel_1.2
thanks alot

note:sorry if i havent provided enough information for u to help me...im 
still pretty much new to this...

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


Re: [U-Boot] [PATCH] DaVinci Network Driver Updates

2009-05-18 Thread Paulraj, Sandeep
 Ben,
 Any comments on this patch?

Thanks,
Sandeep

> -Original Message-
> From: Paulraj, Sandeep 
> Sent: Tuesday, May 12, 2009 11:46 AM
> To: u-boot@lists.denx.de
> Cc: Paulraj, Sandeep
> Subject: [PATCH] DaVinci Network Driver Updates
> 
> Different flavours of DaVinci SOC's have differences in their EMAC IP
> This patch does the following
> 1) Updates base addresses for DM365
> 2) Updates MDIO frequencies for DM365 and DM646x
> 3) Update EMAC wrapper registers for DM365 and DM646x
> 
> Patch applies to u-boot-net git. the EMAC driver itself 
> will be updated shortly to add support for DM365 and DM646x
> 
> Signed-off-by: Sandeep Paulraj 
> ---
>  include/asm-arm/arch-davinci/emac_defs.h |   32 
> +-
>  1 files changed, 31 insertions(+), 1 deletions(-)
> 
> diff --git a/include/asm-arm/arch-davinci/emac_defs.h 
> b/include/asm-arm/arch-davinci/emac_defs.h
> index c11161f..ae75f84 100644
> --- a/include/asm-arm/arch-davinci/emac_defs.h
> +++ b/include/asm-arm/arch-davinci/emac_defs.h
> @@ -38,15 +38,38 @@
>  
>  #include 
>  
> +#ifdef CONFIG_SOC_DM365
> +#define EMAC_BASE_ADDR   (0x01d07000)
> +#define EMAC_WRAPPER_BASE_ADDR   (0x01d0a000)
> +#define EMAC_WRAPPER_RAM_ADDR(0x01d08000)
> +#define EMAC_MDIO_BASE_ADDR  (0x01d0b000)
> +#else
>  #define EMAC_BASE_ADDR   (0x01c8)
>  #define EMAC_WRAPPER_BASE_ADDR   (0x01c81000)
>  #define EMAC_WRAPPER_RAM_ADDR(0x01c82000)
>  #define EMAC_MDIO_BASE_ADDR  (0x01c84000)
> +#endif
>  
> +#ifdef CONFIG_SOC_DM646x
> +/* MDIO module input frequency */
> +#define EMAC_MDIO_BUS_FREQ   7650
> +/* MDIO clock output frequency */
> +#define EMAC_MDIO_CLOCK_FREQ 250 /* 2.5 MHz */
> +#elif defined(CONFIG_SOC_DM365)
> +/* MDIO module input frequency */
> +#define EMAC_MDIO_BUS_FREQ   12150
> +/* MDIO clock output frequency */
> +#define EMAC_MDIO_CLOCK_FREQ 220 /* 2.2 MHz */
> +#else
>  /* MDIO module input frequency */
>  #define EMAC_MDIO_BUS_FREQ   9900/* 
> PLL/6 - 99 MHz */
>  /* MDIO clock output frequency */
>  #define EMAC_MDIO_CLOCK_FREQ 200 /* 2.0 MHz */
> +#endif
> +
> +/* PHY mask - set only those phy number bits where phy 
> is/can be connected */
> +#define EMAC_MDIO_PHY_NUM   1
> +#define EMAC_MDIO_PHY_MASK  (1 << EMAC_MDIO_PHY_NUM)
>  
>  /* Ethernet Min/Max packet size */
>  #define EMAC_MIN_ETHERNET_PKT_SIZE   60
> @@ -103,6 +126,8 @@ typedef volatile struct _emac_desc
>  
>  #define EMAC_MACCONTROL_MIIEN_ENABLE (0x20)
>  #define EMAC_MACCONTROL_FULLDUPLEX_ENABLE(0x1)
> +#define EMAC_MACCONTROL_GIGABIT_ENABLE   (1 << 7)
> +#define EMAC_MACCONTROL_GIGFORCE (1 << 17)
>  
>  #define EMAC_RXMBPENABLE_RXCAFEN_ENABLE  (0x20)
>  #define EMAC_RXMBPENABLE_RXBROADEN   (0x2000)
> @@ -258,12 +283,17 @@ typedef struct  {
>  
>  /* EMAC Wrapper Registers Structure */
>  typedef struct  {
> +#if defined(CONFIG_SOC_DM646x) || defined(CONFIG_SOC_DM365)
> + dv_reg  IDVER;
> + dv_reg  SOFTRST;
> + dv_reg  EMCTRL;
> +#else
>   u_int8_tRSVD0[4100];
>   dv_reg  EWCTL;
>   dv_reg  EWINTTCNT;
> +#endif
>  } ewrap_regs;
>  
> -
>  /* EMAC MDIO Registers Structure */
>  typedef struct  {
>   dv_reg  VERSION;
> -- 
> 1.6.0.4
> 
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] fix accidental erase of OneNand whole chip

2009-05-18 Thread Geiger Ho
This patch fixes the accidental erase of OneNand whole chip when issuing 
command "onenand erase".

Signed-off-by: Geiger Ho 


--- u-boot-2009.03/common/cmd_onenand.c 2009-03-22 05:04:41.0 +0800
+++ u-boot-2009.03-dev/common/cmd_onenand.c 2009-05-18 
17:57:27.0 +0800
@@ -367,6 +367,8 @@ int do_onenand(cmd_tbl_t * cmdtp, int fl
return 0;
}

+   goto usage;
+
default:
/* At least 4 args */



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


[U-Boot] [PATCH] at91: Extended soft_i2c driver for AT91SAM9263 SoC

2009-05-18 Thread Daniel Gorsulowski
While hard_i2c support is not available
(see http://lists.denx.de/pipermail/u-boot/2009-March/049751.html),
this patch enables soft_i2c on AT91SAM9263 SoC.

Signed-off-by: Daniel Gorsulowski 
---
 drivers/i2c/soft_i2c.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index 59883a5..9a48783 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -34,6 +34,11 @@
 #include 
 #include 
 #endif
+#ifdef CONFIG_AT91SAM9263  /* only valid for AT91SAM9263 */
+#include 
+#include 
+#include 
+#endif
 #ifdef CONFIG_IXP425   /* only valid for IXP425 */
 #include 
 #endif
-- 
1.6.1

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


[U-Boot] [PATCH] at91: Add support for MEESC board of esd gmbh

2009-05-18 Thread Daniel Gorsulowski
This patch is a rebase against branch arm/next and adds support for
MEESC board of esd gmbh.
The MEESC is based on an Atmel AT91SAM9263 SoC.

Signed-off-by: Daniel Gorsulowski 
---
 MAINTAINERS   |4 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/esd/meesc/Makefile  |   54 ++
 board/esd/meesc/config.mk |1 +
 board/esd/meesc/meesc.c   |  239 +
 include/configs/meesc.h   |  191 
 7 files changed, 493 insertions(+), 0 deletions(-)
 create mode 100644 board/esd/meesc/Makefile
 create mode 100644 board/esd/meesc/config.mk
 create mode 100644 board/esd/meesc/meesc.c
 create mode 100644 include/configs/meesc.h

diff --git a/MAINTAINERS b/MAINTAINERS
index bf076b9..9795625 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -529,6 +529,10 @@ Peter Figuli 
 
wepep250xscale
 
+Daniel Gorsulowski 
+
+   meesc   ARM926EJS (AT91SAM9263 SoC)
+
 Marius Gröger 
 
impa7   ARM720T (EP7211)
diff --git a/MAKEALL b/MAKEALL
index c98d03a..e220615 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -583,6 +583,7 @@ LIST_at91=" \
cmc_pu2 \
csb637  \
kb9202  \
+   meesc   \
mp2usb  \
m501sk  \
pm9263  \
diff --git a/Makefile b/Makefile
index 81a5cd0..4ed145c 100644
--- a/Makefile
+++ b/Makefile
@@ -2760,6 +2760,9 @@ at91sam9rlek_config   :   unconfig
fi;
@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 
+meesc_config   :   unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91
+
 pm9263_config  :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
 
diff --git a/board/esd/meesc/Makefile b/board/esd/meesc/Makefile
new file mode 100644
index 000..b7f60fa
--- /dev/null
+++ b/board/esd/meesc/Makefile
@@ -0,0 +1,54 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop 
+# Lead Tech Design 
+#
+# 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-y+= $(BOARD).o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/esd/meesc/config.mk b/board/esd/meesc/config.mk
new file mode 100644
index 000..9ce161e
--- /dev/null
+++ b/board/esd/meesc/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x21f0
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
new file mode 100644
index 000..18880c8
--- /dev/null
+++ b/board/esd/meesc/meesc.c
@@ -0,0 +1,239 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop 
+ * Lead Tech Design 
+ *
+ * (C) Copyright 2008
+ * Ulf Samuelsson 
+ *
+ * (C) Copyright 2009
+ * Daniel Gorsulowski 
+ * esd electronic system design gmbh 
+ *
+ * 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

Re: [U-Boot] [PATCH] 85xx: Fix the wrong SYS_CLK_IN for 8569MDS

2009-05-18 Thread Joakim Tjernlund
>
> The SYS_CLK_IN of MPC8569MDS is 66.66MHz,
> The DDR_CLK_IN is same with SYS_CLK_IN in 8569 processor.
> so, change the SYS_CLK_IN from 66MHz to 66.66MHz.
>
> Signed-off-by: Dave Liu 
> ---
>  include/configs/MPC8569MDS.h |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h
> index 7fd2b56..c501b17 100644
> --- a/include/configs/MPC8569MDS.h
> +++ b/include/configs/MPC8569MDS.h
> @@ -55,8 +55,8 @@
>  extern unsigned long get_clock_freq(void);
>  #endif
>  /* Replace a call to get_clock_freq (after it is implemented)*/
> -#define CONFIG_SYS_CLK_FREQ   6600
> -#define CONFIG_DDR_CLK_FREQ   6600
> +#define CONFIG_SYS_CLK_FREQ   
> +#define CONFIG_DDR_CLK_FREQ   CONFIG_SYS_CLK_FREQ

Is the clock really 66.66 MHz? Our clock is 66.666000 MHz and
pretending it is 66.66 will show up as RTC drift.

  Jocke

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


[U-Boot] [PATCH] 85xx: Fix the wrong SYS_CLK_IN for 8569MDS

2009-05-18 Thread Dave Liu
The SYS_CLK_IN of MPC8569MDS is 66.66MHz,
The DDR_CLK_IN is same with SYS_CLK_IN in 8569 processor.
so, change the SYS_CLK_IN from 66MHz to 66.66MHz.

Signed-off-by: Dave Liu 
---
 include/configs/MPC8569MDS.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h
index 7fd2b56..c501b17 100644
--- a/include/configs/MPC8569MDS.h
+++ b/include/configs/MPC8569MDS.h
@@ -55,8 +55,8 @@
 extern unsigned long get_clock_freq(void);
 #endif
 /* Replace a call to get_clock_freq (after it is implemented)*/
-#define CONFIG_SYS_CLK_FREQ6600
-#define CONFIG_DDR_CLK_FREQ6600
+#define CONFIG_SYS_CLK_FREQ
+#define CONFIG_DDR_CLK_FREQCONFIG_SYS_CLK_FREQ
 
 /*
  * These can be toggled for performance analysis, otherwise use default.
-- 
1.5.4

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


Re: [U-Boot] make U-Boot quiet

2009-05-18 Thread simon polette
Ok, so when I say "don't work", it mean that it don't change anything.
This option should quiet messages on the console, but all messages are
still printed.

2009/5/18 Wolfgang Denk :
> Dear simon polette,
>
> In message <72795ccb0905180218w1a23321fi1c93c84345a16...@mail.gmail.com> you 
> wrote:
>>
>> I'm trying to get U-Boot run silently by #defining
>> CONFIG_SILENT_CONSOLE and CONFIG_SYS_DEVICE_NULLDEV in the config
>> file, and setting "silent" in the environment, but it still don't
>> work.
>> Do I forget anything?
>
> You at least forgot to describe the problem.
>
> "don't work" is not exactly a precise description of hwat is working
> for you, and what is not working as expected.
>
> 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
> Those who do not  understand  Unix  are  condemned  to  reinvent  it,
> poorly.              - Henry Spencer, University of Toronto Unix hack
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Timeout in tftp.c

2009-05-18 Thread Achim Ehrlich
Jean-Christophe PLAGNIOL-VILLARD schrieb:
>> My value was at 100. Switching back to 1000 didn't solve my problem,  
>> but instead causes erase and write operations on nand flash to timeout  
>> as well. My u-boot was built on commit  
>> 03bab0091948196b9558248684c04f60943ca4b5 of the at-91 tree.
> this revision does not integrate the timer fix
>> Rebasing it  
>> to the current version with the changed timer code caused u-boot to not  
>> boot at all on my hardware. I just made a simple board port and didn't  
>> change much, but I add my diff against u-boot-at91 anyway. It should  
>> work on the Atmel Board as well, but I don't own any.
> normaly yes but you need to update a few your config to have it working
> see comment on your patch
>> Thank you for your help
>>
>> Achim
>>
>  +
>> +#ifdef CONFIG_AT91SAM9G20EK
>> +/* arch number of AT91SAM9260EK-Board */
>> +gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
>> +#else
>> +/* arch number of AT91SAM9260EK-Board */
>> +gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9260EK;
>> +#endif
> sure?
>> +/* adress of boot parameters */
>> +gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
>> +
>> +at91_serial_hw_init();
>> +#ifdef CONFIG_CMD_NAND
>> +stamp9G20_nand_hw_init();
>> +#endif
> 
>> diff --git a/include/asm-arm/mach-types.h b/include/asm-arm/mach-types.h
>> index 2c1e69b..91fc62f 100644
>> --- a/include/asm-arm/mach-types.h
>> +++ b/include/asm-arm/mach-types.h
> when you will send your final please send a sync request
> 
>> diff --git a/include/configs/stamp9G20.h b/include/configs/stamp9G20.h
>> new file mode 100644
>> index 000..6c4a1b5
>> --- /dev/null
>> +++ b/include/configs/stamp9G20.h
>> @@ -0,0 +1,183 @@
>> +/*
>> + * (C) Copyright 2007-2008
>> + * Stelian Pop 
>> + * Lead Tech Design 
>> + * (C) Achim Ehrlich 
>> + * taskit GmbH 
>> + *
>> + * Configuation settings for the Stamp9G20 CPU module.
>> + *
>> + * 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
>> + */
>> +
>> +#ifndef __CONFIG_H
>> +#define __CONFIG_H
>> +
>> +/* ARM asynchronous clock */
>> +#define AT91_MAIN_CLOCK 18432000/* 18.432 MHz crystal */
>> +#define CONFIG_SYS_AT91_PLLB0x10193f05  /* PLLB settings for 
>> USB */
> please remove
>> +#define CONFIG_SYS_HZ   1000/* 1ms resolution */
>> +
>> +#define AT91_SLOW_CLOCK 32768   /* slow clock */
> please remove
>> +
>> +#define CONFIG_ARM926EJS1   /* This is an ARM926EJS Core*/
>> +#define AT91_CPU_NAME   "AT91SAM9G20"
>> +//#define AT91_MASTER_CLOCK 13200   /* peripheral */
>> +//#define AT91_CPU_CLOCK39600   /* cpu */
>> +#define CONFIG_AT91SAM9G20  1   /* It's an Atmel AT91SAM9G20 SoC*/
> please add
> #define CONFIG_ARCH_CPU_INIT
>> +
> 
> please note I've sync the at91 with u-boot general tree they are the same now
> but for dev please base your code against u-boot-arm/next
> 
> Best Regards,
> J.

Thank you, these changes made it work fine. The tftpboot timeout is now 
correct as well.

Kind regards

Achim

-- 
product manager

email:aehrl...@taskit.de
Tel.: ++49 30 611295-25
Fax: ++49 30 611295-11

--
taskit GmbH
Seelenbinderstr. 33 | D-12555 Berlin
web:http://www.taskit.de
Amtsgericht Charlottenburg: 93HRB39014
Managing director: Thorsten Raulfs
--
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] make U-Boot quiet

2009-05-18 Thread Wolfgang Denk
Dear simon polette,

In message <72795ccb0905180218w1a23321fi1c93c84345a16...@mail.gmail.com> you 
wrote:
> 
> I'm trying to get U-Boot run silently by #defining
> CONFIG_SILENT_CONSOLE and CONFIG_SYS_DEVICE_NULLDEV in the config
> file, and setting "silent" in the environment, but it still don't
> work.
> Do I forget anything?

You at least forgot to describe the problem.

"don't work" is not exactly a precise description of hwat is working
for you, and what is not working as expected.

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
Those who do not  understand  Unix  are  condemned  to  reinvent  it,
poorly.  - Henry Spencer, University of Toronto Unix hack
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Enable Autoboot

2009-05-18 Thread H. Johnny
Yes, I misunderstand the problem. Use CONFIG_BOOTDELAY to
enable/disable for autoboot.

2009/5/18 Wolfgang Denk :
> Dear "H. Johnny",
>
> In message <50a974c70905180032t18a559ffxd2772d36ef23c...@mail.gmail.com> you 
> wrote:
>>
>> Set bootargs in u-boot command if you just want to autoboot. For example,
>
> This is nonsense. The "bootargs" variable is completely unrelated to
> autoboot.
>
>> You also can modify the CONFIG_EXTRA_ENV_SETTINGS define in
>> include/configs/MPC8313ERDB.h file directly.
>
> Nonsense again. CONFIG_EXTRA_ENV_SETTINGS is also unrelated.
>
> These settings have NOTHING to do whether a board autoboots or not.
>
> 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
> : 1.  What is the possibility of this being added in the future?
> In the near future, the probability is close to zero. In the  distant
> future, I'll be dead, and posterity can do whatever they like... :-)
>                                                              - lwall
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] make U-Boot quiet

2009-05-18 Thread simon polette
Hi,

I'm trying to get U-Boot run silently by #defining
CONFIG_SILENT_CONSOLE and CONFIG_SYS_DEVICE_NULLDEV in the config
file, and setting "silent" in the environment, but it still don't
work.
Do I forget anything?
My device is a at91sam9261ek board (arm).

Best regards,

Simon Polette
Adeneo - Adetel Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC/PATCH] Add support for Linux-like kallsysms

2009-05-18 Thread Mike Frysinger
On Monday 18 May 2009 04:37:54 Wolfgang Denk wrote:
> In message Mike Frysinger wrote:
> > The kernel stores address<->symbol names in it so things can be decoded
> > at runtime.  Do it in U-Boot, and we get nice symbol decoding when
> > crashing.
>
> I like the idea as a pretty useful debug help.
>
> If nobody objects I guess we could pull this into "next" ?

part of this patch moves stuff out of the Blackfin specific code, so if no one 
objects, i'll repost the "full" version which would be ok for "next".
-mike


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


Re: [U-Boot] Enable Autoboot

2009-05-18 Thread Wolfgang Denk
Dear "H. Johnny",

In message <50a974c70905180032t18a559ffxd2772d36ef23c...@mail.gmail.com> you 
wrote:
>
> Set bootargs in u-boot command if you just want to autoboot. For example,

This is nonsense. The "bootargs" variable is completely unrelated to
autoboot.

> You also can modify the CONFIG_EXTRA_ENV_SETTINGS define in
> include/configs/MPC8313ERDB.h file directly.

Nonsense again. CONFIG_EXTRA_ENV_SETTINGS is also unrelated.

These settings have NOTHING to do whether a board autoboots or not.

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
: 1.  What is the possibility of this being added in the future?
In the near future, the probability is close to zero. In the  distant
future, I'll be dead, and posterity can do whatever they like... :-)
  - lwall
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC/PATCH] Add support for Linux-like kallsysms

2009-05-18 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <1242627582-25398-1-git-send-email-vap...@gentoo.org> you wrote:
> The kernel stores address<->symbol names in it so things can be decoded at
> runtime.  Do it in U-Boot, and we get nice symbol decoding when crashing.

I like the idea as a pretty useful debug help.

If nobody objects I guess we could pull this into "next" ?


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
America has been discovered before, but it has always been hushed up.
- Oscar Wilde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Ethernet not working on OMAP3 board with

2009-05-18 Thread Wolfgang Denk
Dear Matthias Ludwig,

In message <20090518081724.ga19...@ultratronik.de> you wrote:
> Dear Mani,
> 
> > I was testing the latest tip of u-boot and v2009.06-rc1,
> > I find that the Ethernet is not working.
> 
> i assume you are using a board with SMSC911x ethernet chip? If so, this
> discussion may help you:
>   http://lists.denx.de/pipermail/u-boot/2009-April/050687.html
> 
> SMSC911x (and others) do not work in mainline if no eeprom with MAC
> address is present. A patch solving this issue is (afaik) in net/next.
> 
> @Wolfgang/Ben: shouldn't this be in 2009.6?

I consider this a bug fix for 2009.06. Ben?

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
Genius doesn't work on an assembly line basis.  You can't simply say,
"Today I will be brilliant."
-- Kirk, "The Ultimate Computer", stardate 4731.3
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting X86 using uboot

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

In message <509266184e1640ce8b4b0a06f1adf...@userd662364e58> you wrote:
> 
> Is it possible to boot an X86 machine (with ATOM or Core2Duo) using
> uboot ?

U-Boot has not been ported to Atom ore Core2Duo yet.

> If yes, how uboot is loaded to the master boot record of the disk from
> which the machine is booted ?

You misunderstand the role of U-Boot. U-Boot does not get installed in
the MBR of any boot media, it would replace the BIOS on your
mainboard.

In general, for x86 you probably want to have a look at coreboot
instead.

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 use of anthropomorphic terminology when  dealing  with  computing
systems is a symptom of professional immaturity.   -- Edsger Dijkstra
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Ethernet not working on OMAP3 board with

2009-05-18 Thread Matthias Ludwig
Dear Mani,

> I was testing the latest tip of u-boot and v2009.06-rc1,
> I find that the Ethernet is not working.

i assume you are using a board with SMSC911x ethernet chip? If so, this
discussion may help you:
http://lists.denx.de/pipermail/u-boot/2009-April/050687.html

SMSC911x (and others) do not work in mainline if no eeprom with MAC
address is present. A patch solving this issue is (afaik) in net/next.

@Wolfgang/Ben: shouldn't this be in 2009.6?

best regards,
Matthias

-- 
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] Enable Autoboot

2009-05-18 Thread H. Johnny
2009/5/18 Vijay Nikam :
> Hello All,
>
> I have bsp from freescale for mpc8313erdb evalutaion board. the board
> is up and running no issues with it as of now.
> But in u-boot the autoboot option is not enabled and I would like to
> have enabled. I believe that I need to do some changes in the u-boot
> source code.
> Could anyone please point me towards the way that how I can enable the
> autoboot option? where the sources and CONFIG option for autoboot is
> located ? ? ?

The main mpc8313erdb config file is in include/configs/MPC8313ERDB.h
Set bootargs in u-boot command if you just want to autoboot. For example,
setenv bootargs root=/dev/nfs rw ${mtdparts}
nfsroot=10.0.0.5:/tftpboot/10.0.0.6/,rsize=1500,wsize=1500
ip=10.0.0.6:10.0.0.5:10.0.0.5:255.0.0.0:mpc8313erdb:eth1:off panic=1
console=ttyS0,115200;
saveenv;

You also can modify the CONFIG_EXTRA_ENV_SETTINGS define in
include/configs/MPC8313ERDB.h file directly.

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


Re: [U-Boot] Enable Autoboot

2009-05-18 Thread Liu Dave-R63238
> I have bsp from freescale for mpc8313erdb evalutaion board. the board
> is up and running no issues with it as of now.
> But in u-boot the autoboot option is not enabled and I would like to
> have enabled. I believe that I need to do some changes in the u-boot
> source code.
> Could anyone please point me towards the way that how I can enable the
> autoboot option? where the sources and CONFIG option for autoboot is
> located ? ? ?

Have a grep 'BOOTDELAY' in the README, and have a look the
doc/README.autoboot.

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


[U-Boot] Enable Autoboot

2009-05-18 Thread Vijay Nikam
Hello All,

I have bsp from freescale for mpc8313erdb evalutaion board. the board
is up and running no issues with it as of now.
But in u-boot the autoboot option is not enabled and I would like to
have enabled. I believe that I need to do some changes in the u-boot
source code.
Could anyone please point me towards the way that how I can enable the
autoboot option? where the sources and CONFIG option for autoboot is
located ? ? ?

Kindly please acknowledge ... thank you.

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


[U-Boot] [RFC/PATCH v2] allow boards to customize compiler options on a per-file/dir basis

2009-05-18 Thread Mike Frysinger
With our Blackfin boards, we like to build the compression routines with
-O2 as our tests show a pretty good size/speed tradeoff.  For the rest of
U-Boot though, we want to stick with the default -Os as that is mostly
control code.  So in our case, we would add a line like so to the board
specific config.mk file:
CFLAGS_lib_generic += -O2

Now all files under lib_generic/ will have -O2 appended to their build.

Signed-off-by: Mike Frysinger 
---
v2
- dont require dir_ since the naming is already unique (all objects
  have a ".o" suffix while dirs do not)

 config.mk |   19 +--
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/config.mk b/config.mk
index b1254e9..c3a787a 100644
--- a/config.mk
+++ b/config.mk
@@ -206,23 +206,30 @@ exportTEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS 
CPPFLAGS CFLAGS AFLAGS
 
 #
 
+# Allow boards to use custom optimize flags on a per dir/file basis
+BCURDIR := $(notdir $(CURDIR))
+cmd_compile.s.S = $(CPP) $(AFLAGS) $(AFLAGS_$(@F)) $(AFLAGS_$(BCURDIR)) -o $@ 
$<
+cmd_compile.o.S = $(CC)  $(AFLAGS) $(AFLAGS_$(@F)) $(AFLAGS_$(BCURDIR)) -o $@ 
$< -c
+cmd_compile.o.c = $(CC)  $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ 
$< -c
+
 ifndef REMOTE_BUILD
 
 %.s:   %.S
-   $(CPP) $(AFLAGS) -o $@ $<
+   $(cmd_compile.s.S)
 %.o:   %.S
-   $(CC) $(AFLAGS) -c -o $@ $<
+   $(cmd_compile.o.S)
 %.o:   %.c
-   $(CC) $(CFLAGS) -c -o $@ $<
+   $(cmd_compile.o.c)
 
 else
 
 $(obj)%.s: %.S
-   $(CPP) $(AFLAGS) -o $@ $<
+   $(cmd_compile.s.S)
 $(obj)%.o: %.S
-   $(CC) $(AFLAGS) -c -o $@ $<
+   $(cmd_compile.o.S)
 $(obj)%.o: %.c
-   $(CC) $(CFLAGS) -c -o $@ $<
+   $(cmd_compile.o.c)
+
 endif
 
 #
-- 
1.6.3

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