[U-Boot] [GIT PULL] Please pull u-boot-mpc85xx.git

2011-05-19 Thread Kumar Gala
The following changes since commit 0ea91423f47461bf7eaed2d4aff198076dd07fd5:

  Merge branch 'master' of git://git.denx.de/u-boot-arm (2011-05-18 14:31:56 
+0200)

are available in the git repository at:

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

Shaohui Xie (2):
  powerpc/85xx: Enable eSPI support on corenet ds boards
  powerpc/85xx: add support for env in MMC/SPI on corenet ds boards

 board/freescale/common/Makefile |2 +
 boards.cfg  |7 +-
 include/configs/corenet_ds.h|   40 +++---
 3 files changed, 40 insertions(+), 9 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] OMAP5912 -- Status?

2011-05-19 Thread James Harris
Greetings all,

 

Over the past few days I've been trying to get u-boot 2011.03 for the
omap5912osk working.

 

Support for the target appears to have stagnated...

 

"Out of the box" the omap5912osk (and omap1610inn) target fails to
compile due to the following missing symbols:

CONFIG_SYS_SDRAM_BASE

CONFIG_SYS_INIT_SP_ADDR

 

Can someone please confirm the u-boot support status of this board?

 

The relocation code for ARM seems to have moved on since u-boot V1.1.1.

Unfortunately that version has build problems with my more recent gcc
4.4.6 toolchain (arm-unknown-eabi)

 

I'd like revive the omap5912osk target...

 

The README files on relocation indicate that the PowerPC architectures
use the DATA CACHE for initial stack operations.

What is the standard approach on ARM systems? And in particular for the
ARM926EJS in the OMAP5912?

 

I've tried to use the top of the "framebuffer" SRAM address space (base
address + SRAM size - minus generated global data size) but this failed.

 

Thank you

 

James

 

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


Re: [U-Boot] OMAP5912 -- Status?

2011-05-19 Thread Igor Grinberg
Hi James,

On 05/19/11 10:07, James Harris wrote:

> Greetings all,
>
>  
>
> Over the past few days I've been trying to get u-boot 2011.03 for the
> omap5912osk working.
>
>  
>
> Support for the target appears to have stagnated...
>
>  
>
> "Out of the box" the omap5912osk (and omap1610inn) target fails to
> compile due to the following missing symbols:
>
> CONFIG_SYS_SDRAM_BASE
>
> CONFIG_SYS_INIT_SP_ADDR

I've send a patch [1] which hopefully fixes omap1610inn and omap1610h2.
I can't test is as I don't have this hardware.
It is currently waiting for Sandeep's approval.

[1]
http://www.mail-archive.com/u-boot@lists.denx.de/msg52157.html



-- 
Regards,
Igor.

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


Re: [U-Boot] OMAP5912 -- Status? -- Identified as ARM926EJS start.S problem

2011-05-19 Thread James Harris
Hi Igor,

Thanks for your prompt response.
I've made similar modifications to the omap5912osk over the past number of days 
with no success...
The problem appears deeper than just providing these definitions, which as you 
say, requires actual hardware to test with :)

I've gone back to 2010.09 release and it now works very nicely!

I chose that version as it is just prior to the relocation changes applied in 
the arch/arm/cpu/arm926ejs/start.S file:
2010-09-19 Heiko Schocher ARM: implement relocation for ARM926

That change would certainly cause out-of-box compilation failures, however I am 
not sure whether it was that change or possibly the following change:
2010-10-13 Albert Aribaud arm: implement ELF relocations
that causes the runtime failure...

I may investigate further, however, at this stage I can "move on" using the 
2010.09 release.

As an aside: Using U-Boot 2010.09 also resolves a problem I was having with 
u-boot V1.1.1:
The V2.6.32 linux kernel could not be booted when mem=32M was passed using 
u-boot V1.1.1
However when I tried earlier today, through pure desperation, passing mem=16M 
it did boot.
Now under u-boot 2010.09 the Linux kernel boots just fine with mem=32M

Cheers,

James


...
 
James Harris

T  +61 8 8104 5253
E   jhar...@ellex.com
...

-Original Message-
From: Igor Grinberg [mailto:grinb...@compulab.co.il] 
Sent: Thursday, 19 May 2011 5:09 PM
To: James Harris
Cc: u-boot@lists.denx.de; ri...@ti.com
Subject: Re: [U-Boot] OMAP5912 -- Status?

Hi James,

On 05/19/11 10:07, James Harris wrote:

> Greetings all,
>
>  
>
> Over the past few days I've been trying to get u-boot 2011.03 for the 
> omap5912osk working.
>
>  
>
> Support for the target appears to have stagnated...
>
>  
>
> "Out of the box" the omap5912osk (and omap1610inn) target fails to 
> compile due to the following missing symbols:
>
> CONFIG_SYS_SDRAM_BASE
>
> CONFIG_SYS_INIT_SP_ADDR

I've send a patch [1] which hopefully fixes omap1610inn and omap1610h2.
I can't test is as I don't have this hardware.
It is currently waiting for Sandeep's approval.

[1]
http://www.mail-archive.com/u-boot@lists.denx.de/msg52157.html



--
Regards,
Igor.

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


Re: [U-Boot] [PATCH v3 1/5] TFTP: replace "server" with "remote" in local variable names

2011-05-19 Thread Detlev Zundel
Hi Luca,

> With the upcoming TFTP server implementation, the remote node can be
> either a client or a server, so avoid ambiguities.
>
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 

Acked-by: Detlev Zundel 

Cheers
  Detlev

-- 
Algebraists do it in a ring, in fields, in groups.
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 4/5] TFTP: add tftpsrv command

2011-05-19 Thread Detlev Zundel
Luca Ceresoli  writes:

> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 

Acked-by: Detlev Zundel 

Cheers
  Detlev

-- 
-- Question authority!
-- Yeah, says who?
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/5] TFTP: rename STATE_RRQ to STATE_SEND_RRQ

2011-05-19 Thread Detlev Zundel
Luca Ceresoli  writes:

> With the upcoming TFTP server implementation, requests can be either
> outgoing or incoming, so avoid ambiguities.
>
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 

Acked-by: Detlev Zundel 

Cheers
  Detlev

-- 
More than any other time in history, mankind faces a crossroads.  One
path leads  to despair  and utter  hopelessness.   The other to total
extinction.  Let us pray, we have the wisdom to choose correctly.
-- Woody Allen
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/5] TFTP: net/tftp.c: add server mode receive

2011-05-19 Thread Detlev Zundel
Hi Luca,

> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 

Acked-by: Detlev Zundel 

Just for the future:

[...]

> diff --git a/net/tftp.h b/net/tftp.h
> index e3dfb26..3abdf7b 100644
> --- a/net/tftp.h
> +++ b/net/tftp.h
> @@ -2,6 +2,8 @@
>   *   LiMon - BOOTP/TFTP.
>   *
>   *   Copyright 1994, 1995, 2000 Neil Russell.
> + *   Copyright 2011 Comelit Group SpA
> + *  Luca Ceresoli 
>   *   (See License)
>   */
>  
> @@ -16,6 +18,10 @@
>  /* tftp.c */
>  extern void  TftpStart (void);   /* Begin TFTP get */
>  
> +#ifdef CONFIG_CMD_TFTPSRV
> +extern void  TftpStartServer(void);  /* Wait for incoming TFTP put */
> +#endif
> +
>  /**/
>  
>  #endif /* __TFTP_H__ */

I think we don't need the ifdefs in header files, or am I missing
something?  I _really_ like to avoid ifdefs wherever we can ;)

Cheers
  Detlev

-- 
I have a computer on which I can install any code I choose.  I don't
think that is a security flaw.  On the contrary, if only one company
can install a new version, that is a grave security flaw for me as a
user.  -- Richard Stallman 
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 5/5] net/tftp.c: fix typo

2011-05-19 Thread Detlev Zundel
Luca Ceresoli  writes:

> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 

Acked-by: Detlev Zundel 

Cheers
  Detlev

-- 
The  mathematician's patterns,  like the  painter's or  the poet's,  must be
beautiful;  the ideas, like the colours or the words, must fit together in a
harmonious way. Beauty is the first test: there is no permanent place in the
world for ugly mathematics.   -- G. H. Hardy
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] Accurate boot time measurement

2011-05-19 Thread Detlev Zundel
Hi Simon,

[...]

> I believe I have covered this ground very thoroughly and would like
> advice please on what to do next. The options I can see are:

As Graeme points out, you got enough positive feedback that I encourage
you to continue and address the comments.

> - change the code to use a fallback when a microsecond timer is not
> available

Excuse me for not diving into that too deep, but from my top-level
overview, it would seem like a good idea that if an architecture _has_ a
microsecond timer, it could use generic code to massage that into the
HZ=1000 API that we currently use with the addition of offering the
extended precision.  Your code then would need such a fallback and could
work with the best precision offered by the architecture.  New
architectures with microsecond timers would need to only implement the
new microsecond timer infrastructure and be done with it.

I know that this probably ignores much of the reality, but it is as much
as I can say with the time that I have available.

As a side-note, I would always suggest looking at how Linux solves similar
problems and follow examples set there.

> - integrate with boot progress

The current boot progress to me seems pretty ugly and could do with a
make-over.  So if it is possible to merge those two logical functions,
we would have a win-win situation.

> - something else? drop it?

No, please don't - I think you created enough interest to carry on.

Cheers
  Detlev

-- 
Perfecting oneself is as much unlearning as it is learning. 
-- Edsger Dijkstra 
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/4] MX5: Introduce a function for setting the chip select size

2011-05-19 Thread Stefano Babic
On 05/18/2011 10:47 PM, Fabio Estevam wrote:
> Signed-off-by: Fabio Estevam 
> ---

Hi Fabio,

> +void set_chipselect_size(int const cs_size)
> +{
> + unsigned int reg;
> + struct iomuxc *iomuxc_regs = (struct weim *)IOMUXC_BASE_ADDR;
> + reg = readl(&iomuxc_regs->gpr1);
> +
> + switch (cs_size) {
> + case CS0_128:
> + reg &= ~0x7;/* CS0=128MB, CS1=0, CS2=0, CS3=0 */
> + reg |= 0x5;
> + break;
> + case CS0_64M_CS1_64M:
> + reg &= ~0x3F;   /* CS0=64MB, CS1=64MB, CS2=0, CS3=0 */
> + reg |= 0x1B;
> + break;
> + case CS0_64M_CS1_32M_CS2_32M:
> + reg &= ~0x1FF;  /* CS0=64MB, CS1=32MB, CS2=32MB, CS3=0 */
> + reg |= 0x4B;
> + break;
> + case CS0_32M_CS1_32M_CS2_32M_CS3_32M:
> + reg &= ~0xFFF;  /* CS0=32MB, CS1=32MB, CS2=32MB, CS3=32MB */
> + reg |= 0x249;
> + break;
> + default:
> + printf("Unknown chip select size\n");
> + break;
> + }
> +
> + writel(reg, &iomuxc_regs->gpr1);
> +}

mmmhhh...it seems to me not complete, because not all combinations are
covered. And setting fixed values in the switch constraints us to have
very long defines, as CS0_32M_CS1_32M_CS2_32M_CS3_32M.

What about to do in another way ? In the register, there are four bits
for each chip select, and the value to be set can then easy shifted to
the right place. You could define an enum with

CS_SIZE_32M = 0,
CS_SIZE_64M,
CS_SIZE_128

and use it as size. The function could take the chipselect as parameter,
and you could set the register with something like (size | ACT_CS) <<
(CS_SHIFT * chipselect), with CS_SHIFT=3. Then all cases are covered.

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] [RFC] Duplicated string prefix

2011-05-19 Thread Detlev Zundel
Hi Gray,

> The string prefixes "*** ERROR:" and "WARNING:" (or variations thereof) 
> is duplicated numerous times throughout u-boot.
> Replacing with e.g. a 'putserr' function which prepends the string 
> prefix to the unique part of the error message and then displays it may 
> be a worthwhile space saving.

You should be able to tell beforehand how much this could save by
analyzing the strings in a current U-Boot compile, right?  This way one
would know whether it makes sense to embark on that journey.

_If_ we decide to go down that route, I'd suggest using functions
comparable to what Linux offers, e.g. something like pr_err, pr_warning,
etc.

Cheers
  Detlev

-- 
Perfecting oneself is as much unlearning as it is learning. 
-- Edsger Dijkstra 
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] phylib: Detect link on 10G devices correctly

2011-05-19 Thread Detlev Zundel
Hi Andy,

> gen10g_startup() had 2 bugs:
>
> 1) It had a boolean logic error in checking the MMD mask, and
> always checked all of them.

Good catch.

> 2) It checked devices which don't actually report link state, which
> meant that it would never believe the link was fully up.
>
> Fix the boolean logic, and then mask the MMD mask so only link-reporting
> devices are checked.
>
> Signed-off-by: Andy Fleming 
> Reported-by: Ed Swarthout 
> ---
>
>  drivers/net/phy/generic_10g.c |8 ++--
>  include/linux/mdio.h  |8 
>  2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/phy/generic_10g.c b/drivers/net/phy/generic_10g.c
> index 315c508..1c3e69e 100644
> --- a/drivers/net/phy/generic_10g.c
> +++ b/drivers/net/phy/generic_10g.c
> @@ -36,7 +36,7 @@ int gen10g_shutdown(struct phy_device *phydev)
>  int gen10g_startup(struct phy_device *phydev)
>  {
>   int devad, reg;
> - u32 mmd_mask = phydev->mmds;
> + u32 mmd_mask = phydev->mmds & MDIO_DEVS_LINK;

So we are introducing this new macro, right?  I don't see this in Linux
- how is this handled there?  If we do have to create a new name, can't
we use something more self-documenting, e.g. MDIO_DEVS_REPORT_LINK or
such?

Cheers
  Detlev

-- 
Quantum physicists can either know how fast they do it, or where they
do it, but not both.
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 0/2] SMDKV310 Board Support

2011-05-19 Thread Chander Kashyap
Hi,
This patchset adds support for a new board SMDKV310, based on S5PV310 SOC.
This SOC is very similar to S5PC210 SOC, hence we are re-using this SOC code.

Specific changes in PATCH v3 are mention in specific patch files.

Chander Kashyap (2):
  ARMV7: Add support for Samsung SMDKV310 Board
  ARMV7: MMC SPL Boot support for SMDKV310 board

 MAINTAINERS|4 +
 Makefile   |   11 +
 board/samsung/smdkv310/Makefile|   46 ++
 board/samsung/smdkv310/lowlevel_init.S |  470 
 board/samsung/smdkv310/mem_setup.S |  365 +++
 board/samsung/smdkv310/smdkv310.c  |  136 ++
 boards.cfg |1 +
 include/configs/smdkv310.h |  169 +++
 mmc_spl/board/samsung/smdkv310/Makefile|  105 +
 mmc_spl/board/samsung/smdkv310/mmc_boot.c  |   81 
 .../board/samsung/smdkv310/tools/mkv310_image.c|  116 +
 mmc_spl/board/samsung/smdkv310/u-boot.lds  |   86 
 12 files changed, 1590 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/smdkv310/Makefile
 create mode 100644 board/samsung/smdkv310/lowlevel_init.S
 create mode 100644 board/samsung/smdkv310/mem_setup.S
 create mode 100644 board/samsung/smdkv310/smdkv310.c
 create mode 100644 include/configs/smdkv310.h
 create mode 100644 mmc_spl/board/samsung/smdkv310/Makefile
 create mode 100644 mmc_spl/board/samsung/smdkv310/mmc_boot.c
 create mode 100644 mmc_spl/board/samsung/smdkv310/tools/mkv310_image.c
 create mode 100644 mmc_spl/board/samsung/smdkv310/u-boot.lds

--
1.7.4.1

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


[U-Boot] [PATCH v3 2/2] ARMV7: MMC SPL Boot support for SMDKV310 board

2011-05-19 Thread Chander Kashyap
Added MMC SPL boot support for SMDKV310. This framework design is
based on nand_spl support.

Signed-off-by: Chander Kashyap 
---
Changes for v3:
- spl file renamed to u-boot-mmc-spl.bin
- spl directory renamed to mmc_spl
- comments added in mkv310_image.c file

 Makefile   |   11 ++
 mmc_spl/board/samsung/smdkv310/Makefile|  105 ++
 mmc_spl/board/samsung/smdkv310/mmc_boot.c  |   81 ++
 .../board/samsung/smdkv310/tools/mkv310_image.c|  116 
 mmc_spl/board/samsung/smdkv310/u-boot.lds  |   86 +++
 5 files changed, 399 insertions(+), 0 deletions(-)
 create mode 100644 mmc_spl/board/samsung/smdkv310/Makefile
 create mode 100644 mmc_spl/board/samsung/smdkv310/mmc_boot.c
 create mode 100644 mmc_spl/board/samsung/smdkv310/tools/mkv310_image.c
 create mode 100644 mmc_spl/board/samsung/smdkv310/u-boot.lds

diff --git a/Makefile b/Makefile
index 384a59e..25b87b0 100644
--- a/Makefile
+++ b/Makefile
@@ -322,6 +322,10 @@ ALL += $(obj)u-boot-onenand.bin
 ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
 endif

