Re: [U-Boot] [PATCH 1/1] Changes for single binary image for u-boot for NAND/OneNAND flash.

2009-03-03 Thread Nishanth Menon
Manikandan Pillai said the following on 03/03/2009 05:41 AM:
 Support for single binary image for NAND/OneNAND based OMAP3 EVM
 boards. The software has to set the flag CONFIG_ENV_IS_RUNTIME_SEL
 in include/configs/omap3_evm.h. The software is able to detect
 whether it is NAND or OneNAND flash at runtime. The flash
 detected is set as the environment store also.
   
makes sense for SDP also.. in SDP3430, we have NOR,OneNAND,NAND and MMC
as possible boot devices. :(
Could you please split this patch into two:
a) changes to generic files
b) changes specific to omap.
it is easier to review that way..
 As per the comments received, the change is done only for OMAP3 EVM.

 Signed-off-by: Manikandan Pillai mani.pil...@ti.com
 ---
  board/omap3/evm/evm.c |2 +
  common/Makefile   |1 +
  common/cmd_nvedit.c   |5 ++
  common/env_common.c   |8 +++-
  common/env_nand.c |   33 +++-
  common/env_onenand.c  |   26 +-
  cpu/arm_cortexa8/omap3/board.c|   13 +
  cpu/arm_cortexa8/omap3/mem.c  |  100 
 -
  cpu/arm_cortexa8/omap3/sys_info.c |   27 +-
  include/common.h  |   10 +++-
  include/configs/omap3_evm.h   |6 ++-
  lib_arm/board.c   |   25 +++---
  12 files changed, 237 insertions(+), 19 deletions(-)

 diff --git a/board/omap3/evm/evm.c b/board/omap3/evm/evm.c
 index b406312..9924432 100644
 --- a/board/omap3/evm/evm.c
 +++ b/board/omap3/evm/evm.c
 @@ -44,7 +44,9 @@ int board_init(void)
  {
   DECLARE_GLOBAL_DATA_PTR;
  
 +#if !defined(CONFIG_ENV_IS_RUNTIME_SEL)
   gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
 +#endif
   /* board id for Linux */
   gd-bd-bi_arch_number = MACH_TYPE_OMAP3EVM;
   /* boot param addr */
 diff --git a/common/Makefile b/common/Makefile
 index f13cd11..a6c55d2 100644
 --- a/common/Makefile
 +++ b/common/Makefile
 @@ -58,6 +58,7 @@ COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
  COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
  COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
  COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 +COBJS-$(CONFIG_ENV_IS_RUNTIME_SEL) += env_onenand.o env_nand.o
  
  # command
  COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
 diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
 index 68c673e..628bcf4 100644
 --- a/common/cmd_nvedit.c
 +++ b/common/cmd_nvedit.c
 @@ -59,6 +59,7 @@ DECLARE_GLOBAL_DATA_PTR;
  !defined(CONFIG_ENV_IS_IN_NAND)   \
  !defined(CONFIG_ENV_IS_IN_ONENAND)\
  !defined(CONFIG_ENV_IS_IN_SPI_FLASH)  \
 +!defined(CONFIG_ENV_IS_RUNTIME_SEL)   \
  !defined(CONFIG_ENV_IS_NOWHERE)
  # error Define one of 
 CONFIG_ENV_IS_IN_{NVRAM|EEPROM|FLASH|DATAFLASH|ONENAND|SPI_FLASH|NOWHERE}
  #endif
 @@ -66,6 +67,10 @@ DECLARE_GLOBAL_DATA_PTR;
  #define XMK_STR(x)   #x
  #define MK_STR(x)XMK_STR(x)
  
 +#if defined(CONFIG_ENV_IS_RUNTIME_SEL)
 +extern saveenv_p saveenv;
 +#endif
 +
  /
  /
  
 diff --git a/common/env_common.c b/common/env_common.c
 index 6be3bb0..b692900 100644
 --- a/common/env_common.c
 +++ b/common/env_common.c
 @@ -46,8 +46,13 @@ DECLARE_GLOBAL_DATA_PTR;
  
  extern env_t *env_ptr;
  
 +#if defined(CONFIG_ENV_IS_RUNTIME_SEL)
 +extern env_get_char_spec_p env_get_char_spec;
 +extern env_relocate_spec_p env_relocate_spec;
 +#else
  extern void env_relocate_spec (void);
  extern uchar env_get_char_spec(int);
 +#endif
  
  static uchar env_get_char_init (int index);
  
 @@ -140,7 +145,8 @@ uchar default_environment[] = {
  };
  
  #if defined(CONFIG_ENV_IS_IN_NAND)   /* Environment is in Nand Flash 
 */ \
 - || defined(CONFIG_ENV_IS_IN_SPI_FLASH)
 + || defined(CONFIG_ENV_IS_IN_SPI_FLASH) \
 + || (defined(CONFIG_CMD_NAND)  defined(CONFIG_ENV_IS_RUNTIME_SEL))
   
Errr ENV_IS_IN_NAND Vs ENV_IS_RUNTIME_SEL is not clear.

  int default_environment_size = sizeof(default_environment);
  #endif
  
 diff --git a/common/env_nand.c b/common/env_nand.c
 index 76569da..add74c2 100644
 --- a/common/env_nand.c
 +++ b/common/env_nand.c
 @@ -65,17 +65,22 @@ int nand_legacy_rw (struct nand_chip* nand, int cmd,
  extern uchar default_environment[];
  extern int default_environment_size;
  
 +#if defined(CONFIG_ENV_IS_RUNTIME_SEL)
 +char *nand_env_name_spec = NAND;
   
I suppose we might want a README.runtime_env to understand it's usage..
 +#else
  char * env_name_spec = NAND;
 -
 +#endif
  
  #ifdef ENV_IS_EMBEDDED
  extern uchar environment[];
  env_t *env_ptr = (env_t *)(environment[0]);
 +#elif defined(CONFIG_ENV_IS_RUNTIME_SEL)
 +env_t *nand_env_ptr;
 +env_t *env_ptr;
  #else /* ! ENV_IS_EMBEDDED */
  env_t *env_ptr = 0;
  #endif /* ENV_IS_EMBEDDED */
  
 -
  /* local functions */
  #if !defined(ENV_IS_EMBEDDED)
  static void 

Re: [U-Boot] [PATCH] Seperate mtdpart command from jffs2

2009-03-03 Thread Stefan Roese
On Tuesday 03 March 2009, Kyungmin Park wrote:
 Some program such as UBI only used the mtdpart only.
 however current jffs2 cmdline has dependent with jffs2 cmd
 This patch make a build only jffs2 cmdline without jffs2 cmd dependency.

Thanks. I'll review it in a few days.

Best regards,
Stefan

=
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] [PATCH 1/1] Fix for running examples on OMAP3 EVM board

2009-03-03 Thread Nishanth Menon
Manikandan Pillai said the following on 03/03/2009 05:40 AM:
 Example binaries to be downloaded to 0x8030 for OMAP3 EVMs.

 Signed-off-by: Manikandan Pillai mani.pil...@ti.com
 ---
  examples/Makefile |4 
  1 files changed, 4 insertions(+), 0 deletions(-)

 diff --git a/examples/Makefile b/examples/Makefile
 index dbcfa92..75e6c87 100644
 --- a/examples/Makefile
 +++ b/examples/Makefile
 @@ -36,10 +36,14 @@ else
  ifeq ($(CPU),omap3)
  LOAD_ADDR = 0x8030
  else
 +ifeq ($(CPU),arm_cortexa8)
 +LOAD_ADDR = 0x8030
 +else
   
I am bit confused here.. first we say $(CPU) omap3...EVM is based on
omap3 rt?
the second change is not valid - cortex_a8 - we might have future
platforms which have cortex. they need not use the same memory map as
OMAP does. this is not valid change. NAK from me.

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


Re: [U-Boot] U-Boot Scripting suggestions to decrement counter in EEPROM. Alignment bug in itest on ARM.

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
On 17:40 Tue 03 Mar , Tom Evans wrote:
 I'm implementing a rather complex boot that involves flags and counters 
 in EEPROM.

in which case do you need this?

update?

in u-boot you have better system that involve watchdog and bootcount

I do not known which cpu or soc you use but you can implement it simply

 BUG IN ITEST
 
 itest crashes ARM chips. I can iread.b *8200 == 0, but
 iread.b *8201 == 0 throws an alignment exception that kills the 
 box. The code in itest.c is:
 
 static long evalexp(char *s, int w)
 {
  long l, *p;
 
  /* if the parameter starts with a * then assume is a
 pointer to the value we want */
  if (s[0] == '*') {
  p = (long *)simple_strtoul(s[1], NULL, 16);
  l = *p;
here you are support to use the good accessor readb/readw/readl
b  } else {
  l = simple_strtoul(s, NULL, 16);
  }
 
  return (l  ((1  (w * 8)) - 1));
 }
 
 l = *p works on a 486 but not on an ARM. It is a simple change - a 
 three-way case on the width reading through the right pointer.
the arm does not allow you to do an non aligned access

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


Re: [U-Boot] FSL DDR @ 83xx

2009-03-03 Thread Andre Schwarz
Jerry Van Baren wrote:
 Andre Schwarz wrote:
 Kumar Gala schrieb:
 On Dec 9, 2008, at 12:01 PM, Andre Schwarz wrote:

 Jon Loeliger schrieb:
 On Mon, 2008-12-08 at 18:02 +0100, Andre Schwarz wrote:

 Kim,

 I'd like to change my DDR setup code since it looks like my computed
 values are not perfectly stable on our 8343 based board.

 This implies using a fake SPD and the related code to set up the
 controller.

 Is the new common FSL DDR setup code (cpu/mpc8xxx/ddr/*) stable 
 for
 83xx or shall I stick to cpu/mpc83xx/spd_sdram.c for a while ?

 The new, common DDR code in use by the FSL boards does not
 yet cover the 83xx family, though the plan is to eventually
 do so.

 Patches in that direction, are, naturally, welcome... :-)

 jdl



 Is anybody working on this ?
 The spd_sdram code lacks support for 3 bank adress bits and various
 termination schemes which
 are essential for tiny boards with soldered memory.

 Of course I could contribute for the 8343.
 But I don't now about the others (85xx/86x) in detail and don't want
 to scatter #ifdefs all over the code ...

 regards,
 André
 I don't believe anyone is currently working on getting the new ddr
 code to be used w/83xx.  Feel free to submit patches that does this
 and we will review them as they are posted.

 - k
 After spending few hours it seems to work basically.
 This is what I've done :

 - add mpc8xxx(ddr/libddr.a to top level Makefile for 83xx
 - created mpc83xx/ddr-gen2.c and ported to meet ddr83xx_t
 - created board specific ddr.c for SPD accessor and basic setup.
 - created board specific ddr2_spd_eeprom_t (soldered memory)

 The board config got these #defines :

 #define CONFIG_FSL_DDR2
 #define CONFIG_DDR_SPD
 #define CONFIG_NUM_DDR_CONTROLLERS  1   - this should go
 into mpc83xx header
 #define CONFIG_DIMM_SLOTS_PER_CTLR  1
 #define CONFIG_CHIP_SELECTS_PER_CTRL1

 Since spd_sdram.o is always build (mpc83xx/Makefile) and the code is
 also activated by CONFIG_SPD_EEPROM
 we should find a reasonable way  to switch between old and new DDR
 code by some kind of #define.

 Is this the way to go ?

 regards,
 André

 Hi André, others,

 Has anyone made any progress on moving the mpc83xx family to the 
 mpc8xxx/ddr unified initialization?

 André, could you post what you did to the list or, if it isn't in 
 publishable shape, email it to me so I can bash at it?

 Thanks,
 gvb

Jerry,

unfortunately I got interrupted, since this has not been a high priority 
issue to us.
The usual 83xx DDR setup works quite fine.

Since I'm horribly out of sync there'll be no patch.

What I have done so far (it's not yet working) :

- added #defines to board header for DDR gen2.
- created DDR-II compatible PROM table parsable by SPD code.
- added board specific DDR code according to Freescale file layout.
- created cpu/mpc83xx/ddr-gen2.c

All new code is plain copy/paste of existing Freescale code with minor mods.

Setting up LAW has not been done in any way.

I think the new code is pretty much straight forward and definitely 
worth the effort porting it to 83xx.

You'll get my stuff off-list.


regards,
Andre


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


[U-Boot] Is it possible to support interrupts in ARM without MMU in u-boot

2009-03-03 Thread akshay st








Hi,
I wanted to know whether it is possible to support arm interrupts in u-boot 
without MMU on. Since ARM expects the normal interrupt vectors to be either 
0x or 0x0. If possible can be tell me what needs to be done?
 
Warm Regards,
Akshay



  Bring your gang together. Do your thing. Find your favourite Yahoo! group 
at http://in.promos.yahoo.com/groups/___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] AT91RM9200 U-Boot can not load initrd from flash

2009-03-03 Thread Dmitry Koroban

 To be more precise: Patches to the Linux kernel have been submitted...
   
I've searched archive using gmane but found only links to cvs whis is no 
longer used. This question seems to be asked frequently, so why don't 
you add it to FAQ along with link to patches to prevent further questions?

Thank you

-- 
Dmitry

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


Re: [U-Boot] AT91RM9200 U-Boot can not load initrd from flash

2009-03-03 Thread Dmitry K

 To be more precise: Patches to the Linux kernel have been submitted...


I've searched archive using gmane but found only links to cvs whis is no 
longer used. This question seems to be asked frequently, so why don't 
you add it to FAQ along with link to patches to prevent further 
questions?

Thank you

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


Re: [U-Boot] Uboot and DMA

2009-03-03 Thread praveen G
Hi,

Any info??

Best Regards,
Praveen

On Mon, Mar 2, 2009 at 11:25 AM, praveen G gpravee...@gmail.com wrote:

 Hi,

 Please let me know if Uboot uses DMA for any of its operations during board
 bootup.
 Please let me know if Uboot has DMA support and if yes how??

 Thanks in advance.

 Best Regards,
 Nikhil

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


Re: [U-Boot] Uboot and DMA

2009-03-03 Thread praveen G
Hi,
Any updates??

Nikhil

On Mon, Mar 2, 2009 at 11:25 AM, praveen G gpravee...@gmail.com wrote:

 Hi,

 Please let me know if Uboot uses DMA for any of its operations during board
 bootup.
 Please let me know if Uboot has DMA support and if yes how??

 Thanks in advance.

 Best Regards,
 Nikhil

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


[U-Boot] U-boot with SMSC LAN8700

2009-03-03 Thread Louis Ruch
Hello all,

We have developed a board based on the Freescale MPC8315E-RDB.  We have made
some changes to the board in order to cut costs, and one of the changes made
was to replace the standard Ethernet chip with the SMSC LAN8700 chip.  We
are able to start up the board and get it to launch u-boot:

=

However once in the u-boot command line we are unable to perform any network
functions.  Ping fails as well as the tftp command to get our linux image
acrross to the board.

From what we can tell it should not be a problem and all we need to do is
enable RMII support for the uboot and it should detect the chip.  Is this
correct?  If it is how do we go about enabling RMII support for the device,
and is there anything else we need to do in order to get this chip supported
by the u-boot?

We compiled our version of u-boot by using the LTIB software that came with
the MPC8315E-RDB BSP which automatically generated our u-boot version.

Regards,

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


Re: [U-Boot] Uboot and DMA

2009-03-03 Thread Jerry Van Baren
Hi Nikhil,

praveen G wrote:
 Hi,
 Any updates??
 
 Nikhil

http://www.catb.org/~esr/faqs/smart-questions.html

 On Mon, Mar 2, 2009 at 11:25 AM, praveen G gpravee...@gmail.com wrote:
 
 Hi,

 Please let me know if Uboot uses DMA for any of its operations during board
 bootup.

U-Boot supports quite a few different processor families with an a large 
range of variants over hundreds of boards.  I have not checked, but I'm 
pretty confident the answer is yes for at least one board in there and 
for at least some interpretation of bootup.

 Please let me know if Uboot has DMA support and if yes how??

Very carefully.  If you want to use DMA on your processor and your 
board, you should do it very carefully as well.

 Thanks in advance.

 Best Regards,
 Nikhil

Less flippantly, you have the source.  Search it and learn.  We don't 
have enough information to give you any better advice.

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


Re: [U-Boot] AT91SAM926x Nor Boot

2009-03-03 Thread Robert Schwebel
On Tue, Mar 03, 2009 at 10:35:08AM +0100, Jens Scharsig wrote:
 I'm start with a port for a new customer board with NOR-flash only.
 Our customer don't like use AT91Bootstrap.
 
 I look at the source, but don't found any initialization code for
 AT91SAM926x.
 
 My question:
 
 Are there any plans or patches which support to use u-boot without
 AT91Bootstrap?  or Should I do this by myself?

We have ported u-boot-v2 to AT91SAM9263, without at91bootstrap. Look in
the v2 git repository. The port isn't very mature, but anyway. Patches
are welcome.

rsc
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] AT91SAM926x Nor Boot

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:35 Tue 03 Mar , Jens Scharsig wrote:
 Hello,
 
 I'm start with a port for a new customer board with NOR-flash only.
 Our customer don't like use AT91Bootstrap.
 
 I look at the source, but don't found any initialization code for AT91SAM926x.
 
 My question:
 
 Are there any plans or patches which support to use u-boot without 
 AT91Bootstrap?
 or
 Should I do this by myself?
it was done with Ronetix on the 9263 and 9260

patch are on the ML

They will in the Mainline for the next merge

I've test them on my 9263ek tooo patch fo r the next merge

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


[U-Boot] [PATCH 1/9] at91sam9/cap9: use define instead hardcoded value for the USB_OHCI_REGS_BASE

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 include/configs/afeb9260.h  |3 ++-
 include/configs/at91cap9adk.h   |3 ++-
 include/configs/at91sam9260ek.h |3 ++-
 include/configs/at91sam9261ek.h |3 ++-
 include/configs/at91sam9263ek.h |3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
index 9eed342..ca1ba21 100644
--- a/include/configs/afeb9260.h
+++ b/include/configs/afeb9260.h
@@ -112,11 +112,12 @@
 #define CONFIG_NET_MULTI   1
 #define CONFIG_NET_RETRY_COUNT 20
 
+#include asm/arch/hardware.h
 /* USB */
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
-#define CONFIG_SYS_USB_OHCI_REGS_BASE  0x0050  /* 
AT91SAM9260_UHP_BASE */
+#define CONFIG_SYS_USB_OHCI_REGS_BASE  AT91SAM9260_UHP_BASE
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME  at91sam9260
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
 #define CONFIG_USB_STORAGE 1
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 01da99b..8a0f553 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -129,11 +129,12 @@
 #define CONFIG_NET_RETRY_COUNT 20
 #define CONFIG_RESET_PHY_R 1
 
+#include asm/arch/hardware.h
 /* USB */
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
-#define CONFIG_SYS_USB_OHCI_REGS_BASE  0x0070  /* 
AT91_BASE_UHP */
+#define CONFIG_SYS_USB_OHCI_REGS_BASE  AT91CAP9_UHP_BASE
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME  at91cap9
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
 #define CONFIG_USB_STORAGE 1
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 2f1a41f..7ab08a1 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -114,11 +114,12 @@
 #define CONFIG_NET_RETRY_COUNT 20
 #define CONFIG_RESET_PHY_R 1
 
+#include asm/arch/hardware.h
 /* USB */
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
-#define CONFIG_SYS_USB_OHCI_REGS_BASE  0x0050  /* 
AT91SAM9260_UHP_BASE */
+#define CONFIG_SYS_USB_OHCI_REGS_BASE  AT91SAM9260_UHP_BASE
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME  at91sam9260
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
 #define CONFIG_USB_STORAGE 1
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index ebecfa4..15fc6db 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -127,11 +127,12 @@
 #define CONFIG_NET_RETRY_COUNT 20
 #define CONFIG_RESET_PHY_R 1
 
+#include asm/arch/hardware.h
 /* USB */
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
-#define CONFIG_SYS_USB_OHCI_REGS_BASE  0x0050  /* 
AT91SAM9261_UHP_BASE */
+#define CONFIG_SYS_USB_OHCI_REGS_BASE  AT91SAM9261_UHP_BASE
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME  at91sam9261
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
 #define CONFIG_USB_STORAGE 1
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index e28903c..9087fc3 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -134,11 +134,12 @@
 #define CONFIG_NET_RETRY_COUNT 20
 #define CONFIG_RESET_PHY_R 1
 
+#include asm/arch/hardware.h
 /* USB */
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
-#define CONFIG_SYS_USB_OHCI_REGS_BASE  0x00a0  /* 
AT91SAM9263_UHP_BASE */
+#define CONFIG_SYS_USB_OHCI_REGS_BASE  AT91SAM9263_UHP_BASE
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME  at91sam9263
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
 #define CONFIG_USB_STORAGE 1
-- 
1.5.6.5

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


[U-Boot] [PATCH 2/9] AT91RM9200EK: fix broken boot from NOR flash

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm920t/start.S |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S
index fbcfe6d..f610e9f 100644
--- a/cpu/arm920t/start.S
+++ b/cpu/arm920t/start.S
@@ -258,11 +258,9 @@ cpu_init_crit:
 * find a lowlevel_init.S in your board directory.
 */
mov ip, lr
-#ifdefined(CONFIG_AT91RM9200EK)
 
-#else
bl  lowlevel_init
-#endif
+
mov lr, ip
mov pc, lr
 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */
-- 
1.5.6.5

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


[U-Boot] [PATCH 3/9] at91: rename DATAFLASH_MMC_SELECT to CONFIG_SYS_DATAFLASH_MMC_PIO

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
and add CONFIG_DATAFLASH_MMC_SELECT to activate it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 board/atmel/at91rm9200dk/mux.c |   74 
 include/at45.h |2 +-
 2 files changed, 38 insertions(+), 38 deletions(-)
 rewrite board/atmel/at91rm9200dk/mux.c (69%)

diff --git a/board/atmel/at91rm9200dk/mux.c b/board/atmel/at91rm9200dk/mux.c
dissimilarity index 69%
index 767d280..8319142 100644
--- a/board/atmel/at91rm9200dk/mux.c
+++ b/board/atmel/at91rm9200dk/mux.c
@@ -1,37 +1,37 @@
-#include config.h
-#include common.h
-#include asm/hardware.h
-#include dataflash.h
-
-int AT91F_GetMuxStatus(void) {
-#ifdef DATAFLASH_MMC_SELECT
-   AT91C_BASE_PIOB-PIO_PER = DATAFLASH_MMC_SELECT; /* Set in PIO mode */
-   AT91C_BASE_PIOB-PIO_OER = DATAFLASH_MMC_SELECT; /* Configure in output 
*/
-
-
-   if(AT91C_BASE_PIOB-PIO_ODSR  DATAFLASH_MMC_SELECT) {
-   return 1;
-   } else {
-   return 0;
-   }
-#endif
-   return 0;
-}
-
-void AT91F_SelectMMC(void) {
-#ifdef DATAFLASH_MMC_SELECT
-   AT91C_BASE_PIOB-PIO_PER = DATAFLASH_MMC_SELECT;/* Set in PIO 
mode */
-   AT91C_BASE_PIOB-PIO_OER = DATAFLASH_MMC_SELECT;/* Configure in 
output */
-   /* Set Output */
-   AT91C_BASE_PIOB-PIO_SODR = DATAFLASH_MMC_SELECT;
-#endif
-}
-
-void AT91F_SelectSPI(void) {
-#ifdef DATAFLASH_MMC_SELECT
-   AT91C_BASE_PIOB-PIO_PER = DATAFLASH_MMC_SELECT;/* Set in PIO 
mode */
-   AT91C_BASE_PIOB-PIO_OER = DATAFLASH_MMC_SELECT;/* Configure in 
output */
-   /* Clear Output */
-   AT91C_BASE_PIOB-PIO_CODR = DATAFLASH_MMC_SELECT;
-#endif
-}
+#include config.h
+#include common.h
+#include asm/hardware.h
+#include dataflash.h
+
+int AT91F_GetMuxStatus(void) {
+#ifdef CONFIG_DATAFLASH_MMC_SELECT
+   AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Set in PIO 
mode */
+   AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Configure 
in output */
+
+
+   if(AT91C_BASE_PIOB-PIO_ODSR  CONFIG_SYS_DATAFLASH_MMC_PIO) {
+   return 1;
+   } else {
+   return 0;
+   }
+#endif
+   return 0;
+}
+
+void AT91F_SelectMMC(void) {
+#ifdef CONFIG_DATAFLASH_MMC_SELECT
+   AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO;/* Set 
in PIO mode */
+   AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO;/* 
Configure in output */
+   /* Set Output */
+   AT91C_BASE_PIOB-PIO_SODR = CONFIG_SYS_DATAFLASH_MMC_PIO;
+#endif
+}
+
+void AT91F_SelectSPI(void) {
+#ifdef CONFIG_DATAFLASH_MMC_SELECT
+   AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO;/* Set 
in PIO mode */
+   AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO;/* 
Configure in output */
+   /* Clear Output */
+   AT91C_BASE_PIOB-PIO_CODR = CONFIG_SYS_DATAFLASH_MMC_PIO;
+#endif
+}
diff --git a/include/at45.h b/include/at45.h
index 40bb4a0..e7e3711 100644
--- a/include/at45.h
+++ b/include/at45.h
@@ -1,7 +1,7 @@
 
 #ifndef_AT45_H_
 #define_AT45_H_
-#ifdef DATAFLASH_MMC_SELECT
+#ifdef CONFIG_DATAFLASH_MMC_SELECT
 extern void AT91F_SelectMMC(void);
 extern void AT91F_SelectSPI(void);
 extern int AT91F_GetMuxStatus(void);
-- 
1.5.6.5

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


[U-Boot] [PATCH 4/9] at91rm9200dk: Move conditional compilation to Makefile

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 board/atmel/at91rm9200dk/Makefile |   14 ++
 board/atmel/at91rm9200dk/mux.c|   16 ++--
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/board/atmel/at91rm9200dk/Makefile 
b/board/atmel/at91rm9200dk/Makefile
index 2d806d0..79d41d6 100644
--- a/board/atmel/at91rm9200dk/Makefile
+++ b/board/atmel/at91rm9200dk/Makefile
@@ -25,10 +25,16 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).a
 
-COBJS  := at91rm9200dk.o flash.o led.o mux.o partition.o
-
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
+COBJS-y += $(BOARD).o
+COBJS-y += flash.o
+COBJS-y += led.o
+ifdef CONFIG_HAS_DATAFLASH
+COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += mux.o
+COBJS-y += partition.o
+endif
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):$(obj).depend $(OBJS) $(SOBJS)
diff --git a/board/atmel/at91rm9200dk/mux.c b/board/atmel/at91rm9200dk/mux.c
index 8319142..030411c 100644
--- a/board/atmel/at91rm9200dk/mux.c
+++ b/board/atmel/at91rm9200dk/mux.c
@@ -3,35 +3,31 @@
 #include asm/hardware.h
 #include dataflash.h
 
