Re: [U-Boot] [PATCH 1/1] MX5:MX53: support for freescale MX53LOCO board

2011-02-22 Thread Jason Liu
Hi, Wolfgang,

2011/2/22 Wolfgang Denk w...@denx.de:
 Dear Liu Hui-R64343,

 In message 
 2cf7613b9822a943bef13ef7acec5bd114a...@039-sn1mpn1-003.039d.mgd.msft.net 
 you wrote:

 As I discovered myself, usage of config.mk is discouraged and it should be
 removed and it is not accepted anymore for new boards. Instead of that, it 
 is
 possible to add CONFIG_ options in boards.cfg.

 OK, do you know why config.mk is discouraged?

 There are seeral reasons, the most prominent being

 1) because it's simply not needed in 95% of all cases

 2) because it's bad to distribute vital configuration information into
   several independent files

 and

 3) because we're preparing the grounds for a Kconfig based setup so we
   want to have all config options controlled by a single mechanism
   (board config file).

OK,  get it. Thanks for the detailed information.


 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
 All easy problems have already been solved.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

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


Re: [U-Boot] [PATCH 1/1] MX5:MX53: support for freescale MX53LOCO board

2011-02-22 Thread Jason Liu
Hi, Wolfgang,

2011/2/22 Wolfgang Denk w...@denx.de:
 Dear Liu Hui-R64343,

 In message 
 2cf7613b9822a943bef13ef7acec5bd114a...@039-sn1mpn1-003.039d.mgd.msft.net 
 you wrote:

  +# (C Copyright 2011
  +# Jason Liu Freescale Software Engineering r64...@freescale.com
 
 Why don´t you use the standard Freescale copyright header here instead?

 Do you think it's a must to do it here?

 Your manager at Freescale probably wants it.

Yes, maybe. 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
 The IQ of the group is the lowest IQ of a member of the group divided
 by the number of people in the group.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

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


Re: [U-Boot] [PATCH] Fix variable flavor in examples/standalone/Makefile

2011-02-22 Thread Che-liang Chiou
Dear Wolfgang Denk,

On Tue, Feb 22, 2011 at 3:33 PM, Wolfgang Denk w...@denx.de wrote:
 In message aanlktimw1vlc8gm_xsdgqgkluyyzkqofyfb8-bjvb...@mail.gmail.com you 
 wrote:
 The bug is caused by using recursively expanded flavor for BIN and SREC.
 You wrote The bug.  How does this bug manifest in U-Boot?  For which
 configuration do you see issues?

The bug I refer to is that hello_world.bin and hello_world.srec are not built.

I can reproduce this bug in versatile_config, but I believe it is generally
applicable to other configures as well since it is caused by Makefile
syntax.

Here is how I found the bug:

$ make O=/tmp/build distclean
$ make O=/tmp/build versatile_config
$ make O=/tmp/build -j8
$ ls /tmp/build/examples/standalone/
hello_world  hello_world.o  libstubs.o  smc9_eeprom
smc9_eeprom.o  stubs.o

Notice that hello_world.bin and hello_world.srec are not found.

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


[U-Boot] arm writel in v2010.03-rc1 generate wrong code

2011-02-22 Thread zzs213
My board is very similar to at91rm9200ek. I have a function to init nor flash 
bus, like this :

void gfd3000cdb_nor_hw_init(void)
{
at91_mc_t *mc = (at91_mc_t *)AT91_MC_BASE;

writel(CONFIG_SYS_EBI_CFGR_VAL, (mc-ebi.cfgr));
writel(CONFIG_SYS_SMC_CSR0_VAL, mc-smc.csr[0]);
}

Which render to the fllowing asm code :