+ifeq ($(CONFIG_MMC_U_BOOT),y)
+ALL += $(obj)mmc_spl/u-boot-mmc-spl.bin
+endif
+
 all:   $(ALL)

 $(obj)u-boot.hex:  $(obj)u-boot
@@ -413,6 +417,11 @@ onenand_ipl:   $(TIMESTAMP_FILE) $(VERSION_FILE) 
$(obj)include/autoconf.mk
 $(obj)u-boot-onenand.bin:  onenand_ipl $(obj)u-boot.bin
cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin

+mmc_spl:   $(TIMESTAMP_FILE) $(VERSION_FILE) depend
+   $(MAKE) -C mmc_spl/board/$(BOARDDIR) all
+
+$(obj)mmc_spl/u-boot-mmc-spl.bin:  mmc_spl
+
 $(VERSION_FILE):
@( localvers='$(shell $(TOPDIR)/tools/setlocalversion 
$(TOPDIR))' ; \
   printf '#define PLAIN_VERSION "%s%s"\n' \
@@ -1123,6 +1132,7 @@ clean:
@rm -f $(obj)lib/asm-offsets.s
@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,System.map}
@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map}
+   @rm -f 
$(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin}
@rm -f $(ONENAND_BIN)
@rm -f $(obj)onenand_ipl/u-boot.lds
@rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
@@ -1147,6 +1157,7 @@ clobber:  clean
@rm -fr $(obj)include/generated
@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l 
-print | xargs rm -f
@[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l 
-print | xargs rm -f
+   @[ ! -d $(obj)mmc_spl ] || find $(obj)mmc_spl -name "*" -type l -print 
| xargs rm -f

 ifeq ($(OBJTREE),$(SRCTREE))
 mrproper \
diff --git a/mmc_spl/board/samsung/smdkv310/Makefile 
b/mmc_spl/board/samsung/smdkv310/Makefile
new file mode 100644
index 000..f1ce066
--- /dev/null
+++ b/mmc_spl/board/samsung/smdkv310/Makefile
@@ -0,0 +1,105 @@
+#
+# (C) Copyright 2006-2007
+# Stefan Roese, DENX Software Engineering, s...@denx.de.
+#
+# (C) Copyright 2008
+# Guennadi Liakhovetki, DENX Software Engineering, 
+#
+# (C) Copyright 2011
+# Chander Kashyap, Samsung Electronics, 
+#
+# 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
+#
+
+CONFIG_MMC_SPL = y
+
+include $(TOPDIR)/config.mk
+
+LDSCRIPT= $(TOPDIR)/mmc_spl/board/$(BOARDDIR)/u-boot.lds
+LDFLAGS= -Bstatic -T $(mmcobj)u-boot.lds -Ttext 
$(CONFIG_SYS_TEXT_BASE) $(PLATFORM_LDFLAGS)
+AFLAGS += -DCONFIG_MMC_SPL
+CFLAGS += -DCONFIG_MMC_SPL
+CFLAGS += -DCONFIG_PRELOADER
+
+SOBJS  = start.o mem_setup.o lowlevel_init.o
+COBJS  = mmc_boot.o
+
+SRCS   := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+__OBJS := $(SOBJS) $(COBJS)
+LNDIR  := $(OBJTREE)/mmc_spl/board/$(BOARDDIR)
+
+mmcobj := $(OBJTREE)/mmc_spl/
+
+
+MKV310_MMC_SPL_EXEC = mkv310_mmc_spl_exec
+MMC_SPL_BIN = u-boot-mmc-spl.bin
+
+ALL = $(mmcobj)u-boot-spl $(mmcobj)u-boot-spl.bin $(mmcobj)$(MMC_SPL_BIN)
+
+all:$(obj).depend $(ALL)
+
+$(mmcobj)$(MMC_SPL_BIN):  $(mmcobj)u-boot-spl.bin tools/$(MKV310_MMC_SPL_EXEC)
+   ./tools/$(MKV310_MMC_SPL_EXEC) $(mmcobj)u-boot-spl.bin 
$(mmcobj)$(MMC_SPL_BIN)
+   rm -f tools/$(MKV310_MMC_SPL_EXEC)
+
+tools/$(MKV310

[U-Boot] [PATCH v3 1/2] ARMV7: Add support for Samsung SMDKV310 Board

2011-05-19 Thread Chander Kashyap
SMDKV310 board is based on Samsung S5PV310 SOC. This SOC is very much
similar to S5PC210.

Signed-off-by: Chander Kashyap 
Signed-off-by: Tushar Behera 
---
Changes for v2:
- Coding Style Cleanup
- Removed unwanted macros from board config file.
- Ethernet controllor configuration is done using gpio structures.
- MMC Controllor gpio configuration corrected.
- Added MAINTAINERS entry.
- Removed unwanted code from mem_setup.S.
Changes for v3:
- Comment style fixed
- Added New macro in board config file.

 MAINTAINERS|4 +
 board/samsung/smdkv310/Makefile|   46 +++
 board/samsung/smdkv310/lowlevel_init.S |  470 
 board/samsung/smdkv310/mem_setup.S |  365 +
 board/samsung/smdkv310/smdkv310.c  |  136 +
 boards.cfg |1 +
 include/configs/smdkv310.h |  169 
 7 files changed, 1191 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/smdkv310/Makefile
 create mode 100644 board/samsung/smdkv310/lowlevel_init.S
 create mode 100644 board/samsung/smdkv310/mem_setup.S
 create mode 100644 board/samsung/smdkv310/smdkv310.c
 create mode 100644 include/configs/smdkv310.h

diff --git a/MAINTAINERS b/MAINTAINERS
index e2c48a8..a3f6ef2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -702,6 +702,10 @@ Minkyu Kang 
s5p_goniARM ARMV7 (S5PC110 SoC)
s5pc210_universal   ARM ARMV7 (S5PC210 SoC)

+Chander Kashyap 
+
+   SMDKV310ARM ARMV7 (S5PC210 SoC)
+
 Frederik Kriewitz 

devkit8000  ARM ARMV7 (OMAP3530 SoC)
diff --git a/board/samsung/smdkv310/Makefile b/board/samsung/smdkv310/Makefile
new file mode 100644
index 000..8e9b703
--- /dev/null
+++ b/board/samsung/smdkv310/Makefile
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2011 Samsung Electronics
+#
+# 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).o
+
+SOBJS  := mem_setup.o
+SOBJS  += lowlevel_init.o
+COBJS  += smdkv310.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+all:$(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/samsung/smdkv310/lowlevel_init.S 
b/board/samsung/smdkv310/lowlevel_init.S
new file mode 100644
index 000..359cff4
--- /dev/null
+++ b/board/samsung/smdkv310/lowlevel_init.S
@@ -0,0 +1,470 @@
+/*
+ * Lowlevel setup for SMDKV310 board based on S5PC210
+ *
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include 
+#include 
+#include 
+
+/*
+ * Register usages:
+ *
+ * r5 has zero always
+ * r7 has GPIO part1 base 0x1140
+ * r6 has GPIO part2 base 0x1100
+ */
+
+#define MEM_DLLl_ON
+
+_TEXT_BASE:
+   .word   CONFIG_SYS_TEXT_BASE
+
+   .globl lowlevel_init
+lowlevel_init:
+   push{lr}
+
+   /* r5 has always zero */
+   mov r5, #0
+   ldr r7, =S5PC210_GPIO_PART1_BASE
+   ldr r6, =S5PC210_GPIO_PART2_BASE
+
+   /* check reset status  */
+   ldr r0, =(S5PC210_POWER_BASE + 0x81C) 

Re: [U-Boot] OMAP5912 -- Status? -- Identified as ARM926EJS start.S problem

2011-05-19 Thread Igor Grinberg
On 05/19/11 11:12, James Harris wrote:

> Hi Igor,
>
> Thanks for your prompt response.
> I've made similar modifications to the omap5912osk over the past number of 
> days with no success...

:(

> The problem appears deeper than just providing these definitions, which as 
> you say, requires actual hardware to test with :)

Exactly, I had to make it compile so I can compile test some other patch.
So I took some values from another board with the same SoC that looked sane to 
me.
And put there a "FIXME" comment...

> I've gone back to 2010.09 release and it now works very nicely!
>
> I chose that version as it is just prior to the relocation changes applied in 
> the arch/arm/cpu/arm926ejs/start.S file:
> 2010-09-19 Heiko Schocher ARM: implement relocation for ARM926
>
> That change would certainly cause out-of-box compilation failures, however I 
> am not sure whether it was that change or possibly the following change:
> 2010-10-13 Albert Aribaud arm: implement ELF relocations
> that causes the runtime failure...

Added Heiko and Albert to cc.

> I may investigate further, however, at this stage I can "move on" using the 
> 2010.09 release.
>
> As an aside: Using U-Boot 2010.09 also resolves a problem I was having with 
> u-boot V1.1.1:
> The V2.6.32 linux kernel could not be booted when mem=32M was passed using 
> u-boot V1.1.1
> However when I tried earlier today, through pure desperation, passing mem=16M 
> it did boot.
> Now under u-boot 2010.09 the Linux kernel boots just fine with mem=32M
>
> Cheers,
>
> James
>
>
> ...
>  
> James Harris
>
> T  +61 8 8104 5253
> E   jhar...@ellex.com
> ...
>
> -Original Message-
> From: Igor Grinberg [mailto:grinb...@compulab.co.il] 
> Sent: Thursday, 19 May 2011 5:09 PM
> To: James Harris
> Cc: u-boot@lists.denx.de; ri...@ti.com
> Subject: Re: [U-Boot] OMAP5912 -- Status?
>
> Hi James,
>
> On 05/19/11 10:07, James Harris wrote:
>
>> Greetings all,
>>
>>  
>>
>> Over the past few days I've been trying to get u-boot 2011.03 for the 
>> omap5912osk working.
>>
>>  
>>
>> Support for the target appears to have stagnated...
>>
>>  
>>
>> "Out of the box" the omap5912osk (and omap1610inn) target fails to 
>> compile due to the following missing symbols:
>>
>> CONFIG_SYS_SDRAM_BASE
>>
>> CONFIG_SYS_INIT_SP_ADDR
> I've send a patch [1] which hopefully fixes omap1610inn and omap1610h2.
> I can't test is as I don't have this hardware.
> It is currently waiting for Sandeep's approval.
>
> [1]
> http://www.mail-archive.com/u-boot@lists.denx.de/msg52157.html
>
>
>
> --
> Regards,
> Igor.
>
>

-- 
Regards,
Igor.

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


Re: [U-Boot] [PATCH v3 3/4] MX5: Introduce a function for setting the chip select size

2011-05-19 Thread Fabio Estevam
Hi Stefano,

On Thu, May 19, 2011 at 5:46 AM, Stefano Babic  wrote:
> On 05/18/2011 10:47 PM, Fabio Estevam wrote:
>> Signed-off-by: Fabio Estevam 
>> ---
>
> Hi Fabio,
>
>> +void set_chipselect_size(int const cs_size)
>> +{
>> +     unsigned int reg;
>> +     struct iomuxc *iomuxc_regs = (struct weim *)IOMUXC_BASE_ADDR;
>> +     reg = readl(&iomuxc_regs->gpr1);
>> +
>> +     switch (cs_size) {
>> +     case CS0_128:
>> +             reg &= ~0x7;    /* CS0=128MB, CS1=0, CS2=0, CS3=0 */
>> +             reg |= 0x5;
>> +             break;
>> +     case CS0_64M_CS1_64M:
>> +             reg &= ~0x3F;   /* CS0=64MB, CS1=64MB, CS2=0, CS3=0 */
>> +             reg |= 0x1B;
>> +             break;
>> +     case CS0_64M_CS1_32M_CS2_32M:
>> +             reg &= ~0x1FF;  /* CS0=64MB, CS1=32MB, CS2=32MB, CS3=0 */
>> +             reg |= 0x4B;
>> +             break;
>> +     case CS0_32M_CS1_32M_CS2_32M_CS3_32M:
>> +             reg &= ~0xFFF;  /* CS0=32MB, CS1=32MB, CS2=32MB, CS3=32MB */
>> +             reg |= 0x249;
>> +             break;
>> +     default:
>> +             printf("Unknown chip select size\n");
>> +             break;
>> +     }
>> +
>> +     writel(reg, &iomuxc_regs->gpr1);
>> +}
>
> mmmhhh...it seems to me not complete, because not all combinations are
> covered.

Yes, it is complete. Only these four combinations are allowed as per
the MX53 Reference Manual.

>And setting fixed values in the switch constraints us to have
> very long defines, as CS0_32M_CS1_32M_CS2_32M_CS3_32M.

I can change the very long defines if you want.

I thought initially on doing the generic function as you described,
but then we would need to check for only the 4 valid combinations.
Then I came with this implementation that only handle the 4 possible
cases.

Let me know what you think.

Regards,

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


[U-Boot] Warning: message 1QM9ew-0002CZ-0r delayed 48 hours

2011-05-19 Thread Mail Delivery System
This message was created automatically by mail delivery software.
A message that you sent has not yet been delivered to one or more of its
recipients after more than 48 hours on the queue on srv-01.kinhteviet.com.

The message identifier is: 1QM9ew-0002CZ-0r
The subject of the message is: w...@mail.ovi.com
The date of the message is:Tue, 17 May 2011 09:04:51 +0700

The address to which the message has not yet been delivered is:

  w...@mail.ovi.com

No action is required on your part. Delivery attempts will continue for
some time, and this warning may be repeated at intervals if the message
remains undelivered. Eventually the mail delivery software will give up,
and when that happens, the message will be returned to you.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/4] MX5: Introduce a function for setting the chip select size

2011-05-19 Thread Stefano Babic
On 05/19/2011 01:49 PM, Fabio Estevam wrote:
> Hi Stefano,
> 

Hi Fabio,

>>
>> mmmhhh...it seems to me not complete, because not all combinations are
>> covered.
> 
> Yes, it is complete. Only these four combinations are allowed as per
> the MX53 Reference Manual.
> 
>> And setting fixed values in the switch constraints us to have
>> very long defines, as CS0_32M_CS1_32M_CS2_32M_CS3_32M.
> 
> I can change the very long defines if you want.
> 
> I thought initially on doing the generic function as you described,
> but then we would need to check for only the 4 valid combinations.
> Then I came with this implementation that only handle the 4 possible
> cases.

I made the same mistake and I was convinced that all combinations are
possible. I understand why you changed in this way and I agree with this
implementation, thanks for clarification.

Acked-by: Stefano Babic 

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


[U-Boot] [PATCH 1/2] mx53smd: Fix build issue due to BOARD_LATE_INIT

2011-05-19 Thread Fabio Estevam
board_late_init function is not used, so remove BOARD_LATE_INIT from config 
file.

Fix the following error:

arch/arm/lib/libarm.o: In function `board_init_r':
/home/fabio/u-boot-imx/arch/arm/lib/board.c:590: undefined reference to 
`board_late_init'

Signed-off-by: Fabio Estevam 
---
 include/configs/mx53smd.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/include/configs/mx53smd.h b/include/configs/mx53smd.h
index 356ee10..e64ff98 100644
--- a/include/configs/mx53smd.h
+++ b/include/configs/mx53smd.h
@@ -42,7 +42,6 @@
 #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
 
 #define CONFIG_BOARD_EARLY_INIT_F
-#define BOARD_LATE_INIT
 #define CONFIG_MXC_GPIO
 
 #define CONFIG_MXC_UART
-- 
1.6.0.4


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


[U-Boot] [PATCH 2/2] mx53smd: Configure two banks of DDR

2011-05-19 Thread Fabio Estevam
Signed-off-by: Fabio Estevam 
---
 board/freescale/mx53smd/mx53smd.c |   18 +++---
 include/configs/mx53smd.h |3 +++
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mx53smd/mx53smd.c 
b/board/freescale/mx53smd/mx53smd.c
index 2d158f7..f3c433f 100644
--- a/board/freescale/mx53smd/mx53smd.c
+++ b/board/freescale/mx53smd/mx53smd.c
@@ -42,11 +42,23 @@ u32 get_board_rev(void)
 
 int dram_init(void)
 {
-   /* dram_init must store complete ramsize in gd->ram_size */
-   gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE,
-   PHYS_SDRAM_1_SIZE);
+   u32 size1, size2;
+
+   size1 = get_ram_size((volatile void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
+   size2 = get_ram_size((volatile void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
+
+   gd->ram_size = size1 + size2;
+
return 0;
 }
+void dram_init_banksize(void)
+{
+   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+   gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+
+   gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+   gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+}
 
 static void setup_iomux_uart(void)
 {
diff --git a/include/configs/mx53smd.h b/include/configs/mx53smd.h
index e64ff98..65d5e05 100644
--- a/include/configs/mx53smd.h
+++ b/include/configs/mx53smd.h
@@ -165,6 +165,9 @@
 #define CONFIG_NR_DRAM_BANKS   2
 #define PHYS_SDRAM_1   CSD0_BASE_ADDR
 #define PHYS_SDRAM_1_SIZE  (512 * 1024 * 1024)
+#define PHYS_SDRAM_2   CSD1_BASE_ADDR
+#define PHYS_SDRAM_2_SIZE  (512 * 1024 * 1024)
+#define PHYS_SDRAM_SIZE (PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE)
 
 #define CONFIG_SYS_SDRAM_BASE  (PHYS_SDRAM_1)
 #define CONFIG_SYS_INIT_RAM_ADDR   (IRAM_BASE_ADDR)
-- 
1.6.0.4


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


Re: [U-Boot] [PATCH 2/2] mx53smd: Configure two banks of DDR

2011-05-19 Thread Stefano Babic
On 05/19/2011 03:44 PM, Fabio Estevam wrote:
> Signed-off-by: Fabio Estevam 
> ---
>  board/freescale/mx53smd/mx53smd.c |   18 +++---
>  include/configs/mx53smd.h |3 +++
>  2 files changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/board/freescale/mx53smd/mx53smd.c 
> b/board/freescale/mx53smd/mx53smd.c
> index 2d158f7..f3c433f 100644
> --- a/board/freescale/mx53smd/mx53smd.c
> +++ b/board/freescale/mx53smd/mx53smd.c
> @@ -42,11 +42,23 @@ u32 get_board_rev(void)
>  
>  int dram_init(void)
>  {
> - /* dram_init must store complete ramsize in gd->ram_size */
> - gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE,
> - PHYS_SDRAM_1_SIZE);
> + u32 size1, size2;
> +
> + size1 = get_ram_size((volatile void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
> + size2 = get_ram_size((volatile void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
> +
> + gd->ram_size = size1 + size2;
> +
>   return 0;

mmmhhh...I merged your first patch on this board, but I have not yet
request a pull to u-boot arm. These two patches solved two problems with
the first patch. What do you think if I squash all three patches together ?

Regards,
Stefano

-- 
=
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 2/2] mx53smd: Configure two banks of DDR

2011-05-19 Thread Fabio Estevam
On 5/19/2011 12:03 PM, Stefano Babic wrote:
... 
> mmmhhh...I merged your first patch on this board, but I have not yet
> request a pull to u-boot arm. These two patches solved two problems with
> the first patch. What do you think if I squash all three patches together ?

Yes, squashing the 3 patches is fine.

Thanks,

Fabio Estevam


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


[U-Boot] [PATCH] MX5: drop config.mk from efikamx board

2011-05-19 Thread Stefano Babic
Signed-off-by: Stefano Babic 
CC: Marek Vasut 
---
 board/efikamx/config.mk |   25 -
 boards.cfg  |2 +-
 2 files changed, 1 insertions(+), 26 deletions(-)
 delete mode 100644 board/efikamx/config.mk

diff --git a/board/efikamx/config.mk b/board/efikamx/config.mk
deleted file mode 100644
index 6e90671..000
--- a/board/efikamx/config.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
-#
-# 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
-#
-
-CONFIG_SYS_TEXT_BASE = 0x9780
-IMX_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/imximage.cfg
-ALL += $(obj)u-boot.imx
diff --git a/boards.cfg b/boards.cfg
index 9339981..970fa12 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -122,7 +122,7 @@ omap5912osk  arm arm926ejs   -  
 ti
 edminiv2 arm arm926ejs   -   LaCie 
 orion5x
 dkb arm arm926ejs   -   
Marvellpantheon
 ca9x4_ct_vxp arm armv7   vexpressarmltd
-efikamx  arm armv7   efikamx - 
 mx5
+efikamx  arm armv7   efikamx - 
 mx5mx51evk:IMX_CONFIG=board/efikamx/imximage.cfg
 mx51evk  arm armv7   mx51evk 
freescale  mx5
mx51evk:IMX_CONFIG=board/freescale/mx51evk/imximage.cfg
 mx53evk  arm armv7   mx53evk 
freescale  mx5
mx53evk:IMX_CONFIG=board/freescale/mx53evk/imximage.cfg
 mx53loco arm armv7   mx53loco
freescale  mx5
mx53loco:IMX_CONFIG=board/freescale/mx53loco/imximage.cfg
-- 
1.7.1

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


Re: [U-Boot] [PATCH] MX5: drop config.mk from efikamx board

2011-05-19 Thread Marek Vasut
On Thursday, May 19, 2011 05:44:23 PM Stefano Babic wrote:
> Signed-off-by: Stefano Babic 
> CC: Marek Vasut 

Acked-by: Marek Vasut 
> ---
>  board/efikamx/config.mk |   25 -
>  boards.cfg  |2 +-
>  2 files changed, 1 insertions(+), 26 deletions(-)
>  delete mode 100644 board/efikamx/config.mk
> 
> diff --git a/board/efikamx/config.mk b/board/efikamx/config.mk
> deleted file mode 100644
> index 6e90671..000
> --- a/board/efikamx/config.mk
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -#
> -# Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
> -#
> -# 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
> -#
> -
> -CONFIG_SYS_TEXT_BASE = 0x9780
> -IMX_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/imximage.cfg
> -ALL += $(obj)u-boot.imx
> diff --git a/boards.cfg b/boards.cfg
> index 9339981..970fa12 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -122,7 +122,7 @@ omap5912osk  arm arm926ejs   - 
>  ti edminiv2 arm arm926ejs   -
>   LaCie  orion5x dkb   arm
>  
arm926ejs 
>  -   Marvellpantheon ca9x4_ct_vxp
> arm armv7   vexpressarmltd -efikamx   
>   arm armv7   efikamx -  mx5
> +efikamx  arm armv7   efikamx
> -  mx5mx51evk:IMX_CONFIG=board/efikamx/imximage.cfg 
mx51evk 
> arm armv7   mx51evk freescale 
> mx5   mx51evk:IMX_CONFIG=board/freescale/mx51evk/imximage.cfg 
> mx53evk  
>arm armv7   mx53evk freescale  
>mx5mx53evk:IMX_CONFIG=board/freescale/mx53evk/imximage.cfg 
> mx53loco  
>   arm armv7   mx53locofreescale   
>   mx5 mx53loco:IMX_CONFIG=board/freescale/mx53loco/imximage.cfg
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/13] add XScale sub architecture (IXP/PXA) to board list

2011-05-19 Thread Marek Vasut
On Wednesday, January 26, 2011 08:30:35 AM Wolfgang Denk wrote:
> Dear Michael Schwingen,
> 
> In message <4d3f5f45.4020...@discworld.dascon.de> you wrote:
> > > That's not a "board list", but the MAINTAINERS file (I would
> > > expect changes to boards.cfg when I read "board list").
> > 
> > Right. Do you waht a patch with an updated comment?
> 
> Yes, please.
> 
> > >> -wepep250xscale
> > >> +wepep250xscale/pxa (removed)
> > > 
> > > What does "removed" mean? When it's removed, then please remove.
> > 
> > It looks like it is already removed - I could not find support for that
> > board in the current code, but I think removing maintainers is nothing
> > *I* should do without further discussion?
> 
> Well, this got removed by Marek in commit 7369478.
> 
> 
> Marek, it seems you forgot to clean up MAINTAINERS, and also to add
> the removed boards to the "doc/README.scrapyard" file.  Can you please
> provide cleanup patches for these commits:
> 
> 4262a7c   2010-10-22 01:38:01 +0200   PXA: Remove "xsengine" board
> 7369478   2010-10-22 01:38:01 +0200   PXA: Remove "wepep250" board
> 75e2035   2010-10-22 01:38:01 +0200   PXA: Remove "delta" board

Damn, I'm still missing this in !

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


[U-Boot] [PATCH] mx51evk: Fix number of DDR banks

2011-05-19 Thread Fabio Estevam
MX51EVK board has 2 banks of 256MB DDR memories instead of a single one with 
512MB.

Signed-off-by: Fabio Estevam 
---
 board/freescale/mx51evk/mx51evk.c |   18 +++---
 include/configs/mx51evk.h |7 +--
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/board/freescale/mx51evk/mx51evk.c 
b/board/freescale/mx51evk/mx51evk.c
index e2d3d74..ef7c6e4 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -52,11 +52,23 @@ u32 get_board_rev(void)
 
 int dram_init(void)
 {
-   /* dram_init must store complete ramsize in gd->ram_size */
-   gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE,
-   PHYS_SDRAM_1_SIZE);
+   u32 size1, size2;
+
+   size1 = get_ram_size((volatile void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
+   size2 = get_ram_size((volatile void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
+
+   gd->ram_size = size1 + size2;
+
return 0;
 }
+void dram_init_banksize(void)
+{
+   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+   gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+
+   gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+   gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+}
 
 static void setup_iomux_uart(void)
 {
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index 207b20c..2dc3dff 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -198,9 +198,12 @@
 /*---
  * Physical Memory Map
  */
-#define CONFIG_NR_DRAM_BANKS   1
+#define CONFIG_NR_DRAM_BANKS   2
 #define PHYS_SDRAM_1   CSD0_BASE_ADDR
-#define PHYS_SDRAM_1_SIZE  (512 * 1024 * 1024)
+#define PHYS_SDRAM_1_SIZE  (256 * 1024 * 1024)
+#define PHYS_SDRAM_2   CSD1_BASE_ADDR
+#define PHYS_SDRAM_2_SIZE  (256 * 1024 * 1024)
+#define PHYS_SDRAM_SIZE(PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE)
 
 #define CONFIG_SYS_SDRAM_BASE  (PHYS_SDRAM_1)
 #define CONFIG_SYS_INIT_RAM_ADDR   (IRAM_BASE_ADDR)
-- 
1.6.0.4


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


[U-Boot] [PATCH v2 0/4] introduce nand write.trimffs

2011-05-19 Thread Ben Gardiner
This series adds a nand write variant which implements the procedure
reccomended in the UBI FAQ [1] of dropping trailing pages of eraseblocks
containing entirely 0xff's.

[1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo

Changes since v1:
 * renamed to 'trimffs' from 'ubi'
 * wrapped the new feature in #ifdefs
 * don't make it default for jffs -- patch dropped
 * attribution of the drop_ffs() function from mtd-utils to Artem

Ben Gardiner (4):
  [v2] nand_base: trivial: fix comment read/write comment
  [v2] nand_util: convert nand_write_skip_bad() to flags
  [v2] nand_util: drop trailing all-0xff pages if requested
  [v2] cmd_nand: add nand write.trimffs command

 common/cmd_nand.c|   22 +++-
 drivers/mtd/nand/nand_base.c |2 +-
 drivers/mtd/nand/nand_util.c |   43 +++--
 include/nand.h   |7 +-
 4 files changed, 63 insertions(+), 11 deletions(-)

-- 
1.7.4.1

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


[U-Boot] [PATCH 1/4] [v2] nand_base: trivial: fix comment read/write comment

2011-05-19 Thread Ben Gardiner
Replace an incorrect 'read' with 'write' in a comment.

Signed-off-by: Ben Gardiner 

---
Changes since v1:
 * rebased to HEAD of git://git.denx.de/u-boot-nand-flash.git : ff7b4a0
   ("env_nand: zero-initialize variable nand_erase_options")

---
 drivers/mtd/nand/nand_base.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 52f8575..1a95a91 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1950,7 +1950,7 @@ static int nand_write(struct mtd_info *mtd, loff_t to, 
size_t len,
struct nand_chip *chip = mtd->priv;
int ret;
 
-   /* Do not allow reads past end of device */
+   /* Do not allow writes past end of device */
if ((to + len) > mtd->size)
return -EINVAL;
if (!len)
-- 
1.7.4.1

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


[U-Boot] [PATCH 3/4] [v2] nand_util: drop trailing all-0xff pages if requested

2011-05-19 Thread Ben Gardiner
Add a flag to nand_read_skip_bad() such that if true, any trailing
pages in an eraseblock whose contents are entirely 0xff will be
dropped.

The implementation is via a new drop_ffs() function which is
based on the function of the same name from the ubiformat
utility by Artem Bityutskiy.

This is as-per the reccomendations of the UBI FAQ [1]

Signed-off-by: Ben Gardiner 
CC: Artem Bityutskiy 

[1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo

---

This behaviour was found to fix both UBI and JFFS2 images written to
cleanly erased NAND partitions on da850evm.

Changes since v1:
 * rebased to HEAD of git://git.denx.de/u-boot-nand-flash.git : ff7b4a0
   ("env_nand: zero-initialize variable nand_erase_options")
 * wrap the new functionality in a CONFIG_CMD_NAND_TRIMFFS ifdef to
   reduce size impact of new feature

---
 drivers/mtd/nand/nand_util.c |   32 +---
 include/nand.h   |1 +
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 03ccd02..2bfe743 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -436,6 +436,24 @@ static int check_skip_len(nand_info_t *nand, loff_t 
offset, size_t length)
return ret;
 }
 
+#ifdef CONFIG_CMD_NAND_TRIMFFS
+static size_t drop_ffs(const nand_info_t *nand, const u_char *buf,
+   const size_t *len)
+{
+   size_t i, l = *len;
+
+   for (i = l - 1; i >= 0; i--)
+   if (((const uint8_t *)buf)[i] != 0xFF)
+   break;
+
+   /* The resulting length must be aligned to the minimum flash I/O size */
+   l = i + 1;
+   l = (l + nand->writesize - 1) / nand->writesize;
+   l *=  nand->writesize;
+   return l;
+}
+#endif
+
 /**
  * nand_write_skip_bad:
  *
@@ -499,7 +517,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, 
size_t *length,
return -EINVAL;
}
 
-   if (!need_skip) {
+   if (!need_skip && !(flags & WITH_DROP_FFS)) {
rval = nand_write (nand, offset, length, buffer);
if (rval == 0)
return 0;
@@ -512,7 +530,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, 
size_t *length,
 
while (left_to_write > 0) {
size_t block_offset = offset & (nand->erasesize - 1);
-   size_t write_size;
+   size_t write_size, truncated_write_size;
 
WATCHDOG_RESET ();
 
@@ -558,7 +576,15 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, 
size_t *length,
else
 #endif
{
-   rval = nand_write (nand, offset, &write_size, p_buffer);
+   truncated_write_size = write_size;
+#ifdef CONFIG_CMD_NAND_TRIMFFS
+   if (flags & WITH_DROP_FFS)
+   truncated_write_size = drop_ffs(nand, p_buffer,
+   &write_size);
+#endif
+
+   rval = nand_write(nand, offset, &truncated_write_size,
+   p_buffer);
offset += write_size;
p_buffer += write_size;
}
diff --git a/include/nand.h b/include/nand.h
index 95b83a0..a5368e2 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -116,6 +116,7 @@ int nand_read_skip_bad(nand_info_t *nand, loff_t offset, 
size_t *length,
   u_char *buffer);
 
 #define WITH_YAFFS_OOB (1 << 0) /* whether write with yaffs format */
+#define WITH_DROP_FFS  (1 << 1) /* drop trailing all-0xff pages */
 #define WITH_DEFAULTS  0
 
 int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
-- 
1.7.4.1

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


[U-Boot] [PATCH 2/4] [v2] nand_util: convert nand_write_skip_bad() to flags

2011-05-19 Thread Ben Gardiner
In a future commit the behaviour of nand_write_skip_bad()
will be further extended.

Convert the only flag currently passed to the nand_write_
skip_bad() function to a bitfield of only one allocated
member. This should avoid an explosion of int's at the
end of the parameter list or the ambiguous calls like

nand_write_skip_bad(info, offset, len, buf, 0, 1, 1);
nand_write_skip_bad(info, offset, len, buf, 0, 1, 0);

Instead there will be:

nand_write_skip_bad(info, offset, len, buf, WITH_YAFFS_OOB |
WITH_OTHER);

Signed-off-by: Ben Gardiner 
CC: Detlev Zundel 

---
Changes since v1:
 * rebased to HEAD of git://git.denx.de/u-boot-nand-flash.git : ff7b4a0
   ("env_nand: zero-initialize variable nand_erase_options")
 * renamed the flag from WITH_OOB to WITH_YAFFS_OOB (Detlev Zundel)
 * introduce 'WITH_DEFAULTS' flag defined as 0 so as to convert also
   the remaining nand_write_skip_bad() call (Detlev Zundel)

---
 common/cmd_nand.c|6 --
 drivers/mtd/nand/nand_util.c |8 
 include/nand.h   |6 +-
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 7bd37de..cb752c1 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -574,14 +574,16 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
 (u_char *)addr);
else
ret = nand_write_skip_bad(nand, off, &rwsize,
- (u_char *)addr, 0);
+ (u_char *)addr,
+ WITH_DEFAULTS);
 #ifdef CONFIG_CMD_NAND_YAFFS
} else if (!strcmp(s, ".yaffs")) {
if (read) {
printf("Unknown nand command suffix '%s'.\n", 
s);
return 1;
}
-   ret = nand_write_skip_bad(nand, off, &rwsize, (u_char 
*)addr, 1);
+   ret = nand_write_skip_bad(nand, off, &rwsize,
+   (u_char *)addr, WITH_YAFFS_OOB);
 #endif
} else if (!strcmp(s, ".oob")) {
/* out-of-band data */
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 5a6f7ae..03ccd02 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -448,11 +448,11 @@ static int check_skip_len(nand_info_t *nand, loff_t 
offset, size_t length)
  * @param offset   offset in flash
  * @param length   buffer length
  * @param bufferbuffer to read from
- * @param withoob  whether write with yaffs format
+ * @param flagsflags mmofying the behaviour of the write to 
NAND
  * @return 0 in case of success
  */
 int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
-   u_char *buffer, int withoob)
+   u_char *buffer, int flags)
 {
int rval = 0, blocksize;
size_t left_to_write = *length;
@@ -460,7 +460,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, 
size_t *length,
int need_skip;
 
 #ifdef CONFIG_CMD_NAND_YAFFS
-   if (withoob) {
+   if (flags & WITH_YAFFS_OOB) {
int pages;
pages = nand->erasesize / nand->writesize;
blocksize = (pages * nand->oobsize) + nand->erasesize;
@@ -529,7 +529,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, 
size_t *length,
write_size = blocksize - block_offset;
 
 #ifdef CONFIG_CMD_NAND_YAFFS
-   if (withoob) {
+   if (flags & WITH_YAFFS_OOB) {
int page, pages;
size_t pagesize = nand->writesize;
size_t pagesize_oob = pagesize + nand->oobsize;
diff --git a/include/nand.h b/include/nand.h
index 7459bd0..95b83a0 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -114,8 +114,12 @@ typedef struct nand_erase_options nand_erase_options_t;
 
 int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
   u_char *buffer);
+
+#define WITH_YAFFS_OOB (1 << 0) /* whether write with yaffs format */
+#define WITH_DEFAULTS  0
+
 int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
-   u_char *buffer, int withoob);
+   u_char *buffer, int flags);
 int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts);
 
 #define NAND_LOCK_STATUS_TIGHT 0x01
-- 
1.7.4.1

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


[U-Boot] [PATCH 4/4] [v2] cmd_nand: add nand write.trimffs command

2011-05-19 Thread Ben Gardiner
Add another nand write. variant, trimffs. This command will request of
nand_write_skip_bad() that all trailing all-0xff pages will be
dropped from eraseblocks when they are written to flash as-per the
reccommended behaviour of the UBI FAQ [1].

The function that implements this timming is the drop_ffs() function
by Artem Bityutskiy, ported from the mtd-utils tree.

[1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo

Signed-off-by: Ben Gardiner 
CC: Artem Bityutskiy 
CC: Detlev Zundel 

---

Detlev,
I did not do any erased-state checks since the implicit assumption
in other nand commands is that the user is required to do their
own erasing beforehand.

Changes since v1:
 * rebased to HEAD of git://git.denx.de/u-boot-nand-flash.git : ff7b4a0
   ("env_nand: zero-initialize variable nand_erase_options")
 * renamed the command variant to '.trimffs' from '.ubi' (Detlev Zundel)
 * added attribution to mtd-utils and Artem Bityutskiy in both the source
   comments and commit message
 * wrapped the new command in a new ifdef, CONFIG_CMD_NAND_TRIMFFS, to
   reduce the size impact of this new feature

---
 common/cmd_nand.c|   16 
 drivers/mtd/nand/nand_util.c |3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index cb752c1..51d726c 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -576,6 +576,16 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
ret = nand_write_skip_bad(nand, off, &rwsize,
  (u_char *)addr,
  WITH_DEFAULTS);
+#ifdef CONFIG_CMD_NAND_TRIMFFS
+   } else if (!strcmp(s, ".trimffs")) {
+   if (read) {
+   printf("Unknown nand command suffix '%s'\n", s);
+   return 1;
+   }
+   ret = nand_write_skip_bad(nand, off, &rwsize,
+   (u_char *)addr,
+   WITH_DROP_FFS);
+#endif
 #ifdef CONFIG_CMD_NAND_YAFFS
} else if (!strcmp(s, ".yaffs")) {
if (read) {
@@ -690,6 +700,12 @@ U_BOOT_CMD(
"nand write - addr off|partition size\n"
"read/write 'size' bytes starting at offset 'off'\n"
"to/from memory address 'addr', skipping bad blocks.\n"
+#ifdef CONFIG_CMD_NAND_TRIMFFS
+   "nand write.trimffs - addr off|partition size\n"
+   "write 'size' bytes starting at offset 'off' from memory address\n"
+   "'addr', skipping bad blocks and dropping any pages at the end\n"
+   "of eraseblocks that contain only 0xFF\n"
+#endif
 #ifdef CONFIG_CMD_NAND_YAFFS
"nand write.yaffs - addr off|partition size\n"
"write 'size' bytes starting at offset 'off' with yaffs format\n"
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 2bfe743..357f332 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -11,6 +11,9 @@
  * nandwrite.c by Steven J. Hill (sjh...@realitydiluted.com)
  *and Thomas Gleixner (t...@linutronix.de)
  *
+ * Copyright (C) 2008 Nokia Corporation: drop_ffs() function by
+ * Artem Bityutskiy  from mtd-utils
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
-- 
1.7.4.1

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


[U-Boot] [PATCH] [FIX] cmd_nand: fix help of nand erase subcommand

2011-05-19 Thread Daniel Hobi
Since commit 30486322 (nand erase: .spread, .part, .chip subcommands)
the arguments off and size are no longer optional.

Signed-off-by: Daniel Hobi 
Cc: Scott Wood 
---
 common/cmd_nand.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 7bd37de..44c4d1f 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -693,7 +693,7 @@ U_BOOT_CMD(
"write 'size' bytes starting at offset 'off' with yaffs format\n"
"from memory address 'addr', skipping bad blocks.\n"
 #endif
-   "nand erase[.spread] [clean] [off [size]] - erase 'size' bytes "
+   "nand erase[.spread] [clean] off size - erase 'size' bytes "
"from offset 'off'\n"
"With '.spread', erase enough for given file size, otherwise,\n"
"'size' includes skipped bad blocks.\n"
-- 
1.7.5.1

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


Re: [U-Boot] OMAP5912 -- Status? -- Identified as ARM926EJS start.S problem

2011-05-19 Thread Wolfgang Denk
Dear "James Harris",

In message <66F0ABBCB3D267479CB73B0F4C78908F02739008@ellex-adc1> you wrote:
> 
> I've made similar modifications to the omap5912osk over the past number of
> days with no success...
> The problem appears deeper than just providing these definitions, which as
> you say, requires actual hardware to test with :)

We still have an omap5912osk in our lab. If you can wait a bit for
the results, I can run a test or another.


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
Landru! Guide us!
-- A Beta 3-oid, "The Return of the Archons", stardate 3157.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/2] SMDKV310 Board Support

2011-05-19 Thread Wolfgang Denk
Dear Chander Kashyap,

In message <1305796982-7155-1-git-send-email-chander.kash...@linaro.org> you 
wrote:
>
> This patchset adds support for a new board SMDKV310, based on S5PV310 SOC.
> This SOC is very similar to S5PC210 SOC, hence we are re-using this SOC code.

Which patchset? I see only this cover letter, but neither patch 1/2
nor patch 2.2 ?

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
Life is a game. Money is how we keep score.  - Ted Turner
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/4] MX5: Introduce a function for setting the chip select size

2011-05-19 Thread Wolfgang Denk
Dear Fabio Estevam,

In message <1305751670-30808-3-git-send-email-fabio.este...@freescale.com> you 
wrote:
> Signed-off-by: Fabio Estevam 
> ---
>  arch/arm/cpu/armv7/mx5/soc.c  |   30 
> +
>  arch/arm/include/asm/arch-mx5/imx-regs.h  |5 
>  arch/arm/include/asm/arch-mx5/sys_proto.h |2 +-
>  3 files changed, 36 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c
> index 40b8b56..e599df8 100644
> --- a/arch/arm/cpu/armv7/mx5/soc.c
> +++ b/arch/arm/cpu/armv7/mx5/soc.c
> @@ -163,6 +163,36 @@ int cpu_mmc_init(bd_t *bis)
>  #endif
>  }
>  
> +void set_chipselect_size(int const cs_size)
> +{
> + unsigned int reg;
> + struct iomuxc *iomuxc_regs = (struct weim *)IOMUXC_BASE_ADDR;
> + reg = readl(&iomuxc_regs->gpr1);
> +
> + switch (cs_size) {
> + case CS0_128:
> + reg &= ~0x7;/* CS0=128MB, CS1=0, CS2=0, CS3=0 */
> + reg |= 0x5;
> + break;
> + case CS0_64M_CS1_64M:
> + reg &= ~0x3F;   /* CS0=64MB, CS1=64MB, CS2=0, CS3=0 */
> + reg |= 0x1B;
> + break;
> + case CS0_64M_CS1_32M_CS2_32M:
> + reg &= ~0x1FF;  /* CS0=64MB, CS1=32MB, CS2=32MB, CS3=0 */
> + reg |= 0x4B;
> + break;
> + case CS0_32M_CS1_32M_CS2_32M_CS3_32M:
> + reg &= ~0xFFF;  /* CS0=32MB, CS1=32MB, CS2=32MB, CS3=32MB */
> + reg |= 0x249;
> + break;
> + default:
> + printf("Unknown chip select size\n");

In cases like this, please _always_ print _what_ the unknown chip size
was.  Please fix.

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
Hacking's just another word for nothing left to kludge.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] mx51evk: Make use of the i.MX GPIO API

2011-05-19 Thread Fabio Estevam
Make use of the i.MX GPIO API.

While at it created a separate function for the FEC PHY reset,
so that it can be decoupled from the power_init function.

Signed-off-by: Fabio Estevam 
---
 board/freescale/mx51evk/mx51evk.c |   33 +
 1 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/board/freescale/mx51evk/mx51evk.c 
b/board/freescale/mx51evk/mx51evk.c
index ef7c6e4..2dabef9 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -33,6 +33,11 @@
 #include 
 #include 
 #include 
+#include 
+
+#define MX51EVK_PHY_RESET  (1 * 32 + 14)   /* GPIO2_14 */
+#define MX51EVK_SD1_CD (0 * 32 + 0)/* GPIO1_0 */
+#define MX51EVK_SD2_CD (0 * 32 + 6)/* GPIO1_6 */
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -261,27 +266,22 @@ static void power_init(void)
pmic_reg_write(REG_MODE_1, val);
udelay(200);
 
-   reg = readl(GPIO2_BASE_ADDR + 0x0);
-   reg &= ~0x4000;  /* Lower reset line */
-   writel(reg, GPIO2_BASE_ADDR + 0x0);
-
-   reg = readl(GPIO2_BASE_ADDR + 0x4);
-   reg |= 0x4000;  /* configure GPIO lines as output */
-   writel(reg, GPIO2_BASE_ADDR + 0x4);
-
-   /* Reset the ethernet controller over GPIO */
-   writel(0x1, IOMUXC_BASE_ADDR + 0x0AC);
-
/* Enable VGEN3, VCAM, VAUDIO, VVIDEO, VSD regulators */
val = VGEN3EN | VGEN3CONFIG | VCAMEN | VCAMCONFIG |
VVIDEOEN | VAUDIOEN  | VSDEN;
pmic_reg_write(REG_MODE_1, val);
+}
+
+static void reset_phy_fec(void)
+{
+   mxc_request_iomux(MX51_PIN_EIM_A20, IOMUX_CONFIG_ALT1);
+   mxc_gpio_direction(MX51EVK_PHY_RESET, MXC_GPIO_DIRECTION_OUT);
 
+   mxc_gpio_set(MX51EVK_PHY_RESET, 0); /* Lower reset line */
+
udelay(500);
 
-   reg = readl(GPIO2_BASE_ADDR + 0x0);
-   reg |= 0x4000;
-   writel(reg, GPIO2_BASE_ADDR + 0x0);
+   mxc_gpio_set(MX51EVK_PHY_RESET, 1); /* Set reset line to high */
 }
 
 #ifdef CONFIG_FSL_ESDHC
@@ -290,9 +290,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
 
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
-   *cd = readl(GPIO1_BASE_ADDR) & 0x01;
+   *cd = mxc_gpio_get(MX51EVK_SD1_CD);
else
-   *cd = readl(GPIO1_BASE_ADDR) & 0x40;
+   *cd = mxc_gpio_get(MX51EVK_SD2_CD);
 
return 0;
 }
@@ -414,6 +414,7 @@ int board_mmc_init(bd_t *bis)
 int board_early_init_f(void)
 {
setup_iomux_uart();
+   reset_phy_fec();
setup_iomux_fec();
 
return 0;
-- 
1.6.0.4


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


[U-Boot] [PATCH v4 1/4] MX5: Make the weim structure complete

2011-05-19 Thread Fabio Estevam
Signed-off-by: Fabio Estevam 
---
Changes since v3:
- No changes
Changes since v2:
- Add CS1_BASE_ADDR for MX51
- Add WEIM Registers
 arch/arm/include/asm/arch-mx5/imx-regs.h |  131 --
 1 files changed, 125 insertions(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h 
b/arch/arm/include/asm/arch-mx5/imx-regs.h
index a1849f8..b65b11f 100644
--- a/arch/arm/include/asm/arch-mx5/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
@@ -32,6 +32,7 @@
 #define CSD0_BASE_ADDR  0x9000
 #define CSD1_BASE_ADDR  0xA000
 #define NFC_BASE_ADDR_AXI   0xCFFF
+#define CS1_BASE_ADDR   0xB800
 #elif defined(CONFIG_MX53)
 #define IPU_CTRL_BASE_ADDR  0x1800
 #define SPBA0_BASE_ADDR 0x5000
@@ -41,6 +42,7 @@
 #define CSD1_BASE_ADDR  0xB000
 #define NFC_BASE_ADDR_AXI   0xF7FF
 #define IRAM_BASE_ADDR  0xF800
+#define CS1_BASE_ADDR   0xF400
 #else
 #error "CPU_TYPE not defined"
 #endif
@@ -129,6 +131,90 @@
 #define SAHARA_BASE_ADDR   (AIPS2_BASE_ADDR + 0x000F8000)
 
 /*
+ * WEIM CSnGCR1
+ */
+#define CSEN(x)(x)
+#define SWR(x) ((x) << 1)
+#define SRD(x) ((x) << 2)
+#define MUM(x) ((x) << 3)
+#define WFL(x) ((x) << 4)
+#define RFL(x) ((x) << 5)
+#define CRE(x) ((x) << 6)
+#define CREP(x)((x) << 7)
+#define BL(x)  (((x) & 0x7) << 8)
+#define WC(x)  ((x) << 11)
+#define BCD(x) (((x) & 0x3) << 12)
+#define BCS(x) (((x) & 0x3) << 14)
+#define DSZ(x) (((x) & 0x7) << 16)
+#define SP(x)  ((x) << 19)
+#define CSREC(x)   (((x) & 0x7) << 20)
+#define AUS(x) ((x) << 23)
+#define GBC(x) (((x) & 0x7) << 24)
+#define WP(x)  ((x) << 27)
+#define PSZ(x) (((x) & 0x0f << 28)
+
+/*
+ * WEIM CSnGCR2
+ */
+#define ADH(x) (((x) & 0x3))
+#define DAPS(x)(((x) & 0x0f << 4)
+#define DAE(x) ((x) << 8)
+#define DAP(x) ((x) << 9)
+#define MUX16_BYP(x)   ((x) << 12)
+
+/*
+ * WEIM CSnRCR1
+ */
+#define RCSN(x)(((x) & 0x7))
+#define RCSA(x)(((x) & 0x7) << 4)
+#define OEN(x) (((x) & 0x7) << 8)
+#define OEA(x) (((x) & 0x7) << 12)
+#define RADVN(x)   (((x) & 0x7) << 16)
+#define RAL(x) ((x) << 19)
+#define RADVA(x)   (((x) & 0x7) << 20)
+#define RWSC(x)(((x) & 0x3f) << 24)
+
+/*
+ * WEIM CSnRCR2
+ */
+#define RBEN(x)(((x) & 0x7))
+#define RBE(x) ((x) << 3)
+#define RBEA(x)(((x) & 0x7) << 4)
+#define RL(x)  (((x) & 0x3) << 8)
+#define PAT(x) (((x) & 0x7) << 12)
+#define APR(x) ((x) << 15)
+
+/*
+ * WEIM CSnWCR1
+ */
+#define WCSN(x)(((x) & 0x7))
+#define WCSA(x)(((x) & 0x7) << 3)
+#define WEN(x) (((x) & 0x7) << 6)
+#define WEA(x) (((x) & 0x7) << 9)
+#define WBEN(x)(((x) & 0x7) << 12)
+#define WBEA(x)(((x) & 0x7) << 15)
+#define WADVN(x)   (((x) & 0x7) << 18)
+#define WADVA(x)   (((x) & 0x7) << 21)
+#define WWSC(x)(((x) & 0x3f) << 24)
+#define WBED1(x)   ((x) << 30)
+#define WAL(x) ((x) << 31)
+
+/*
+ * WEIM CSnWCR2
+ */
+#define WBED(x)(x)
+
+/*
+ * WEIM WCR
+ */
+#define BCM(x) (x)
+#define GBCD(x)(((x) & 0x3) << 1)
+#define INTEN(x)   ((x) << 4)
+#define INTPOL(x)  ((x) << 5)
+#define WDOG_EN(x) ((x) << 8)
+#define WDOG_LIMIT(x)  (((x) & 0x3) << 9)
+
+/*
  * Number of GPIO pins per port
  */
 #define GPIO_NUM_PIN32
@@ -231,12 +317,45 @@ struct clkctl {
 
 /* WEIM registers */
 struct weim {
-   u32 csgcr1;
-   u32 csgcr2;
-   u32 csrcr1;
-   u32 csrcr2;
-   u32 cswcr1;
-   u32 cswcr2;
+   u32 cs0gcr1;
+   u32 cs0gcr2;
+   u32 cs0rcr1;
+   u32 cs0rcr2;
+   u32 cs0wcr1;
+   u32 cs0wcr2;
+   u32 cs1gcr1;
+   u32 cs1gcr2;
+   u32 cs1rcr1;
+   u32 cs1rcr2;
+   u32 cs1wcr1;
+   u32 cs1wcr2;
+   u32 cs2gcr1;
+   u32 cs2gcr2;
+   u32 cs2rcr1;
+   u32 cs2rcr2;
+   u32 cs2wcr1;
+   u32 cs2wcr2;
+   u32 cs3gcr1;
+   u32 cs3gcr2;
+   u32 cs3rcr1;
+   u32 cs3rcr2;
+   u32 cs3wcr1;
+   u32 cs3wcr2;
+   u32 cs4gcr1;
+   u32 cs4gcr2;
+   u32 cs4rcr1;
+   u32 cs4rcr2;
+   u32 cs4wcr1;
+   u32 cs4wcr2;
+   u32 cs5gcr1;
+   u32 cs5gcr2;
+   u32 cs5rcr1;
+   u32 cs5rcr2;
+   u32 cs5wcr1;
+   u32 cs5wcr2;
+   u32 wcr;
+   u32 wiar;
+   u32 ear;
 };
 
 /* GPIO Registers */
-- 
1.6.0.4


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


[U-Boot] [PATCH v4 2/4] MX5: Add iomux structure

2011-05-19 Thread Fabio Estevam
Signed-off-by: Fabio Estevam 
---
Changes since v3:
- No changes
Changes since v2:
- Distinguish iomuxc struct between MX51 and MX53

 arch/arm/include/asm/arch-mx5/imx-regs.h |   23 +++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h 
b/arch/arm/include/asm/arch-mx5/imx-regs.h
index b65b11f..3c61c7f 100644
--- a/arch/arm/include/asm/arch-mx5/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
@@ -358,6 +358,29 @@ struct weim {
u32 ear;
 };
 
+#if defined(CONFIG_MX51)
+struct iomuxc {
+   u32 gpr0;
+   u32 gpr1;
+   u32 omux0;
+   u32 omux1;
+   u32 omux2;
+   u32 omux3;
+   u32 omux4;
+};
+#elif defined(CONFIG_MX53)
+struct iomuxc {
+   u32 gpr0;
+   u32 gpr1;
+   u32 gpr2;
+   u32 omux0;
+   u32 omux1;
+   u32 omux2;
+   u32 omux3;
+   u32 omux4;
+};
+#endif
+
 /* GPIO Registers */
 struct gpio_regs {
u32 gpio_dr;
-- 
1.6.0.4


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


[U-Boot] [PATCH v4 3/4] MX5: Introduce a function for setting the chip select size

2011-05-19 Thread Fabio Estevam
Signed-off-by: Fabio Estevam 
---
Changes since v3:
- Print the chip size in the case of error

 arch/arm/cpu/armv7/mx5/soc.c  |   30 +
 arch/arm/include/asm/arch-mx5/imx-regs.h  |5 
 arch/arm/include/asm/arch-mx5/sys_proto.h |2 +-
 3 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c
index 40b8b56..e599df8 100644
--- a/arch/arm/cpu/armv7/mx5/soc.c
+++ b/arch/arm/cpu/armv7/mx5/soc.c
@@ -163,6 +163,36 @@ int cpu_mmc_init(bd_t *bis)
 #endif
 }
 
+void set_chipselect_size(int const cs_size)
+{
+   unsigned int reg;
+   struct iomuxc *iomuxc_regs = (struct weim *)IOMUXC_BASE_ADDR;
+   reg = readl(&iomuxc_regs->gpr1);
+
+   switch (cs_size) {
+   case CS0_128:
+   reg &= ~0x7;/* CS0=128MB, CS1=0, CS2=0, CS3=0 */
+   reg |= 0x5;
+   break;
+   case CS0_64M_CS1_64M:
+   reg &= ~0x3F;   /* CS0=64MB, CS1=64MB, CS2=0, CS3=0 */
+   reg |= 0x1B;
+   break;
+   case CS0_64M_CS1_32M_CS2_32M:
+   reg &= ~0x1FF;  /* CS0=64MB, CS1=32MB, CS2=32MB, CS3=0 */
+   reg |= 0x4B;
+   break;
+   case CS0_32M_CS1_32M_CS2_32M_CS3_32M:
+   reg &= ~0xFFF;  /* CS0=32MB, CS1=32MB, CS2=32MB, CS3=32MB */
+   reg |= 0x249;
+   break;
+   default:
+   printf("Unknown chip select size: %d\n", cs_size);
+   break;
+   }
+
+   writel(reg, &iomuxc_regs->gpr1);
+}
 
 void reset_cpu(ulong addr)
 {
diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h 
b/arch/arm/include/asm/arch-mx5/imx-regs.h
index 9d2046a..5163614 100644
--- a/arch/arm/include/asm/arch-mx5/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
@@ -214,6 +214,11 @@
 #define WDOG_EN(x) ((x) << 8)
 #define WDOG_LIMIT(x)  (((x) & 0x3) << 9)
 
+#define CS0_1280
+#define CS0_64M_CS1_64M1
+#define CS0_64M_CS1_32M_CS2_32M2
+#define CS0_32M_CS1_32M_CS2_32M_CS3_32M3
+
 /*
  * Number of GPIO pins per port
  */
diff --git a/arch/arm/include/asm/arch-mx5/sys_proto.h 
b/arch/arm/include/asm/arch-mx5/sys_proto.h
index f687503..ce63675 100644
--- a/arch/arm/include/asm/arch-mx5/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx5/sys_proto.h
@@ -27,5 +27,5 @@
 u32 get_cpu_rev(void);
 #define is_soc_rev(rev)((get_cpu_rev() & 0xFF) - rev)
 void sdelay(unsigned long);
-
+void set_chipselect_size(int const);
 #endif
-- 
1.6.0.4


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


[U-Boot] [PATCH v4 4/4] MX53: Add initial support for MX53ARD

2011-05-19 Thread Fabio Estevam
Signed-off-by: Fabio Estevam 
---
Changes since v3:
- No changes
Changes since v2:
- Use macros for setting up weim register
- Use set_chipselect_size function
- Rename the file to imximage_dd3.cfg to make explicit the DDR type.

 MAINTAINERS  |1 +
 board/freescale/mx53ard/Makefile |   48 +
 board/freescale/mx53ard/imximage_dd3.cfg |   96 +
 board/freescale/mx53ard/mx53ard.c|  308 ++
 boards.cfg   |1 +
 include/configs/mx53ard.h|  198 +++
 6 files changed, 652 insertions(+), 0 deletions(-)
 create mode 100644 board/freescale/mx53ard/Makefile
 create mode 100644 board/freescale/mx53ard/imximage_dd3.cfg
 create mode 100644 board/freescale/mx53ard/mx53ard.c
 create mode 100644 include/configs/mx53ard.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 07237e3..b63f53f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -639,6 +639,7 @@ Kristoffer Ericson 
 Fabio Estevam 
 
mx31pdk i.MX31
+   mx53ard i.MX53
mx53smd i.MX53
 
 Peter Figuli 
diff --git a/board/freescale/mx53ard/Makefile b/board/freescale/mx53ard/Makefile
new file mode 100644
index 000..c48ece8
--- /dev/null
+++ b/board/freescale/mx53ard/Makefile
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007, Guennadi Liakhovetski 
+#
+# (C) Copyright 2011 Freescale Semiconductor, Inc.
+#
+# 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  := mx53ard.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/mx53ard/imximage_dd3.cfg 
b/board/freescale/mx53ard/imximage_dd3.cfg
new file mode 100644
index 000..0f298ab
--- /dev/null
+++ b/board/freescale/mx53ard/imximage_dd3.cfg
@@ -0,0 +1,96 @@
+#
+# (C) Copyright 2009
+# Stefano Babic DENX Software Engineering sba...@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. 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 0x53fa8

Re: [U-Boot] [GIT PULL] Please pull u-boot-mpc85xx.git

2011-05-19 Thread Wolfgang Denk
Dear Kumar Gala,

In message  you 
wrote:
> The following changes since commit 0ea91423f47461bf7eaed2d4aff198076dd07fd5:
> 
>   Merge branch 'master' of git://git.denx.de/u-boot-arm (2011-05-18 14:31:56 
> +0200)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-mpc85xx.git master
> 
> Shaohui Xie (2):
>   powerpc/85xx: Enable eSPI support on corenet ds boards
>   powerpc/85xx: add support for env in MMC/SPI on corenet ds boards
> 
>  board/freescale/common/Makefile |2 +
>  boards.cfg  |7 +-
>  include/configs/corenet_ds.h|   40 +++---
>  3 files changed, 40 insertions(+), 9 deletions(-)

Applied, 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
"We learn from history that we learn nothing from history."
- George Bernard Shaw
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] [NAND] Fixes 16bit NAND support with the NDFC

2011-05-19 Thread Alex Waterman
>From ad2238044b9abc5a2094096219a1256a8ad091b0 Mon Sep 17 00:00:00 2001
From: Alex Waterman 
Date: Thu, 19 May 2011 15:08:36 -0400
Subject: [PATCH] [NAND] Fixes 16bit NAND support with the NDFC

This patch adds support for 16 bit NAND devices attached to the
NDFC on ppc4xx processors. Two config entries were added:

  CONFIG_SYS_NDFC_16- Setting this tells the NDFC that a
  16 bit device is attached.
  CONFIG_SYS_NDFC_EBC0_CFG  - This is for the External Bus
  Controller configuration register.

Also, a new ndfc_read_byte() function was added which does not
first convert the data to little endian.

The NAND SPL was also modified to do 16bit bad block testing
when a 16 bit chip is being used.

Signed-off-by: Alex Waterman 
Cc: Scott Wood 
Cc: Stefan Roese 
---
 drivers/mtd/nand/ndfc.c |   34 +-
 nand_spl/nand_boot.c|   11 ---
 2 files changed, 37 insertions(+), 8 deletions(-)

diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 0729e0c..b533474 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -37,6 +37,13 @@
 #include 
 #include 
 
+#ifndef CONFIG_SYS_NAND_BCR
+#define CONFIG_SYS_NAND_BCR 0x8000
+#endif
+#ifndef CONFIG_SYS_NDFC_EBC0_CFG
+#define CONFIG_SYS_NDFC_EBC0_CFG 0xb840
+#endif
+
 /*
  * We need to store the info, which chip-select (CS) is used for the
  * chip number. For example on Sequoia NAND chip #0 uses
@@ -140,11 +147,23 @@ static int ndfc_verify_buf(struct mtd_info *mtdinfo, 
const uint8_t *buf, int len
 
return 0;
 }
-#endif /* #ifndef CONFIG_NAND_SPL */
 
-#ifndef CONFIG_SYS_NAND_BCR
-#define CONFIG_SYS_NAND_BCR 0x8000
-#endif
+/*
+ * Read a byte from the NDFC.
+ */
+static uint8_t ndfc_read_byte(struct mtd_info *mtd)
+{
+
+   struct nand_chip *chip = mtd->priv;
+
+   if (chip->options & NAND_BUSWIDTH_16)
+   return (uint8_t) readw(chip->IO_ADDR_R);
+   else
+   return readb(chip->IO_ADDR_R);
+
+}
+
+#endif /* #ifndef CONFIG_NAND_SPL */
 
 void board_nand_select_device(struct nand_chip *nand, int chip)
 {
@@ -198,16 +217,21 @@ int board_nand_init(struct nand_chip *nand)
nand->ecc.bytes = 3;
nand->select_chip = ndfc_select_chip;
 
+#ifdef CONFIG_SYS_NDFC_16BIT
+   nand->options |= NAND_BUSWIDTH_16;
+#endif
+
 #ifndef CONFIG_NAND_SPL
nand->write_buf  = ndfc_write_buf;
nand->verify_buf = ndfc_verify_buf;
+   nand->read_byte = ndfc_read_byte;
 
chip++;
 #else
/*
 * Setup EBC (CS0 only right now)
 */
-   mtebc(EBC0_CFG, 0xb840);
+   mtebc(EBC0_CFG, CONFIG_SYS_NDFC_EBC0_CFG);
 
mtebc(PB0CR, CONFIG_SYS_EBC_PB0CR);
mtebc(PB0AP, CONFIG_SYS_EBC_PB0AP);
diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
index 9545a9a..4683c7c 100644
--- a/nand_spl/nand_boot.c
+++ b/nand_spl/nand_boot.c
@@ -122,10 +122,15 @@ static int nand_is_bad_block(struct mtd_info *mtd, int 
block)
nand_command(mtd, block, 0, CONFIG_SYS_NAND_BAD_BLOCK_POS, 
NAND_CMD_READOOB);
 
/*
-* Read one byte
+* Read one byte (or two if it's a 16 bit chip).
 */
-   if (readb(this->IO_ADDR_R) != 0xff)
-   return 1;
+   if (this->options & NAND_BUSWIDTH_16) {
+   if (readw(this->IO_ADDR_R) != 0x)
+   return 1;
+   } else {
+   if (readb(this->IO_ADDR_R) != 0xff)
+   return 1;
+   }
 
return 0;
 }
-- 
1.7.4.4



-- 
Alex Waterman
Computer Engineer
Phone: 215-896-4920
Email: awater...@dawning.com

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


Re: [U-Boot] [PATCH 1/8] net/tftp.c: cosmetic: fix lines over 80 characters

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305388203-22983-2-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
>  net/tftp.c |   66 ++-
>  1 files changed, 42 insertions(+), 24 deletions(-)

Applied, 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
"Unibus timeout fatal trap program lost sorry"  -  An  error  message
printed by DEC's RSTS operating system for the PDP-11
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/8] net/tftp.c: cosmetic: fix whitespace issues

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305388203-22983-3-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> This removes the following checkpatch issues:
>  - ERROR: space prohibited before that close parenthesis ')'
>  - ERROR: space required after that ';' (ctx:BxV)
>  - ERROR: space required after that ',' (ctx:VxV)
>  - ERROR: space required after that ';' (ctx:VxV)
>  - ERROR: spaces required around that '<<=' (ctx:VxV)
>  - ERROR: spaces required around that '<' (ctx:VxV)
>  - ERROR: spaces required around that '=' (ctx:VxV)
>  - ERROR: spaces required around that '+=' (ctx:VxV)
>  - ERROR: spaces required around that '=' (ctx:VxW)
>  - WARNING: please, no spaces at the start of a line
>  - WARNING: space prohibited between function name and open parenthesis '('
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
>  net/tftp.c |  192 
> ++--
>  1 files changed, 97 insertions(+), 95 deletions(-)

Applied, 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
Witch!  Witch!  They'll burn ya!
-- Hag, "Tomorrow is Yesterday", stardate unknown
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/8] net/tftp.c: cosmetic: do not use assignment in if condition

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305388203-22983-5-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> This removes the following checkpatch issue:
>  - ERROR: do not use assignment in if condition.
> 
> There is one such error left:
> 
>   ERROR: do not use assignment in if condition
>   #239: FILE: tftp.c:239:
>   +   if (!ProhibitMcast
>   +&& (Bitmap = malloc(Mapsize))
>   +&& eth_get_dev()->mcast) {
> 
> which would require an additional nested if to be fixed, resulting in longer
> and less readable code.
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
>  net/tftp.c |   18 --
>  1 files changed, 12 insertions(+), 6 deletions(-)

Applied, 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
"It's hard to believe that something which is neither seen  nor  felt
can do so much harm."
"That's true. But an idea can't be seen or felt. And that's what kept
the Troglytes in the mines all these centuries. A mistaken idea."
-- Vanna and Kirk, "The Cloud Minders", stardate 5819.0
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/8] net/tftp.c: cosmetic: fix pointer syntax issues

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305388203-22983-4-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> This removes the following checkpatch issues:
>  - ERROR: "foo * bar" should be "foo *bar"
>  - ERROR: "(foo*)" should be "(foo *)"
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
>  net/tftp.c |   20 ++--
>  1 files changed, 10 insertions(+), 10 deletions(-)

Applied, 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
If some day we are defeated, well, war has  its  fortunes,  good  and
bad.
-- Commander Kor, "Errand of Mercy", stardate 3201.7
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/8] net/tftp.c: cosmetic: fix brace issues

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305388203-22983-6-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> This removes the following checkpatch issues:
>  - WARNING: braces {} are not necessary for single statement blocks
>  - WARNING: braces {} are not necessary for any arm of this statement
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
>  net/tftp.c |   17 ++---
>  1 files changed, 6 insertions(+), 11 deletions(-)

Applied, 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
Without freedom of choice there is no creativity.
-- Kirk, "The return of the Archons", stardate 3157.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/8] net/tftp.c: cosmetic: trailing statements should be on next line

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305388203-22983-7-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> This removes the following checkpatch issue:
>  - ERROR: trailing statements should be on next line
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
>  net/tftp.c |9 ++---
>  1 files changed, 6 insertions(+), 3 deletions(-)

Applied, 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
You see but you do not observe.
Sir Arthur Conan Doyle, in "The Memoirs of Sherlock Holmes"
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 7/8] net/tftp.c: cosmetic: fix indentation

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305388203-22983-8-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> This removes the following checkpatch issue:
>  - WARNING: suspect code indent for conditional statements
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
>  net/tftp.c |   11 ++-
>  1 files changed, 6 insertions(+), 5 deletions(-)

Applied, 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
A day without sunshine is like night.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 8/8] net/tftp.c: cosmetic: do not initialise statics to 0 or NULL

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305388203-22983-9-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> This removes the following checkpatch issue:
>  - ERROR: do not initialise statics to 0 or NULL
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
>  net/tftp.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, 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
"You know, after a woman's raised a family and so on,  she  wants  to
start living her own life."   "Whose life she's _been_ living, then?"
  - Terry Pratchett, _Witches Abroad_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/5] TFTP: replace "server" with "remote" in local variable names

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305626621-15008-2-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> With the upcoming TFTP server implementation, the remote node can be
> either a client or a server, so avoid ambiguities.
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> 
> ---
> Changes in v2:
>  - fixed checkpatch issues.
> 
> Changes in v3:
>  - rebased on top of the net/tftp.c cleanup;
>  - renamed also local variable ServerNet to RemoteNet in TftpStart();
>  - clarified commit message.
> 
>  net/tftp.c |   28 ++--
>  1 files changed, 14 insertions(+), 14 deletions(-)

Applied, 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
"Pardon me for breathing, which I never do anyway so I don't know why
I bother to say it, oh God, I'm so depressed. Here's another of those
self-satisfied doors. Life! Don't talk to me about life."
- Marvin the Paranoid Android
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/5] TFTP: rename STATE_RRQ to STATE_SEND_RRQ

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305626621-15008-3-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> With the upcoming TFTP server implementation, requests can be either
> outgoing or incoming, so avoid ambiguities.
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> 
> ---
> Changes in v2: none.
> 
> Changes in v3:
>  - rebased on top of the net/tftp.c cleanup.
> 
>  net/tftp.c |   12 ++--
>  1 files changed, 6 insertions(+), 6 deletions(-)

Applied, 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
Some programming languages manage to  absorb  change,  but  withstand
progress.  -- Epigrams in Programming, ACM SIGPLAN Sept. 1982
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] mvsata: issue hard reset on initialization

2011-05-19 Thread Michael Walle
Am Donnerstag 12 Mai 2011, 00:22:46 schrieb Michael Walle:
> Before the actual initialization do a hard reset of the SATA port and the
> connected device.
> 
> changes v1->v2:
>  - add comment for udelay


ping? :)

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


Re: [U-Boot] [PATCH v3 3/5] TFTP: net/tftp.c: add server mode receive

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305626621-15008-4-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> 
> ---
> Changes in v2: none.
> 
> Changes in v3:
>  - rebased on top of the net/tftp.c cleanup;
>  - removed all #ifdefs that used to remove negligible amounts of compiled 
> code,
>at the cost of a much less readable source file; after measurements, it
>turned out this change does not increase code size.
> 
>  net/tftp.c |   62 ---
>  net/tftp.h |6 +
>  2 files changed, 64 insertions(+), 4 deletions(-)

Applied, 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
Lots of folks confuse bad management with destiny.   -- Frank Hubbard
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [GIT PULL] Please pull u-boot-mpc85xx.git

2011-05-19 Thread Kumar Gala

On May 19, 2011, at 2:31 PM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message  you 
> wrote:
>> The following changes since commit 0ea91423f47461bf7eaed2d4aff198076dd07fd5:
>> 
>>  Merge branch 'master' of git://git.denx.de/u-boot-arm (2011-05-18 14:31:56 
>> +0200)
>> 
>> are available in the git repository at:
>> 
>>  git://git.denx.de/u-boot-mpc85xx.git master
>> 
>> Shaohui Xie (2):
>>  powerpc/85xx: Enable eSPI support on corenet ds boards
>>  powerpc/85xx: add support for env in MMC/SPI on corenet ds boards
>> 
>> board/freescale/common/Makefile |2 +
>> boards.cfg  |7 +-
>> include/configs/corenet_ds.h|   40 +++---
>> 3 files changed, 40 insertions(+), 9 deletions(-)
> 
> Applied, thanks.
> 
> Best regards,
> 
> Wolfgang Denk

thanks for pulling these in for this release.

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


Re: [U-Boot] [PATCH v3 4/5] TFTP: add tftpsrv command

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305626621-15008-5-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> 
> ---
> Changes in v2: none.
> 
> Changes in v3:
>  - rebased on top of the net/tftp.c cleanup;
>  - made do_tftpsrv() static;
>  - improved tftpsrv command help;
>  - removed all #ifdefs that used to remove negligible amounts of compiled 
> code,
>at the cost of a much less readable source file; after measurements, it
>turned out this change does not increase code size.
> 
>  README   |1 +
>  common/cmd_net.c |   17 +
>  include/net.h|3 ++-
>  net/net.c|7 ++-
>  4 files changed, 26 insertions(+), 2 deletions(-)

Applied, 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
"Free markets select for winning solutions."- Eric S. Raymond
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 5/5] net/tftp.c: fix typo

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1305626621-15008-6-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> 
> ---
> Changes in v3: this patch is new in v3.
> 
>  net/tftp.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, 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
[Braddock:] Mr. Churchill, you are drunk.
[Churchill:] And you madam, are ugly.  But I shall be sober tomorrow.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] [NAND] Fixes 16bit NAND support with the NDFC