-int AT91F_GetMuxStatus(void) {
-#ifdef CONFIG_DATAFLASH_MMC_SELECT
+int AT91F_GetMuxStatus(void)
+{
AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Set in PIO 
mode */
AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Configure 
in output */
 
-
if(AT91C_BASE_PIOB-PIO_ODSR  CONFIG_SYS_DATAFLASH_MMC_PIO) {
return 1;
} else {
return 0;
}
-#endif
return 0;
 }
 
-void AT91F_SelectMMC(void) {
-#ifdef CONFIG_DATAFLASH_MMC_SELECT
+void AT91F_SelectMMC(void)
+{
AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO;/* Set 
in PIO mode */
AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO;/* 
Configure in output */
/* Set Output */
AT91C_BASE_PIOB-PIO_SODR = CONFIG_SYS_DATAFLASH_MMC_PIO;
-#endif
 }
 
-void AT91F_SelectSPI(void) {
-#ifdef CONFIG_DATAFLASH_MMC_SELECT
+void AT91F_SelectSPI(void)
+{
AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO;/* Set 
in PIO mode */
AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO;/* 
Configure in output */
/* Clear Output */
AT91C_BASE_PIOB-PIO_CODR = CONFIG_SYS_DATAFLASH_MMC_PIO;
-#endif
 }
-- 
1.5.6.5

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


[U-Boot] [PATCH 5/9] Add support for the AT91RM9200EK Board.

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
From: Ulf Samuelsson u...@atmel.com

with
- NOR (cfi driver)
- DataFlash
- USB OHCI
- Net

Signed-off-by: Ulf Samuelsson u...@atmel.com
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 MAKEALL |1 +
 Makefile|3 +
 board/atmel/at91rm9200ek/Makefile   |   56 ++
 board/atmel/at91rm9200ek/at91rm9200ek.c |   86 +
 board/atmel/at91rm9200ek/config.mk  |1 +
 board/atmel/at91rm9200ek/led.c  |   89 +
 board/atmel/at91rm9200ek/misc.c |   51 +
 board/atmel/at91rm9200ek/mux.c  |   40 
 board/atmel/at91rm9200ek/partition.c|   38 
 board/atmel/at91rm9200ek/u-boot.lds |   56 ++
 drivers/mtd/cfi_flash.c |5 +-
 include/configs/at91rm9200ek.h  |  315 +++
 12 files changed, 737 insertions(+), 4 deletions(-)
 create mode 100644 board/atmel/at91rm9200ek/Makefile
 create mode 100644 board/atmel/at91rm9200ek/at91rm9200ek.c
 create mode 100644 board/atmel/at91rm9200ek/config.mk
 create mode 100644 board/atmel/at91rm9200ek/led.c
 create mode 100644 board/atmel/at91rm9200ek/misc.c
 create mode 100644 board/atmel/at91rm9200ek/mux.c
 create mode 100644 board/atmel/at91rm9200ek/partition.c
 create mode 100644 board/atmel/at91rm9200ek/u-boot.lds
 create mode 100644 include/configs/at91rm9200ek.h

diff --git a/MAKEALL b/MAKEALL
index f8c912b..25d0647 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -567,6 +567,7 @@ LIST_at91= \
afeb9260\
at91cap9adk \
at91rm9200dk\
+   at91rm9200ek\
at91sam9260ek   \
at91sam9261ek   \
at91sam9263ek   \
diff --git a/Makefile b/Makefile
index b1dee97..784af52 100644
--- a/Makefile
+++ b/Makefile
@@ -2605,6 +2605,9 @@ shannon_config:   unconfig
 at91rm9200dk_config:   unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk atmel at91rm9200
 
+at91rm9200ek_config:   unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200ek atmel at91rm9200
+
 cmc_pu2_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
 
diff --git a/board/atmel/at91rm9200ek/Makefile 
b/board/atmel/at91rm9200ek/Makefile
new file mode 100644
index 000..500ce72
--- /dev/null
+++ b/board/atmel/at91rm9200ek/Makefile
@@ -0,0 +1,56 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS-y += $(BOARD).o
+COBJS-y += led.o
+COBJS-y += misc.o
+ifdef CONFIG_HAS_DATAFLASH
+COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += mux.o
+COBJS-y += partition.o
+endif
+
+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/atmel/at91rm9200ek/at91rm9200ek.c 
b/board/atmel/at91rm9200ek/at91rm9200ek.c
new file mode 100644
index 000..ea684e9
--- /dev/null
+++ b/board/atmel/at91rm9200ek/at91rm9200ek.c
@@ -0,0 +1,86 @@
+/*
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH www.elinos.com
+ * Marius Groeger mgroe...@sysgo.de
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A 

[U-Boot] [PATCH 6/9] at91rm9200: move serial driver to drivers/serial

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
add CONFIG_AT91RM9200_USART to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm920t/at91rm9200/Makefile|2 +-
 drivers/serial/Makefile|1 +
 .../serial.c = drivers/serial/at91rm9200_usart.c  |0 
 include/configs/at91rm9200dk.h |1 +
 include/configs/at91rm9200ek.h |1 +
 include/configs/cmc_pu2.h  |1 +
 include/configs/csb637.h   |1 +
 include/configs/kb9202.h   |1 +
 include/configs/m501sk.h   |1 +
 include/configs/mp2usb.h   |1 +
 10 files changed, 9 insertions(+), 1 deletions(-)
 rename cpu/arm920t/at91rm9200/serial.c = drivers/serial/at91rm9200_usart.c 
(100%)

diff --git a/cpu/arm920t/at91rm9200/Makefile b/cpu/arm920t/at91rm9200/Makefile
index ab4c52c..67f17fa 100644
--- a/cpu/arm920t/at91rm9200/Makefile
+++ b/cpu/arm920t/at91rm9200/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(SOC).a
 
 COBJS  = bcm5221.o dm9161.o ether.o i2c.o interrupts.o \
- lxt972.o serial.o usb.o spi.o
+ lxt972.o usb.o spi.o
 SOBJS  = lowlevel_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index d0efd73..465b29f 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk
 LIB:= $(obj)libserial.a
 
 COBJS-$(CONFIG_ARM_DCC) += arm_dcc.o
+COBJS-$(CONFIG_AT91RM9200_USART) += at91rm9200_usart.o
 COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o
 COBJS-$(CONFIG_MCFUART) += mcfuart.o
 COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o
diff --git a/cpu/arm920t/at91rm9200/serial.c b/drivers/serial/at91rm9200_usart.c
similarity index 100%
rename from cpu/arm920t/at91rm9200/serial.c
rename to drivers/serial/at91rm9200_usart.c
diff --git a/include/configs/at91rm9200dk.h b/include/configs/at91rm9200dk.h
index 5a980d3..56128c1 100644
--- a/include/configs/at91rm9200dk.h
+++ b/include/configs/at91rm9200dk.h
@@ -88,6 +88,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index beefc1d..2fc4faf 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -112,6 +112,7 @@
  * define one of these to choose the DBGU,
  * USART0 or USART1 as console
  */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/cmc_pu2.h b/include/configs/cmc_pu2.h
index d9acb47..e05e91b 100644
--- a/include/configs/cmc_pu2.h
+++ b/include/configs/cmc_pu2.h
@@ -88,6 +88,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #undef CONFIG_DBGU
 #define CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/csb637.h b/include/configs/csb637.h
index 761c0dc..e1cdc7f 100644
--- a/include/configs/csb637.h
+++ b/include/configs/csb637.h
@@ -90,6 +90,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/kb9202.h b/include/configs/kb9202.h
index 1ce8c69..7dd81e6 100644
--- a/include/configs/kb9202.h
+++ b/include/configs/kb9202.h
@@ -72,6 +72,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/m501sk.h b/include/configs/m501sk.h
index a432850..1e7d90e 100644
--- a/include/configs/m501sk.h
+++ b/include/configs/m501sk.h
@@ -110,6 +110,7 @@
 #define CONFIG_CMC_PU2
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h
index 9ac7e9a..b78fc76 100644
--- a/include/configs/mp2usb.h
+++ b/include/configs/mp2usb.h
@@ -95,6 +95,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
-- 
1.5.6.5

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


[U-Boot] [PATCH 7/9] at91rm9200: fix DCC support

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm920t/at91rm9200/interrupts.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/cpu/arm920t/at91rm9200/interrupts.c 
b/cpu/arm920t/at91rm9200/interrupts.c
index 5f0703c..3e35f68 100644
--- a/cpu/arm920t/at91rm9200/interrupts.c
+++ b/cpu/arm920t/at91rm9200/interrupts.c
@@ -179,8 +179,10 @@ void reset_cpu (ulong ignored)
AT91PS_PIO pio = AT91C_BASE_PIOA;
 #endif
 
+#if defined(CONFIG_DBGU) || defined(CONFIG_USART0) || defined(CONFIG_USART1)
/*shutdown the console to avoid strange chars during reset */
us-US_CR = (AT91C_US_RSTRX | AT91C_US_RSTTX);
+#endif
 
 #ifdef CONFIG_AT91RM9200DK
/* Clear PA19 to trigger the hard reset */
-- 
1.5.6.5

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


[U-Boot] [PATCH 9/9] at91rm9200ek: add dcc support with at91rm9200ek_dcc_config

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 Makefile   |   14 +-
 include/configs/at91rm9200ek.h |4 +++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 50ce78e..c24115d 100644
--- a/Makefile
+++ b/Makefile
@@ -2605,8 +2605,20 @@ shannon_config   :   unconfig
 at91rm9200dk_config:   unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk atmel at91rm9200
 
+at91rm9200ek_dcc_multi_config  \
+at91rm9200ek_dcc_config\
 at91rm9200ek_config:   unconfig
-   @$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200ek atmel at91rm9200
+   @mkdir -p $(obj)include
+   @if [ $(findstring _dcc_mutli, $@) ] ; then \
+   echo #define CONFIG_ARM_DCC  $(obj)include/config.h ; \
+   echo #define CONFIG_ARM_DCC_MUTLI  $(obj)include/config.h ; 
\
+   echo #define CONFIG_CONSOLE_MUX  $(obj)include/config.h ; \
+   $(XECHO) ... configured with dcc as multi serial; \
+   elif [ $(findstring _dcc_, $@) ] ; then \
+   echo #define CONFIG_ARM_DCC   $(obj)include/config.h ; \
+   $(XECHO) ... with dcc as serial ; \
+   fi;
+   @$(MKCONFIG) -a at91rm9200ek arm arm920t at91rm9200ek atmel at91rm9200
 
 cmc_pu2_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index 2fc4faf..1face05 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -112,6 +112,7 @@
  * define one of these to choose the DBGU,
  * USART0 or USART1 as console
  */
+#if !defined(CONFIG_ARM_DCC) || defined(CONFIG_ARM_DCC_MULTI)
 #define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
@@ -121,8 +122,9 @@
 /* disable modem initialization stuff */
 #undef CONFIG_MODEM_SUPPORT
 
-#define CONFIG_SYS_BAUDRATE_TABLE  {115200 , 19200, 38400, 57600, 9600 }
 #define CONFIG_BAUDRATE115200
+#endif
+#define CONFIG_SYS_BAUDRATE_TABLE  {115200 , 19200, 38400, 57600, 9600 }
 
 /*
  * Command line configuration.
-- 
1.5.6.5

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


[U-Boot] [PATCH 8/9] at91sam9263ek add dcc support with at91sam9263ek_dcc_config

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 Makefile|   11 +++
 include/configs/at91sam9263ek.h |2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 784af52..50ce78e 100644
--- a/Makefile
+++ b/Makefile
@@ -2687,6 +2687,8 @@ at91sam9261ek_config  :   unconfig
 at91sam9263ek_nandflash_config \
 at91sam9263ek_dataflash_config \
 at91sam9263ek_dataflash_cs0_config \
+at91sam9263ek_dcc_multi_config \
+at91sam9263ek_dcc_config \
 at91sam9263ek_wdt_config \
 at91sam9263ek_config   :   unconfig
@mkdir -p $(obj)include
@@ -2701,6 +2703,15 @@ at91sam9263ek_config :   unconfig
echo #define CONFIG_AT91SAM9_WATCHDOG  
$(obj)include/config.h ; \
$(XECHO) ... configured with watchdog active; \
fi
+   @if [ $(findstring _dcc_mutli, $@) ] ; then \
+   echo #define CONFIG_ARM_DCC  $(obj)include/config.h ; \
+   echo #define CONFIG_ARM_DCC_MUTLI  $(obj)include/config.h ; 
\
+   echo #define CONFIG_CONSOLE_MUX  $(obj)include/config.h ; \
+   $(XECHO) ... configured with dcc as multi serial; \
+   elif [ $(findstring _dcc_, $@) ] ; then \
+   echo #define CONFIG_ARM_DCC  $(obj)include/config.h ; \
+   $(XECHO) ... configured with dcc as serial; \
+   fi
@$(MKCONFIG) -a at91sam9263ek arm arm926ejs at91sam9263ek atmel at91
 
 at91sam9rlek_nandflash_config \
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 9087fc3..b193497 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -52,11 +52,13 @@
 /*
  * Hardware drivers
  */
+#if !defined(CONFIG_ARM_DCC) || defined(CONFIG_ARM_DCC_MULTI)
 #define CONFIG_ATMEL_USART 1
 #undef CONFIG_USART0
 #undef CONFIG_USART1
 #undef CONFIG_USART2
 #define CONFIG_USART3  1   /* USART 3 is DBGU */
+#endif
 
 /* LCD */
 #define CONFIG_LCD 1
-- 
1.5.6.5

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


[U-Boot] AT91 Pull Request

2009-03-03 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi Wolfgang,

Please pull The following changes since commit 
32688e572ff96715b41420e9a7f280db6c399b65:
  Wolfgang Denk (1):
Update CHANGELOG;  Prepare 2009.03-rc1

are available in the git repository at:

  git://git.denx.de/u-boot-at91.git master

Jean-Christophe PLAGNIOL-VILLARD (11):
  at91sam9xeek: fix soc name
  at91sam9: add watchdog support
  at91sam9263ek: active watchdog support via at91sam9263ek_wdt_config
  at91sam9/cap9: use define instead hardcoded value for the 
USB_OHCI_REGS_BASE
  AT91RM9200EK: fix broken boot from NOR flash
  at91: rename DATAFLASH_MMC_SELECT to CONFIG_SYS_DATAFLASH_MMC_PIO
  at91rm9200dk: Move conditional compilation to Makefile
  at91rm9200: move serial driver to drivers/serial
  at91rm9200: fix DCC support
  at91sam9263ek add dcc support with at91sam9263ek_dcc_config
  at91rm9200ek: add dcc support with at91rm9200ek_dcc_config

Jens Scharsig (1):
  AT91RM9200 BGA port D defines

Ulf Samuelsson (1):
  Add support for the AT91RM9200EK Board.

 MAKEALL|1 +
 Makefile   |   34 ++-
 board/atmel/at91rm9200dk/Makefile  |   14 +-
 board/atmel/at91rm9200dk/mux.c |   34 +--
 board/atmel/at91rm9200ek/Makefile  |   56 
 board/atmel/at91rm9200ek/at91rm9200ek.c|   86 ++
 board/atmel/at91rm9200ek/config.mk |1 +
 board/atmel/at91rm9200ek/led.c |   89 ++
 board/atmel/at91rm9200ek/misc.c|   51 +++
 board/atmel/at91rm9200ek/mux.c |   40 +++
 board/atmel/at91rm9200ek/partition.c   |   38 +++
 board/atmel/at91rm9200ek/u-boot.lds|   56 
 cpu/arm920t/at91rm9200/Makefile|2 +-
 cpu/arm920t/at91rm9200/interrupts.c|2 +
 cpu/arm920t/start.S|4 +-
 doc/README.at91|9 +
 drivers/mtd/cfi_flash.c|5 +-
 drivers/serial/Makefile|1 +
 .../serial.c = drivers/serial/at91rm9200_usart.c  |0 
 drivers/serial/atmel_usart.c   |4 +-
 drivers/watchdog/Makefile  |   46 +++
 drivers/watchdog/at91sam9_wdt.c|   79 +
 include/asm-arm/arch-at91/at91_wdt.h   |   38 +++
 include/asm-arm/arch-at91rm9200/AT91RM9200.h   |   31 ++
 include/at45.h |2 +-
 include/configs/afeb9260.h |3 +-
 include/configs/at91cap9adk.h  |3 +-
 include/configs/at91rm9200dk.h |1 +
 include/configs/at91rm9200ek.h |  318 
 include/configs/at91sam9260ek.h|3 +-
 include/configs/at91sam9261ek.h|3 +-
 include/configs/at91sam9263ek.h|   10 +-
 include/configs/cmc_pu2.h  |1 +
 include/configs/csb637.h   |1 +
 include/configs/kb9202.h   |1 +
 include/configs/m501sk.h   |1 +
 include/configs/mp2usb.h   |1 +
 37 files changed, 1030 insertions(+), 39 deletions(-)
 create mode 100644 board/atmel/at91rm9200ek/Makefile
 create mode 100644 board/atmel/at91rm9200ek/at91rm9200ek.c
 create mode 100644 board/atmel/at91rm9200ek/config.mk
 create mode 100644 board/atmel/at91rm9200ek/led.c
 create mode 100644 board/atmel/at91rm9200ek/misc.c
 create mode 100644 board/atmel/at91rm9200ek/mux.c
 create mode 100644 board/atmel/at91rm9200ek/partition.c
 create mode 100644 board/atmel/at91rm9200ek/u-boot.lds
 rename cpu/arm920t/at91rm9200/serial.c = drivers/serial/at91rm9200_usart.c 
(100%)
 create mode 100644 drivers/watchdog/Makefile
 create mode 100644 drivers/watchdog/at91sam9_wdt.c
 create mode 100644 include/asm-arm/arch-at91/at91_wdt.h
 create mode 100644 include/configs/at91rm9200ek.h

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


[U-Boot] [PATCH] Add the mfill and mcheck memory commands.

2009-03-03 Thread Benoit Monin
The mfill command writes the value of a counter to a memory area.
The mcheck command verifies the memory area against the counter value.
Those commands are useful for debugging memory/framebuffer controller.

The configuration option is CONFIG_MFILL and this only takes effect if
the memory commands are activated globally (CONFIG_CMD_MEM).

Signed-off-by: Benoît Monin bmonin at adeneo.eu
---
 README   |   17 +++-
 common/cmd_mem.c |  127 ++
 2 files changed, 143 insertions(+), 1 deletions(-)

diff --git a/README b/README
index 43fb1c0..d0a636e 100644
--- a/README
+++ b/README
@@ -627,7 +627,7 @@ The following options need to be configured:
CONFIG_CMD_LOADB  loadb
CONFIG_CMD_LOADS  loads
CONFIG_CMD_MEMORY md, mm, nm, mw, cp, cmp, crc, base,
- loop, loopw, mtest
+ loop, loopw, mtest, mfill, mcheck
CONFIG_CMD_MISC   Misc functions like sleep etc
CONFIG_CMD_MMC  * MMC memory mapped support
CONFIG_CMD_MII  * MII utility commands
@@ -2678,6 +2678,21 @@ Low Level (hardware related) configuration options:
This only takes effect if the memory commands are activated
globally (CONFIG_CMD_MEM).
 
+- CONFIG_MFILL
+   Add the mfill and mcheck memory commands. mfill writes
+   a memory area with the value of a counter. mcheck checks
+   a memory area against the value of a counter and can be run
+   after mfill.
+
+   (mfill/mcheck)[.b, .w, .l] address count [init]
+ [.b, .w, .l] : Access size (default to l).
+ address : Address in hexadecimal.
+ count : Number of elements to write in hex.
+ [init] : Initial value of the counter (default to 0).
+
+   This only takes effect if the memory commands are activated
+   globally (CONFIG_CMD_MEM).
+
 - CONFIG_SKIP_LOWLEVEL_INIT
 - CONFIG_SKIP_RELOCATE_UBOOT
 
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 2d4fc2a..0191687 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -943,6 +943,117 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char *argv[])
return rcode;
 }
 
+#ifdef CONFIG_MFILL
+/* Memory fill
+ * 
+ * Write a memory area with the value of a counter
+ * 
+ * mfill{.b, .w, .l} {address} {count} {init}
+ */
+static int do_mem_mfill(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+   volatile void* addr;
+   ulong count;
+   ulong val;
+   int size;
+   
+   if (argc  3) {
+   printf (Usage:\n%s\n, cmdtp-usage);
+   return 1;
+   }
+   /* Scan for data size */
+   if ((size = cmd_get_data_size(argv[0], 4))  0)
+   return 1;
+   addr = (void*)simple_strtoul(argv[1], NULL, 16);
+   addr += base_address;
+   count = simple_strtoul(argv[2], NULL, 16);
+   if (argc == 4) {
+   val = simple_strtoul(argv[3], NULL, 16);
+   } else {
+   val = 0;
+   }
+   if (size == 4) {
+   while (count--  0) {
+   *((ulong*)addr) = (ulong)val++;
+   addr += size;
+   }
+   } else if (size == 2) {
+   while (count--  0) {
+   *((ushort*)addr) = (ushort)val++;
+   addr += size;
+   }
+   } else {
+   while (count--  0) {
+   *((uchar*)addr) = (uchar)val++;
+   addr += size;
+   }
+   }
+   return 0;
+}
+
+/* Memory check
+ * 
+ * Check a memory area against the value of a counter
+ * Run this after mfill.
+ * 
+ * mcheck{.b, .w, .l} {address} {count} {init}
+ */
+static int do_mem_mcheck(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+   volatile void* addr;
+   ulong count;
+   ulong val;
+   int size;
+   
+   if (argc  3) {
+   printf (Usage:\n%s\n, cmdtp-usage);
+   return 1;
+   }
+   /* Scan for data size */
+   if ((size = cmd_get_data_size(argv[0], 4))  0)
+   return 1;
+   addr = (void*)simple_strtoul(argv[1], NULL, 16);
+   addr += base_address;
+   count = simple_strtoul(argv[2], NULL, 16);
+   if (argc == 4) {
+   val = simple_strtoul(argv[3], NULL, 16);
+   } else {
+   val = 0;
+   }
+   if (size == 4) {
+   while (count--  0) {
+   if (*((ulong*)addr) != (ulong)val) {
+   printf (Mem error @ 0x%p: found 0x%08lx, 
expected 0x%08lx\n,
+   addr, *((ulong*)addr), (ulong)val);
+   if (ctrlc()) return 1;
+   

Re: [U-Boot] AT91SAM926x Nor Boot

2009-03-03 Thread Ken.Fuchs
Jens Scharsig wrote:

 I'm start with a port for a new customer board with NOR-flash only.
 Our customer don't like use AT91Bootstrap.
 
 I look at the source, but don't found any initialization code for
 AT91SAM926x. 
 
 My question:
 
 Are there any plans or patches which support to use u-boot without
 AT91Bootstrap? or
 Should I do this by myself?

I have tested a solution based on U-Boot-1.1.5 as modified by Atmel.
The
adaptation to booting via NOR flash itself was written by Alessandro
Rubini:

http://www.gnudd.com/pub/patches/at91sam9263ek-nor/at91sam9263ek-nor.pdf

Although it is based on old code, the documentation of the problem of
booting
from NOR flash on the AT91SAM9263 is worth reading.

Sincerely,

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


[U-Boot] Bad CPU identification on MPC8544DS

2009-03-03 Thread jeff angielski

Despite the SVR being the same (0x803c0011), the latest u-boot is
misidentifying the CPU when compared against the original 1.3.0 u-boot.
The CPU is a 8544E but u-boot is reporting 8533E.

The wierd part of this is that according to the Chip Errata for the
MPC8544E, the SVR *should* be 0x803c01xx  - which is different than both
the 1.3 and latest git version are reading.

Can any of the Freescale guys explain this discrepancy between the
manual, the Freescale BSP u-boot, and the latest u-boot?



Using the u-boot that is built with the LTIB and ships with the
MPC8544DS board:



U-Boot 1.3.0-rc3 (Mar 28 2008 - 11:13:50)

CPU:   8544_E, Version: 1.1, (0x803c0011)
Core:  E500, Version: 2.2, (0x80210022)  
Clock Configuration: 
   CPU: 999 MHz, CCB: 399 MHz,   
   DDR: 199 MHz, LBC:  24 MHz
L1:D-cache 32 kB enabled 
   I-cache 32 kB enabled 



Using the latest u-boot:


U-Boot 2009.03-rc1-00031-gd82fd0f-dirty (Mar 03 2009 - 13:09:00)

CPU:   8533E, Version: 1.1, (0x803c0011)
Core:  E500, Version: 2.2, (0x80210022) 
Clock Configuration:
   CPU0:1000 MHz,   
   CCB:400  MHz,
   DDR:200  MHz (400 MT/s data rate), LBC:25   MHz
L1:D-cache 32 kB enabled  
   I-cache 32 kB enabled  
Board: MPC8544DS, System ID: 0x12, System Version: 0x20, FPGA Version:
0x31




-- 
Jeff Angielski
The PTR Group
www.theptrgroup.com


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


Re: [U-Boot] Uboot NAND sub system and it's commands

2009-03-03 Thread Scott Wood
On Mon, Mar 02, 2009 at 08:36:03PM +0530, Swapnali C. Patil wrote:
 Hello All,
 I am using DM6446 (TI DaVinci) customized board. 
 1. I am not able to understand meaning of NAND Sub system U boot commands, 
 e.g. nand write, nand read, nand erase etc. 

write, read, and erase are fairly straightforward English words. 
Is there some particular aspect you find confusing?

 2. I want to use the NAND sub system U boot command in Linux (ARM side
 of DM6446 core), is it possible ? may be some utiliy to export these
 commands

No.  U-boot does not remain active once Linux boots.

 or some paralle command which have similar functionality (such as
 writting on specific location of RAM (8700) from nand(0X100)).?

See nandwrite in the mtd-utils package.

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


Re: [U-Boot] U-Boot Scripting suggestions to decrement, counter in EEPROM.

2009-03-03 Thread Tom Evans
Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com wrote:
 On 17:40 Tue 03 Mar , Tom Evans wrote:
 I'm implementing a rather complex boot that involves flags
  and counters in EEPROM.
 
 in which case do you need this?
 
 update?

Yes, it is when updating the Linux Kernel and Sysroot images.

These are both duplicated. The alternate set is updated, then an 
alternate boot (a boot from the designated alternate set) is commanded 
with a count limit. If this expires the boot reverts to the original 
boot, otherwise the OS scripts switch Alternate and Active then 
update the other one. It is more complex involving two sets of counters 
and multiple run-levels etc.

 in u-boot you have better system that involve watchdog and bootcount

It is only currently supported on the PPC8260, requires spare words in a 
CPM SCC (or equivalent by writing bootcount_load() and bootcount_store() 
functions) and is too simplistic for what I need to do. It might work if 
the OS (after boot) could update the U-Boot Environment, but that's way 
too much linking (between Linux and U-Boot) and I don't have a writeable 
environment either.

I was hoping for a suggestion for reading memory locations into shell 
variables. It looks like I'll have to add one of these.

Thank you Jean-Christophe.

-- 
===
Tom Evans  tom.ev...@ceos.com.au
CEOS Pty Ltd   www.ceos.com.au
3/17 Burgundy St, Heidelberg,
Victoria 3084, Australia
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Status open patches: ColdFire

2009-03-03 Thread TC Liew
Wolfgang,

We will include in the coming RC release. Thanks!

Regards,
TsiChung

On Sat, Feb 21, 2009 at 6:00 PM, Wolfgang Denk w...@denx.de wrote:

 Dear John  Tsi Chung,

 I have the following patches still marked as open in my list. Could
 you please have a look...

 ColdFire:
 12/04 arun c   [U-Boot] [PATCH] Coldfire: XL Bus minor fixes


 Thanks in advance.

 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
 It is wrong always, everywhere and for everyone to  believe  anything
 upon  insufficient  evidence.  - W. K. Clifford, British philosopher,
 circa 1876
 ___
 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] Reduce OneNAND IPL common code (v3)

2009-03-03 Thread Scott Wood
On Tue, Mar 03, 2009 at 09:05:53AM +0900, Kyungmin Park wrote:
 OneNAND IPL has common codes for RAM init, load data, and jump to 2nd
 bootloader, but it's common code used about 300~400 bytes. So board
 specific codes, such as lowlevel_init, can't has enough code. It make
 a difficult to implement OneNAND IPL.
 
 his patch make this common code as small as possible. and give
 lowlevel_init can have more codes.
 
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com

Applied generic bits to u-boot-nand-flash/next (minus the complete
removal of hang(), which is pending the ARM change).  The ARM part should
go through the ARM maintainer, and I still think you can have the
exceptions hang with a branch-to-self without needing external code;
something like this (apologies if it's been too long since I've done ARM
ASM):

_start:
b   reset
#ifdef CONFIG_ONENAND_IPL
sub pc, pc, #4
sub pc, pc, #4
sub pc, pc, #4
sub pc, pc, #4
sub pc, pc, #4
sub pc, pc, #4
sub pc, pc, #4

. = _start + 64
#else
...
#endif

This would make it easier to see what happened with a JTAG, and prevent
any possibility of it getting stuck in a loop that keeps banging on the
flash chip.

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


Re: [U-Boot] Coldfire: MCF5271: Periodic HW watchdog petting and sleep function does not work.

2009-03-03 Thread TC Liew
Richard,

Can you be more specific on how the MAX6369 WDO and WDI connects to
MCF5271's signal? Is it GPIO? ResetIn? Others?

Regards,
TsiChung

On Mon, Mar 2, 2009 at 3:05 PM, Richard Retanubun 
richardretanu...@ruggedcom.com wrote:

 Hi Guys,

 I am using u-boot 2009.03-rc1 and a board based on Coldfire MC5271EVB eval
 platform.
 Our external watchdog is a MAX6369.

 I have #define CONFIG_HW_WATCHDOG and #undef CONFIG_WATCHDOG in our board's
 config file and
 have created the hw_watchdog_reset function to toggle the WDI line to pet
 the watchdog.

 However, my board keeps resetting at the watchdog timeout. Upon probing, I
 found out that
 the watchdog toggle line in not being toggled periodically by u-boot. Which
 means a regular call
 to WATCHDOG_RESET() is not happening. If I execute commands, the WDI will
 get toggled and the watchdog
 will not timeout, which means that the WATCHDOG_RESET() mapping to
 hw_watchdog_reset function is working, it is
 just not being called periodically.

 I am looking at the programmable interrupt timer that the get_timer()
 function uses, and so far everything checks out.

 I'm also stuck at using u-boot's sleep command, e.g. sleep 1 will never
 return. Which I suspect may be the same root cause.
 (this can also be observed on the M5271EVB board).

 What am I missing here?

 Thank you for all your time.

 Regards,

 - Richard Retanubun.


 ___
 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] Fix for running examples on OMAP3 EVM board

2009-03-03 Thread Dirk Behme
Nishanth Menon wrote:
 Manikandan Pillai said the following on 03/03/2009 05:40 AM:
 Example binaries to be downloaded to 0x8030 for OMAP3 EVMs.

 Signed-off-by: Manikandan Pillai mani.pil...@ti.com
 ---
  examples/Makefile |4 
  1 files changed, 4 insertions(+), 0 deletions(-)

 diff --git a/examples/Makefile b/examples/Makefile
 index dbcfa92..75e6c87 100644
 --- a/examples/Makefile
 +++ b/examples/Makefile
 @@ -36,10 +36,14 @@ else
  ifeq ($(CPU),omap3)
  LOAD_ADDR = 0x8030
  else
 +ifeq ($(CPU),arm_cortexa8)
 +LOAD_ADDR = 0x8030
 +else
   
 I am bit confused here.. first we say $(CPU) omap3...EVM is based on
 omap3 rt?
 the second change is not valid - cortex_a8 - we might have future
 platforms which have cortex. they need not use the same memory map as
 OMAP does. this is not valid change. NAK from me.

Even if it becomes boring, I agree to Nishanth again. NACK from me, too.

Best regards

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


Re: [U-Boot] Alignment bug in itest on ARM doesn't work on big-endian either?

2009-03-03 Thread Tom Evans
Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com wrote:
 On 17:40 Tue 03 Mar , Tom Evans wrote:
 BUG IN ITEST
 
 itest crashes ARM chips. I can iread.b *8200 == 0,
  but iread.b *8201 == 0 throws an alignment
  exception that kills the box. The code in itest.c is:

 static long evalexp(char *s, int w)
 {
  long l, *p;

  /* if the parameter starts with a * then assume
  is a pointer to the value we want */
  if (s[0] == '*') {
  p = (long *)simple_strtoul(s[1], NULL, 16);
  l = *p;

 here you are support to use the good accessor
  readb/readw/readl

Thank you for your response.

readl() is defined in asm-arm/io.h as __arch_getl(a) which
is defined as (*(volatile unsigned int *)(a)) which
doesn't handle misalignment and will still crash.

I think those functions are only meant for I/O reads.

The code then selects the byte with the following:

   return (l  ((1  (w * 8)) - 1));

That selects the LOWER 8/16/32 bits of the 32-bit read.

Which works on a 486, ARM variants with unaligned transfers, but NOT on 
a PPC or any other big-endian CPUs (about half of them supported by U-Boot).

On a big-endian unaligned supporting CPU I'd expect a byte read of 
address 0 to read 3 and a read of 1 to read 4 (in the next 
word!). Ditto for itest.w.

Whoever owns/maintains this code, and/or can test it on a big-endian 
target should fix these, taking hints from the cmd_mem.c code which does 
all of this in a portable manner. I don't have a big-endian target so I 
can't test the big-endian fix.

 the arm does not allow you to do an non aligned access

I know that. The current itest code doesn't. The indirect pointer 
feature mustn't be used much if I'm the first one to find these problems.

-- 
===
Tom Evans  tom.ev...@ceos.com.au
CEOS Pty Ltd   www.ceos.com.au
3/17 Burgundy St, Heidelberg,
Victoria 3084, Australia
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-Boot 1.1.6 and Marvell 88E1116 RGMII operations

2009-03-03 Thread Kim Phillips
On Thu, 26 Feb 2009 17:45:08 -0800
Ray Fogg r...@tyzx.com wrote:

 cable, leading us to the suspicion that the MAC is not properly set up in
 RGMII mode.
 
 We note that the newest release of U-Boot supports the Marvell 88E1118 PHY,
 which uses the same die as the 88E1116.
 
 Our question is:  has anyone made the 88E1116 or the 88E1118 work using
 U-Boot version 1.1.6, 

support for the 88e1118 went in as commit v1.3.3-24-g290ef64, which is
May 2008 vs. 1.1.6's Nov. 2006.

 or are there any suggestions on making this work?

either back port 88e1118 support to 1.1.6 or forward-port the other
parts of your u-boot (and submit your board support patches here for
inclusion in mainline so this doesn't happen again :).

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


Re: [U-Boot] U-boot with SMSC LAN8700

2009-03-03 Thread Kim Phillips
On Tue, 3 Mar 2009 14:20:58 +0200
Louis Ruch louisr...@gmail.com wrote:

 From what we can tell it should not be a problem and all we need to do is
 enable RMII support for the uboot and it should detect the chip.  Is this
 correct?  If it is how do we go about enabling RMII support for the device,
 and is there anything else we need to do in order to get this chip supported
 by the u-boot?
 
 We compiled our version of u-boot by using the LTIB software that came with
 the MPC8315E-RDB BSP which automatically generated our u-boot version.

I don't know what version of u-boot that is, but in the mainline
u-boot, it sounds like you'll have to add a phy_info_smsclan8700 entry
to drivers/net/tsec.c.  fyi, drivers/qe/uec_phy.c looks like it already
has an old-style phy_info entry for the lan8700.

naturally, patches for mainline u-boot are welcome.

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


Re: [U-Boot] [PATCH 1/1] Fix for running examples on OMAP3 EVM board

2009-03-03 Thread Pillai, Manikandan
Hi all,

For the EVM board,

$BOARD = evm $CPU = arm_cortexa8 and $ARCH = arm.
$VENDOR = omap3 and $SOC = omap3

I can change the check to check BOARD so that it is applicable only
To OMAP3 EVMs.

ifeq ($(BOARD),evm)
LOAD_ADDR = 0x8030
else



Regards
Mani

 -Original Message-
 From: Dirk Behme [mailto:dirk.be...@googlemail.com]
 Sent: Wednesday, March 04, 2009 5:47 AM
 To: u-boot@lists.denx.de
 Cc: Nishanth Menon; Pillai, Manikandan
 Subject: Re: [U-Boot] [PATCH 1/1] Fix for running examples on OMAP3 EVM board
 
 Nishanth Menon wrote:
  Manikandan Pillai said the following on 03/03/2009 05:40 AM:
  Example binaries to be downloaded to 0x8030 for OMAP3 EVMs.
 
  Signed-off-by: Manikandan Pillai mani.pil...@ti.com
  ---
   examples/Makefile |4 
   1 files changed, 4 insertions(+), 0 deletions(-)
 
  diff --git a/examples/Makefile b/examples/Makefile
  index dbcfa92..75e6c87 100644
  --- a/examples/Makefile
  +++ b/examples/Makefile
  @@ -36,10 +36,14 @@ else
   ifeq ($(CPU),omap3)
   LOAD_ADDR = 0x8030
   else
  +ifeq ($(CPU),arm_cortexa8)
  +LOAD_ADDR = 0x8030
  +else
 
  I am bit confused here.. first we say $(CPU) omap3...EVM is based on
  omap3 rt?
  the second change is not valid - cortex_a8 - we might have future
  platforms which have cortex. they need not use the same memory map as
  OMAP does. this is not valid change. NAK from me.
 
 Even if it becomes boring, I agree to Nishanth again. NACK from me, too.
 
 Best regards
 
 Dirk

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


Re: [U-Boot] Bad CPU identification on MPC8544DS

2009-03-03 Thread Pieter


jeff angielski wrote:
 Despite the SVR being the same (0x803c0011), the latest u-boot is
 misidentifying the CPU when compared against the original 1.3.0 u-boot.
 The CPU is a 8544E but u-boot is reporting 8533E.

 The wierd part of this is that according to the Chip Errata for the
 MPC8544E, the SVR *should* be 0x803c01xx  - which is different than both
 the 1.3 and latest git version are reading.

 Can any of the Freescale guys explain this discrepancy between the
 manual, the Freescale BSP u-boot, and the latest u-boot?



 Using the u-boot that is built with the LTIB and ships with the
 MPC8544DS board:



 U-Boot 1.3.0-rc3 (Mar 28 2008 - 11:13:50)

 CPU:   8544_E, Version: 1.1, (0x803c0011)
 Core:  E500, Version: 2.2, (0x80210022)  
 Clock Configuration: 
CPU: 999 MHz, CCB: 399 MHz,   
DDR: 199 MHz, LBC:  24 MHz
 L1:D-cache 32 kB enabled 
I-cache 32 kB enabled 



 Using the latest u-boot:


 U-Boot 2009.03-rc1-00031-gd82fd0f-dirty (Mar 03 2009 - 13:09:00)

 CPU:   8533E, Version: 1.1, (0x803c0011)
 Core:  E500, Version: 2.2, (0x80210022) 
 Clock Configuration:
CPU0:1000 MHz,   
CCB:400  MHz,
DDR:200  MHz (400 MT/s data rate), LBC:25   MHz
 L1:D-cache 32 kB enabled  
I-cache 32 kB enabled  
 Board: MPC8544DS, System ID: 0x12, System Version: 0x20, FPGA Version:
 0x31
   
I found that U-boot 2009 does  much more detailed checking regarding the
CPU IDs. But also found discrepancies in the CPU reporting while running
U-boot 2009 using the BDI 2000. With the BDI2000 my CPU was detected as
8547E and with a standalone boot, U-Boot got 8548E.

See if the CPU is detected incorrectly while booting stand alone.
cheers pieter


smime.p7s
Description: S/MIME Cryptographic Signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] How to Remove the padding bits from u-boot.bin

2009-03-03 Thread kuldeep nigam
Hi All,
I am using MIP405T board and trying to reduce the size of u-boot.bin
by disabling the drivers that i didn't need. But the image size is not
changing because it is padding all 1's at the end of the image. Can anyone
tell me how to remove these padding bits.

Image size is 512 K
Actual image size is 207 K (approx.)
u-boot version is 1.3.2

Hexdump of u-boot.bin is as follows:

00337d0  0200  0100 f9ff a8d0 faff 78f8
00337e0 faff 90f8 faff acf8  1000  0100
00337f0 f9ff 68ce faff b4f8 faff d4f8 faff 04fa
0033800  1000  0100 f9ff 68ce faff 08fa
0033810        
0033820        
*
007fff0       f84b 0421
008



with regards,
kuldeep nigam
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Uboot NAND sub system and it's commands

2009-03-03 Thread Swapnali C. Patil
Thanks Scott for input
Best regards
-swapnali
- Original Message - 
From: Scott Wood scottw...@freescale.com
To: Swapnali C. Patil swapnali.pa...@intelli-vision.com
Cc: u-boot@lists.denx.de
Sent: Wednesday, March 04, 2009 4:18 AM
Subject: Re: [U-Boot] Uboot NAND sub system and it's commands


 On Mon, Mar 02, 2009 at 08:36:03PM +0530, Swapnali C. Patil wrote:
 Hello All,
 I am using DM6446 (TI DaVinci) customized board.
 1. I am not able to understand meaning of NAND Sub system U boot 
 commands, e.g. nand write, nand read, nand erase etc.

 write, read, and erase are fairly straightforward English words.
 Is there some particular aspect you find confusing?

 2. I want to use the NAND sub system U boot command in Linux (ARM side
 of DM6446 core), is it possible ? may be some utiliy to export these
 commands

 No.  U-boot does not remain active once Linux boots.

 or some paralle command which have similar functionality (such as
 writting on specific location of RAM (8700) from nand(0X100)).?

 See nandwrite in the mtd-utils package.

 -Scott 

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


Re: [U-Boot] [PATCH 1/1] Fix for running examples on OMAP3 EVM board

2009-03-03 Thread Pillai, Manikandan
Hi,


Fine with me. I can change the CPU-omap3 to SOC-omap3.



 -Original Message-
 From: Nishanth Menon [mailto:menon.nisha...@gmail.com]
 Sent: Wednesday, March 04, 2009 11:49 AM
 To: Pillai, Manikandan
 Cc: Dirk Behme; u-boot@lists.denx.de
 Subject: Re: [U-Boot] [PATCH 1/1] Fix for running examples on OMAP3 EVM board
 
 Pillai, Manikandan said the following on 03/04/2009 06:57 AM:
  Hi all,
 
 please dont top post.
  For the EVM board,
 
  $BOARD = evm $CPU = arm_cortexa8 and $ARCH = arm.
  $VENDOR = omap3 and $SOC = omap3
 
  I can change the check to check BOARD so that it is applicable only
  To OMAP3 EVMs.
 
  ifeq ($(BOARD),evm)
  LOAD_ADDR = 0x8030
  else
 
 what is so special about evm? ;) if we have an exception from the
 current boards supported, lets go ahead and do it..
 mebbe the right fix would be replace $CPU, omap3 with $SOC,omap3?
 Regards,
 Nishanth Menon

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


Re: [U-Boot] [PATCH 1/1] Fix for running examples on OMAP3 EVM board

2009-03-03 Thread Nishanth Menon
Pillai, Manikandan said the following on 03/04/2009 06:57 AM:
 Hi all,
   
please dont top post.
 For the EVM board,

 $BOARD = evm $CPU = arm_cortexa8 and $ARCH = arm.
 $VENDOR = omap3 and $SOC = omap3

 I can change the check to check BOARD so that it is applicable only
 To OMAP3 EVMs.

 ifeq ($(BOARD),evm)
 LOAD_ADDR = 0x8030
 else
   
what is so special about evm? ;) if we have an exception from the
current boards supported, lets go ahead and do it..
mebbe the right fix would be replace $CPU, omap3 with $SOC,omap3?
Regards,
Nishanth Menon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] Changes for single binary image for u-boot for NAND/OneNAND flash.

2009-03-03 Thread Pillai, Manikandan
Hi,

Pls find my comments below


 -Original Message-
 From: Nishanth Menon [mailto:menon.nisha...@gmail.com]
 Sent: Tuesday, March 03, 2009 2:03 PM
 To: Pillai, Manikandan
 Cc: u-boot@lists.denx.de; dirk.be...@googlemail.com
 Subject: Re: [U-Boot] [PATCH 1/1] Changes for single binary image for u-boot
 for NAND/OneNAND flash.

 Manikandan Pillai said the following on 03/03/2009 05:41 AM:
  Support for single binary image for NAND/OneNAND based OMAP3 EVM
  boards. The software has to set the flag CONFIG_ENV_IS_RUNTIME_SEL
  in include/configs/omap3_evm.h. The software is able to detect
  whether it is NAND or OneNAND flash at runtime. The flash
  detected is set as the environment store also.
 
 makes sense for SDP also.. in SDP3430, we have NOR,OneNAND,NAND and MMC
 as possible boot devices. :(
 Could you please split this patch into two:
 a) changes to generic files
 b) changes specific to omap.
 it is easier to review that way..
[Pillai, Manikandan] OK


  As per the comments received, the change is done only for OMAP3 EVM.
 
  Signed-off-by: Manikandan Pillai mani.pil...@ti.com
  ---
   board/omap3/evm/evm.c |2 +
   common/Makefile   |1 +
   common/cmd_nvedit.c   |5 ++
   common/env_common.c   |8 +++-
   common/env_nand.c |   33 +++-
   common/env_onenand.c  |   26 +-
   cpu/arm_cortexa8/omap3/board.c|   13 +
   cpu/arm_cortexa8/omap3/mem.c  |  100
 -
   cpu/arm_cortexa8/omap3/sys_info.c |   27 +-
   include/common.h  |   10 +++-
   include/configs/omap3_evm.h   |6 ++-
   lib_arm/board.c   |   25 +++---
   12 files changed, 237 insertions(+), 19 deletions(-)
 
  diff --git a/board/omap3/evm/evm.c b/board/omap3/evm/evm.c
  index b406312..9924432 100644
  --- a/board/omap3/evm/evm.c
  +++ b/board/omap3/evm/evm.c
  @@ -44,7 +44,9 @@ int board_init(void)
   {
  DECLARE_GLOBAL_DATA_PTR;
 
  +#if !defined(CONFIG_ENV_IS_RUNTIME_SEL)
  gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
  +#endif
  /* board id for Linux */
  gd-bd-bi_arch_number = MACH_TYPE_OMAP3EVM;
  /* boot param addr */
  diff --git a/common/Makefile b/common/Makefile
  index f13cd11..a6c55d2 100644
  --- a/common/Makefile
  +++ b/common/Makefile
  @@ -58,6 +58,7 @@ COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
   COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
   COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
   COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
  +COBJS-$(CONFIG_ENV_IS_RUNTIME_SEL) += env_onenand.o env_nand.o
 
   # command
   COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
  diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
  index 68c673e..628bcf4 100644
  --- a/common/cmd_nvedit.c
  +++ b/common/cmd_nvedit.c
  @@ -59,6 +59,7 @@ DECLARE_GLOBAL_DATA_PTR;
   !defined(CONFIG_ENV_IS_IN_NAND) \
   !defined(CONFIG_ENV_IS_IN_ONENAND)  \
   !defined(CONFIG_ENV_IS_IN_SPI_FLASH)\
  +!defined(CONFIG_ENV_IS_RUNTIME_SEL) \
   !defined(CONFIG_ENV_IS_NOWHERE)
   # error Define one of
 CONFIG_ENV_IS_IN_{NVRAM|EEPROM|FLASH|DATAFLASH|ONENAND|SPI_FLASH|NOWHERE}
   #endif
  @@ -66,6 +67,10 @@ DECLARE_GLOBAL_DATA_PTR;
   #define XMK_STR(x) #x
   #define MK_STR(x)  XMK_STR(x)
 
  +#if defined(CONFIG_ENV_IS_RUNTIME_SEL)
  +extern saveenv_p saveenv;
  +#endif
  +
   /
   /
 
  diff --git a/common/env_common.c b/common/env_common.c
  index 6be3bb0..b692900 100644
  --- a/common/env_common.c
  +++ b/common/env_common.c
  @@ -46,8 +46,13 @@ DECLARE_GLOBAL_DATA_PTR;
 
   extern env_t *env_ptr;
 
  +#if defined(CONFIG_ENV_IS_RUNTIME_SEL)
  +extern env_get_char_spec_p env_get_char_spec;
  +extern env_relocate_spec_p env_relocate_spec;
  +#else
   extern void env_relocate_spec (void);
   extern uchar env_get_char_spec(int);
  +#endif
 
   static uchar env_get_char_init (int index);
 
  @@ -140,7 +145,8 @@ uchar default_environment[] = {
   };
 
   #if defined(CONFIG_ENV_IS_IN_NAND) /* Environment is in Nand
 Flash */ \
  -   || defined(CONFIG_ENV_IS_IN_SPI_FLASH)
  +   || defined(CONFIG_ENV_IS_IN_SPI_FLASH) \
  +   || (defined(CONFIG_CMD_NAND)  defined(CONFIG_ENV_IS_RUNTIME_SEL))
 
 Errr ENV_IS_IN_NAND Vs ENV_IS_RUNTIME_SEL is not clear.
[Pillai, Manikandan] I am not clear with the query


   int default_environment_size = sizeof(default_environment);
   #endif
 
  diff --git a/common/env_nand.c b/common/env_nand.c
  index 76569da..add74c2 100644
  --- a/common/env_nand.c
  +++ b/common/env_nand.c
  @@ -65,17 +65,22 @@ int nand_legacy_rw (struct nand_chip* nand, int cmd,
   extern uchar default_environment[];
   extern int default_environment_size;
 
  +#if defined(CONFIG_ENV_IS_RUNTIME_SEL)
  +char *nand_env_name_spec = 

Re: [U-Boot] AT91SAM926x Nor Boot

2009-03-03 Thread Jens Scharsig
Thanks at all,

J. Scharsig

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


Re: [U-Boot] U-Boot hangs after loading device tree

2009-03-03 Thread Afzal Nadirshah
Hi Pieter,
Thanks for your suggestion. I guess its halting at the point where u-boot is 
handing over to the Linux kernel image.
For doing the post mortem analysis, I am not able to obtain the address of the 
virtual

Regards,
Afzal Nadirshah

-Original Message-
From: Pieter [mailto:phenn...@vastech.co.za]
Sent: Monday, March 02, 2009 4:24 PM
To: Afzal Nadirshah
Subject: Re: [U-Boot] U-Boot hangs after loading device tree

Afzal Nadirshah wrote:
 Hi,
I am trying to bring linux up on our custom board, by loading the 
 kernel.img , canynlands.dtb and Ramdisk onto the RAM using the serial port.
However the boot process is getting hung. The boot boot process stops 
 after the following messages :


  = run flash_self
 ## Booting kernel from Legacy Image at 1c00 ...
Image Name:   Linux-2.6.25.7-2-geaaf8db
Created:  2008-06-30  13:53:11 UTC
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:1547704 Bytes =  1.5 MB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
 ## Loading init Ramdisk from Legacy Image at 1c20 ...
Image Name:   Simple Embedded Linux Framework
Created:  2002-10-24   9:30:38 UTC
Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
Data Size:1476478 Bytes =  1.4 MB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
 ## Flattened Device Tree blob at 1c1e
Booting using the fdt blob at 0x1c1e
Uncompressing Kernel Image ... OK
Loading Ramdisk to 1fc78000, end 1fde077e ... OK
Loading Device Tree to 007f9000, end 007ff0b4 ... OK


 I have changed the kernel_addr, fdt_addr and the ramdisk_addr to the RAM 
 addresses.
 This is the output of the printenv command :


 = printenv
 bootdelay=5
 baudrate=115200
 loads_echo=
 preboot=echo;echo Type run flash_nfs to mount root filesystem over NFS;echo
 hostname=canyonlands
 netdev=eth0
 nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}
 ramargs=setenv bootargs root=/dev/ram rw
 addip=setenv bootargs ${bootargs} 
 ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}1
 addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}
 addmisc=setenv bootargs ${bootargs}
 initrd_high=3000
 kernel_addr_r=40
 fdt_addr_r=80
 ramdisk_addr_r=C0
 hostname=canyonlands
 bootfile=canyonlands/uImage
 ramdisk_file=canyonlands/uRamdisk
 rootpath=/opt/eldk/ppc_4xxFP
 flash_self=run ramargs addip addtty addmisc;bootm ${kernel_addr} 
 ${ramdisk_addr} ${fdt_addr}
 flash_nfs=run nfsargs addip addtty addmisc;bootm ${kernel_addr} - ${fdt_addr}
 net_nfs=tftp ${kernel_addr_r} ${bootfile}; tftp ${fdt_addr_r} ${fdt_file}; 
 run nfsargs addip a}
 net_self_load=tftp ${kernel_addr_r} ${bootfile};tftp ${fdt_addr_r} 
 ${fdt_file};tftp ${ramdisk_;
 net_self=run net_self_load;run ramargs addip addtty addmisc;bootm 
 ${kernel_addr_r} ${ramdisk_a}
 fdt_file=canyonlands/canyonlands.dtb
 load=tftp 20 canyonlands/u-boot.bin
 update=protect off 0x0100 ;era 0x0100 ;cp.b 
 ${fileaddr} 0x0100 ${fv
 upd=run load update
 nload=tftp 20 canyonlands/u-boot-nand.bin
 nupdate=nand erase 0 10;nand write 20 0 10;setenv filesize;saveenv
 nupd=run nload nupdate
 pciconfighost=1
 pcie_mode=RP:RP
 fdt_addr=1c1e
 ramdisk_addr=1c20
 ram_root=run ramargs addip;bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}
 ram_ws=1C00
 kernel_addr=1c00
 stdin=serial
 stdout=serial
 stderr=serial
 ver=U-Boot 2009.01 (Feb 25 2009 - 15:12:15)
 bootcmd=run flash_self
 bootargs=root=/dev/ram rw ip=canyonlands:eth0:off panic=1 
 console=ttyS0,115200
 filesize=1687BE

 Have anybody faced a similar problem?

I recently had a similar problem - the solution was a combination of DTS
tweaks and U-Boot defines for my board. have a look at the post mortem
debugging and recheck all your defines.

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

or search the mailing list for my postings:
 [U-Boot] Custom MPC8548 boot using FDT problem
cheers pieter



http://www.mindtree.com/email/disclaimer.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] FW: U-Boot hangs after loading device tree

2009-03-03 Thread Aggrwal Poonam-B10812
 

 -Original Message-
 From: u-boot-boun...@lists.denx.de 
 [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Afzal Nadirshah
 Sent: Wednesday, March 04, 2009 12:42 PM
 To: Pieter; u-boot@lists.denx.de
 Subject: [U-Boot] FW: U-Boot hangs after loading device tree
 
 
 
 Hi Pieter,
 Thanks for your suggestion. I guess its halting at the point 
 where u-boot is handing over to the Linux kernel image.
 For doing the post mortem analysis, I am not able to obtain 
 the virtual address of the log_buf.
 grep log_buf System.map or grep __log_buf System.map doesn't 
 give nay output.
 
 Sorry for the double post.
 
Just check your platform name/machine name in the dts , most probably
your platform probe is not getting called. 
Also may be debug version of u-boot may give better idea.
 Regards,
 Afzal Nadirshah
 
 -Original Message-
 From: Pieter [mailto:phenn...@vastech.co.za]
 Sent: Monday, March 02, 2009 4:24 PM
 To: Afzal Nadirshah
 Subject: Re: [U-Boot] U-Boot hangs after loading device tree
 
 Afzal Nadirshah wrote:
  Hi,
 I am trying to bring linux up on our custom board, 
 by loading the kernel.img , canynlands.dtb and Ramdisk onto 
 the RAM using the serial port.
 However the boot process is getting hung. The boot 
 boot process stops after the following messages :
 
 
   = run flash_self
  ## Booting kernel from Legacy Image at 1c00 ...
 Image Name:   Linux-2.6.25.7-2-geaaf8db
 Created:  2008-06-30  13:53:11 UTC
 Image Type:   PowerPC Linux Kernel Image (gzip compressed)
 Data Size:1547704 Bytes =  1.5 MB
 Load Address: 
 Entry Point:  
 Verifying Checksum ... OK
  ## Loading init Ramdisk from Legacy Image at 1c20 ...
 Image Name:   Simple Embedded Linux Framework
 Created:  2002-10-24   9:30:38 UTC
 Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
 Data Size:1476478 Bytes =  1.4 MB
 Load Address: 
 Entry Point:  
 Verifying Checksum ... OK
  ## Flattened Device Tree blob at 1c1e
 Booting using the fdt blob at 0x1c1e
 Uncompressing Kernel Image ... OK
 Loading Ramdisk to 1fc78000, end 1fde077e ... OK
 Loading Device Tree to 007f9000, end 007ff0b4 ... OK
 
 
  I have changed the kernel_addr, fdt_addr and the 
 ramdisk_addr to the RAM addresses.
  This is the output of the printenv command :
 
 
  = printenv
  bootdelay=5
  baudrate=115200
  loads_echo=
  preboot=echo;echo Type run flash_nfs to mount root 
 filesystem over 
  NFS;echo hostname=canyonlands netdev=eth0 nfsargs=setenv bootargs 
  root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ramargs=setenv 
  bootargs root=/dev/ram rw addip=setenv bootargs ${bootargs} 
  ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}1
  addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate} 
  addmisc=setenv bootargs ${bootargs} initrd_high=3000 
  kernel_addr_r=40 fdt_addr_r=80 ramdisk_addr_r=C0 
  hostname=canyonlands bootfile=canyonlands/uImage 
  ramdisk_file=canyonlands/uRamdisk rootpath=/opt/eldk/ppc_4xxFP 
  flash_self=run ramargs addip addtty addmisc;bootm ${kernel_addr} 
  ${ramdisk_addr} ${fdt_addr} flash_nfs=run nfsargs addip addtty 
  addmisc;bootm ${kernel_addr} - ${fdt_addr} net_nfs=tftp 
  ${kernel_addr_r} ${bootfile}; tftp ${fdt_addr_r} ${fdt_file}; run 
  nfsargs addip a} net_self_load=tftp ${kernel_addr_r} 
 ${bootfile};tftp 
  ${fdt_addr_r} ${fdt_file};tftp ${ramdisk_; net_self=run 
  net_self_load;run ramargs addip addtty addmisc;bootm 
 ${kernel_addr_r} 
  ${ramdisk_a} fdt_file=canyonlands/canyonlands.dtb
  load=tftp 20 canyonlands/u-boot.bin update=protect off 
 0x0100 
  ;era 0x0100 ;cp.b ${fileaddr} 0x0100 ${fv 
  upd=run load update nload=tftp 20 canyonlands/u-boot-nand.bin 
  nupdate=nand erase 0 10;nand write 20 0 10;setenv 
  filesize;saveenv nupd=run nload nupdate
  pciconfighost=1
  pcie_mode=RP:RP
  fdt_addr=1c1e
  ramdisk_addr=1c20
  ram_root=run ramargs addip;bootm ${kernel_addr} ${ramdisk_addr} 
  ${fdt_addr} ram_ws=1C00 kernel_addr=1c00 stdin=serial 
  stdout=serial stderr=serial ver=U-Boot 2009.01 (Feb 25 2009 - 
  15:12:15) bootcmd=run flash_self bootargs=root=/dev/ram rw 
  ip=canyonlands:eth0:off panic=1 console=ttyS0,115200 
  filesize=1687BE
 
  Have anybody faced a similar problem?
 
 I recently had a similar problem - the solution was a 
 combination of DTS tweaks and U-Boot defines for my board. 
 have a look at the post mortem debugging and recheck all your defines.
 
  http://www.denx.de/wiki/view/DULG/LinuxPostMortemAnalysis
 
 or search the mailing list for my postings:
  [U-Boot] Custom MPC8548 boot using FDT problem cheers pieter
 
 
 
 http://www.mindtree.com/email/disclaimer.html
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
 
 

Re: [U-Boot] [PATCH 1/1] Changes for single binary image for u-boot for NAND/OneNAND flash.

2009-03-03 Thread Nishanth Menon
Pillai, Manikandan said the following on 03/04/2009 08:35 AM:
  #if defined(CONFIG_ENV_IS_IN_NAND) /* Environment is in Nand
   
 Flash */ \
 
 -   || defined(CONFIG_ENV_IS_IN_SPI_FLASH)
 +   || defined(CONFIG_ENV_IS_IN_SPI_FLASH) \
 +   || (defined(CONFIG_CMD_NAND)  defined(CONFIG_ENV_IS_RUNTIME_SEL))

   
 Errr ENV_IS_IN_NAND Vs ENV_IS_RUNTIME_SEL is not clear.
 
 [Pillai, Manikandan] I am not clear with the query

   

CONFIG_ENV_IS_RUNTIME_SEL is dependent only on CMD_NAND? if I had onenand and 
NOR, then what?

 +void print_board_info(void)
 +{
 +   u32 btype;
 +
 +   btype = get_board_type();
 +
 +   display_board_info(btype);
 +}
 +

   
 I dont think this is related to this...
 
 [Pillai, Manikandan] The default EVM support does not have NAND. To build only
 For NAND, you need to enable this. I can put this in a separate patch in a 
 series.

   
my comment - move this as a seperate patch.. this patch seems to mix up
things doing different things and confusing for a review.
 -#if defined(CONFIG_CMD_ONENAND)
 +#if defined(CONFIG_CMD_NAND)  defined(CONFIG_ENV_IS_RUNTIME_SEL)
 +   gpmc_config = gpmc_m_nand;
 +   nand_cs_base = (gpmc_csx_t *)(GPMC_CONFIG_CS0_BASE +
 +   (gpmc_index * GPMC_CONFIG_WIDTH));
 +   base = PISMO1_NAND_BASE;
 +   size = PISMO1_NAND_SIZE;
 +   enable_gpmc_config(gpmc_config, nand_cs_base, base, size);
 +   /* NAND and/or ONENAND is to be scanned */
 +   is_nand = 0;
 +   nand_init();
 +   if (nand_info[0].size) {
 +   is_nand = 1;
 +   f_off = SMNAND_ENV_OFFSET;
 +   f_sec = SZ_128K;
 +   /* env setup */
 +   boot_flash_base = base;
 +   boot_flash_off = f_off;
 +   boot_flash_sec = f_sec;
 +   boot_flash_env_addr = f_off;
 +
 +   env_name_spec = nand_env_name_spec;
 +   env_ptr = nand_env_ptr;
 +   env_get_char_spec = nand_env_get_char_spec;
 +   env_init = nand_env_init;
 +   saveenv = nand_saveenv;
 +   env_relocate_spec = nand_env_relocate_spec;
 +   gpmc_index++;
 +   }

   
 with a change like above in a common omap3 file, you are essentially
 bottlenecking scalability to other OMAP3 platforms which use different
 NAND. Eg. we assume SZ_128K ;) kinda wrong rt? sector size is dependent
 on the nand device we plug in..
 
 [Pillai, Manikandan] I can plug out the initialization stuff and put it in
 a board dependent file and invoke the same from the common omap3 locations
 for the type of board.

   
that might be a nice idea.. will look for your changes.. :)
 printf(OMAP%s-%s rev %d, CPU-OPP2 L3-165MHz\n, cpu_s,
 -  sec_s, get_cpu_rev());
 -   printf(%s + %s/%s\n, sysinfo.board_string,
 -  mem_s, sysinfo.nand_string);
 +   sec_s, get_cpu_rev());
 +#if defined(CONFIG_ENV_IS_RUNTIME_SEL)
 +   printf(%s + %s/, sysinfo.board_string,
 +   mem_s);
 +#if defined(CONFIG_CMD_NAND)
 +   if (is_nand)
 +   printf(%s\n, NAND);
 +#endif
 +#if defined(CONFIG_CMD_ONENAND)
 +   if (is_onenand)
 +   printf(%s\n, ONENAND);
 +#endif
 +#else
 +   printf(%s + %s/%s\n, sysinfo.board_string,
 +   mem_s, sysinfo.nand_string);
 +#endif

   
 I have this feel that we could improve this #ifdef mess.. using
 variables maybe?
 
 [Pillai, Manikandan] other suggestions welcome Personally, I felt
 here the #ifdef is not so dirty.
   