20120f0c gfd3000cdb_nor_hw_init:
20120f0c:   e3a01000mov r1, #0  ; 0x0
20120f10:   e3e0309bmvn r3, #155; 0x9b
20120f14:   e5831000str r1, [r3]
20120f18:   e283309badd r3, r3, #155; 0x9b
20120f1c:   e553208fldrbr2, [r3, #-143]
20120f20:   e3e0207bmvn r2, #123; 0x7b
20120f24:   e543208fstrbr2, [r3, #-143]
20120f28:   e553208eldrbr2, [r3, #-142]
20120f2c:   e3a02032mov r2, #50 ; 0x32
20120f30:   e543208estrbr2, [r3, #-142]
20120f34:   e553208dldrbr2, [r3, #-141]
20120f38:   e543108dstrbr1, [r3, #-141]
20120f3c:   e553208cldrbr2, [r3, #-140]
20120f40:   e543108cstrbr1, [r3, #-140]
20120f44:   e1a0f00emov pc, lr

It can't work very obviously because it use the target address as four byte 
address, but my idea is write  a 4bytes word
to the target address. 

And the cpu dead when I download this code to the board.


Then I change the function to the flowwing form:

void gfd3000cdb_nor_hw_init(void)
{
at91_mc_t *mc = (at91_mc_t *)AT91_MC_BASE;

writel(CONFIG_SYS_EBI_CFGR_VAL, (mc-ebi.cfgr));
writel(CONFIG_SYS_SMC_CSR0_VAL, (unsigned int)(mc-smc.csr[0]));
}

It's asm code is :

20120f0c gfd3000cdb_nor_hw_init:
20120f0c:   e3a02000mov r2, #0  ; 0x0
20120f10:   e3e0309bmvn r3, #155; 0x9b
20120f14:   e5832000str r2, [r3]
20120f18:   e59f2008ldr r2, [pc, #8]; 20120f28 
gfd3000cdb_nor_hw_init+0x1c
20120f1c:   e283300cadd r3, r3, #12 ; 0xc
20120f20:   e5832000str r2, [r3]
20120f24:   e1a0f00emov pc, lr
20120f28:   3284.word   0x3284

It's ok. And the board say OK too.

My toolchain is eldk4.2

anybody help me!!


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


Re: [U-Boot] [PATCH 1/2] env_mmc: Allow board code to override the environment address

2011-02-22 Thread Kumar Gala

On Feb 10, 2011, at 12:15 AM, Kumar Gala wrote:

 
 On Jan 29, 2011, at 5:29 PM, Kumar Gala wrote:
 
 From: Mingkai Hu mingkai...@freescale.com
 
 On some boards the environment may not be located at a fixed address in
 the MMC/SDHC card.  This allows those boards to implement their own
 means to report what address the environment is located at.
 
 Signed-off-by: Mingkai Hu mingkai...@freescale.com
 Signed-off-by: Jerry Huang chang-ming.hu...@freescale.com
 Signed-off-by: Zhao Chenhui b35...@freescale.com
 Signed-off-by: Kumar Gala ga...@kernel.crashing.org
 ---
 common/env_mmc.c |   31 +++
 1 files changed, 27 insertions(+), 4 deletions(-)
 
 diff --git a/common/env_mmc.c b/common/env_mmc.c
 index 71dcc4c..83f40f4 100644
 --- a/common/env_mmc.c
 +++ b/common/env_mmc.c
 @@ -1,5 +1,5 @@
 /*
 - * (C) Copyright 2008-2010 Freescale Semiconductor, Inc.
 + * (C) Copyright 2008-2011 Freescale Semiconductor, Inc.
 *
 * See file CREDITS for list of people who contributed to this
 * project.
 @@ -51,6 +51,19 @@ static void use_default(void);
 
 DECLARE_GLOBAL_DATA_PTR;
 
 +#if !defined(CONFIG_ENV_OFFSET)
 +#define CONFIG_ENV_OFFSET 0
 +#endif
 +
 +static int __mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
 +{
 +*env_addr = CONFIG_ENV_OFFSET;
 +return 0;
 +}
 +__attribute__((weak, alias(__mmc_get_env_addr)))
 +int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr);
 +
 +
 uchar env_get_char_spec(int index)
 {
  return *((uchar *)(gd-env_addr + index));
 @@ -102,10 +115,14 @@ int saveenv(void)
  ssize_t len;
  char*res;
  struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
 +u32 offset;
 
  if (init_mmc_for_env(mmc))
  return 1;
 
 +if(mmc_get_env_addr(mmc, offset))
 +return 1;
 +
  res = (char *)env_new.data;
  len = hexport_r(env_htab, '\0', res, ENV_SIZE);
  if (len  0) {
 @@ -114,7 +131,7 @@ int saveenv(void)
  }
  env_new.crc   = crc32(0, env_new.data, ENV_SIZE);
  printf(Writing to MMC(%d)... , CONFIG_SYS_MMC_ENV_DEV);
 -if (write_env(mmc, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, (u_char 
 *)env_new)) {
 +if (write_env(mmc, CONFIG_ENV_SIZE, offset, (u_char *)env_new)) {
  puts(failed\n);
  return 1;
  }
 @@ -141,16 +158,22 @@ inline int read_env(struct mmc *mmc, unsigned long 
 size,
 void env_relocate_spec(void)
 {
 #if !defined(ENV_IS_EMBEDDED)
 -   char buf[CONFIG_ENV_SIZE];
 +char buf[CONFIG_ENV_SIZE];
 
  struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
 +u32 offset;
 
  if (init_mmc_for_env(mmc)) {
  use_default();
  return;
  }
 
 -if (read_env(mmc, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, buf)) {
 +if(mmc_get_env_addr(mmc, offset)) {
 +use_default();
 +return ;
 +}
 +
 +if (read_env(mmc, CONFIG_ENV_SIZE, offset, buf)) {
  use_default();
  return;
  }
 -- 
 
 Wolfgang,
 
 Any comments on this?
 
 - k

ping

- k

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


Re: [U-Boot] arm writel in v2010.03-rc1 generate wrong code

2011-02-22 Thread Jens Scharsig
Am 2011-02-22 09:06, schrieb zzs213:
 My board is very similar to at91rm9200ek. I have a function to init nor flash 
 bus, like this :
 
 void gfd3000cdb_nor_hw_init(void)
 {
   at91_mc_t *mc = (at91_mc_t *)AT91_MC_BASE;
 
   writel(CONFIG_SYS_EBI_CFGR_VAL, (mc-ebi.cfgr));
   writel(CONFIG_SYS_SMC_CSR0_VAL, mc-smc.csr[0]);
 }
 
 Which render to the fllowing asm code :
 
 20120f0c gfd3000cdb_nor_hw_init:
 20120f0c:   e3a01000mov r1, #0  ; 0x0
 20120f10:   e3e0309bmvn r3, #155; 0x9b
 20120f14:   e5831000str r1, [r3]
 20120f18:   e283309badd r3, r3, #155; 0x9b
 20120f1c:   e553208fldrbr2, [r3, #-143]
 20120f20:   e3e0207bmvn r2, #123; 0x7b
 20120f24:   e543208fstrbr2, [r3, #-143]
 20120f28:   e553208eldrbr2, [r3, #-142]
 20120f2c:   e3a02032mov r2, #50 ; 0x32
 20120f30:   e543208estrbr2, [r3, #-142]
 20120f34:   e553208dldrbr2, [r3, #-141]
 20120f38:   e543108dstrbr1, [r3, #-141]
 20120f3c:   e553208cldrbr2, [r3, #-140]
 20120f40:   e543108cstrbr1, [r3, #-140]
 20120f44:   e1a0f00emov pc, lr
 
 It can't work very obviously because it use the target address as four byte 
 address, but my idea is write  a 4bytes word
 to the target address. 
 
 And the cpu dead when I download this code to the board.
 
 
 Then I change the function to the flowwing form:
 
 void gfd3000cdb_nor_hw_init(void)
 {
   at91_mc_t *mc = (at91_mc_t *)AT91_MC_BASE;
 
   writel(CONFIG_SYS_EBI_CFGR_VAL, (mc-ebi.cfgr));
   writel(CONFIG_SYS_SMC_CSR0_VAL, (unsigned int)(mc-smc.csr[0]));
 }
 
 It's asm code is :
 
 20120f0c gfd3000cdb_nor_hw_init:
 20120f0c:   e3a02000mov r2, #0  ; 0x0
 20120f10:   e3e0309bmvn r3, #155; 0x9b
 20120f14:   e5832000str r2, [r3]
 20120f18:   e59f2008ldr r2, [pc, #8]; 20120f28 
 gfd3000cdb_nor_hw_init+0x1c
 20120f1c:   e283300cadd r3, r3, #12 ; 0xc
 20120f20:   e5832000str r2, [r3]
 20120f24:   e1a0f00emov pc, lr
 20120f28:   3284.word   0x3284
 
 It's ok. And the board say OK too.
 
 My toolchain is eldk4.2
 
 anybody help me!!

I think you need this patch

http://lists.denx.de/pipermail/u-boot/2010-December/084133.html

regards

Jens Scharsig

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


Re: [U-Boot] [PATCH 18/18] Make the at91sam9263ek compile again.

2011-02-22 Thread Uli Raich
Dear Reinhard,
Yes, the problems were mainly due to my ignorance with respect to git: I 
thought that rework110218 was just a later version of rework110202, which is 
clearly not the case.
I probably also did not create a new branch, which had the effect that you see 
17 patches, which were not mine.
Ok, I think I am slowly improving. I started from scratch and first compiled 
your at91sam9260ek version, which compiles fine when using the nand flash 
version but fails on the dataflash version.
Then I modified my files, always watching what you had done in the 
at91sam9260ek version. I think that now I exclusively touch files that are 
specific to the at91sam9263ek and nothing else.
I will still take a few days to check everything before making another attempt 
to send the patches.
Thanks again for your patience with me.
Uli

Sorry, this has to get a full NAK.

1. Please never hijack someone's thread! Your patch has nothing to do with
someone's PATCH 18/18.

2. You are undoing all rework efforts with this patch!
The rework was, amongst others, to get rid of all AT91_*, AT91SoC_*, AVR*
macros and unify them into ATMEL_* macros. And by that also remove the twofold
re-wrapping of those defines.


It seems you have not understood the concept of CONFIG_ macros.
They are to allow the designer to use different USARTs, not
explicitly only the one in the debug unit...

3. And, please, run your patches through checkpatch.pl

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


[U-Boot] Porting TPM support (from Linux) to U-Boot

2011-02-22 Thread Huewe.external
Hi,

we at Infineon would like to port TPM support to U-Boot, especially in regard 
to our new I2C TPM chips.
TPM in u-boot would be a key element to verified/trusted booting.

As we already have a working linux device driver for this device we thought it 
might be a good starting point to port tpm functionality to u-boot.
The Linux driver consists of two parts, the generic tpm.c [1] and a 
vendor/hardware specific part, in our case tpm_tis_i2c.c [2].

For a proof of concept / prototype implementation, we experimented with the 
tpm.c, tpm.h and our tpm_tis_i2c.c driver, added some glue/compatibility layer.
On top of this driver with glue layer we put a so called TDDL (tddl.c) which 
handles the TIS protocol.
In addition to that we implemented a new tpm U-Boot command (cmd_tpm.c).

We put the driver files, together with the tddl in lib/libtddl/and added a new 
include file (tddl.h) in include.
The cmd_tpm.c includes this file.
All other (internally used) header files reside in lib/libtddl/ in order to not 
pollute the include/ dir.


This setup works quite fine.
But I'm almost sure that this is not the correct way to port a linux driver to 
u-boot. ;)

Can you perhaps point me to some resources how to do it correctly?
How would you start? And how would you split up the files?


Furthermore I have some related questions:
-   Is U-Boot using a libc / can I use functions from the glibc/ulibc? Are 
there any constraints?
-   Is there an equivalent for jiffies in u-boot? Or rather what is the 
correct way to handle timeouts?
-   Is there an equivalent for be32_to_cpu ? (big endian to whatever 
endianess the cpu uses) in u-boot?



Would be great if you could help me out on this issue.

Thanks,
Peter

References:
[1] 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;f=drivers/char/tpm;
[2] https://patchwork.kernel.org/patch/577781/


Glossary:
TPM: Trusted Platform Module
TCG: Trusted Computing Group
TDDL: TCG device driver library
TIS: TCG Interface Specification







Peter Huewe

Infineon Technologies AG
CCS TI SWT SW ESW
Tel:+49 821 25851-86
Fax:+49 89 234-9552849

huewe.exter...@infineon.commailto:huewe.exter...@infineon.com

VISIT US AT: www.infineon.comhttp://www.infineon.com/ *
Infineon Technologies AG
Vorsitzender des Aufsichtsrats: Prof. Dr. Klaus Wucherer
Vorstand: Peter Bauer (Vorsitzender), Dominik Asam, Dr. Reinhard Ploss
Sitz der Gesellschaft: Neubiberg

Registergericht: München HRB 126492

This email and any attachments are confidential and may be subject to legal or 
some other professional privilege. They are intended solely for the attention 
and use of the named addressee(s). If you are not the named addressee(s) you 
must not use, disclose, retain or reproduce all or any part of the information 
contained in this email or any attachments. Any unauthorised use or disclosure 
may be unlawful. If you have received this email by mistake, please inform the 
sender immediately and delete it and all copies from your system and destroy 
any hard copies of it.




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


Re: [U-Boot] Porting TPM support (from Linux) to U-Boot

2011-02-22 Thread Wolfgang Denk
Dear huewe.exter...@infineon.com,

In message 
b2e5851d0f254d45b5019f4dd73497573d00647...@mucse405.eu.infineon.com you wrote:

 This setup works quite fine.
 But I'm almost sure that this is not the correct way to port a linux driver
  to u-boot. ;)

There is no general, one-size-fits-all approach.

 Can you perhaps point me to some resources how to do it correctly?
 How would you start? And how would you split up the files?

This cannot be answered without seing the code. Submit your code as
patches, so it can be reviewed.

 Furthermore I have some related questions:
 -   Is U-Boot using a libc / can I use functions from the glibc/ulibc?
 Are there any constraints?

U-Boot is self-contained. It does not use any expternal libc, but
provides all needed functions itself (which is obviously only a small
subset of standard libc functionality).

 -   Is there an equivalent for jiffies in u-boot? Or rather what is the
  correct way to handle timeouts?

Please use the U-Boot timer functions (udelay(), get_timer()).

 -   Is there an equivalent for be32_to_cpu ? (big endian to whatever en
 dianess the cpu uses) in u-boot?

We have be32_to_cpu(), or you could use ntohl().

Hm... why didn't you check this yourself?  All it takes is a grep
...

 This email and any attachments are confidential and may be subject to lega
 l or some other professional privilege. They are intended solely for the at
...

Please omit such crap whewn posting to public mailing lists.


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
Data is a lot like humans: It is  born.  Matures.  Gets  married  to
other  data, divorced. Gets old. One thing that it doesn't do is die.
It has to be killed. - Arthur Miller
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Porting TPM support (from Linux) to U-Boot

2011-02-22 Thread Huewe.external
Hi,
Thank you very much for your answer.

 This cannot be answered without seeing the code. Submit your code as
 patches, so it can be reviewed.
 Please use the U-Boot timer functions (udelay(), get_timer()).

Ok, I'll clean up the code and then submit it. 

 Please omit such crap when posting to public mailing lists.
Sorry about that, you're totally right on this one ;)

Thanks,
Peter 


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


Re: [U-Boot] [PATCH 1/1] MX5:MX53: support for freescale MX53LOCO board

2011-02-22 Thread Stefano Babic
On 02/22/2011 02:44 AM, Liu Hui-R64343 wrote:
 As I discovered myself, usage of config.mk is discouraged and it should be
 removed and it is not accepted anymore for new boards. Instead of that, it is
 possible to add CONFIG_ options in boards.cfg.
 
 OK, do you know why config.mk is discouraged?

Wolfgang has already explained why.

 Can I based on next of u-boot-imx to submit new patches since master branch
 Of uboot does not have it?

Yes, of course. I will apply in any case your patches on top of
u-boot-imx/next until the window will be opened again.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] arm writel in v2010.03-rc1 generate wrong code

2011-02-22 Thread zzs213
 anybody help me!!

I think you need this patch

http://lists.denx.de/pipermail/u-boot/2010-December/084133.html


Is there any other smoothly solution? 
This patch makes my code differ from the main line,So I think it's not good 
enough.

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


Re: [U-Boot] arm writel in v2010.03-rc1 generate wrong code

2011-02-22 Thread Wolfgang Denk
Dear zzs213,

In message 747caca3.ef8a.12e4d18b2cb.coremail.zzs...@126.com you wrote:

 I think you need this patch
 
 http://lists.denx.de/pipermail/u-boot/2010-December/084133.html
 
 Is there any other smoothly solution? 
 This patch makes my code differ from the main line,So I think it's not good 
 enough.

You can of course just wait until the patch has been accepted for
mainline, or until another solution has been developed.

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
People have one thing in common: they are all different.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] arm writel in v2010.03-rc1 generate wrong code

2011-02-22 Thread Albert ARIBAUD
Le 22/02/2011 13:42, Wolfgang Denk a écrit :
 Dear zzs213,

 In message747caca3.ef8a.12e4d18b2cb.coremail.zzs...@126.com  you wrote:

 I think you need this patch

 http://lists.denx.de/pipermail/u-boot/2010-December/084133.html

 Is there any other smoothly solution?
 This patch makes my code differ from the main line,So I think it's not good 
 enough.

 You can of course just wait until the patch has been accepted for
 mainline, or until another solution has been developed.

Meanwhile, one can maintain a local copy of the U-Boot git repository 
with a dedicated branch where this patch is added, and keep this branch 
rebased on master.

 Best regards,

 Wolfgang Denk

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


Re: [U-Boot] building enc28j60 for omap3: SILICON ERRATA

2011-02-22 Thread jacopo mondi
On Wed, 16 Feb 2011 18:31:23 +0100
Reinhard Meyer u-b...@emk-elektronik.de wrote:
 
 Not sure, the driver builds fine with ARM boards.
 Maybe you need to have CONFIG_NET_MULTI set?
 
 Best Regards,
 Reinhard

I've continued working on enc28j60 in those days, trying to make it
finally work with my beagle.
Stefano confirmed it works 'out of the box' (if I understood
correctly), but I'm experiencing some problems.

The first one is related to an ENC28J60 silicon errata (revision B5,
issue number 1).
It happens that the driver hangs waiting for CLKRDY becoming ready
(enc_clock_wait function).
That test is not relevant, since after a soft reset CLKRDY
bit is not cleared. I can submit a patch, but is a question of simply
waiting for more than 1ms instead of polling on that bit (that's what
the errata says).

Second issue is related to enc identification.
The following code section:

phid1 = phy_read(enc, PHY_REG_PHID1);
phid2 = phy_read(enc, PHY_REG_PHID2)  ENC_PHID2_MASK;
if (phid1 != ENC_PHID1_VALUE || phid2 != ENC_PHID2_VALUE) {
printf(%s: failed to identify PHY. Found
%04x:%04x\n,   enc-dev-name,
phid1, phid2);
 return -1;
}

fails because phy_read instructions return 0 or random values (0xB0B0
or 0xB000).
Linux driver does not perform such tests, so I've tried removing them.
Anyway all read and write to enc fails.
Could that be related to omap3_spi implementation?

I can confirm that same same board I'm using for test works great
under Linux, so it is not an hardware issue.

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


Re: [U-Boot] [PATCH] Introduce a new linker flag LDFLAGS_FINAL

2011-02-22 Thread Wolfgang Denk
Dear Haiying Wang,

In message 1297975097.1973.20.camel@haiying-laptop you wrote:

  Your scripts works fine. Now I only get one pair of diff which are
  System.map.mpc7448hpc2.diff  u-boot.map.mpc7448hpc2.diff, because
  mpc7448hpc2 failed to build:
  
  Configuring for mpc7448hpc2 board...
  cc1: error: AltiVec and E500 instructions cannot coexist
  cc1: error: AltiVec and E500 instructions cannot coexist
  lib/asm-offsets.c:1: error: AltiVec and E500 instructions cannot coexist
  make: *** [lib/asm-offsets.s] Error 1
  make: *** Waiting for unfinished jobs

You are using a broken or incorrectly configured (for the purpose)
tool chain then.  I don't see such problems with ELDK.


 Sorry, I ignored some other info just now. Not only 7448 but also some
 other boards failed to build, you can get the failed info from the
 beforepatch.txt and afterpatch.txt I sent yesterday. The final result
 should be:
 
 haiying@haiying-laptop:~/Opensource/Denx/u-boot$ ls -s *.diff
 0 System.map.ESTEEM192E.diff 0 System.map.P2020DS.diff
 0 System.map.ETX094.diff 0 System.map.sbc8641d.diff
 0 System.map.LANTEC.diff 0 System.map.SPD823TS.diff
 0 System.map.mpc7448hpc2.diff0 System.map.xpedite517x.diff
 0 System.map.MPC8610HPCD.diff0 u-boot.map.mpc7448hpc2.diff
 0 System.map.MPC8641HPCN_36BIT.diff  0 u-boot.map.MPC8610HPCD.diff
 0 System.map.MPC8641HPCN.diff0 u-boot.map.MPC8641HPCN_36BIT.diff
 0 System.map.mpq101.diff 0 u-boot.map.MPC8641HPCN.diff
 0 System.map.P2020DS_36BIT.diff  0 u-boot.map.sbc8641d.diff
 0 System.map.P2020DS_DDR2.diff   0 u-boot.map.xpedite517x.diff
 
 The above boards failed to build thus the diff files were generated but the 
 contents are all 0. 

All these boards build fine for me.

 All the other boards should not have difference in System.map/u-boot.map 
 before and after applying the LDFLAGS_FINAL patch.

As it's mostly unmaintained and/or Freescale boards that are untested
because of your tool chain issues I guess we can assume the test
passed.

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
To get something done, a committee should consist  of  no  more  than
three men, two of them absent.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] Introduce a new linker flag LDFLAGS_FINAL

2011-02-22 Thread Haiying.Wang
From: Haiying Wang haiying.w...@freescale.com

commit 8aba9dceebb14144e07d19593111ee3a999c37fc
Divides variable of linker flags to LDFLAGS-u-boot and LDFLAGS

breaks the usage of --gc-section to build nand_spl. We still need linker option
--gc-section for every uboot image, not only the main one. LDFLAGS_FINAL passes
the --gc-sections to each uboot image.

Because we add PLATFORM_FLAGS to LDFLAGS_FINAL via LDFLAGS in toplevel config.mk
,  we use LDFLAGS_FINAL to replace the PLATFORM_LDFLAGS in the Makefile of each
nand_spl board.

Signed-off-by: Scott Wood scottw...@freescale.com
Signed-off-by: Haiying Wang haiying.w...@freescale.com
---
v2: make changes based on the current top of the tree.
 arch/blackfin/config.mk   |2 +-
 arch/i386/config.mk   |2 +-
 arch/nios2/config.mk  |2 +-
 arch/powerpc/config.mk|2 +-
 arch/sh/config.mk |2 +-
 config.mk |3 ++-
 nand_spl/board/amcc/acadia/Makefile   |2 +-
 nand_spl/board/amcc/bamboo/Makefile   |2 +-
 nand_spl/board/amcc/canyonlands/Makefile  |2 +-
 nand_spl/board/amcc/kilauea/Makefile  |2 +-
 nand_spl/board/amcc/sequoia/Makefile  |2 +-
 nand_spl/board/davinci/da8xxevm/Makefile  |2 +-
 nand_spl/board/freescale/mpc8313erdb/Makefile |4 ++--
 nand_spl/board/freescale/mpc8315erdb/Makefile |4 ++--
 nand_spl/board/freescale/mpc8536ds/Makefile   |2 +-
 nand_spl/board/freescale/mpc8569mds/Makefile  |2 +-
 nand_spl/board/freescale/mpc8572ds/Makefile   |2 +-
 nand_spl/board/freescale/mx31pdk/Makefile |2 +-
 nand_spl/board/freescale/p1_p2_rdb/Makefile   |3 ++-
 nand_spl/board/karo/tx25/Makefile |2 +-
 nand_spl/board/samsung/smdk6400/Makefile  |2 +-
 nand_spl/board/sheldon/simpc8313/Makefile |4 ++--
 22 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index 0cba294..f4503ea 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -30,7 +30,7 @@ CONFIG_BFIN_BOOT_MODE := $(strip $(subst 
,,$(CONFIG_BFIN_BOOT_MODE)))
 PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
 PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
 
-LDFLAGS_u-boot += --gc-sections
+LDFLAGS_FINAL += --gc-sections
 LDFLAGS += -m elf32bfin
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 
diff --git a/arch/i386/config.mk b/arch/i386/config.mk
index a84af63..67aac0d 100644
--- a/arch/i386/config.mk
+++ b/arch/i386/config.mk
@@ -38,6 +38,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
 
 PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions
 
-LDFLAGS_u-boot += --gc-sections -pie
+LDFLAGS_FINAL += --gc-sections -pie
 LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
 
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index fa93180..d241a96 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -31,5 +31,5 @@ PLATFORM_CPPFLAGS += -G0
 
 LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
 
-LDFLAGS_u-boot += --gc-sections
+LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 64191c7..31e4416 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -24,7 +24,7 @@
 CROSS_COMPILE ?= ppc_8xx-
 
 STANDALONE_LOAD_ADDR = 0x4
-LDFLAGS_u-boot = --gc-sections
+LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 433cc15..48393b5 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -30,7 +30,7 @@ endif
 
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
 PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym 
reloc_dst=$(CONFIG_SYS_TEXT_BASE)
-LDFLAGS_u-boot = --gc-sections
+LDFLAGS_FINAL = --gc-sections
 
 ifdef CONFIG_SYS_LDSCRIPT
 LDSCRIPT := $(subst ,,$(CONFIG_SYS_LDSCRIPT))
diff --git a/config.mk b/config.mk
index 5147c35..caa6221 100644
--- a/config.mk
+++ b/config.mk
@@ -205,8 +205,9 @@ endif
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
 
 LDFLAGS += $(PLATFORM_LDFLAGS)
+LDFLAGS_FINAL += -Bstatic $(LDFLAGS)
 
-LDFLAGS_u-boot += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
+LDFLAGS_u-boot += -T $(obj)u-boot.lds $(LDFLAGS_FINAL)
 ifneq ($(CONFIG_SYS_TEXT_BASE),)
 LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
 endif
diff --git a/nand_spl/board/amcc/acadia/Makefile 
b/nand_spl/board/amcc/acadia/Makefile
index f8ca654..8799457 100644
--- a/nand_spl/board/amcc/acadia/Makefile
+++ b/nand_spl/board/amcc/acadia/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk
 
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
-LDFLAGS= 

Re: [U-Boot] [PATCH v2] Introduce a new linker flag LDFLAGS_FINAL

2011-02-22 Thread Scott Wood
On Tue, 22 Feb 2011 15:17:37 -0500
haiying.w...@freescale.com wrote:

 diff --git a/config.mk b/config.mk
 index 5147c35..caa6221 100644
 --- a/config.mk
 +++ b/config.mk
 @@ -205,8 +205,9 @@ endif
  AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
  
  LDFLAGS += $(PLATFORM_LDFLAGS)
 +LDFLAGS_FINAL += -Bstatic $(LDFLAGS)
  
 -LDFLAGS_u-boot += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
 +LDFLAGS_u-boot += -T $(obj)u-boot.lds $(LDFLAGS_FINAL)
  ifneq ($(CONFIG_SYS_TEXT_BASE),)
  LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
  endif

As Mike Frysinger pointed out, LDFLAGS is already used in addition to
LDFLAGS_u-boot.  So we may want to have LDFLAGS_FINAL not include LDFLAGS:

LDFLAGS += -Bstatic
LDFLAGS_u-boot += -T $(obj)u-boot.lds $(LDFLAGS_FINAL)

and then...

 diff --git a/nand_spl/board/freescale/mpc8536ds/Makefile 
 b/nand_spl/board/freescale/mpc8536ds/Makefile
 index 9c9d63e..c71a35a 100644
 --- a/nand_spl/board/freescale/mpc8536ds/Makefile
 +++ b/nand_spl/board/freescale/mpc8536ds/Makefile
 @@ -30,7 +30,7 @@ PAD_TO := 0xfff01000
  include $(TOPDIR)/config.mk
  
  LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
 -LDFLAGS  = -Bstatic -T $(LDSCRIPT) -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) 
 $(PLATFORM_LDFLAGS)
 +LDFLAGS := -T $(LDSCRIPT) -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) $(LDFLAGS_FINAL)
  AFLAGS   += -DCONFIG_NAND_SPL
  CFLAGS   += -DCONFIG_NAND_SPL

LDFLAGS := -T $(LDSCRIPT) -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
   $(LDFLAGS) $(LDFLAGS_FINAL)

The only functional difference should be that we're no longer repeating
certain flags in the main u-boot link.

-Scott

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


[U-Boot] [PATCH v3] Introduce a new linker flag LDFLAGS_FINAL

2011-02-22 Thread Haiying.Wang
From: Haiying Wang haiying.w...@freescale.com

commit 8aba9dceebb14144e07d19593111ee3a999c37fc
Divides variable of linker flags to LDFLAGS-u-boot and LDFLAGS

breaks the usage of --gc-section to build nand_spl. We still need linker option
--gc-section for every uboot image, not only the main one. LDFLAGS_FINAL passes
the --gc-sections to each uboot image.

To get the proper linker flags, we use LDFLAGS and LDFLAGS_FINAL to replace 
PLATFORM_LDFLAGS in the Makefile of each nand_spl board.

Signed-off-by: Scott Wood scottw...@freescale.com
Signed-off-by: Haiying Wang haiying.w...@freescale.com
---
v3: remove LDFLAGS from LDFLAGS_FINAL since it is already in LDFLAGS_u-boot, and
add LDFLAGS to each nand_spl board's LDFLAGS
 arch/blackfin/config.mk   |2 +-
 arch/i386/config.mk   |2 +-
 arch/nios2/config.mk  |2 +-
 arch/powerpc/config.mk|2 +-
 arch/sh/config.mk |2 +-
 config.mk |3 ++-
 nand_spl/board/amcc/acadia/Makefile   |3 ++-
 nand_spl/board/amcc/bamboo/Makefile   |3 ++-
 nand_spl/board/amcc/canyonlands/Makefile  |3 ++-
 nand_spl/board/amcc/kilauea/Makefile  |3 ++-
 nand_spl/board/amcc/sequoia/Makefile  |3 ++-
 nand_spl/board/davinci/da8xxevm/Makefile  |3 ++-
 nand_spl/board/freescale/mpc8313erdb/Makefile |4 ++--
 nand_spl/board/freescale/mpc8315erdb/Makefile |4 ++--
 nand_spl/board/freescale/mpc8536ds/Makefile   |3 ++-
 nand_spl/board/freescale/mpc8569mds/Makefile  |3 ++-
 nand_spl/board/freescale/mpc8572ds/Makefile   |3 ++-
 nand_spl/board/freescale/mx31pdk/Makefile |3 ++-
 nand_spl/board/freescale/p1_p2_rdb/Makefile   |3 ++-
 nand_spl/board/karo/tx25/Makefile |3 ++-
 nand_spl/board/samsung/smdk6400/Makefile  |3 ++-
 nand_spl/board/sheldon/simpc8313/Makefile |4 ++--
 22 files changed, 39 insertions(+), 25 deletions(-)

diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index 0cba294..f4503ea 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -30,7 +30,7 @@ CONFIG_BFIN_BOOT_MODE := $(strip $(subst 
,,$(CONFIG_BFIN_BOOT_MODE)))
 PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
 PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
 
-LDFLAGS_u-boot += --gc-sections
+LDFLAGS_FINAL += --gc-sections
 LDFLAGS += -m elf32bfin
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 
diff --git a/arch/i386/config.mk b/arch/i386/config.mk
index a84af63..67aac0d 100644
--- a/arch/i386/config.mk
+++ b/arch/i386/config.mk
@@ -38,6 +38,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
 
 PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions
 
-LDFLAGS_u-boot += --gc-sections -pie
+LDFLAGS_FINAL += --gc-sections -pie
 LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
 
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index fa93180..d241a96 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -31,5 +31,5 @@ PLATFORM_CPPFLAGS += -G0
 
 LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
 
-LDFLAGS_u-boot += --gc-sections
+LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 64191c7..31e4416 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -24,7 +24,7 @@
 CROSS_COMPILE ?= ppc_8xx-
 
 STANDALONE_LOAD_ADDR = 0x4
-LDFLAGS_u-boot = --gc-sections
+LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 433cc15..48393b5 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -30,7 +30,7 @@ endif
 
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
 PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym 
reloc_dst=$(CONFIG_SYS_TEXT_BASE)
-LDFLAGS_u-boot = --gc-sections
+LDFLAGS_FINAL = --gc-sections
 
 ifdef CONFIG_SYS_LDSCRIPT
 LDSCRIPT := $(subst ,,$(CONFIG_SYS_LDSCRIPT))
diff --git a/config.mk b/config.mk
index 5147c35..d80c02a 100644
--- a/config.mk
+++ b/config.mk
@@ -205,8 +205,9 @@ endif
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
 
 LDFLAGS += $(PLATFORM_LDFLAGS)
+LDFLAGS_FINAL += -Bstatic
 
-LDFLAGS_u-boot += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
+LDFLAGS_u-boot += -T $(obj)u-boot.lds $(LDFLAGS_FINAL)
 ifneq ($(CONFIG_SYS_TEXT_BASE),)
 LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
 endif
diff --git a/nand_spl/board/amcc/acadia/Makefile 
b/nand_spl/board/amcc/acadia/Makefile
index f8ca654..f4323d5 100644
--- a/nand_spl/board/amcc/acadia/Makefile
+++ b/nand_spl/board/amcc/acadia/Makefile
@@ -25,7 +25,8 @@ include $(TOPDIR)/config.mk
 include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk
 
 LDSCRIPT= 

Re: [U-Boot] [PATCH] arm: Tegra2: add support for A9 CPU init

2011-02-22 Thread Tom Warren
Anyone willing to review this? I'd like to get it pulled in to
Albert's arm repo ASAP.

Thanks,

Tom

On Wed, Feb 16, 2011 at 1:26 PM, Tom Warren twarren.nvi...@gmail.com wrote:
 Signed-off-by: Tom Warren twar...@nvidia.com
 ---
  arch/arm/cpu/armv7/start.S                 |    6 +
  arch/arm/cpu/armv7/tegra2/Makefile         |    2 +-
  arch/arm/cpu/armv7/tegra2/ap20.c           |  490 
 
  arch/arm/cpu/armv7/tegra2/ap20.h           |  105 ++
  arch/arm/include/asm/arch-tegra2/clk_rst.h |   27 ++
  arch/arm/include/asm/arch-tegra2/pmc.h     |    8 +
  arch/arm/include/asm/arch-tegra2/scu.h     |   43 +++
  arch/arm/include/asm/arch-tegra2/tegra2.h  |    5 +
  board/nvidia/common/board.c                |   10 +
  board/nvidia/common/board.h                |   29 ++
  include/configs/harmony.h                  |    1 +
  include/configs/seaboard.h                 |    1 +
  include/configs/tegra2-common.h            |    2 +
  13 files changed, 728 insertions(+), 1 deletions(-)
  create mode 100644 arch/arm/cpu/armv7/tegra2/ap20.c
  create mode 100644 arch/arm/cpu/armv7/tegra2/ap20.h
  create mode 100644 arch/arm/include/asm/arch-tegra2/scu.h
  create mode 100644 board/nvidia/common/board.h

 diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
 index 684f2d2..50a1725 100644
 --- a/arch/arm/cpu/armv7/start.S
 +++ b/arch/arm/cpu/armv7/start.S
 @@ -70,6 +70,12 @@ _end_vect:
  _TEXT_BASE:
        .word   CONFIG_SYS_TEXT_BASE

 +#ifdef CONFIG_TEGRA2
 +.globl _armboot_start
 +_armboot_start:
 +        .word _start
 +#endif
 +
  /*
  * These are defined in the board-specific linker script.
  */
 diff --git a/arch/arm/cpu/armv7/tegra2/Makefile 
 b/arch/arm/cpu/armv7/tegra2/Makefile
 index 687c887..f1ea915 100644
 --- a/arch/arm/cpu/armv7/tegra2/Makefile
 +++ b/arch/arm/cpu/armv7/tegra2/Makefile
 @@ -28,7 +28,7 @@ include $(TOPDIR)/config.mk
  LIB    =  $(obj)lib$(SOC).o

  SOBJS  := lowlevel_init.o
 -COBJS  := board.o sys_info.o timer.o
 +COBJS  := ap20.o board.o sys_info.o timer.o

  SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
  OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
 diff --git a/arch/arm/cpu/armv7/tegra2/ap20.c 
 b/arch/arm/cpu/armv7/tegra2/ap20.c
 new file mode 100644
 index 000..89d0d5e
 --- /dev/null
 +++ b/arch/arm/cpu/armv7/tegra2/ap20.c
 @@ -0,0 +1,490 @@
 +/*
 +* (C) Copyright 2010-2011
 +* NVIDIA Corporation www.nvidia.com
 +*
 +* See file CREDITS for list of people who contributed to this
 +* project.
 +*
 +* This program is free software; you can redistribute it and/or
 +* modify it under the terms of the GNU General Public License as
 +* published by the Free Software Foundation; either version 2 of
 +* the License, or (at your option) any later version.
 +*
 +* This program is distributed in the hope that it will be useful,
 +* but WITHOUT ANY WARRANTY; without even the implied warranty of
 +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +* GNU General Public License for more details.
 +*
 +* You should have received a copy of the GNU General Public License
 +* along with this program; if not, write to the Free Software
 +* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 +* MA 02111-1307 USA
 +*/
 +
 +#include ap20.h
 +#include asm/io.h
 +#include asm/arch/tegra2.h
 +#include asm/arch/clk_rst.h
 +#include asm/arch/pmc.h
 +#include asm/arch/pinmux.h
 +#include asm/arch/scu.h
 +#include common.h
 +
 +static void init_pll_x(void)
 +{
 +       struct clk_rst_ctlr *clkrst = (struct clk_rst_ctlr 
 *)NV_PA_CLK_RST_BASE;
 +       u32     reg;
 +
 +       /* Is PLL-X already running? */
 +       reg = readl(clkrst-crc_pllx_base);
 +       if (reg  PLL_ENABLE)
 +               return;
 +
 +       /* Do PLLX init if it isn't running, but BootROM sets it, so TBD */
 +}
 +
 +static void set_cpu_reset_vector(u32 vector)
 +{
 +       writel(vector, EXCEP_VECTOR_CPU_RESET_VECTOR);
 +}
 +
 +static void enable_cpu_clock(int enable)
 +{
 +       struct clk_rst_ctlr *clkrst = (struct clk_rst_ctlr 
 *)NV_PA_CLK_RST_BASE;
 +       u32   reg, clk;
 +
 +       /*
 +        * NOTE:
 +        * Regardless of whether the request is to enable or disable the CPU
 +        * clock, every processor in the CPU complex except the master (CPU 0)
 +        * will have it's clock stopped because the AVP only talks to the
 +        * master. The AVP does not know (nor does it need to know) that there
 +        * are multiple processors in the CPU complex.
 +        */
 +
 +       /* Need to initialize PLLX? */
 +       if (enable) {
 +               /* Initialize PLL */
 +               init_pll_x();
 +
 +               /* Wait until stable */
 +               udelay(NVBOOT_CLOCKS_PLL_STABILIZATION_DELAY);
 +
 +               reg = CCLK_BURST_POLICY;
 +               writel(reg, clkrst-crc_cclk_brst_pol);
 +
 +               reg = SUPER_CCLK_DIVIDER;
 +               writel(reg, clkrst-crc_super_cclk_div);
 +       }
 +
 +       /* Fetch the register 

Re: [U-Boot] [PATCH] arm: Tegra2: add support for A9 CPU init

2011-02-22 Thread Albert ARIBAUD
Hi Tom,

Le 23/02/2011 00:41, Tom Warren a écrit :
 Anyone willing to review this? I'd like to get it pulled in to
 Albert's arm repo ASAP.

I should be able to review it during the week-end--not before, sorry.

Note however that since this is not a bugfix and it came after the merge 
window closed, it would go to u-boot-arm/next, not /master; it will go 
to u-boot-arm/master after the the upcoming release (and then to 
u-boot/master when the next merge window closes).

 Thanks,

 Tom

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


Re: [U-Boot] Uboot - USB to Ethernet patch

2011-02-22 Thread Simon Glass
Yes, will do - Simon

On Sat, Feb 19, 2011 at 1:05 AM, Remy Bohmer li...@bohmer.net wrote:
 Hi Simon,

 2011/2/18 Simon Glass s...@chromium.org:
 +UBML

 Hi Anders,

 You will need at least:

 /* Enable USB Ethernet dongles */
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX

 (and your platform must support USB with CONFIG_CMD_USB and CONFIG_USB_EHCI
 for example)

 You will also want to enable the network commands:

 #define CONFIG_CMD_NET
 #define CONFIG_NET_MULTI
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_DHCP

 and some bootp options:

 #define CONFIG_BOOTP_SUBNETMASK
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_HOSTNAME
 #define CONFIG_BOOTP_BOOTPATH

 #define CONFIG_IPADDR 10.0.0.2
 #define CONFIG_SERVERIP 10.0.0.1
 #define CONFIG_BOOTFILE uImage


 I might have missed something, but that should be enough to make progress.

 'usb start' should identify the Ethernet dongle. Then 'bootp' should use it
 to obtain an IP address from DHCP.

 Apparently it is not clear to others how it should be used.
 Can you please add a description to doc/README.usb and provide a patch for 
 that?

 Kind regards,

 Remy

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


[U-Boot] organizing doc/ dir?

2011-02-22 Thread Kumar Gala
Wolfgang,

Any issue that added a little hierarchy to the doc/ dir?

maybe something mimic board/

for example:

doc/README.mpc8313erdb  -  doc/freescale/README.mpc8313erdb
doc/README.mpc8315erdb  -  doc/freescale/README.mpc8315erdb
doc/README.mpc8323erdb  -  doc/freescale/README.mpc8323erdb
doc/README.mpc832xemds  -  doc/freescale/README.mpc832xemds
doc/README.mpc8349itx   -  doc/freescale/README.mpc8349itx
doc/README.mpc8360emds  -  doc/freescale/README.mpc8360emds
doc/README.mpc837xemds  -  doc/freescale/README.mpc837xemds
doc/README.mpc837xerdb  -  doc/freescale/README.mpc837xerdb
doc/README.mpc83xxads   -  doc/freescale/README.mpc83xxads
doc/README.mpc83xx.ddrecc- doc/freescale/README.mpc83xx.ddrecc
doc/README.mpc8536ds-  doc/freescale/README.mpc8536ds
doc/README.mpc8544ds-  doc/freescale/README.mpc8544ds
doc/README.mpc8569mds   -  doc/freescale/README.mpc8569mds
doc/README.mpc8572ds-  doc/freescale/README.mpc8572ds
doc/README.mpc85xxads   -  doc/freescale/README.mpc85xxads
doc/README.mpc85xxcds   -  doc/freescale/README.mpc85xxcds
doc/README.mpc8610hpcd  -  doc/freescale/README.mpc8610hpcd
doc/README.mpc8641hpcn  -  doc/freescale/README.mpc8641hpcn

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


Re: [U-Boot] organizing doc/ dir?

2011-02-22 Thread Wolfgang Denk
Dear Kumar Gala,

In message 78b99acf-ec73-4dbc-b4ee-49f1b33b9...@kernel.crashing.org you wrote:
 
 Any issue that added a little hierarchy to the doc/ dir?

Excellent idea - thanks!

 maybe something mimic board/
 
 for example:
 
 doc/README.mpc8313erdb  -  doc/freescale/README.mpc8313erdb
 doc/README.mpc8315erdb  -  doc/freescale/README.mpc8315erdb
 doc/README.mpc8323erdb  -  doc/freescale/README.mpc8323erdb
 doc/README.mpc832xemds  -  doc/freescale/README.mpc832xemds
 doc/README.mpc8349itx   -  doc/freescale/README.mpc8349itx
 doc/README.mpc8360emds  -  doc/freescale/README.mpc8360emds
 doc/README.mpc837xemds  -  doc/freescale/README.mpc837xemds
 doc/README.mpc837xerdb  -  doc/freescale/README.mpc837xerdb
 doc/README.mpc83xxads   -  doc/freescale/README.mpc83xxads
 doc/README.mpc83xx.ddrecc- doc/freescale/README.mpc83xx.ddrecc
...

Eventually we should folow the code layout and do

doc/board/freescale/README.mpc8313erdb
doc/board/freescale/README.mpc8315erdb
doc/board/freescale/README.mpc8323erdb
doc/board/freescale/README.mpc832xemds

but
README.mpc83xx.ddrecc

is not specific to Freescale boards and should be somewhere else.

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
Remember, there's a big difference between kneeling down and  bending
over.   - Frank Zappa
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] organizing doc/ dir?

2011-02-22 Thread Peter Tyser
On Wed, 2011-02-23 at 00:02 -0600, Kumar Gala wrote:
 Wolfgang,
 
 Any issue that added a little hierarchy to the doc/ dir?
 
 maybe something mimic board/
 
 for example:
 
 doc/README.mpc8313erdb  -  doc/freescale/README.mpc8313erdb
 doc/README.mpc8315erdb  -  doc/freescale/README.mpc8315erdb
 doc/README.mpc8323erdb  -  doc/freescale/README.mpc8323erdb
 doc/README.mpc832xemds  -  doc/freescale/README.mpc832xemds
 doc/README.mpc8349itx   -  doc/freescale/README.mpc8349itx
 doc/README.mpc8360emds  -  doc/freescale/README.mpc8360emds
 doc/README.mpc837xemds  -  doc/freescale/README.mpc837xemds
 doc/README.mpc837xerdb  -  doc/freescale/README.mpc837xerdb
 doc/README.mpc83xxads   -  doc/freescale/README.mpc83xxads
 doc/README.mpc83xx.ddrecc- doc/freescale/README.mpc83xx.ddrecc
 doc/README.mpc8536ds-  doc/freescale/README.mpc8536ds
 doc/README.mpc8544ds-  doc/freescale/README.mpc8544ds
 doc/README.mpc8569mds   -  doc/freescale/README.mpc8569mds
 doc/README.mpc8572ds-  doc/freescale/README.mpc8572ds
 doc/README.mpc85xxads   -  doc/freescale/README.mpc85xxads
 doc/README.mpc85xxcds   -  doc/freescale/README.mpc85xxcds
 doc/README.mpc8610hpcd  -  doc/freescale/README.mpc8610hpcd
 doc/README.mpc8641hpcn  -  doc/freescale/README.mpc8641hpcn

What about adding a doc/board directory?  eg:
doc/README.mpc8313erdb  -  doc/board/freescale/README.mpc8313erdb
doc/README.mpc8315erdb  -  doc/board/freescale/README.mpc8315erdb
doc/README.ocotea   -  doc/board/amcc/README.ocotea
doc/README.ebony-  doc/board/amcc/README.ebony
doc/README.zeus -  doc/board/README.zeus
doc/README.xpedite1k-  doc/board/README.xpedite1k

Since the majority of documentation is board specific at this point,
it'd be nice if it was all moved into a subdirectory to clean up the
top-level doc/ dir.

Also, without the board subdirectory it'd be unclear where general
Freescale documentation that was relevant to multiple board vendors
would go.  Eg README.fsl-ddr - doc/freescale?  or doc/?.

A reorganization sounds nice either way!

Peter

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


Re: [U-Boot] organizing doc/ dir?

2011-02-22 Thread Albert ARIBAUD
Hi Kumar and others,

Le 23/02/2011 07:02, Kumar Gala a écrit :
 Wolfgang,

 Any issue that added a little hierarchy to the doc/ dir?

 maybe something mimic board/

I would tend to agree wholeheartedly to the idea, if only because /doc 
currently contains 154 files, which meakes it not that easy to sort 
things out.

But why limit oneself to boards? U-Boot has a structured arch/ dir as 
well, and lib/ also, to name only some. Structuring /doc after these as 
well would be quite useful as:

- only general U-Boot doc files would reside directly under /doc, making 
it easier for beginners to grasp U-boot essentials (and for seasoned 
users to brush up their knowledge) -- for instance, the rationales for 
U-Boot such as the recently discussed float issue could be made much 
more visible by being one of a few files in /doc itself;

- arch-related files under /doc/arch (including a rationale file 
explaining how /arch itself is organized) and arch-specific files under 
/doc/arch/arch -- /doc/arch/arm would hold all ARM related stuff; that 
would make arch, cpu, SoC specific information easier to locate;

- lib-related files in /doc/lib to better explain and document the as 
much of libc behavior as needed but no more approach;

- possibly even on a far further future, automated doc generation from 
code annotations would help keeping the doc up-to-date and benefit from 
/doc mimicking the source code tree structure -- but granted, it may not 
be that easy to find where in the code some of what /doc contains now 
should go.

... and I'm certainly missing other benefits.

So yes, I would second a /doc reorg beyond a mere /doc/boards creation.

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


[U-Boot] [PATCH V2 1/1] MX53: support for freescale MX53LOCO board

2011-02-22 Thread Jason Liu
This patch add initial support for freescale MX53LOCO board.
Network(FEC),SD/MMC, UART have been supported by this patch.

Signed-off-by: Jason Liu r64...@freescale.com

---
Changes for v2:
- remove config.mk, instead add CONFIG_ options in boards.cfg
- fix copyright issue, use freescale copyright.
- rebase on u-boot-imx/next branch and resend.
---
 MAINTAINERS   |1 +
 board/freescale/mx53loco/Makefile |   47 +
 board/freescale/mx53loco/imximage.cfg |   96 ++
 board/freescale/mx53loco/mx53loco.c   |  316 +
 boards.cfg|1 +
 include/configs/mx53loco.h|  196 
 6 files changed, 657 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index b37ed0c..0462179 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -566,6 +566,7 @@ Stefano Babic sba...@denx.de
 Jason Liu r64...@freescale.com
 
mx53evk i.MX53
+   mx53locoi.MX53
 
 Enric Balletbo i Serra eballe...@iseebcn.com
 
diff --git a/board/freescale/mx53loco/Makefile 
b/board/freescale/mx53loco/Makefile
new file mode 100644
index 000..2088a48
--- /dev/null
+++ b/board/freescale/mx53loco/Makefile
@@ -0,0 +1,47 @@
+#
+# (C) Copyright 2011 Freescale Semiconductor, Inc.
+# Jason Liu r64...@freescale.com
+#
+# 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).o
+
+COBJS  := mx53loco.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(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/freescale/mx53loco/imximage.cfg 
b/board/freescale/mx53loco/imximage.cfg
new file mode 100755
index 000..ce9c8fc
--- /dev/null
+++ b/board/freescale/mx53loco/imximage.cfg
@@ -0,0 +1,96 @@
+# Copyright (C) 2011 Freescale Semiconductor, Inc.
+# Jason Liu r64...@freescale.com
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not write to the Free Software
+# Foundation Inc. 51 Franklin Street Fifth Floor Boston,
+# MA 02110-1301 USA
+#
+# Refer docs/README.imxmage for more details about how-to configure
+# and create imximage boot image
+#
+# The syntax is taken as close as possible with the kwbimage
+
+# image version
+
+IMAGE_VERSION 2
+
+# Boot Device : one of
+# spi, sd (the board has no nand neither onenand)
+
+BOOT_FROM  sd
+
+# Device Configuration Data (DCD)
+#
+# Each entry must have the format:
+# Addr-type   AddressValue
+#
+# where:
+#  Addr-type register length (1,2 or 4 bytes)
+#  Address   absolute address of the register
+#  value value to be stored in the register
+
+DATA 4 0x53fa8554 0x0030
+DATA 4 0x53fa8558 0x00300040
+DATA 4 0x53fa8560 0x0030
+DATA 4 0x53fa8564 0x00300040
+DATA 4 0x53fa8568 0x00300040
+DATA 4 0x53fa8570 0x0030
+DATA 4 0x53fa8574 0x0030
+DATA 4 0x53fa8578 0x0030
+DATA 4 0x53fa857c 0x00300040
+DATA 4 0x53fa8580 0x00300040
+DATA 4 0x53fa8584 0x0030
+DATA 4 0x53fa8588 0x0030
+DATA 4 0x53fa8590 0x00300040
+DATA 4 0x53fa8594 0x0030
+DATA 4 0x53fa86f0 0x0030
+DATA 4 0x53fa86f4 0x
+DATA 4 0x53fa86fc 0x
+DATA 4 0x53fa8714 0x
+DATA 4 0x53fa8718 0x0030
+DATA 4 0x53fa871c