2011-05-19 Thread Wolfgang Denk
Dear Alex Waterman,

In message <4dd56fcf.2010...@dawning.com> you wrote:
> From ad2238044b9abc5a2094096219a1256a8ad091b0 Mon Sep 17 00:00:00 2001
> From: Alex Waterman 
> Date: Thu, 19 May 2011 15:08:36 -0400
> Subject: [PATCH] [NAND] Fixes 16bit NAND support with the NDFC
> 
> This patch adds support for 16 bit NAND devices attached to the
> NDFC on ppc4xx processors. Two config entries were added:
> 
>   CONFIG_SYS_NDFC_16- Setting this tells the NDFC that a
> 16 bit device is attached.
>   CONFIG_SYS_NDFC_EBC0_CFG  - This is for the External Bus
> Controller configuration register.
> 
> Also, a new ndfc_read_byte() function was added which does not
> first convert the data to little endian.
> 
> The NAND SPL was also modified to do 16bit bad block testing
> when a 16 bit chip is being used.
> 
> Signed-off-by: Alex Waterman 
> Cc: Scott Wood 
> Cc: Stefan Roese 
> ---
>  drivers/mtd/nand/ndfc.c |   34 +-
>  nand_spl/nand_boot.c|   11 ---
>  2 files changed, 37 insertions(+), 8 deletions(-)