;) not after a time of adding multiple #ifdefs :D... as I said, how
about using variables to do it?
 +#if defined(CONFIG_ENV_IS_RUNTIME_SEL)
 +   gpmc_init(); /* in SRAM or SDRAM, finish GPMC */

   
 Waaah.. gpmc is TI OMAP2 or OMAP3 only NOT in other ARM or PPC
 or other platforms.. NAK on this.
 
 [Pillai, Manikandan] Got your point. But I don't have a solution to this
 Since I EVM is doing a scan,  it requires the gpmc_init to be called late.
 An option is to have another function  board_init_late() which can be used to
 called gpmc_init_late().
   
that could be an option.. but please keep other platforms in mind when
we send this patch.
Regards,
Nishanth Menon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Watchdog timer and booting in Linux kernel

2009-03-03 Thread Sachin Rane
Hi,

We able to integrate u-boot with Linux along with Watchdog enabled for
PPC440gx processor.
Here I am giving the modification we did to make it work.

The intention to write this mail is to provide a reference code for the
people who wants to use Watchdog feature with PPC440gx.

We have used u-boot-1.1.4 and Linux Kernel of version 2.6.16 on PPC440gx
processor.


Steps that we have taken:
1. Enabled 'CONFIG_WATCHDOG' flag code in u-boot code.