Please document the new CONFIG_SYS_* options in the README.

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
"Who alone has reason to *lie  himself  out*  of  actuality?  He  who
*suffers* from it." - Friedrich Nietzsche
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] [NAND] Fixes 16bit NAND support with the NDFC

2011-05-19 Thread Alex Waterman
From: Alex Waterman 
Date: Thu, 19 May 2011 15:08:36 -0400
Subject: [PATCH] [NAND] Fixes 16bit NAND support with the NDFC

This patch adds support for 16 bit NAND devices attached to the
NDFC on ppc4xx processors. Two config entries were added:

  CONFIG_SYS_NDFC_16- Setting this tells the NDFC that a
  16 bit device is attached.
  CONFIG_SYS_NDFC_EBC0_CFG  - This is for the External Bus
  Controller configuration register.

Also, a new ndfc_read_byte() function was added which does not
first convert the data to little endian.

The NAND SPL was also modified to do 16bit bad block testing
when a 16 bit chip is being used.

Signed-off-by: Alex Waterman 
Cc: Scott Wood 
Cc: Stefan Roese 
---
 README  |8 
 drivers/mtd/nand/ndfc.c |   34 +-
 nand_spl/nand_boot.c|   11 ---
 3 files changed, 45 insertions(+), 8 deletions(-)

Here is the new patch with the README updated to reflect the config
options added.

diff --git a/README b/README
index 6f3748d..3ede798 100644
--- a/README
+++ b/README
@@ -2912,6 +2912,14 @@ Low Level (hardware related) configuration options:
 - CONFIG_SYS_SRIOn_MEM_SIZE:
Size of SRIO port 'n' memory region
 
+- CONFIG_SYS_NDFC_16
+   Defined to tell the NDFC that the NAND chip is using a
+   16 bit bus.
+
+- CONFIG_SYS_NDFC_EBC0_CFG
+   Sets the EBC0_CFG register for the NDFC. If not defined
+   a default value will be used.
+
 - CONFIG_SPD_EEPROM
Get DDR timing information from an I2C EEPROM. Common
with pluggable memory modules such as SODIMMs
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 0729e0c..b533474 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -37,6 +37,13 @@
 #include 
 #include 
 
+#ifndef CONFIG_SYS_NAND_BCR
+#define CONFIG_SYS_NAND_BCR 0x8000
+#endif
+#ifndef CONFIG_SYS_NDFC_EBC0_CFG
+#define CONFIG_SYS_NDFC_EBC0_CFG 0xb840
+#endif
+
 /*
  * We need to store the info, which chip-select (CS) is used for the
  * chip number. For example on Sequoia NAND chip #0 uses
@@ -140,11 +147,23 @@ static int ndfc_verify_buf(struct mtd_info *mtdinfo, 
const uint8_t *buf, int len
 
return 0;
 }
-#endif /* #ifndef CONFIG_NAND_SPL */
 