2. Modified the
'kernel-2.6.16.1-ts.amcc440gx.basic.1\arch\ppc\kernel\time.c' (Modified
code starts with 'Sachin' tag)

void reset_watchdog(void)
{
/* Sachin: Resetting Bit#0 and Bit#1
mtspr(SPRN_TSR, 0xc000);
/*Sachin: added - end */
}


void timer_interrupt(struct pt_regs * regs)
{
int next_dec;
unsigned long cpu = smp_processor_id();
unsigned jiffy_stamp = last_jiffy_stamp(cpu);
extern void do_IRQ(struct pt_regs *);

/* Sachin: Reset the Watchdog timer */
reset_watchdog();
/*Sachin: added - end */

:
:
:
:
if (ppc_md.heartbeat 
!ppc_md.heartbeat_count--)
ppc_md.heartbeat();

irq_exit();
}

3. Modified the
'kernel-2.6.16.1-ts.amcc440gx.basic.1\arch\ppc\syslib\ibm44x_common.c':

void __init ibm44x_calibrate_decr(unsigned int freq)
{
unsigned long value;
tb_ticks_per_jiffy = freq / HZ;
tb_to_us = mulhwu_scale_factor(freq, 100);
:
:
:

/*Sachin: added - start */
value = mfspr(SPRN_TCR);
value |= TCR_DIE;
mtspr(SPRN_TCR, value);
/*Sachin: added - end */

//mtspr(SPRN_TCR, TCR_DIE);
}

Thanks.


Regards,
Sachin Rane

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