-#ifndef CONFIG_SYS_NAND_BCR
-#define CONFIG_SYS_NAND_BCR 0x8000
-#endif
+/*
+ * Read a byte from the NDFC.
+ */
+static uint8_t ndfc_read_byte(struct mtd_info *mtd)
+{
+
+   struct nand_chip *chip = mtd->priv;
+
+   if (chip->options & NAND_BUSWIDTH_16)
+   return (uint8_t) readw(chip->IO_ADDR_R);
+   else
+   return readb(chip->IO_ADDR_R);
+
+}
+
+#endif /* #ifndef CONFIG_NAND_SPL */
 
 void board_nand_select_device(struct nand_chip *nand, int chip)
 {
@@ -198,16 +217,21 @@ int board_nand_init(struct nand_chip *nand)
nand->ecc.bytes = 3;
nand->select_chip = ndfc_select_chip;
 
+#ifdef CONFIG_SYS_NDFC_16BIT
+   nand->options |= NAND_BUSWIDTH_16;
+#endif
+
 #ifndef CONFIG_NAND_SPL
nand->write_buf  = ndfc_write_buf;
nand->verify_buf = ndfc_verify_buf;
+   nand->read_byte = ndfc_read_byte;
 
chip++;
 #else
/*
 * Setup EBC (CS0 only right now)
 */
-   mtebc(EBC0_CFG, 0xb840);
+   mtebc(EBC0_CFG, CONFIG_SYS_NDFC_EBC0_CFG);
 
mtebc(PB0CR, CONFIG_SYS_EBC_PB0CR);
mtebc(PB0AP, CONFIG_SYS_EBC_PB0AP);
diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
index 9545a9a..4683c7c 100644
--- a/nand_spl/nand_boot.c
+++ b/nand_spl/nand_boot.c
@@ -122,10 +122,15 @@ static int nand_is_bad_block(struct mtd_info *mtd, int 
block)
nand_command(mtd, block, 0, CONFIG_SYS_NAND_BAD_BLOCK_POS, 
NAND_CMD_READOOB);
 
/*
-* Read one byte
+* Read one byte (or two if it's a 16 bit chip).
 */
-   if (readb(this->IO_ADDR_R) != 0xff)
-   return 1;
+   if (this->options & NAND_BUSWIDTH_16) {
+   if (readw(this->IO_ADDR_R) != 0x)
+   return 1;
+   } else {
+   if (readb(this->IO_ADDR_R) != 0xff)
+   return 1;
+   }
 
return 0;
 }
-- 
1.7.4.4


-- 
Alex Waterman
Computer Engineer
Phone: 215-896-4920
Email: awater...@dawning.com

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


Re: [U-Boot] [Samsung] [PATCH v3 0/2] SMDKV310 Board Support

2011-05-19 Thread Angus Ainslie
Hi Wolfgang

On Thu, May 19, 2011 at 1:00 PM, Wolfgang Denk  wrote:
> Dear Chander Kashyap,
>
> In message <1305796982-7155-1-git-send-email-chander.kash...@linaro.org> you 
> wrote:
>>
>> This patchset adds support for a new board SMDKV310, based on S5PV310 SOC.
>> This SOC is very similar to S5PC210 SOC, hence we are re-using this SOC code.
>
> Which patchset? I see only this cover letter, but neither patch 1/2
> nor patch 2.2 ?
>

It looks like they ended up in a different thread.

http://lists.denx.de/pipermail/u-boot/2011-May/092977.html
http://lists.denx.de/pipermail/u-boot/2011-May/092976.html

Angus


-- 
Angus Ainslie 
Team Lead, Samsung Landing Team
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [Samsung] [PATCH v3 0/2] SMDKV310 Board Support

2011-05-19 Thread Scott Bambrough
On Thu, 2011-05-19 at 21:00 +0200, Wolfgang Denk wrote:
> Dear Chander Kashyap,
> 
> In message <1305796982-7155-1-git-send-email-chander.kash...@linaro.org> you 
> wrote:
> >
> > This patchset adds support for a new board SMDKV310, based on S5PV310 SOC.
> > This SOC is very similar to S5PC210 SOC, hence we are re-using this SOC 
> > code.
> 
> Which patchset? I see only this cover letter, but neither patch 1/2
> nor patch 2.2 ?

I see them all.

Cheers,

Scott


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


[U-Boot] [STATUS] v2011.06-rc1 released

2011-05-19 Thread Wolfgang Denk
Hello everybody:

* U-Boot v2011.06-rc1 was released on Thu, May 19, 2011

* Release "v2011.06" is scheduled in 24 days - on June 12, 2011.

Please help testing, and check if all your relevant patches have been
included.


Note that still a large number of ARM boards are broken. I hope many
people join the efforts and fix at least some of the currently broken
boards.

Note: Boards that will not be fixed for this release will be removed
with the next one.

Thanks in advance to everybody who lends a helping hand.

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
"Life is a garment we continuously alter, but which  never  seems  to
fit."  - David McCord
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [Samsung] [PATCH v3 0/2] SMDKV310 Board Support

2011-05-19 Thread Wolfgang Denk
Dear Angus Ainslie,

In message  you wrote:
> 
> > Which patchset? I see only this cover letter, but neither patch 1/2
> > nor patch 2.2 ?
> 
> It looks like they ended up in a different thread.

I found them.  You also had the linaro-dev list on Cc:, and the
Linaro mail server was faster, so they got sorted into my Linaro
folder.

Sorry for the noise.

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
Insufficient facts always invite danger.
-- Spock, "Space Seed", stardate 3141.9
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] ARMV7: MMC SPL Boot support for SMDKV310 board

2011-05-19 Thread Wolfgang Denk
Dear Chander Kashyap,

In message <1305796982-7155-3-git-send-email-chander.kash...@linaro.org> you 
wrote:
> Added MMC SPL boot support for SMDKV310. This framework design is
> based on nand_spl support.
> 
> Signed-off-by: Chander Kashyap 

Checkpatch says:

WARNING: line over 80 characters
#1333: FILE: include/configs/smdkv310.h:158:
+#define BL2_START_OFFSET   ((CONFIG_ENV_OFFSET + 
CONFIG_ENV_SIZE)/512)


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"If you own a machine, you are in turn owned by it,  and  spend  your
time serving it..."- Marion Zimmer Bradley, _The Forbidden Tower_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCHv4 2/4] armv7: Add ST-Ericsson u8500 arch

2011-05-19 Thread John Rigby
On Tue, Apr 19, 2011 at 2:42 PM, John Rigby  wrote:
> Based on ST-Ericsson internal git repo.
>
> Signed-off-by: Mathieu Poirier 
> Signed-off-by: John Rigby 
> CC: Albert Aribaud 
> ---
> v2: cleanup, mostly removal of unused defines
> v3: remove prototype from sys_proto.h as suggested by Wolfgang
> v4: incorporate changes suggested by Albert:
>  Add copyright to arch/arm/cpu/armv7/u8500/lowlevel.S
>  Remove confusing/incorrect timer comment in arch/arm/cpu/armv7/u8500/timer.c
>  Remove reset timer functions from /timer.c

Albert, can this and parts 3 and 4 go in for rc2?  As I said before
Heiko acked the I2C patch and indicated it was ok with him for it to
go in via your tree.

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


[U-Boot] Beagleboard patches, going upstream?

2011-05-19 Thread Darren Hart
I'm looking to include the following patches from TI's
meta-texasinstruments OE layer recipe for u-boot. They have been sent to
the list, two of them Acked, but have otherwise received no response and
but I don't see them in the git repository. Are these going to be
included upstream (git://git.denx.de/u-boot.git) ?

OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch
Jason said will pull in for ti tree
OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch
OMAP3-Add-DSS-driver-for-OMAP3.patch
BeagleBoard-Added-userbutton-command.patch
Enable-DSS-driver-for-Beagle.patch
Corrected-LED-name-match-finding-avoiding-extraneous.patch
omap3_beagle-Switch-default-console-from-ttyS2-to-tt.patch
Acked-by on list
BeagleBoard-Load-kernel-via-MMC-ext2-not-fat.patch


The following patches I do not see on the list. Koen, Jason, will these
be sent upstream?

OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch from Koen
OMAP3-BeagleBoard-updated-default-configuration.patch from Jason


Is there another repository I should be looking at for the upstream
status of these patches?


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] S5P: add set_mmc_clk for external clock control

2011-05-19 Thread Minkyu Kang
Dear Jaehoon Chung,

On 18 May 2011 16:19, Jaehoon Chung  wrote:
> This patch added set_mmc_clk for external clock control.
>
> c210 didn't support host clock control.
> So We need external_clock_control function for c210.
>
> Signed-off-by: Jaehoon Chung 
> signed-off-by: Minkyu Kang 
> Signed-off-by: Kyungmin Park 
> ---
> Changes for v2:
>   - fixed missing header for 
>
>  arch/arm/cpu/armv7/s5pc1xx/clock.c      |    5 
>  arch/arm/cpu/armv7/s5pc2xx/clock.c      |   32 
> +++
>  arch/arm/include/asm/arch-s5pc1xx/clk.h |    1 +
>  arch/arm/include/asm/arch-s5pc1xx/mmc.h |    1 +
>  arch/arm/include/asm/arch-s5pc2xx/clk.h |    1 +
>  arch/arm/include/asm/arch-s5pc2xx/mmc.h |    1 +
>  drivers/mmc/s5p_mmc.c                   |    4 +++
>  7 files changed, 45 insertions(+), 0 deletions(-)
>

applied to u-boot-samsung

Thanks
Minkyu Kang
-- 
from. prom.
www.promsoft.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] Accurate boot time measurement

2011-05-19 Thread Simon Glass
On Thu, May 19, 2011 at 1:36 AM, Detlev Zundel  wrote:
> Hi Simon,
>
> [...]
>
>> I believe I have covered this ground very thoroughly and would like
>> advice please on what to do next. The options I can see are:
>
> As Graeme points out, you got enough positive feedback that I encourage
> you to continue and address the comments.

OK, it would be nice to have a note from Wolfgang since without his OK
it won't make it in, right?

>
>> - change the code to use a fallback when a microsecond timer is not
>> available
>
> Excuse me for not diving into that too deep, but from my top-level
> overview, it would seem like a good idea that if an architecture _has_ a
> microsecond timer, it could use generic code to massage that into the
> HZ=1000 API that we currently use with the addition of offering the
> extended precision.  Your code then would need such a fallback and could
> work with the best precision offered by the architecture.  New
> architectures with microsecond timers would need to only implement the
> new microsecond timer infrastructure and be done with it.

Yes I suggested that a few emails ago but didn't get a response.

>> - integrate with boot progress
>
> The current boot progress to me seems pretty ugly and could do with a
> make-over.  So if it is possible to merge those two logical functions,
> we would have a win-win situation.

OK fair enough. I will do this if there is agreement that this type of
boot timing is worth having.

Wolfgang can you please chime in here?

Regards,
Simon


>
>> - something else? drop it?
>
> No, please don't - I think you created enough interest to carry on.
>
> Cheers
>  Detlev
>
> --
> Perfecting oneself is as much unlearning as it is learning.
>                                        -- Edsger Dijkstra
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Bitfield macros (was: Re: [PATCH v3 02/10] armv7: add miscellaneous utility macros)

2011-05-19 Thread Simon Glass
On Tue, May 17, 2011 at 9:45 PM, Wolfgang Denk  wrote:
> Dear Simon Glass,
>
> In message  you wrote:
>>
>> > Maybe we can agree to use these existing macros then instead of
>> > inventing new ones with the same functionality.
>>
>> The existing macros do not have enough functionality in my view. If we
>> seriously want people to use these then I believe they need to be
>> enhanced to be easier to use and more powerful.
>
> Please read what I wrote. Pay special attention to the "the same
> functionality" part.

I do not propose that we simply create new macros with the same
functionality. That would be a waste of time.

Let me set out my stall here. I think we need a more powerful set of
bitfield macros in U-Boot.

Bitfields done with masks are not the best since:

1. They require the manual creation of masks which is error-prone and pointless
2.. They allow changing of non-contiguous bits which is seldom useful

I believe we should take advantage of the fact that generally
bitfields are contiguous groups of bits within a single word. If you
look at clrsetbits_le32(), I would make these points:

1. Generally native endian is what is wanted, so putting le32() on the
end seems unnecessary
2. It has three arguments: addr, clear, set. The last two are bitmasks
which must be manually created
3. The clear and set arguments are dependent and yet no advantage is
taken of the fact that they are presumably related to the same
bitfield.

Here's a bit of code I found in U-Boot which illustrates this to some extent:

/* Trigger TIMER_0 by writing A5 to OCPW */
clrsetbits_be32(&gpt0->emsr, 0xff00, 0xa500);

In fact I would go so far as to say that clrsetbits_le32() is for a
different purpose than adjusting bitfield values. Clearly it is more
powerful than we need, and yet harder to use for our common case.

What could we do instead? I suggest we allow the definition of a
bitfield as a high bit and a low bit, with the bitfield extended
between these two, inclusive, values. So imagine lo and hi for
argument's sake. This is nice and natural because the average SOC
datasheet is full of things like this for example:

Bit   Meaning
8:7   UART type: 0 = blah blah, 1 = something else, ...
6:2   UART word length
1:0   UART stop bits

So a bitfield like 23:16 has hi=23 and lo=16. It is 8 bits long. This
is easily converted into:

- shift (just use lo)
- width (hi - lo + 1)
- 'raw' mask (-1U >> (32 - width))
- 'cooked' mask: raw mask << shift

We can use macros to make this easy, like this:

#define UART_SPEED_HI 23
#define UART_SPEED_LO 16

then allow passing of just UART_SPEED to the macro, from which it gets
the _LO and _HI parts automatically. We can actually go further if we
don't mind a bit of magic and use something like:

#define UART_SPEED_BITS 23:16

from which we can extract these two values automatically. Either
method allows us to pass UART_SPEED to the macros as a complete
definition of the bitfield. We can then use the macros to set values,
use enums and all the normal C things we like with less fear of
complication or error.

I need not dwell on the advantages of replacing all the ad-hoc
bitfield manipulation with something common, tested and robust.

Comments welcome.

Regards,
Simon

>
>> > Do you know of examples of such more complex definitions in the Linux
>> > kernel code?
>>
>> Which complex definitions? I was suggesting adding a more powerful
>> group of bitfield macros to U-Boot. It would be better if they were
>> easier to use rather than more complex.
>
> And I asked if any such "more powerful group of bitfield macros" i
> used in Linux?

Not that I can see. Is that important?

>
>> I think clrbits and setbits are a start but they are primitive and we
>> can do better. If we do better, people will use the better options. If
>> lots of people use them then we can start requiring that people do. In
>> the end we get a consistent way of accessing SOC registers at the bit
>> level, as we now do at the word level.
>
> I understand and accept your opinion, but I do not share it.
>
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
> Program maintenance is an entropy-increasing process,  and  even  its
> most skilfull execution only delays the subsidence of the system into
> unfixable obsolescence.       - Fred Brooks, "The Mythical Man Month"
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] Accurate boot time measurement

2011-05-19 Thread Graeme Russ
On Fri, May 20, 2011 at 11:48 AM, Simon Glass  wrote:
> On Thu, May 19, 2011 at 1:36 AM, Detlev Zundel  wrote:
>> Hi Simon,
>>
>> [...]
>>
>>> I believe I have covered this ground very thoroughly and would like
>>> advice please on what to do next. The options I can see are:
>>
>> As Graeme points out, you got enough positive feedback that I encourage
>> you to continue and address the comments.
>
> OK, it would be nice to have a note from Wolfgang since without his OK
> it won't make it in, right?
>
>>
>>> - change the code to use a fallback when a microsecond timer is not
>>> available
>>
>> Excuse me for not diving into that too deep, but from my top-level
>> overview, it would seem like a good idea that if an architecture _has_ a
>> microsecond timer, it could use generic code to massage that into the
>> HZ=1000 API that we currently use with the addition of offering the
>> extended precision.  Your code then would need such a fallback and could
>> work with the best precision offered by the architecture.  New
>> architectures with microsecond timers would need to only implement the
>> new microsecond timer infrastructure and be done with it.
>
> Yes I suggested that a few emails ago but didn't get a response.

Is it just me or are get_timer(), set_timer() and reset_timer() in U-Boot
a little bit braindead? get_timer() returns microseconds since last
reset_timer() plus an optional offset, set_timer() allows the current
microseconds to an arbitrary value and reset_timer() is essentially
set_timer(0)

A random look at at91 is interesting though:

void set_timer(ulong t)
{
gd->tbl = t;
}

void reset_timer(void)
{
reset_timer_masked();
}

void reset_timer_masked(void)
{
/* reset time */
at91_tc_t *tc = (at91_tc_t *) AT91_TC_BASE;
gd->lastinc = readl(&tc->tc[0].cv) & 0x;
gd->tbl = 0;
}

So set_timer(0) != reset_timer() in a rather big way!

Now some arches (imx for example) do not implement set_timer() which makes
using it a 'Bad Idea'(tm)

And why do we need reset_timer() - Anything that uses it can just do:

ulong start_time = get_timer(0);
while (get_timer(start_time) < SOME_TIMEOUT) {
...do stuff..
}

NOTE: May not be the 'safest' way to do that - I recall there being a LOT
of discussion about this with regards to wrap-around and safe ways of
doing the above

Anyway, my point is, if the timer API wasa fixed, all the boot logging API
needs to do is call get_timer() and your done - instant millisecond
timestamp - No fallbacks - Each arch just needs to implement get_timer()
correctly

>>> - integrate with boot progress
>>
>> The current boot progress to me seems pretty ugly and could do with a
>> make-over.  So if it is possible to merge those two logical functions,
>> we would have a win-win situation.

Sounds like a two-patch approach - Fix up boot progress and then slap
logging on top

>
> OK fair enough. I will do this if there is agreement that this type of
> boot timing is worth having.

I could have a look at this if you like Simon

Regards,

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


Re: [U-Boot] [PATCH 0/4] Accurate boot time measurement

2011-05-19 Thread Graeme Russ
>
> Anyway, my point is, if the timer API wasa fixed, all the boot logging API
> needs to do is call get_timer() and your done - instant millisecond

make that microsecond ;)

> timestamp - No fallbacks - Each arch just needs to implement get_timer()
> correctly
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 0/2] SMDKV310 Board Support

2011-05-19 Thread Chander Kashyap
Hi,
This patchset adds support for a new board SMDKV310, based on S5PV310 SOC.
This SOC is very similar to S5PC210 SOC, hence we are re-using this SOC code.

Specific changes in PATCH v3 are mentioned in specific patch files.

Chander Kashyap (2):
  ARMV7: Add support for Samsung SMDKV310 Board
  ARMV7: MMC SPL Boot support for SMDKV310 board

 MAINTAINERS|4 +
 Makefile   |   11 +
 board/samsung/smdkv310/Makefile|   46 ++
 board/samsung/smdkv310/lowlevel_init.S |  470 
 board/samsung/smdkv310/mem_setup.S |  365 +++
 board/samsung/smdkv310/smdkv310.c  |  136 ++
 boards.cfg |1 +
 include/configs/smdkv310.h |  169 +++
 mmc_spl/board/samsung/smdkv310/Makefile|  105 +
 mmc_spl/board/samsung/smdkv310/mmc_boot.c  |   81 
 .../board/samsung/smdkv310/tools/mkv310_image.c|  116 +
 mmc_spl/board/samsung/smdkv310/u-boot.lds  |   86 
 12 files changed, 1590 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/smdkv310/Makefile
 create mode 100644 board/samsung/smdkv310/lowlevel_init.S
 create mode 100644 board/samsung/smdkv310/mem_setup.S
 create mode 100644 board/samsung/smdkv310/smdkv310.c
 create mode 100644 include/configs/smdkv310.h
 create mode 100644 mmc_spl/board/samsung/smdkv310/Makefile
 create mode 100644 mmc_spl/board/samsung/smdkv310/mmc_boot.c
 create mode 100644 mmc_spl/board/samsung/smdkv310/tools/mkv310_image.c
 create mode 100644 mmc_spl/board/samsung/smdkv310/u-boot.lds

-- 
1.7.4.1

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


[U-Boot] [PATCH v4 1/2] ARMV7: Add support for Samsung SMDKV310 Board

2011-05-19 Thread Chander Kashyap
SMDKV310 board is based on Samsung S5PV310 SOC. This SOC is very much
similar to S5PC210.

Signed-off-by: Chander Kashyap 
Signed-off-by: Tushar Behera 
---
Changes for v2:
- Coding Style Cleanup
- Removed unwanted macros from board config file.
- Ethernet controllor configuration is done using gpio structures.
- MMC Controllor gpio configuration corrected.
- Added MAINTAINERS entry.
- Removed unwanted code from mem_setup.S.
Changes for v3:
- Comment style fixed
- Added New macro in board config file.
Changes for v4:
- Fixed line with more than 80 characters in board config file
 
 MAINTAINERS|4 +
 board/samsung/smdkv310/Makefile|   46 +++
 board/samsung/smdkv310/lowlevel_init.S |  470 
 board/samsung/smdkv310/mem_setup.S |  365 +
 board/samsung/smdkv310/smdkv310.c  |  136 +
 boards.cfg |1 +
 include/configs/smdkv310.h |  169 
 7 files changed, 1191 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/smdkv310/Makefile
 create mode 100644 board/samsung/smdkv310/lowlevel_init.S
 create mode 100644 board/samsung/smdkv310/mem_setup.S
 create mode 100644 board/samsung/smdkv310/smdkv310.c
 create mode 100644 include/configs/smdkv310.h

diff --git a/MAINTAINERS b/MAINTAINERS
index e2c48a8..a3f6ef2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -702,6 +702,10 @@ Minkyu Kang 
s5p_goniARM ARMV7 (S5PC110 SoC)
s5pc210_universal   ARM ARMV7 (S5PC210 SoC)
 
+Chander Kashyap 
+
+   SMDKV310ARM ARMV7 (S5PC210 SoC)
+
 Frederik Kriewitz 
 
devkit8000  ARM ARMV7 (OMAP3530 SoC)
diff --git a/board/samsung/smdkv310/Makefile b/board/samsung/smdkv310/Makefile
new file mode 100644
index 000..8e9b703
--- /dev/null
+++ b/board/samsung/smdkv310/Makefile
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2011 Samsung Electronics
+#
+# 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).o
+
+SOBJS  := mem_setup.o
+SOBJS  += lowlevel_init.o
+COBJS  += smdkv310.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+all:$(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/samsung/smdkv310/lowlevel_init.S 
b/board/samsung/smdkv310/lowlevel_init.S
new file mode 100644
index 000..359cff4
--- /dev/null
+++ b/board/samsung/smdkv310/lowlevel_init.S
@@ -0,0 +1,470 @@
+/*
+ * Lowlevel setup for SMDKV310 board based on S5PC210
+ *
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include 
+#include 
+#include 
+
+/*
+ * Register usages:
+ *
+ * r5 has zero always
+ * r7 has GPIO part1 base 0x1140
+ * r6 has GPIO part2 base 0x1100
+ */
+
+#define MEM_DLLl_ON
+
+_TEXT_BASE:
+   .word   CONFIG_SYS_TEXT_BASE
+
+   .globl lowlevel_init
+lowlevel_init:
+   push{lr}
+
+   /* r5 has always zero */
+   mov r5, #0
+   ldr r7, =S5PC210_GPIO_PART1_BASE
+   ldr r6, =S5PC210_GPIO_PART2_B

[U-Boot] [PATCH v4 2/2] ARMV7: MMC SPL Boot support for SMDKV310 board

2011-05-19 Thread Chander Kashyap
Added MMC SPL boot support for SMDKV310. This framework design is
based on nand_spl support.

Signed-off-by: Chander Kashyap 
---
Changes for v3:
- spl file renamed to u-boot-mmc-spl.bin
- spl directory renamed to mmc_spl
- comments added in mkv310_image.c file

 Makefile   |   11 ++
 mmc_spl/board/samsung/smdkv310/Makefile|  105 ++
 mmc_spl/board/samsung/smdkv310/mmc_boot.c  |   81 ++
 .../board/samsung/smdkv310/tools/mkv310_image.c|  116 
 mmc_spl/board/samsung/smdkv310/u-boot.lds  |   86 +++
 5 files changed, 399 insertions(+), 0 deletions(-)
 create mode 100644 mmc_spl/board/samsung/smdkv310/Makefile
 create mode 100644 mmc_spl/board/samsung/smdkv310/mmc_boot.c
 create mode 100644 mmc_spl/board/samsung/smdkv310/tools/mkv310_image.c
 create mode 100644 mmc_spl/board/samsung/smdkv310/u-boot.lds

diff --git a/Makefile b/Makefile
index 384a59e..25b87b0 100644
--- a/Makefile
+++ b/Makefile
@@ -322,6 +322,10 @@ ALL += $(obj)u-boot-onenand.bin
 ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
 endif
 
+ifeq ($(CONFIG_MMC_U_BOOT),y)
+ALL += $(obj)mmc_spl/u-boot-mmc-spl.bin
+endif
+
 all:   $(ALL)
 
 $(obj)u-boot.hex:  $(obj)u-boot
@@ -413,6 +417,11 @@ onenand_ipl:   $(TIMESTAMP_FILE) $(VERSION_FILE) 
$(obj)include/autoconf.mk
 $(obj)u-boot-onenand.bin:  onenand_ipl $(obj)u-boot.bin
cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
 
+mmc_spl:   $(TIMESTAMP_FILE) $(VERSION_FILE) depend
+   $(MAKE) -C mmc_spl/board/$(BOARDDIR) all
+
+$(obj)mmc_spl/u-boot-mmc-spl.bin:  mmc_spl
+
 $(VERSION_FILE):
@( localvers='$(shell $(TOPDIR)/tools/setlocalversion 
$(TOPDIR))' ; \
   printf '#define PLAIN_VERSION "%s%s"\n' \
@@ -1123,6 +1132,7 @@ clean:
@rm -f $(obj)lib/asm-offsets.s
@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,System.map}
@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map}
+   @rm -f 
$(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin}
@rm -f $(ONENAND_BIN)
@rm -f $(obj)onenand_ipl/u-boot.lds
@rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
@@ -1147,6 +1157,7 @@ clobber:  clean
@rm -fr $(obj)include/generated
@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l 
-print | xargs rm -f
@[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l 
-print | xargs rm -f
+   @[ ! -d $(obj)mmc_spl ] || find $(obj)mmc_spl -name "*" -type l -print 
| xargs rm -f
 
 ifeq ($(OBJTREE),$(SRCTREE))
 mrproper \
diff --git a/mmc_spl/board/samsung/smdkv310/Makefile 
b/mmc_spl/board/samsung/smdkv310/Makefile
new file mode 100644
index 000..f1ce066
--- /dev/null
+++ b/mmc_spl/board/samsung/smdkv310/Makefile
@@ -0,0 +1,105 @@
+#
+# (C) Copyright 2006-2007
+# Stefan Roese, DENX Software Engineering, s...@denx.de.
+#
+# (C) Copyright 2008
+# Guennadi Liakhovetki, DENX Software Engineering, 
+#
+# (C) Copyright 2011
+# Chander Kashyap, Samsung Electronics, 
+#
+# 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
+#
+
+CONFIG_MMC_SPL = y
+
+include $(TOPDIR)/config.mk
+
+LDSCRIPT= $(TOPDIR)/mmc_spl/board/$(BOARDDIR)/u-boot.lds
+LDFLAGS= -Bstatic -T $(mmcobj)u-boot.lds -Ttext 
$(CONFIG_SYS_TEXT_BASE) $(PLATFORM_LDFLAGS)
+AFLAGS += -DCONFIG_MMC_SPL
+CFLAGS += -DCONFIG_MMC_SPL
+CFLAGS += -DCONFIG_PRELOADER
+
+SOBJS  = start.o mem_setup.o lowlevel_init.o
+COBJS  = mmc_boot.o
+
+SRCS   := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+__OBJS := $(SOBJS) $(COBJS)
+LNDIR  := $(OBJTREE)/mmc_spl/board/$(BOARDDIR)
+
+mmcobj := $(OBJTREE)/mmc_spl/
+
+
+MKV310_MMC_SPL_EXEC = mkv310_mmc_spl_exec
+MMC_SPL_BIN = u-boot-mmc-spl.bin
+
+ALL = $(mmcobj)u-boot-spl $(mmcobj)u-boot-spl.bin $(mmcobj)$(MMC_SPL_BIN)
+
+all:$(obj).depend $(ALL)
+
+$(mmcobj)$(MMC_SPL_BIN):  $(mmcobj)u-boot-spl.bin tools/$(MKV310_MMC_SPL_EXEC)
+   ./tools/$(MKV310_MMC_SPL_EXEC) $(mmcobj)u-boot-spl.bin 
$(mmcobj)$(MMC_SPL_BIN)
+   rm -f tools/$(MKV310_MMC_SPL_EXEC)
+
+tools/$(MK

[U-Boot] 8308 processor continously reboots with u-boot-2009.11-rc1

2011-05-19 Thread Sharath Kurudi
Hi,

   I am trying to port u-boot-2009.11-rc1 on 8308 processor. I get the
following prints on the terminal and the processor continuously resets

Prints on the console

PrivateBuild:sharath (May 19 2011 - 23:18:20) MPC83XX

Reset Status: Check Stop, External/Internal Soft, External/Internal Hard
Arbiter Event Status:
   Event Address: 0x0001
   Event Type:0x0  = Address Time Out
   Master ID: 0x00 = e300 Core Data Transaction
   Transfer Size: 0x9  = 1 bytes
   Transfer Type: 0x0a = Single-beat or Burst read
   Mem Clk : 0xfe502a8

CPU:   e300c3, MPC8308, Rev: 1.0 at 266.667 MHz, CSB: 133.333 MHz

Could anybody help?


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


[U-Boot] Hello Would You Like To Earn

2011-05-19 Thread Jenny . Smith
Hello u-boot

Would you like to earn an extra $200 everyday?, for just 45 minutes work? You 
could quit your job and make double the money at home working for yourself.

visit->http:tinyurl.com/6lf4xrt

Regards,

Jenny Smith

Survey Human Resources Dept.


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


[U-Boot] Hello Would You Like To Earn

2011-05-19 Thread Jenny . Smith
Hello u-boot

Would you like to earn an extra $200 everyday?, for just 45 minutes work? You 
could quit your job and make double the money at home working for yourself.

visit->http:tinyurl.com/6lf4xrt

Regards,

Jenny Smith

Survey Human Resources Dept.


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


[U-Boot] Hello Would You Like To Earn

2011-05-19 Thread Jenny . Smith
Hello u-boot

Would you like to earn an extra $200 everyday?, for just 45 minutes work? You 
could quit your job and make double the money at home working for yourself.

visit->http:tinyurl.com/6lf4xrt

Regards,

Jenny Smith

Survey Human Resources Dept.


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


[U-Boot] Hello Would You Like To Earn

2011-05-19 Thread Carmille . Burns
Hello u-boot

Would you like to earn an extra $200 everyday?, for just 45 minutes work? You 
could quit your job and make double the money at home working for yourself.

visit->http:tinyurl.com/42e38u9

Regards,

Carmille Burns

Survey Human Resources Dept.


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


[U-Boot] [PATCH] powerpc/85xx: Fix compile errors if CONFIG_SYS_{BR, OR}0_PRELIM aren't set

2011-05-19 Thread Kumar Gala
Add ifdef protection in LBC code to handle the case in which
CONFIG_SYS_BR0_PRELIM and CONFIG_SYS_OR0_PRELIM arent defined for a
build.

Signed-off-by: Kumar Gala 
---
 arch/powerpc/cpu/mpc8xxx/fsl_lbc.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c 
b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
index 7598ebf..d78962f 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
@@ -58,8 +58,10 @@ void init_early_memctl_regs(void)
 #endif
/* now restrict to preliminary range */
if (init_br1) {
+#if defined(CONFIG_SYS_BR0_PRELIM) && defined(CONFIG_SYS_OR0_PRELIM)
set_lbc_br(0, CONFIG_SYS_BR0_PRELIM);
set_lbc_or(0, CONFIG_SYS_OR0_PRELIM);
+#endif
 
 #if defined(CONFIG_SYS_BR1_PRELIM) && defined(CONFIG_SYS_OR1_PRELIM)
set_lbc_or(1, CONFIG_SYS_OR1_PRELIM);
-- 
1.7.3.4

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


[U-Boot] [PATCH] powerpc/85xx: Fix compile errors if CONFIG_SYS_{B, Q}MAN_MEM_PHYS aren't set

2011-05-19 Thread Kumar Gala
Add ifdef protection in LAW & TLB code to handle the case in which
CONFIG_SYS_BMAN_MEM_PHYS or CONFIG_SYS_QMAN_MEM_PHYS arent defined for a
build.

Signed-off-by: Kumar Gala 
---
 board/freescale/corenet_ds/law.c |4 
 board/freescale/corenet_ds/tlb.c |4 
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/board/freescale/corenet_ds/law.c b/board/freescale/corenet_ds/law.c
index d2ba556..dd6f6f7 100644
--- a/board/freescale/corenet_ds/law.c
+++ b/board/freescale/corenet_ds/law.c
@@ -29,8 +29,12 @@
 
 struct law_entry law_table[] = {
SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+#ifdef CONFIG_SYS_BMAN_MEM_PHYS
SET_LAW(CONFIG_SYS_BMAN_MEM_PHYS, LAW_SIZE_2M, LAW_TRGT_IF_BMAN),
+#endif
+#ifdef CONFIG_SYS_QMAN_MEM_PHYS
SET_LAW(CONFIG_SYS_QMAN_MEM_PHYS, LAW_SIZE_2M, LAW_TRGT_IF_QMAN),
+#endif
SET_LAW(PIXIS_BASE_PHYS, LAW_SIZE_4K, LAW_TRGT_IF_LBC),
 #ifdef CONFIG_SYS_DCSRBAR_PHYS
SET_LAW(CONFIG_SYS_DCSRBAR_PHYS, LAW_SIZE_4M, LAW_TRGT_IF_DCSR),
diff --git a/board/freescale/corenet_ds/tlb.c b/board/freescale/corenet_ds/tlb.c
index 38736b4..2ce7004 100644
--- a/board/freescale/corenet_ds/tlb.c
+++ b/board/freescale/corenet_ds/tlb.c
@@ -98,6 +98,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
  0, 6, BOOKE_PAGESZ_256K, 1),
 
/* Bman/Qman */
+#ifdef CONFIG_SYS_BMAN_MEM_PHYS
SET_TLB_ENTRY(1, CONFIG_SYS_BMAN_MEM_BASE, CONFIG_SYS_BMAN_MEM_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, 0,
  0, 9, BOOKE_PAGESZ_1M, 1),
@@ -105,6 +106,8 @@ struct fsl_e_tlb_entry tlb_table[] = {
  CONFIG_SYS_BMAN_MEM_PHYS + 0x0010,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 10, BOOKE_PAGESZ_1M, 1),
+#endif
+#ifdef CONFIG_SYS_QMAN_MEM_PHYS
SET_TLB_ENTRY(1, CONFIG_SYS_QMAN_MEM_BASE, CONFIG_SYS_QMAN_MEM_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, 0,
  0, 11, BOOKE_PAGESZ_1M, 1),
@@ -112,6 +115,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
  CONFIG_SYS_QMAN_MEM_PHYS + 0x0010,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 12, BOOKE_PAGESZ_1M, 1),
+#endif
 #ifdef CONFIG_SYS_DCSRBAR_PHYS
SET_TLB_ENTRY(1, CONFIG_SYS_DCSRBAR, CONFIG_SYS_DCSRBAR_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-- 
1.7.3.4

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


[U-Boot] [PATCH] powerpc/fsl_pci: Fix device tree fixups for newer platforms

2011-05-19 Thread Kumar Gala
We assumed that only a small set of compatiable strings would be needed
to find the PCIe device tree nodes to be fixed up.  However on newer
platforms the simple rules no longer work.  We need to allow specifying
the PCIe compatiable string for each individual SoC.

We introduce CONFIG_SYS_FSL_PCIE_COMPAT for this purpose and set it if
the default isn't sufficient.

Signed-off-by: Kumar Gala 
---
 README|5 +
 arch/powerpc/include/asm/config_mpc85xx.h |9 +
 arch/powerpc/include/asm/fsl_pci.h|6 +-
 3 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/README b/README
index ed73981..8bb9c8d 100644
--- a/README
+++ b/README
@@ -363,6 +363,11 @@ The following options need to be configured:
system clock.  On most PQ3 devices this is 8, on newer QorIQ
devices it can be 16 or 32.  The ratio varies from SoC to Soc.
 
+   CONFIG_SYS_FSL_PCIE_COMPAT
+
+   Defines the string to utilize when trying to match PCIe device
+   tree nodes for the given platform.
+
 - Intel Monahans options:
CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO
 
diff --git a/arch/powerpc/include/asm/config_mpc85xx.h 
b/arch/powerpc/include/asm/config_mpc85xx.h
index 41c2d20..d5c0aee 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -96,6 +96,7 @@
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
 #define CONFIG_NUM_DDR_CONTROLLERS 1
 #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff70
+#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.2"
 
 /* P1011 is single core version of P1020 */
 #elif defined(CONFIG_P1011)
@@ -175,6 +176,7 @@
 #define CONFIG_SYS_QMAN_NUM_PORTALS3
 #define CONFIG_SYS_BMAN_NUM_PORTALS3
 #define CONFIG_SYS_FM_MURAM_SIZE   0x1
+#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.2"
 
 #elif defined(CONFIG_P1020)
 #define CONFIG_MAX_CPUS2
@@ -216,6 +218,7 @@
 #define CONFIG_SYS_QMAN_NUM_PORTALS3
 #define CONFIG_SYS_BMAN_NUM_PORTALS3
 #define CONFIG_SYS_FM_MURAM_SIZE   0x1
+#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.2"
 
 /* P1024 is lower end variant of P1020 */
 #elif defined(CONFIG_P1024)
@@ -265,6 +268,7 @@
 #define CONFIG_NUM_DDR_CONTROLLERS 1
 #define CONFIG_SYS_FM_MURAM_SIZE   0x28000
 #define CONFIG_SYS_FSL_TBCLK_DIV   32
+#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.2"
 #define CONFIG_SYS_FSL_USB1_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB2_PHY_ENABLE
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
@@ -280,6 +284,7 @@
 #define CONFIG_NUM_DDR_CONTROLLERS 1
 #define CONFIG_SYS_FM_MURAM_SIZE   0x28000
 #define CONFIG_SYS_FSL_TBCLK_DIV   32
+#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.2"
 #define CONFIG_SYS_FSL_USB1_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB2_PHY_ENABLE
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
@@ -291,6 +296,7 @@
 #define CONFIG_SYS_FSL_SEC_COMPAT  4
 #define CONFIG_SYS_FM_MURAM_SIZE   0x28000
 #define CONFIG_SYS_FSL_TBCLK_DIV   16
+#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,p4080-pcie"
 
 #elif defined(CONFIG_PPC_P4080)
 #define CONFIG_MAX_CPUS8
@@ -305,6 +311,7 @@
 #define CONFIG_NUM_DDR_CONTROLLERS 2
 #define CONFIG_SYS_FM_MURAM_SIZE   0x28000
 #define CONFIG_SYS_FSL_TBCLK_DIV   16
+#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,p4080-pcie"
 #define CONFIG_SYS_FSL_ERRATUM_CPC_A002
 #define CONFIG_SYS_FSL_ERRATUM_CPC_A003
 #define CONFIG_SYS_FSL_ERRATUM_DDR_A003
@@ -330,6 +337,7 @@
 #define CONFIG_NUM_DDR_CONTROLLERS 1
 #define CONFIG_SYS_FM_MURAM_SIZE   0x28000
 #define CONFIG_SYS_FSL_TBCLK_DIV   32
+#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.2"
 #define CONFIG_SYS_FSL_USB1_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB2_PHY_ENABLE
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
@@ -345,6 +353,7 @@
 #define CONFIG_NUM_DDR_CONTROLLERS 2
 #define CONFIG_SYS_FM_MURAM_SIZE   0x28000
 #define CONFIG_SYS_FSL_TBCLK_DIV   32
+#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.2"
 #define CONFIG_SYS_FSL_USB1_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB2_PHY_ENABLE
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
diff --git a/arch/powerpc/include/asm/fsl_pci.h 
b/arch/powerpc/include/asm/fsl_pci.h
index fc47a9f..49bd2bf 100644
--- a/arch/powerpc/include/asm/fsl_pci.h
+++ b/arch/powerpc/include/asm/fsl_pci.h
@@ -233,7 +233,7 @@ int fsl_pcie_init_board(int busno);
 #if !defined(CONFIG_PCI)
 #define FT_FSL_PCI_SETUP
 #elif defined(CONFIG_FSL_CORENET)
-#define FSL_PCIE_COMPAT"fsl,p4080-pcie"
+#define FSL_PCIE_COMPATCONFIG_SYS_FSL_PCIE_COMPAT
 #define FT_FSL_PCI_SETUP \
FT_FSL_PCIE1_SETUP; \
FT_FSL_PCIE2_SETUP; \
@@ -242,7 +242,11 @@ int fsl_pcie_init_board(int busno);
 #define FT_FSL_PCIE_SETUP FT_FSL_PCI_SETUP
 #elif defined(CONFIG_MPC85xx)
 #define FSL_PCI_COMPAT "fsl,mpc8540-pci"
+#ifdef CONFIG_SYS_FSL

[U-Boot] Hello Would You Like To Earn

2011-05-19 Thread Jenny . Smith
Hello u-boot

Would you like to earn an extra $200 everyday?, for just 45 minutes work? You 
could quit your job and make double the money at home working for yourself.

visit->http:tinyurl.com/6lf4xrt

Regards,

Jenny Smith

Survey Human Resources Dept.


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


Re: [U-Boot] [STATUS] v2011.06-rc1 released

2011-05-19 Thread Jens Scharsig
Hello,

please apply the following patch

http://patchwork.ozlabs.org/patch/83703/

this will make at91rm9200ek and eb_cpux9k2 board work with current release.
This patch also fix the broken arm/920t/at91 arch since last merge with
arm custodian tree.

Best regards

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