Re: [U-Boot] [PATCH 4/4] powerpc/mpc8xxx: fix workaround for errata DDR111 and DDR134

2011-03-22 Thread Kumar Gala

On Mar 17, 2011, at 3:58 PM, Kumar Gala wrote:

> From: York Sun 
> 
> The fix for errata workaround is to avoid covering physical address
> 0xff00 to 0x during the implementation.
> 
> Signed-off-by: York Sun 
> Signed-off-by: Kumar Gala 
> ---
> arch/powerpc/cpu/mpc85xx/ddr-gen3.c |   41 +++
> 1 files changed, 41 insertions(+), 0 deletions(-)

applied

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


Re: [U-Boot] [PATCH 3/4] powerpc/mpc8xxx: disable rcw_en bit for non-DDR3

2011-03-22 Thread Kumar Gala

On Mar 17, 2011, at 3:58 PM, Kumar Gala wrote:

> From: York Sun 
> 
> rcw_en bit is only available for DDR3 controllers. It is a reserved bit on
> DDR1 and DDR2 controllers.
> 
> Signed-off-by: York Sun 
> Signed-off-by: Kumar Gala 
> ---
> arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c |2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)

applied

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


Re: [U-Boot] [PATCH 2/4] powerpc/mpc8572ds: revise board specific timing for dual-rank DIMMs

2011-03-22 Thread Kumar Gala

On Mar 17, 2011, at 3:58 PM, Kumar Gala wrote:

> From: York Sun 
> 
> Tested all possible values for clk_adjust and write_data_delay for dual
> rank UDIMM and RDIMM to revise the tables.
> 
> Signed-off-by: York Sun 
> Signed-off-by: Kumar Gala 
> ---
> board/freescale/mpc8572ds/ddr.c |  110 +++---
> 1 files changed, 78 insertions(+), 32 deletions(-)

applied

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


Re: [U-Boot] [PATCH 1/4] powerpc/mpc8xxx: fix recognition of DIMMs with ECC and Address Parity

2011-03-22 Thread Kumar Gala

On Mar 17, 2011, at 3:58 PM, Kumar Gala wrote:

> From: York Sun 
> 
> To recognize DIMMs with ECC capability by testing ECC bit only. Not to be
> confused by Address Parity bit.
> 
> Signed-off-by: York Sun 
> Signed-off-by: Kumar Gala 
> ---
> .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|3 ++-
> arch/powerpc/include/asm/fsl_ddr_dimm_params.h |4 
> 2 files changed, 6 insertions(+), 1 deletions(-)

applied

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


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

2011-03-22 Thread Kumar Gala
[ a few fixes for v2011.03 related to DDR settings on MPC8572DS ]

The following changes since commit 62043ed02a2acffa801e3574e249de07d30336a2:
  Wolfgang Denk (1):
Merge branch 'master' of git://git.denx.de/u-boot-ubi

are available in the git repository at:

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

York Sun (4):
  powerpc/mpc8xxx: fix recognition of DIMMs with ECC and Address Parity
  powerpc/mpc8572ds: revise board specific timing for dual-rank DIMMs
  powerpc/mpc8xxx: disable rcw_en bit for non-DDR3
  powerpc/mpc8xxx: fix workaround for errata DDR111 and DDR134

 arch/powerpc/cpu/mpc85xx/ddr-gen3.c|   41 +++
 arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c   |2 +
 .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|3 +-
 arch/powerpc/include/asm/fsl_ddr_dimm_params.h |4 +
 board/freescale/mpc8572ds/ddr.c|  110 ++--
 5 files changed, 127 insertions(+), 33 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] S5P: timer: replace bss variable by gd

2011-03-22 Thread Minkyu Kang
On 16 March 2011 20:06, Minkyu Kang  wrote:
> Use the global data instead of bss variable, replace as follow.
>
> count_value -> removed
> timestamp -> tbl
> lastdec -> lastinc
>
> Signed-off-by: Minkyu Kang 
> Signed-off-by: Kyungmin Park 
> ---
>  arch/arm/cpu/armv7/s5p-common/timer.c |   27 ---
>  1 files changed, 12 insertions(+), 15 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 V2] ARMV7: S5P: Fixed register offset in mmc.h

2011-03-22 Thread Minkyu Kang
Dear Chander Kashyap,

On 22 March 2011 20:29, Chander Kashyap  wrote:
> The MMC registers are accessed through struct s5p_mmc member
> variables. MMC controller "control4" register offset is set
> to 0x8C as per data sheet. The size of struct s5p_mmc is also
> corrected.
>
> Signed-off-by: Chander Kashyap 
> Signed-off-by: Tushar Behera 
> ---
>  arch/arm/include/asm/arch-s5pc1xx/mmc.h |    5 +++--
>  arch/arm/include/asm/arch-s5pc2xx/mmc.h |    5 +++--
>  2 files changed, 6 insertions(+), 4 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 01/21] Define new system_restart() and emergency_restart()

2011-03-22 Thread Graeme Russ
On Wed, Mar 23, 2011 at 12:28 AM, Wolfgang Denk  wrote:
> Dear Graeme Russ,
>
> In message <4d88909a.80...@gmail.com> you wrote:
>>
>> > That would be a layer higher than do_reset() (for example, in
>> > panic()).
>>
>> Hmmm, but panic() is defined in lib/vsprintf.c with no possibility for it
>> to be overridden in any arch or board specific way
>
> I guess that could be helped.
>
>> > panic() is a higher software layer. It probably results in calling
>> > reset() in the end.
>>
>> Unless CONFIG_PANIC_HANG is defined...
>
>> reset():
>>   - does not exist (as far as I can tell)
>
> reset() is used as symbol in many arm, mips and sparc start.S files

Good point

>
>> I still like the idea of passing a 'reason' to reset() / panic() - Could we
>> change panic() to:
> ...
>> Anywhere in the code that needed to hang has a choice - hang(reason) or
>> panic(reason | PANIC_FLAG_HANG)
>
> I don't think you resonably decide which to use in common code.

My point was that everything can be piped through panic()

>
> Most calls to panic() appear to come from proprietary flash drivers
> anyway - most of which should be dropped as they could use the CFI
> driver instead. [And if you look at the actual code, the tests for
> these panic()s can easily be computed at compile time, so these are
> stupid aniway.]
>
> Others
>
> Now, assume for things like this:
>
>        panic("No working SDRAM available\n");
>
> or like handling undefined instructions or that - what would be more
> useful - to hang() to to reset()? ;-)

Replace with:
        panic(PANIC_FLAG_HANG, "No working SDRAM available\n");

or:
        panic(PANIC_REASON_NO_RAM, "No working SDRAM available\n");

And all of the current do_reset(NULL, 0, 0, NULL) can be changed to:
        panic(PANIC_FLAG_RESET, NULL);

or if the print a message before the call to reset then:
        panic(PANIC_FLAG_RESET, "Whatever message was printed\n");

And panic() becomes:

void panic(u32 reason, const char *fmt, ...)
{
   if(fmt) {
  va_list args;
  va_start(args, fmt);
  vprintf(fmt, args);
  putc('\n');
  va_end(args);
   }

   if (reason |= PANIC_FLAG_HANG)
   hang(reason);
   else,
   reset(reason);
}

>
>
> Can you please show me a specific case where you would use such
> different arguments to panic() in the existing code?

My reasoning is cleaning up the reset()/hang()/panic() API.

Also, consider devices which do not normally have any device attached to
log serial output, but you may want to log reset/hang reasons for diagnosis
later. Board defined hang() and reset() can log the reason in NVRAM and at
next bootup (with a serial console attached) part of the startup message
could be 'Last Reset Reason'

>
>> Default implementations of hang() and reset() would just ignore reason.
>> Board specific code can use reason to do one last boot_progress(), set LED
>> states etc.
>
> That should be done at a higher software layer.
>

How? For example, if an Ethernet device which the board uses to tftp a file
from fails to initialise, that failure is detected in the common driver
code and as a consequence hang(), reset(), or panic() is called. The driver
can print out a message before calling hang() or reset() (useless if you
have no serial console attached) and by the time any arch or board specific
code gets called, all information regarding the failure has been lost. Why
should a common driver decide if the board should hang or reset? What if
the board has an alternative method of retrieving the file it was going to
tftp (maybe a fail-safe backup in Flash). In which case, the board can
just go

OK, I may be bluring the line towards what might be reasonably handled by
loading an OS (but maybe the latest OS image was being tfp'd) but my point
is that a good reset/panic/hang API gives the _board_ ultimate control over
what do do. Currently, ulitimate control of what to do in a particular
failure scenario is hard-coded by drivers and CPU/SOC/arch specific code
with little to no control offered up to the board. What control there is
has been provided by ugly #ifdef's

I am suggesting an API that goes along the lines of:

 - driver/common/board specific code encounters a failure and calls panic()
   There may be cases where the call site _knows_ a hang or reset must be
   performed and would thus provide PANIC_FLAG_HANG or PANIC_FLAG_RESET
 - panic() prints a message (if provided)
 - panic() calls weak hang or reset functions was default implementations
   in arch/soc/cpu
 - do_reset() from the command line calls straight into reset() with
   PANIC_FLAG_USER_RESET
 - boards can override hang() and reset() in order to provide better
   control of the shutdown processes (release DMA buffers etc) or to
   log the reason in non-volatile storage
 - arch hang() and reset() can be called by the board's override to
   perform shutdown of multi-CPU's etc
 - etc

Regards,

Graeme
___

Re: [U-Boot] [PATCH] strmhz: Make hz unsigned to support greater than 2146 MHz clock

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

In message <1299342497-2942-1-git-send-email-ga...@kernel.crashing.org> you 
wrote:
> From: Ed Swarthout 
> 
> For example, an input of 0x8000 should print:
> 
> 2147.484 instead of -2147.-483.
> 
> Signed-off-by: Ed Swarthout 
> Signed-off-by: Kumar Gala 
> ---
>  include/common.h |2 +-
>  lib/strmhz.c |2 +-
>  2 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
"We don't have to protect the environment -- the Second Coming is  at
hand."   - James Watt
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-03-22 Thread Wolfgang Denk
Dear haiying.w...@freescale.com,

In message <1298410685-21335-1-git-send-email-haiying.w...@freescale.com> you 
wrote:
> From: Haiying Wang 
> 
> commit 8aba9dceebb14144e07d19593111ee3a999c37fc
> Divides variable of linker flags to LDFLAGS-u-boot and LDFLAGS
> 
> breaks the usage of --gc-section to build nand_spl. We still need linker 
> option
> --gc-section for every uboot image, not only the main one. LDFLAGS_FINAL 
> passes
> the --gc-sections to each uboot image.
> 
> To get the proper linker flags, we use LDFLAGS and LDFLAGS_FINAL to replace 
> PLATFORM_LDFLAGS in the Makefile of each nand_spl board.
> 
> Signed-off-by: Scott Wood 
> Signed-off-by: Haiying Wang 
> ---
> v3: remove LDFLAGS from LDFLAGS_FINAL since it is already in LDFLAGS_u-boot, 
> and
> add LDFLAGS to each nand_spl board's LDFLAGS
>  arch/blackfin/config.mk   |2 +-
>  arch/i386/config.mk   |2 +-
>  arch/nios2/config.mk  |2 +-
>  arch/powerpc/config.mk|2 +-
>  arch/sh/config.mk |2 +-
>  config.mk |3 ++-
>  nand_spl/board/amcc/acadia/Makefile   |3 ++-
>  nand_spl/board/amcc/bamboo/Makefile   |3 ++-
>  nand_spl/board/amcc/canyonlands/Makefile  |3 ++-
>  nand_spl/board/amcc/kilauea/Makefile  |3 ++-
>  nand_spl/board/amcc/sequoia/Makefile  |3 ++-
>  nand_spl/board/davinci/da8xxevm/Makefile  |3 ++-
>  nand_spl/board/freescale/mpc8313erdb/Makefile |4 ++--
>  nand_spl/board/freescale/mpc8315erdb/Makefile |4 ++--
>  nand_spl/board/freescale/mpc8536ds/Makefile   |3 ++-
>  nand_spl/board/freescale/mpc8569mds/Makefile  |3 ++-
>  nand_spl/board/freescale/mpc8572ds/Makefile   |3 ++-
>  nand_spl/board/freescale/mx31pdk/Makefile |3 ++-
>  nand_spl/board/freescale/p1_p2_rdb/Makefile   |3 ++-
>  nand_spl/board/karo/tx25/Makefile |3 ++-
>  nand_spl/board/samsung/smdk6400/Makefile  |3 ++-
>  nand_spl/board/sheldon/simpc8313/Makefile |4 ++--
>  22 files changed, 39 insertions(+), 25 deletions(-)

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 dog always bit deepest on the veterinary hand.
- Terry Pratchett, _Wyrd Sisters_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [Patch v2] Fix hash table deletion to prevent lost entries

2011-03-22 Thread Wolfgang Denk
Dear Peter Barada,

In message <4d87d9b0.1080...@logicpd.com> you wrote:
>
> > Can you please fix these, and resubmit?
> Updated patch attached (Thunderbird munched tabs)...

Thanks.

> > Also, do you happen to have a test case that can be used show the
> > problem in the existing code, and to test the patch?
> No, I don't have a testcase off hand (IIRC hashtable size is dependent on 
> size of u-boot and amount of RAM), from my original email:

I was able to verify both the problem and that your fix fixes it.
Tested on "qong".

Added a Tested-by: Wolfgang Denk 

> From: Peter Barada 
> Date: Mon, 21 Mar 2011 19:01:57 -0500
> Subject: [PATCH] Fix hashtable to properly handle deletion.
> 
> Use negative used value to mark deleted entry.  Search keeps probing
> past deleted entries.  Adding an entry uses first deleted entry when
> it hits end of probe chain.
> 
> Initially found that "ramdiskimage" and "preboot" collide modulus 347,
> causing "preboot" to be inserted at idx 190, "ramdiskimage" at idx 191.
> Previous to this fix when "preboot" is deleted, "ramdiskimage" is
> orphaned.
> 
> Signed-off-by: Peter Barada 
> ---
> diff --git a/lib/hashtable.c b/lib/hashtable.c
> index 9f069c0..fcdb53c 100644
> --- a/lib/hashtable.c
> +++ b/lib/hashtable.c

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
Just because your doctor has a name for your condition  doesn't  mean
he knows what it is.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] ST-Ericsson U8500 support

2011-03-22 Thread John Rigby
On Tue, Mar 22, 2011 at 2:40 PM, John Rigby  wrote:
> Add support for ST-Ericsson U8500 SoC and HREF platform
>
> John Rigby (1):
>  armv7: Add support for ST-Ericsson U8500 href platform

I failed to mention that this board uses the mmc driver as vexpress
submitted a few weeks ago.

[U-Boot] [PATCH V3 0/3] Add support for the MMC device to the vexpress
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/4] p101x: extra init for u8500

2011-03-22 Thread John Rigby
From: Rabin Vincent 

empty fifo on init
program receive line control register on u8500

Signed-off-by: Rabin Vincent 
---
 drivers/serial/serial_pl01x.c |   10 ++
 drivers/serial/serial_pl01x.h |4 
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 5dfcde8..22ada8f 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -112,6 +112,12 @@ int serial_init (void)
unsigned int remainder;
unsigned int fraction;
 
+   /* Empty RX fifo if necessary */
+   if (readl(®s->pl011_cr) & UART_PL011_CR_UARTEN) {
+   while (!(readl(®s->fr) & UART_PL01x_FR_RXFE))
+   readl(®s->dr);
+   }
+
/* First, disable everything */
writel(0, ®s->pl011_cr);
 
@@ -134,6 +140,10 @@ int serial_init (void)
writel(UART_PL011_LCRH_WLEN_8 | UART_PL011_LCRH_FEN,
   ®s->pl011_lcrh);
 
+#ifdef CONFIG_U8500
+   /* program receive line control register */
+   writel(0x70, ®s->pl011_rlcr);
+#endif
/* Finally, enable the UART */
writel(UART_PL011_CR_UARTEN | UART_PL011_CR_TXE | UART_PL011_CR_RXE,
   ®s->pl011_cr);
diff --git a/drivers/serial/serial_pl01x.h b/drivers/serial/serial_pl01x.h
index b670c24..fdd3911 100644
--- a/drivers/serial/serial_pl01x.h
+++ b/drivers/serial/serial_pl01x.h
@@ -43,7 +43,11 @@ struct pl01x_regs {
u32 pl010_lcrl; /* 0x10 Line control register, low byte */
u32 pl010_cr;   /* 0x14 Control register */
u32 fr; /* 0x18 Flag register (Read only) */
+#ifdef CONFIG_U8500
+   u32 pl011_rlcr; /* 0x1c Receive line control register */
+#else
u32 reserved;
+#endif
u32 ilpr;   /* 0x20 IrDA low-power counter register */
u32 pl011_ibrd; /* 0x24 Integer baud rate register */
u32 pl011_fbrd; /* 0x28 Fractional baud rate register */
-- 
1.7.1

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


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

2011-03-22 Thread John Rigby
From: Rabin Vincent 

Signed-off-by: Rabin Vincent 
Signed-off-by: Mathieu Poirier 
Signed-off-by: John Rigby 
---
 arch/arm/cpu/armv7/u8500/Makefile  |   46 +++
 arch/arm/cpu/armv7/u8500/clock.c   |   56 +++
 arch/arm/cpu/armv7/u8500/lowlevel.S|   33 ++
 arch/arm/cpu/armv7/u8500/timer.c   |  167 +
 arch/arm/include/asm/arch-u8500/ab8500.h   |  523 
 arch/arm/include/asm/arch-u8500/bits.h |   58 +++
 arch/arm/include/asm/arch-u8500/clock.h|   72 
 arch/arm/include/asm/arch-u8500/common.h   |  107 ++
 arch/arm/include/asm/arch-u8500/gpio.h |  247 +
 arch/arm/include/asm/arch-u8500/hardware.h |   83 +
 arch/arm/include/asm/arch-u8500/u8500.h|   47 +++
 11 files changed, 1439 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/u8500/Makefile
 create mode 100644 arch/arm/cpu/armv7/u8500/clock.c
 create mode 100644 arch/arm/cpu/armv7/u8500/lowlevel.S
 create mode 100644 arch/arm/cpu/armv7/u8500/timer.c
 create mode 100644 arch/arm/include/asm/arch-u8500/ab8500.h
 create mode 100644 arch/arm/include/asm/arch-u8500/bits.h
 create mode 100644 arch/arm/include/asm/arch-u8500/clock.h
 create mode 100644 arch/arm/include/asm/arch-u8500/common.h
 create mode 100644 arch/arm/include/asm/arch-u8500/gpio.h
 create mode 100644 arch/arm/include/asm/arch-u8500/hardware.h
 create mode 100644 arch/arm/include/asm/arch-u8500/u8500.h

diff --git a/arch/arm/cpu/armv7/u8500/Makefile 
b/arch/arm/cpu/armv7/u8500/Makefile
new file mode 100644
index 000..270aa40
--- /dev/null
+++ b/arch/arm/cpu/armv7/u8500/Makefile
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(SOC).o
+
+COBJS  = timer.o clock.o
+SOBJS  = lowlevel.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/arch/arm/cpu/armv7/u8500/clock.c b/arch/arm/cpu/armv7/u8500/clock.c
new file mode 100644
index 000..9e3b873
--- /dev/null
+++ b/arch/arm/cpu/armv7/u8500/clock.c
@@ -0,0 +1,56 @@
+/*
+ * (C) Copyright 2009 ST-Ericsson
+ *
+ * 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 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+struct clkrst {
+   unsigned int pcken;
+   unsigned int pckdis;
+   unsigned int kcken;
+   unsigned int kckdis;
+};
+
+static unsigned int clkrst_base[] = {
+   U8500_CLKRST1_BASE,
+   U8500_CLKRST2_BASE,
+   U8500_CLKRST3_BASE,
+   0,
+   U8500_CLKRST5_BASE,
+   U8500_CLKRST6_BASE,
+   U8500_CLKRST7_BASE, /* ED only */
+};
+
+/* Turn on peripheral clock at PRCC level */
+void u8500_clock_enable(int periph, int cluster, int kern)
+{
+   struct clkrst *clkrst = (struct clkrst *) clkrst_base[periph - 1];
+
+   if (kern != -1)
+   writel(1 << kern, &clkrst->kcken);
+
+   if (cluster != -1)
+   writel(1 << cluster, &clkrst->pcken);
+}
diff --git a/arch/arm/cpu/armv7/u8500/lowlevel.S 
b/arch/arm/cpu/

[U-Boot] [PATCH 3/4] I2C: add driver of st-ericsson u8500 i2c

2011-03-22 Thread John Rigby
From: Michael Brandt 

Signed-off-by: John Rigby 
---
 drivers/i2c/Makefile|1 +
 drivers/i2c/u8500_i2c.c |  603 +++
 drivers/i2c/u8500_i2c.h |  220 +
 3 files changed, 824 insertions(+), 0 deletions(-)
 create mode 100644 drivers/i2c/u8500_i2c.c
 create mode 100644 drivers/i2c/u8500_i2c.h

diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 052fe36..ac9c00f 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -40,6 +40,7 @@ COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o
 COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
 COBJS-$(CONFIG_SPEAR_I2C) += spr_i2c.o
 COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
+COBJS-$(CONFIG_DRIVER_U8500_I2C) += u8500_i2c.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/i2c/u8500_i2c.c b/drivers/i2c/u8500_i2c.c
new file mode 100644
index 000..8965100
--- /dev/null
+++ b/drivers/i2c/u8500_i2c.c
@@ -0,0 +1,603 @@
+/*
+ * Copyright (C) ST-Ericsson SA 2010
+ *
+ * Basic U-Boot I2C interface for STn8500/DB8500
+ * Author: Michael Brandt  for ST-Ericsson
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Only 7-bit I2C device addresses are supported.
+ */
+
+#include 
+#include 
+
+#include "u8500_i2c.h"
+#include 
+#include 
+#include 
+
+#define I2C_ENDAD_COUNTER  (CONFIG_SYS_HZ/100) /* I2C bus timeout */
+#define I2C_FIFO_FLUSH_COUNTER 50  /* flush "timeout" */
+#define I2C_SCL_FREQ   10  /* I2C bus clock frequency.*/
+#define I2C_INPUT_FREQ 4800/* Input clock frequency.*/
+#define TX_FIFO_THRESHOLD  0x4
+#define RX_FIFO_THRESHOLD  0x4
+#define SLAVE_SETUP_TIME 14 /* Slave data setup time, 250ns for 48MHz i2c_clk 
*/
+
+#define WRITE_FIELD(var, mask, shift, value) \
+   (var = ((var & ~(mask)) | ((value) << (shift
+
+static unsigned int bus_initialized[CONFIG_SYS_I2C_BUS_MAX];
+static unsigned int i2c_bus_num;
+static unsigned int i2c_bus_speed[] = {
+   CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SPEED,
+   CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SPEED
+};
+static struct u8500_i2c_regs *i2c_dev[] = {
+   (struct u8500_i2c_regs *)CONFIG_SYS_I2C0_BASE,
+   (struct u8500_i2c_regs *)CONFIG_SYS_I2C1_BASE,
+   (struct u8500_i2c_regs *)CONFIG_SYS_I2C2_BASE,
+   (struct u8500_i2c_regs *)CONFIG_SYS_I2C3_BASE,
+};
+
+static struct {
+   int periph;
+   int pcken;
+   int kcken;
+} i2c_clock_bits[] = {
+   {3, 3, 3}, /* I2C0 */
+   {1, 2, 2}, /* I2C1 */
+   {1, 6, 6}, /* I2C2 */
+   {2, 0, 0}, /* I2C3 */
+};
+
+static void i2c_set_bit(void *reg, u32 mask)
+{
+   writel(readl(reg) | mask, reg);
+}
+
+static void i2c_clr_bit(void *reg, u32 mask)
+{
+   writel(readl(reg) & ~mask, reg);
+}
+
+static void i2c_write_field(void *reg, u32 mask, uint shift, u32 value)
+{
+   writel((readl(reg) & ~mask) | (value << shift), reg);
+}
+
+static int __i2c_set_bus_speed(unsigned int speed)
+{
+   u32 value;
+   struct u8500_i2c_regs *i2c_regs;
+
+   i2c_regs = i2c_dev[i2c_bus_num];
+
+   /* Select standard (100 kbps) speed mode */
+   i2c_write_field(&i2c_regs->cr, I2C_CR_SM, I2C_CR_SHIFT_SM, 0x0);
+
+   /*
+* Set the Baud Rate Counter 2 value
+* Baud rate (standard) = fi2cclk / ( (BRCNT2 x 2) + Foncycle )
+* Foncycle = 0 (no digital filtering)
+*/
+   value = (u32) (I2C_INPUT_FREQ / (speed * 2));
+   i2c_write_field(&i2c_regs->brcr, I2C_BRCR_BRCNT2,
+   I2C_BRCR_SHIFT_BRCNT2, value);
+
+   /* ensure that BRCNT value is zero */
+   i2c_write_field(&i2c_regs->brcr, I2C_BRCR_BRCNT1,
+   I2C_BRCR_SHIFT_BRCNT1, 0);
+
+   return I2C_INPUT_FREQ/(value * 2);
+}
+
+/*
+ * i2c_init - initialize the i2c bus
+ *
+ * speed: bus speed (in HZ)
+ * slaveaddr: address of device in slave mode
+ *
+ * Slave mode is not implemented.
+ */
+void i2c_init(int speed, int slaveaddr)
+{
+   struct u8500_i2c_regs *i2c_regs;
+
+   debug("i2c_init bus %d, speed %d\n", i2c_bus_num, speed);
+
+   u8500_clock_enable(i2c_clock_bits[i2c_bus_num].periph,
+  i2c_clock_bits[i2c_bus_num].pcken,
+  i2c_clock_bits[i2c_bus_num].kcken);
+
+   i2c_r

[U-Boot] [PATCH 0/4] ST-Ericsson U8500 support

2011-03-22 Thread John Rigby
Add support for ST-Ericsson U8500 SoC and HREF platform

John Rigby (1):
  armv7: Add support for ST-Ericsson U8500 href platform

Michael Brandt (1):
  I2C: add driver of st-ericsson u8500 i2c

Rabin Vincent (2):
  p101x: extra init for u8500
  armv7: Add ST-Ericsson u8500 arch

 arch/arm/cpu/armv7/u8500/Makefile  |   46 +++
 arch/arm/cpu/armv7/u8500/clock.c   |   56 +++
 arch/arm/cpu/armv7/u8500/lowlevel.S|   33 ++
 arch/arm/cpu/armv7/u8500/timer.c   |  167 
 arch/arm/include/asm/arch-u8500/ab8500.h   |  523 
 arch/arm/include/asm/arch-u8500/bits.h |   58 +++
 arch/arm/include/asm/arch-u8500/clock.h|   72 
 arch/arm/include/asm/arch-u8500/common.h   |  107 +
 arch/arm/include/asm/arch-u8500/gpio.h |  247 
 arch/arm/include/asm/arch-u8500/hardware.h |   83 
 arch/arm/include/asm/arch-u8500/u8500.h|   47 +++
 board/st-ericsson/u8500/Makefile   |   50 +++
 board/st-ericsson/u8500/gpio.c |  346 
 board/st-ericsson/u8500/prcmu-fw-defs_v1.h |  578 ++
 board/st-ericsson/u8500/prcmu-fw.h |  182 +
 board/st-ericsson/u8500/prcmu.c|  167 
 board/st-ericsson/u8500/u8500_href.c   |  540 +
 boards.cfg |1 +
 drivers/i2c/Makefile   |1 +
 drivers/i2c/u8500_i2c.c|  603 
 drivers/i2c/u8500_i2c.h|  220 ++
 drivers/serial/serial_pl01x.c  |   10 +
 drivers/serial/serial_pl01x.h  |4 +
 include/configs/u8500_href.h   |  243 +++
 24 files changed, 4384 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/u8500/Makefile
 create mode 100644 arch/arm/cpu/armv7/u8500/clock.c
 create mode 100644 arch/arm/cpu/armv7/u8500/lowlevel.S
 create mode 100644 arch/arm/cpu/armv7/u8500/timer.c
 create mode 100644 arch/arm/include/asm/arch-u8500/ab8500.h
 create mode 100644 arch/arm/include/asm/arch-u8500/bits.h
 create mode 100644 arch/arm/include/asm/arch-u8500/clock.h
 create mode 100644 arch/arm/include/asm/arch-u8500/common.h
 create mode 100644 arch/arm/include/asm/arch-u8500/gpio.h
 create mode 100644 arch/arm/include/asm/arch-u8500/hardware.h
 create mode 100644 arch/arm/include/asm/arch-u8500/u8500.h
 create mode 100644 board/st-ericsson/u8500/Makefile
 create mode 100644 board/st-ericsson/u8500/gpio.c
 create mode 100644 board/st-ericsson/u8500/prcmu-fw-defs_v1.h
 create mode 100644 board/st-ericsson/u8500/prcmu-fw.h
 create mode 100644 board/st-ericsson/u8500/prcmu.c
 create mode 100644 board/st-ericsson/u8500/u8500_href.c
 create mode 100644 drivers/i2c/u8500_i2c.c
 create mode 100644 drivers/i2c/u8500_i2c.h
 create mode 100644 include/configs/u8500_href.h

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


[U-Boot] Ein Mehrverdienst mit dem Marktfuhrer

2011-03-22 Thread chadi
Meine Damen und Herren,

als erstes wollen wir, Firma Kyivclimate und das Managementteam, fur die 
Aufgebrachte Zeit, die das lesen dieser Nachricht erfordert, im voraus sich bei 
Ihnen zu bedanken.
Wir sind ein Handelsunternehmen und haben uns auf Verkauf und Installation der 
Klima-, Heizungsanlagen, die unter anderem im Bereich der Tele-, Kommunikation 
und Computerherstellung spezialisiert. Zu unseren Geschaftspartnern gehoren 
Firmen SAMSUNG, LG, AIRELEC wie auch VIESSMANN, SystemAir, Soler & Palau und 
UNIFLAIR. 
Nicht ausgereifte Gesetze und Korruption zwingen Unternehmer neue Wege zu 
gehen, insbesondere weitere Standorte zu grunden, dass unvermeidlich weitere 
Einstellungen mit sich bringt. Neben unserem Hauptsitz im Ukraine ist es uns 
gelungen einige Filialen in Russland und Kasachstan zu offnen. Als nachstes 
haben wie vor auch in Deutschland Fu?zufassen.
Aus diesen Grunden suchen wir momentan einen Regionalvertreter bzw. einen 
Cash-Manager. Eine tatkraftige und verantwortungsbewusste Person, die bereit 
ist den politisch-wirtschaftlichen Nuancen dieser Lander mit Verstandnis 
gegenuber zu treten. Wir bieten Ihnen einen zeitsparenden, aber durchaus 
ansehnlichen Zusatzeinkommen.

Falls wir Ihre Interesse erweckt haben, melden Sie sich unter 
d...@kyivclimate.biz
  
Mit freundlichen Gruben
Sergey Medvedenko
Regional Direktor

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


Re: [U-Boot] [PATCH] Top config.mk: add include/config.mk

2011-03-22 Thread Wolfgang Denk
Dear Joakim Tjernlund,

In message <1295303966-8409-1-git-send-email-joakim.tjernl...@transmode.se> you 
wrote:
> Seems to that the top level config.mk should include
> the auto generated include/config.mk so that all Makefile's
> pickup those definitions.
> 
> Signed-off-by: Joakim Tjernlund 
> ---
>  config.mk |1 +
>  1 files changed, 1 insertions(+), 0 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
The human mind treats a new idea the way the body  treats  a  strange
protein - it rejects it. - P. Medawar
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: Tegra2: Change mach-type to MACH_TYPE_SEABOARD due to mach-types.h update

2011-03-22 Thread Tom Warren
Albert,

On Wed, Feb 23, 2011 at 1:45 PM, Albert ARIBAUD  wrote:
> Le 23/02/2011 21:03, Tom Warren a écrit :
>>
>> OK, I'm an idiot. I see now that I needed to add -n to format-patch to
>> add the numbering to the [PATCH] header.
>>
>> Sorry for the noise - resending now with the corrected patchset.
>>
>> Tom
>
> Actually, for a single patch, you don't need to generate numbers, nor a
> cover letter (the 0/N message).
Is the current patch OK as is? It's a simple one-line change.

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


Re: [U-Boot] [PATCH v6 4/7] jz4740 nand driver

2011-03-22 Thread Scott Wood
On Tue, 22 Mar 2011 16:11:03 +0800
Xiangfu Liu  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 03/08/2011 07:44 AM, Scott Wood wrote:
> >> +#if defined(CONFIG_QI_LB60)
> >> > +#define KEY_U_OUT   (32 * 2 + 16)
> >> > +#define KEY_U_IN(32 * 3 + 19)
> >> > +__gpio_as_input(KEY_U_IN);
> >> > +__gpio_enable_pull(KEY_U_IN);
> >> > +__gpio_as_output(KEY_U_OUT);
> >> > +__gpio_clear_pin(KEY_U_OUT);
> >> > +
> >> > +if (__gpio_get_pin(KEY_U_IN) == 0)
> >> > +usb_boot();
> >> > +#endif
> >> > +#endif
> > This stuff does not belong in the NAND driver; it belongs under your board
> > or cpu directory.
> > 
> 
> I have tried to move those 'usb_boot' to board files. the only problem is 
> I have to run this 'usb_boot' very early. after CPU load the real u-boot to 
> memory
> the usb_boot will not working. I will try to found more info about this. 
> then explain more in next email.

OK, so you need to run it during the SPL phase -- but there should be
some board/cpu-specific file for the SPL (if not, create one).

Current examples of this
include nand_spl/board/freescale/p1_p2_rdb/nand_boot.c and
arch/powerpc/cpu/mpc83xx/nand_init.c.

-Scott

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


Re: [U-Boot] [PATCH V3 2/5] mv_i2c: use structure to replace the direclty define

2011-03-22 Thread Wolfgang Denk
Dear Lei Wen,

In message  you 
wrote:
> 
...
> >> - writel(readl(ICR) & ~ICR_ACKNA> K, ICR);
> >> - writel(readl(ICR) & ~ICR_ALDIE, ICR);
> >> - writel(readl(ICR) | ICR_TB, ICR);
> >> + PXAI2C_AND(&base->icr, ~ICR_AC> KNAK);
> >> + PXAI2C_AND(&base->icr, ~ICR_ALDIE);
> >> + PXAI2C_OR(&base->icr, ICR_TB);
> >
> > What are benefits of those macros?
> > To me this looks ugly and looses readability.
>
> This intend for short the original too long code, but I don't reject to ret> 
> urn
> to the readl, write one.

Please either use plain writel() / readl() accessors, or,
alternatively, implement standard accessors that could be used by
everybody else for the same purpose, too.

See for example the misc clrbits*(), setbits*() or clrsetbits*()
macros as dfined for example in "arch/powerpc/include/asm/io.h"

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
"Deliver yesterday, code today, think tomorrow."
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/4] ARMV7: OMAP3: Add support for Comelit DIG297 board

2011-03-22 Thread Luca Ceresoli
Board support for the DIG297 board manufactured by Comelit Group SpA.
It is a custom board baseed on the BeagleBoard  by
Texas Instruments.

The board support is based on the BeagleBoard implementation.

Signed-off-by: Luca Ceresoli 
Cc: Wolfgang Denk 
Cc: Albert Aribaud 
Cc: Sandeep Paulraj 
---
Changes in v2:
 - renamed board from CPS to DIG297;
 - fixed all (relevant) issues raised by checkpatch.pl;
 - removed config.mk from board dir;
 - fixed coding style;
 - minor cleanups.

 MAINTAINERS   |4 +
 MAKEALL   |1 +
 board/comelit/dig297/Makefile |   49 ++
 board/comelit/dig297/dig297.c |  174 +++
 board/comelit/dig297/dig297.h |  380 +
 boards.cfg|1 +
 include/configs/dig297.h  |  318 ++
 7 files changed, 927 insertions(+), 0 deletions(-)
 create mode 100644 board/comelit/dig297/Makefile
 create mode 100644 board/comelit/dig297/dig297.c
 create mode 100644 board/comelit/dig297/dig297.h
 create mode 100644 include/configs/dig297.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 4756f14..d363710 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -599,6 +599,10 @@ Rick Bronson 
 
AT91RM9200DKat91rm9200
 
+Luca Ceresoli 
+
+   dig297  ARM ARMV7 (OMAP3530 SoC)
+
 Po-Yu Chuang 
 
a320evb FA526 (ARM920T-like) (a320 SoC)
diff --git a/MAKEALL b/MAKEALL
index a732e6a..3e28e64 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -425,6 +425,7 @@ LIST_ARMV7="\
igep0030\
mx51evk \
omap3_beagle\
+   dig297  \
omap3_overo \
omap3_evm   \
omap3_pandora   \
diff --git a/board/comelit/dig297/Makefile b/board/comelit/dig297/Makefile
new file mode 100644
index 000..8dffedd
--- /dev/null
+++ b/board/comelit/dig297/Makefile
@@ -0,0 +1,49 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := dig297.o
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+clean:
+   rm -f $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/comelit/dig297/dig297.c b/board/comelit/dig297/dig297.c
new file mode 100644
index 000..4d4ab5f
--- /dev/null
+++ b/board/comelit/dig297/dig297.c
@@ -0,0 +1,174 @@
+/*
+ * (C) Copyright 2011 Comelit Group SpA
+ * Luca Ceresoli 
+ *
+ * Based on board/ti/beagle/beagle.c:
+ * (C) Copyright 2004-2008
+ * Texas Instruments, 
+ *
+ * Author :
+ * Sunil Kumar 
+ * Shashi Ranjan 
+ *
+ * Derived from Beagle Board and 3430 SDP code by
+ * Richard Woodruff 
+ * Syed Mohammed Khasim 
+ *
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "dig297.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#if defined(CONFIG_CMD_NE

[U-Boot] [PATCH 3/4] ARMV7: OMAP3: boot_flash_env_addr should not be volatile

2011-03-22 Thread Luca Ceresoli
Signed-off-by: Luca Ceresoli 
Cc: Wolfgang Denk 
Cc: Albert Aribaud 
Cc: Sandeep Paulraj 
---
Changes in v2:
 - this patch is new in v2.

 arch/arm/cpu/armv7/omap3/mem.c |2 +-
 include/configs/am3517_evm.h   |2 +-
 include/configs/omap3_evm.h|2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/mem.c b/arch/arm/cpu/armv7/omap3/mem.c
index bd914b0..e9de05d 100644
--- a/arch/arm/cpu/armv7/omap3/mem.c
+++ b/arch/arm/cpu/armv7/omap3/mem.c
@@ -39,7 +39,7 @@ unsigned int boot_flash_base;
 unsigned int boot_flash_off;
 unsigned int boot_flash_sec;
 unsigned int boot_flash_type;
-volatile unsigned int boot_flash_env_addr;
+unsigned int boot_flash_env_addr;
 
 struct gpmc *gpmc_cfg;
 
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 70e8f07..bc2e8bb 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -325,7 +325,7 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 5bdb3fd..570e794 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -320,7 +320,7 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
-- 
1.7.1

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


[U-Boot] [PATCH 1/4 v2] ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX

2011-03-22 Thread Luca Ceresoli
CONFIG_OMAP34XX must be checked for existence, not value.

Signed-off-by: Luca Ceresoli 
Cc: Wolfgang Denk 
Cc: Albert Aribaud 
Cc: Sandeep Paulraj 
---
Changes in v2:
 - this patch is new in v2.

 arch/arm/cpu/armv7/start.S |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index cb4f92f..da054a1 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -111,7 +111,7 @@ reset:
orr r0, r0, #0xd3
msr cpsr,r0
 
-#if (CONFIG_OMAP34XX)
+#if defined(CONFIG_OMAP34XX)
/* Copy vectors to mask ROM indirect addr */
adr r0, _start  @ r0 <- current position of code
add r0, r0, #4  @ skip reset vector
-- 
1.7.1

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


[U-Boot] [PATCH 2/4] ARMV7: OMAP3: Remove unused variable boot_flash_env_addr

2011-03-22 Thread Luca Ceresoli
Signed-off-by: Luca Ceresoli 
Cc: Wolfgang Denk 
Cc: Albert Aribaud 
Cc: Sandeep Paulraj 
---
Changes in v2:
 - this patch is new in v2.

 include/configs/cm_t35.h|1 -
 include/configs/devkit8000.h|1 -
 include/configs/omap3_beagle.h  |1 -
 include/configs/omap3_overo.h   |1 -
 include/configs/omap3_pandora.h |1 -
 include/configs/omap3_sdp3430.h |1 -
 include/configs/omap3_zoom1.h   |1 -
 include/configs/omap3_zoom2.h   |1 -
 8 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 510c6d4..2c5f13b 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -326,7 +326,6 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index d898b77..060d7a6 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -301,7 +301,6 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 5cfa4cb..d010ff7 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -322,7 +322,6 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 1b3d439..1bf837e 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -287,7 +287,6 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 72b0cc2..2561428 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -276,7 +276,6 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index 4708981..ad0d501 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -362,7 +362,6 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index f7d0652..4cec6a9 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -301,7 +301,6 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
index 7377933..0736cef 100644
--- a/include/configs/omap3_zoom2.h
+++ b/include/configs/omap3_zoom2.h
@@ -268,7 +268,6 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
-- 
1.7.1

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


[U-Boot] [PATCH v2] Re: OMAP3 Regression after merging ARM relocation code for custom board

2011-03-22 Thread Luca Ceresoli
Hi all,

here's a patch series that incorporates all the changes required during the
review of v1.
Patches 1 to 3 are cleanups to issues that were discovered up during discussion.

Please note that the new board code is not working (see
http://lists.denx.de/pipermail/u-boot/2011-March/088704.html for the detailed
explanation). The goal of this patch submission is to get it both working and
integrated upstream.

Patch index:
 - ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX
 - ARMV7: OMAP3: Remove unused variable boot_flash_env_addr
 - ARMV7: OMAP3: boot_flash_env_addr should not be volatile
 - ARMV7: OMAP3: Add support for Comelit DIG297 board

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


Re: [U-Boot] [PATCH 01/21] Define new system_restart() and emergency_restart()

2011-03-22 Thread Wolfgang Denk
Dear Graeme Russ,

In message <4d88909a.80...@gmail.com> you wrote:
>
> > That would be a layer higher than do_reset() (for example, in
> > panic()).
> 
> Hmmm, but panic() is defined in lib/vsprintf.c with no possibility for it
> to be overridden in any arch or board specific way

I guess that could be helped.

> > panic() is a higher software layer. It probably results in calling
> > reset() in the end.
> 
> Unless CONFIG_PANIC_HANG is defined...

> reset():
>   - does not exist (as far as I can tell)

reset() is used as symbol in many arm, mips and sparc start.S files

> I still like the idea of passing a 'reason' to reset() / panic() - Could we
> change panic() to:
...
> Anywhere in the code that needed to hang has a choice - hang(reason) or
> panic(reason | PANIC_FLAG_HANG)

I don't think you resonably decide which to use in common code.

Most calls to panic() appear to come from proprietary flash drivers
anyway - most of which should be dropped as they could use the CFI
driver instead. [And if you look at the actual code, the tests for
these panic()s can easily be computed at compile time, so these are
stupid aniway.]

Others 

Now, assume for things like this:

panic("No working SDRAM available\n");

or like handling undefined instructions or that - what would be more
useful - to hang() to to reset()? ;-)


Can you please show me a specific case where you would use such
different arguments to panic() in the existing code?

> Default implementations of hang() and reset() would just ignore reason.
> Board specific code can use reason to do one last boot_progress(), set LED
> states etc.

That should be done at a higher software layer.

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
CAUTION:  The Mass of This Product Contains the Energy Equivalent  of
85 Million Tons of TNT per Net Ounce of Weight.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 1/5] pxa: move i2c driver to the common place

2011-03-22 Thread Lei Wen
Hi Prafulla,

On Tue, Mar 22, 2011 at 7:42 PM, Prafulla Wadaskar  wrote:
>
>
>> -Original Message-
>> From: Lei Wen [mailto:lei...@marvell.com]
>> Sent: Thursday, March 17, 2011 12:15 PM
>> To: Heiko Schocher; Wolfgang Denk; Prafulla Wadaskar; u-
>> b...@lists.denx.de; Marek Vasut; Ashish Karkare; Prabhanjan Sarnaik;
>> adrian.w...@gmail.com
>> Subject: [PATCH V3 1/5] pxa: move i2c driver to the common place
>>
>> For better sharing with other platform other than pxa's,
>> it is more convenient to put the driver to the common place.
>>
>> Signed-off-by: Lei Wen 
>> ---
>> Changelog:
>> v2: rename previous pxa_i2c to mvi2c.
>>
>> V3: change previous name from pxa_i2c to mv_i2c
>>     clean code style issue exist in original code
>>
>>  arch/arm/cpu/pxa/Makefile |    1 -
>>  arch/arm/cpu/pxa/i2c.c    |  469 --
>> ---
>>  drivers/i2c/Makefile      |    1 +
>>  drivers/i2c/mv_i2c.c      |  452
>> +++
>>  include/configs/innokom.h |    1 +
>>  include/configs/xm250.h   |    1 +
>>  6 files changed, 455 insertions(+), 470 deletions(-)
>>  delete mode 100644 arch/arm/cpu/pxa/i2c.c
>>  create mode 100644 drivers/i2c/mv_i2c.c
>
>
> ...snip...
>
>> -#endif       /* CONFIG_HARD_I2C */
>> diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
>> index 052fe36..00a12cc 100644
>> --- a/drivers/i2c/Makefile
>> +++ b/drivers/i2c/Makefile
>> @@ -29,6 +29,7 @@ COBJS-$(CONFIG_BFIN_TWI_I2C) += bfin-twi_i2c.o
>>  COBJS-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o
>>  COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o
>>  COBJS-$(CONFIG_I2C_MVTWSI) += mvtwsi.o
>> +COBJS-$(CONFIG_I2C_MV) += mv_i2c.o
>
> Mvtwsi and mv_i2c are two i2c drivers for Marvell.
> Can you merge these two?

As I explain to you before. Although kirkwood and pxa series are both
the product
of Marvell, but it don't necessary means that they must have the same controller
for both product line. For the i2c part, they just use two different controller.
So why you keep request merge those two? Do you mean you want to
create a unique I2C
framework for whole i2c drivers in drivers/i2c?

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


Re: [U-Boot] [PATCH V3 2/5] mv_i2c: use structure to replace the direclty define

2011-03-22 Thread Lei Wen
Hi Prafulla,

On Tue, Mar 22, 2011 at 7:17 PM, Prafulla Wadaskar  wrote:
>
>
>> -Original Message-
>> From: Lei Wen [mailto:lei...@marvell.com]
>> Sent: Thursday, March 17, 2011 12:15 PM
>> To: Heiko Schocher; Wolfgang Denk; Prafulla Wadaskar; u-
>> b...@lists.denx.de; Marek Vasut; Ashish Karkare; Prabhanjan Sarnaik;
>> adrian.w...@gmail.com
>> Subject: [PATCH V3 2/5] mv_i2c: use structure to replace the direclty
>> define
>>
>> Signed-off-by: Lei Wen 
>> ---
>> Changelog:
>> V3:
>> clean code sytle issue
>>
>>  arch/arm/cpu/pxa/cpu.c                   |   11 +++
>>  arch/arm/include/asm/arch-pxa/pxa-regs.h |   56 -
>>  board/innokom/innokom.c                  |    9 +--
>>  drivers/i2c/mv_i2c.c                     |  133 ++-
>> --
>>  drivers/i2c/mv_i2c.h                     |   83 +++
>>  include/configs/innokom.h                |    1 +
>>  include/configs/xm250.h                  |    1 +
>>  7 files changed, 161 insertions(+), 133 deletions(-)
>>  create mode 100644 drivers/i2c/mv_i2c.h
>>
> ...snip...
>> diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
>> index 09756a4..152ea43 100644
>> --- a/drivers/i2c/mv_i2c.c
>> +++ b/drivers/i2c/mv_i2c.c
>> @@ -8,6 +8,9 @@
>>   * (C) Copyright 2003 Pengutronix e.K.
>>   * Robert Schwebel 
>>   *
>> + * (C) Copyright 2011 Marvell Inc.
>> + * Lei Wen 
>> + *
>>   * See file CREDITS for list of people who contributed to this
>>   * project.
>>   *
>> @@ -34,44 +37,16 @@
>>  #include 
>>
>>  #ifdef CONFIG_HARD_I2C
>> -
>> -/*
>> - *   - CONFIG_SYS_I2C_SPEED
>> - *   - I2C_PXA_SLAVE_ADDR
>> - */
>> -
>> -#include 
>> -#include 
>>  #include 
>> -
>> -#if (CONFIG_SYS_I2C_SPEED == 40)
>> -#define I2C_ICR_INIT (ICR_FM | ICR_BEIE | ICR_IRFIE | ICR_ITEIE |
>> ICR_GCD \
>> -                     | ICR_SCLE)
>> -#else
>> -#define I2C_ICR_INIT (ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD |
>> ICR_SCLE)
>> -#endif
>> -
>> -#define I2C_ISR_INIT         0x7FF
>> +#include "mv_i2c.h"
>>
>>  #ifdef DEBUG_I2C
>>  #define PRINTD(x) printf x
>>  #else
>>  #define PRINTD(x)
>>  #endif
>> -
>> -/* Shall the current transfer have a start/stop condition? */
>> -#define I2C_COND_NORMAL              0
>> -#define I2C_COND_START               1
>> -#define I2C_COND_STOP                2
>> -
>> -/* Shall the current transfer be ack/nacked or being waited for it? */
>> -#define I2C_ACKNAK_WAITACK   1
>> -#define I2C_ACKNAK_SENDACK   2
>> -#define I2C_ACKNAK_SENDNAK   4
>> -
>> -/* Specify who shall transfer the data (master or slave) */
>> -#define I2C_READ             0
>> -#define I2C_WRITE            1
>> +#define PXAI2C_AND(reg, val) writel(readl(reg) & val, reg)
>> +#define PXAI2C_OR(reg, val)  writel(readl(reg) | val, reg)
>
> With reference to the file name MVI2C_ is better macro name to be used here.
> Applicable for s/pxa/mv/g in the entire file too
>
>>
>>  /* All transfers are described by this data structure */
>>  struct i2c_msg {
>> @@ -81,27 +56,37 @@ struct i2c_msg {
>>       u8 data;
>>  };
>>
>> +struct pxa_i2c {
>> +     u32 ibmr;
>> +     u32 pad0;
>> +     u32 idbr;
>> +     u32 pad1;
>> +     u32 icr;
>> +     u32 pad2;
>> +     u32 isr;
>> +     u32 pad3;
>> +     u32 isar;
>> +};
>
> Please document the long names of these register with their offsets.

Good point, I would do it in next post.

>
>> +
>> +static struct pxa_i2c *base = (struct pxa_i2c *)CONFIG_PXA_I2C_REG;
>> +
> ...snip...
>>               if (msg->acknack == I2C_ACKNAK_SENDACK)
>> -                     writel(readl(ICR) & ~ICR_ACKNAK, ICR);
>> -             writel(readl(ICR) & ~ICR_ALDIE, ICR);
>> -             writel(readl(ICR) | ICR_TB, ICR);
>> +                     PXAI2C_AND(&base->icr, ~ICR_ACKNAK);
>> +             PXAI2C_AND(&base->icr, ~ICR_ALDIE);
>> +             PXAI2C_OR(&base->icr, ICR_TB);
>
> What are benefits of those macros?
> To me this looks ugly and looses readability.

This intend for short the original too long code, but I don't reject to return
to the readl, write one.

>
> ...snip...
>> diff --git a/drivers/i2c/mv_i2c.h b/drivers/i2c/mv_i2c.h
>> new file mode 100644
>> index 000..41af0d9
>> --- /dev/null
>> +++ b/drivers/i2c/mv_i2c.h
>> @@ -0,0 +1,83 @@
>> +/*
>> + * (C) Copyright 2011
>> + * Marvell Inc, 
>> + *
>> + * 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 Lice

Re: [U-Boot] [PATCH V3 5/5] I2C: add i2c support for Armada100 platform

2011-03-22 Thread Lei Wen
Hi Prafulla,

On Tue, Mar 22, 2011 at 7:40 PM, Prafulla Wadaskar  wrote:
>
>
>> -Original Message-
>> From: Lei Wen [mailto:lei...@marvell.com]
>> Sent: Thursday, March 17, 2011 12:15 PM
>> To: Heiko Schocher; Wolfgang Denk; Prafulla Wadaskar; u-
>> b...@lists.denx.de; Marek Vasut; Ashish Karkare; Prabhanjan Sarnaik;
>> adrian.w...@gmail.com
>> Subject: [PATCH V3 5/5] I2C: add i2c support for Armada100 platform
>>
>> Signed-off-by: Lei Wen 
>> ---
>> Changelog:
>> V3:
>> clean code sytle issue
>> Add i2c clock enable code include in I2C configure define block
>>
>>  arch/arm/cpu/arm926ejs/armada100/cpu.c    |   16 +++
>>  arch/arm/include/asm/arch-armada100/mfp.h |   40 --
>> ---
>>  board/Marvell/aspenite/aspenite.c         |    5 +++
>>  include/configs/aspenite.h                |   12 
>>  4 files changed, 55 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c
>> b/arch/arm/cpu/arm926ejs/armada100/cpu.c
>> index 62aa175..c21938e 100644
>> --- a/arch/arm/cpu/arm926ejs/armada100/cpu.c
>> +++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c
>> @@ -62,6 +62,16 @@ int arch_cpu_init(void)
>>       /* Enable GPIO clock */
>>       writel(APBC_APBCLK, &apb1clkres->gpio);
>>
>> +#ifdef CONFIG_I2C_MV
>> +     /* Enable general I2C clock */
>> +     writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0);
>> +     writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0);
>> +
>> +     /* Enable power I2C clock */
>> +     writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1);
>> +     writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1);
>> +#endif
>> +
>>       /*
>>        * Enable Functional and APB clock at 14.7456MHz
>>        * for configured UART console
>> @@ -90,3 +100,9 @@ int print_cpuinfo(void)
>>       return 0;
>>  }
>>  #endif
>> +
>> +#ifdef CONFIG_I2C_MV
>> +void i2c_clk_enable(void)
>> +{
>> +}
>
> Empty function, you can better ifdef calling line

Same reason as I explain in previous email...

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


Re: [U-Boot] [PATCH V3 3/5] I2C: add i2c support for Pantheon platform

2011-03-22 Thread Lei Wen
Hi Prafulla,

On Tue, Mar 22, 2011 at 7:22 PM, Prafulla Wadaskar  wrote:
>
>
>> -Original Message-
>> From: Lei Wen [mailto:lei...@marvell.com]
>> Sent: Thursday, March 17, 2011 12:15 PM
>> To: Heiko Schocher; Wolfgang Denk; Prafulla Wadaskar; u-
>> b...@lists.denx.de; Marek Vasut; Ashish Karkare; Prabhanjan Sarnaik;
>> adrian.w...@gmail.com
>> Subject: [PATCH V3 3/5] I2C: add i2c support for Pantheon platform
>>
>> Add i2c support to dkb board with pantheon soc.
>>
>> Signed-off-by: Lei Wen 
>> ---
>> Changelog:
>> V3:
>> clean code sytle issue
>> Add i2c clock enable code include in I2C configure define block
>>
>>  arch/arm/cpu/arm926ejs/pantheon/cpu.c    |   12 
>>  arch/arm/include/asm/arch-pantheon/cpu.h |    4 +++-
>>  arch/arm/include/asm/arch-pantheon/mfp.h |    6 --
>>  board/Marvell/dkb/dkb.c                  |    4 
>>  include/configs/dkb.h                    |   11 +++
>>  5 files changed, 34 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/cpu/arm926ejs/pantheon/cpu.c
>> b/arch/arm/cpu/arm926ejs/pantheon/cpu.c
>> index 9ddc77c..8b2eafa 100644
>> --- a/arch/arm/cpu/arm926ejs/pantheon/cpu.c
>> +++ b/arch/arm/cpu/arm926ejs/pantheon/cpu.c
>> @@ -59,6 +59,12 @@ int arch_cpu_init(void)
>>       /* Enable GPIO clock */
>>       writel(APBC_APBCLK, &apbclkres->gpio);
>>
>> +#ifdef CONFIG_I2C_MV
>> +     /* Enable I2C clock */
>> +     writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apbclkres->twsi);
>> +     writel(APBC_FNCLK | APBC_APBCLK, &apbclkres->twsi);
>> +#endif
>> +
>>       icache_enable();
>>
>>       return 0;
>> @@ -76,3 +82,9 @@ int print_cpuinfo(void)
>>       return 0;
>>  }
>>  #endif
>> +
>> +#ifdef CONFIG_I2C_MV
>> +void i2c_clk_enable(void)
>> +{
>> +}
>
> Empty function !!

As you might notice, this driver is directly taken from original cpu/pxa/i2c.c.
Original driver implent a global i2c clock enable in the reset
function call, which
is not needed by other platform, like the armada100 and pantheon.

But certainly I couldn't just rudely remove that code. So this is the reason
why I crreate the i2c_clk_enable function call and define it as void
one for the armada100
and pantheon.

>
>> +#endif
>> diff --git a/arch/arm/include/asm/arch-pantheon/cpu.h
>> b/arch/arm/include/asm/arch-pantheon/cpu.h
>> index 30f4393..60955c5 100644
>> --- a/arch/arm/include/asm/arch-pantheon/cpu.h
>> +++ b/arch/arm/include/asm/arch-pantheon/cpu.h
>> @@ -50,7 +50,9 @@ struct panthapb_registers {
>>       u32 uart0;      /*0x000*/
>>       u32 uart1;      /*0x004*/
>>       u32 gpio;       /*0x008*/
>> -     u8 pad0[0x034 - 0x08 - 4];
>> +     u8 pad0[0x02c - 0x08 - 4];
>> +     u32 twsi;       /*0x02c*/
>> +     u8 pad1[0x034 - 0x2c - 4];
>>       u32 timers;     /*0x034*/
>>  };
>>
>> diff --git a/arch/arm/include/asm/arch-pantheon/mfp.h
>> b/arch/arm/include/asm/arch-pantheon/mfp.h
>> index fb291cf..e939196 100644
>> --- a/arch/arm/include/asm/arch-pantheon/mfp.h
>> +++ b/arch/arm/include/asm/arch-pantheon/mfp.h
>> @@ -32,8 +32,10 @@
>>   * offset, pull,pF, drv,dF, edge,eF ,afn,aF
>>   */
>>  /* UART2 */
>> -#define MFP47_UART2_RXD              MFP_REG(0x198) | MFP_AF6 |
>> MFP_DRIVE_MEDIUM
>> -#define MFP48_UART2_TXD              MFP_REG(0x19c) | MFP_AF6 |
>> MFP_DRIVE_MEDIUM
>> +#define MFP47_UART2_RXD              (MFP_REG(0x198) | MFP_AF6 |
>> MFP_DRIVE_MEDIUM)
>> +#define MFP48_UART2_TXD              (MFP_REG(0x19c) | MFP_AF6 |
>> MFP_DRIVE_MEDIUM)
>> +#define MFP53_CI2C_SCL               (MFP_REG(0x1b0) | MFP_AF2 |
>> MFP_DRIVE_MEDIUM)
>> +#define MFP54_CI2C_SDA               (MFP_REG(0x1b4) | MFP_AF2 |
>> MFP_DRIVE_MEDIUM)
>>
>>  /* More macros can be defined here... */
>>
>> diff --git a/board/Marvell/dkb/dkb.c b/board/Marvell/dkb/dkb.c
>> index 72a2d2a..00f73e7 100644
>> --- a/board/Marvell/dkb/dkb.c
>> +++ b/board/Marvell/dkb/dkb.c
>> @@ -36,6 +36,10 @@ int board_early_init_f(void)
>>               MFP47_UART2_RXD,
>>               MFP48_UART2_TXD,
>>
>> +             /* I2C */
>> +             MFP53_CI2C_SCL,
>> +             MFP54_CI2C_SDA,
>> +
>>               MFP_EOC         /*End of configureation*/
>>       };
>>       /* configure MFP's */
>> diff --git a/include/configs/dkb.h b/include/configs/dkb.h
>> index 638af5e..1b18c44 100644
>> --- a/include/configs/dkb.h
>> +++ b/include/configs/dkb.h
>> @@ -56,6 +56,17 @@
>>  #include "mv-common.h"
>>
>>  #undef CONFIG_ARCH_MISC_INIT
>> +
>> +/*
>> + * I2C definition
>> + */
>> +#define CONFIG_CMD_I2C
>> +#define CONFIG_I2C_MV                        1
>> +#define CONFIG_PXA_I2C_REG           0xd4011000
>> +#define CONFIG_HARD_I2C                      1
>> +#define CONFIG_SYS_I2C_SPEED         0
>> +#define CONFIG_SYS_I2C_SLAVE         0xfe
>> +
> What about if I don't want to include this support
> These configuration must if ifdefed with CONFIG_CMD_I2C which will be defined 
> in board config file.

Yep, that make sense. I would include this change for next post.

Thanks,
Lei
_

Re: [U-Boot] [PATCH 01/21] Define new system_restart() and emergency_restart()

2011-03-22 Thread Graeme Russ
On 21/03/11 23:00, Wolfgang Denk wrote:
> Dear Graeme Russ,
> 
> In message <4d8739f6.5040...@gmail.com> you wrote:
>>
>> I kind of like the idea of different reset sources (CPU exception, hardware
>> failure, user initiated) but agree copying the linux architecture is over
>> the top.
> 
> What's the difference as far as do_reset() is concenred?  It shall
> just (hard) reset the system, nothing else.
> 
>> Is there any reason reset() could not take a 'reason' parameter? It could
>> be a bit-mask with CPU, SOC and arch reserved bits (unhandled exception,
>> user initiated, panic etc) and board specific bits
> 
> What for? To perform the intended purpose, no parameter is needed.
> 
>> Board or arch specific code could handle different reasons however they
>> please (like logging it in NVRAM prior to restart, gracefully shutting down
>> multiple CPU's, clearing DMA buffers etc)
> 
> That would be a layer higher than do_reset() (for example, in
> panic()).

Hmmm, but panic() is defined in lib/vsprintf.c with no possibility for it
to be overridden in any arch or board specific way

> 
>> All 'hang', 'panic', 'reset' etc code can be simplified into a single code
>> path (although calling 'reset' to 'hang' is a bit odd)
> 
> hang() and reset() are intentionally very different things.  A call to
> hang() is supposed to hang (surprise, surprise!) infinitely.  It must
> not cause a reset.

As I said, calling reset() to hang is odd :)

> 
> panic() is a higher software layer. It probably results in calling
> reset() in the end.
> 

Unless CONFIG_PANIC_HANG is defined...

Looking into the code

panic():
  - ~130 call sites
  - Implemented in lib/vsprintf.c
  - Calls do_reset() if CONFIG_PANIC_HANG is not defined
  - Calls hang() if CONFIG_PANIC_HANG is defined

hang():
  - ~180 call sites using hang() and hang ()
  - Implemented in arch\lib\board.c
  - ARM, i386, m68k, microblaze, mips,  prints "### ERROR ### Please RESET
the board ###\n" and loops
  - avr32 prints nothing and loops
  - Blackfin can set status LEDs based on #define, prints "### ERROR ###
Please RESET the board ###\n" and triggers a breakpoint if a JTAG debugger
is connected
  - nios2 disables interrupts then does the same as ARM et all
  - powerpc is similar to ARM et al but also calls show_boot_progress(-30)
  - sh - same as ARM et al but prints "Board ERROR\n"
  - sparc - if CONFIG_SHOW_BOOT_PROGRESS defined, same as powerpc, else
same as ARM et al

So hang() could easily be weakly implemented in common\ which would allow
arch and board specific overrides

do_reset():
  - ~70 call sites
  - 39 implemetations
  - Implemented all over the place (arch/cpu/, arch/lib, board/)
  - Only ARM is in arch/lib which could likely be moved to arch/cpu
  - Is U_BOOT_CMD
  - m68k has a number of very similar/identical implementations
  - Is not weak - Cannot be overridden at the board level
  - Ouch, PPC is real ugly:
#if !defined(CONFIG_PCIPPC2) && \
!defined(CONFIG_BAB7xx)  && \
!defined(CONFIG_ELPPC)   && \
!defined(CONFIG_PPMC7XX)
/* no generic way to do board reset. simply call soft_reset. */
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
...
Boards can thus provide their own do_reset()
  - Wow, m68k/cpu/mcf52x2/cpu.c is even uglier - 7 definitions selectable
by #ifdef's
  - Because do_reset() is U_BOOT_CMD, practically every call is:
do_reset (NULL, 0, 0, NULL) - do_bootm() does pass it's args onto
do_reset()
  - No implementation of do_reset() uses any args anyway

reset():
  - does not exist (as far as I can tell)

So, maybe we could replace do_reset() with a weak reset() function defined
in arch/cpu which can be overridden at the board level. All existing calls
to do_reset() can be converted to simply reset()

The U_BOOT_CMD do_reset() would simply call reset()

Could many of the current calls to do_reset() be replaced with calls to
panic()?

I still like the idea of passing a 'reason' to reset() / panic() - Could we
change panic() to:

void panic(u32 reason, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vprintf(fmt, args);
putc('\n');
va_end(args);

if (reason |= PANIC_FLAG_HANG)
hang(reason);
else
reset(reason);
}

Anywhere in the code that needed to hang has a choice - hang(reason) or
panic(reason | PANIC_FLAG_HANG)

Default implementations of hang() and reset() would just ignore reason.
Board specific code can use reason to do one last boot_progress(), set LED
states etc.

Regards,

Graeme


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


[U-Boot] [PATCH] S5P: mmc: Resolved interrupt error during mmc_init

2011-03-22 Thread Chander Kashyap
Blocksize was hardcoded to 512 bytes. But the blocksize varies
depeding on various mmc subsystem commands (between 8 and 512).
This hardcoding was resulting in interrupt error during data
transfer.

It is now calculated based upon the request sent by mmc subsystem.

Signed-off-by: Chander Kashyap 
---
 drivers/mmc/s5p_mmc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/s5p_mmc.c b/drivers/mmc/s5p_mmc.c
index 195b5be..0323800 100644
--- a/drivers/mmc/s5p_mmc.c
+++ b/drivers/mmc/s5p_mmc.c
@@ -51,7 +51,7 @@ static void mmc_prepare_data(struct mmc_host *host, struct 
mmc_data *data)
writeb(ctrl, &host->reg->hostctl);
 
/* We do not handle DMA boundaries, so set it to max (512 KiB) */
-   writew((7 << 12) | (512 << 0), &host->reg->blksize);
+   writew((7 << 12) | (data->blocksize & 0xFFF), &host->reg->blksize);
writew(data->blocks, &host->reg->blkcnt);
 }
 
-- 
1.7.1

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


[U-Boot] [PATCH] powerpc/qoriq: Update USB mode device tree fixup

2011-03-22 Thread Ramneek Mehresh
Modify support for USB mode fixup:
- Add support for fetching USB mode and phy type
  via hwconfig
- Add common support for USB mode and phy type
  device tree fix-up for all USB controllers
  mentioned in hwconfig string
- Add USB2 controller offset

Signed-off-by: Ramneek Mehresh 
---
Applies on git://git.am.freescale.net/mirrors/u-boot
(branch next)
 arch/powerpc/cpu/mpc8xxx/fdt.c|   84 ++---
 arch/powerpc/include/asm/immap_85xx.h |3 +-
 include/fdt_support.h |6 ++-
 3 files changed, 74 insertions(+), 19 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index 54e60bb..3744205 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009-2010 Freescale Semiconductor, Inc.
+ * Copyright 2009-2011 Freescale Semiconductor, Inc.
  *
  * This file is derived from arch/powerpc/cpu/mpc85xx/cpu.c and
  * arch/powerpc/cpu/mpc86xx/cpu.c. Basically this file contains
@@ -28,6 +28,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #if defined(CONFIG_MP) && (defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx))
 static int ft_del_cpuhandle(void *blob, int cpuhandle)
@@ -83,25 +85,21 @@ void ft_fixup_num_cores(void *blob) {
 #endif /* defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) */
 
 #ifdef CONFIG_HAS_FSL_DR_USB
-void fdt_fixup_dr_usb(void *blob, bd_t *bd)
+static void fdt_fixup_usb_mode_phy_type(void *blob, const char *mode,
+   const char *phy_type)
 {
-   char *mode;
-   char *type;
const char *compat = "fsl-usb2-dr";
const char *prop_mode = "dr_mode";
const char *prop_type = "phy_type";
-   int node_offset;
-   int err;
+   static int start_offset = -1;
+   int err, node_offset;
 
-   mode = getenv("usb_dr_mode");
-   type = getenv("usb_phy_type");
-   if (!mode && !type)
-   return;
-
-   node_offset = fdt_node_offset_by_compatible(blob, 0, compat);
+   node_offset = fdt_node_offset_by_compatible(blob,
+   start_offset, compat);
if (node_offset < 0) {
-   printf("WARNING: could not find compatible node %s: %s.\n",
-   compat, fdt_strerror(node_offset));
+   printf("WARNING: could not find compatible"
+   "node %s: %s.\n", compat,
+   fdt_strerror(node_offset));
return;
}
 
@@ -113,13 +111,65 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
   prop_mode, compat, fdt_strerror(err));
}
 
-   if (type) {
-   err = fdt_setprop(blob, node_offset, prop_type, type,
- strlen(type) + 1);
+   if (phy_type) {
+   err = fdt_setprop(blob, node_offset, prop_type, phy_type,
+   strlen(phy_type) + 1);
if (err < 0)
printf("WARNING: could not set %s for %s: %s.\n",
   prop_type, compat, fdt_strerror(err));
}
+
+   start_offset = node_offset;
+}
+
+void fdt_fixup_dr_usb(void *blob, bd_t *bd)
+{
+   const char *modes[] = { "host", "peripheral", "otg" };
+   const char *phys[] = { "ulpi", "umti" };
+   const char *phy_type = NULL;
+   char usb1_defined = 0;
+   const char *mode = NULL;
+   int node_offset;
+   char str[5];
+   int err, i, j;
+
+   for (i = 1; i <= USB_MAX_DEVICE; i++) {
+   int mode_idx = -1, phy_idx = -1;
+   sprintf(str, "%s%d", "usb", i);
+   if (hwconfig(str)) {
+   for (j = 0; j < sizeof(modes); j++) {
+   if (hwconfig_subarg_cmp(str, "dr_mode",
+   modes[j])) {
+   mode_idx = j;
+   break;
+   }
+   }
+   for (j = 0; j < sizeof(phys); j++) {
+   if (hwconfig_subarg_cmp(str, "phy_type",
+   phys[j])) {
+   phy_idx = j;
+   break;
+   }
+   }
+   if ((mode_idx >= 0) || (phy_idx >= 0)) {
+   fdt_fixup_usb_mode_phy_type(blob,
+   modes[mode_idx], phys[phy_idx]);
+   if (!strcmp(str, "usb1"))
+   usb1_defined = 1;
+   } else {
+   printf("WARNING: invalid phy or mode\n");
+   }
+   } else {
+   break;
+   }

Re: [U-Boot] [PATCH V3 1/5] pxa: move i2c driver to the common place

2011-03-22 Thread Prafulla Wadaskar


> -Original Message-
> From: Lei Wen [mailto:lei...@marvell.com]
> Sent: Thursday, March 17, 2011 12:15 PM
> To: Heiko Schocher; Wolfgang Denk; Prafulla Wadaskar; u-
> b...@lists.denx.de; Marek Vasut; Ashish Karkare; Prabhanjan Sarnaik;
> adrian.w...@gmail.com
> Subject: [PATCH V3 1/5] pxa: move i2c driver to the common place
> 
> For better sharing with other platform other than pxa's,
> it is more convenient to put the driver to the common place.
> 
> Signed-off-by: Lei Wen 
> ---
> Changelog:
> v2: rename previous pxa_i2c to mvi2c.
> 
> V3: change previous name from pxa_i2c to mv_i2c
> clean code style issue exist in original code
> 
>  arch/arm/cpu/pxa/Makefile |1 -
>  arch/arm/cpu/pxa/i2c.c|  469 --
> ---
>  drivers/i2c/Makefile  |1 +
>  drivers/i2c/mv_i2c.c  |  452
> +++
>  include/configs/innokom.h |1 +
>  include/configs/xm250.h   |1 +
>  6 files changed, 455 insertions(+), 470 deletions(-)
>  delete mode 100644 arch/arm/cpu/pxa/i2c.c
>  create mode 100644 drivers/i2c/mv_i2c.c


...snip...

> -#endif   /* CONFIG_HARD_I2C */
> diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
> index 052fe36..00a12cc 100644
> --- a/drivers/i2c/Makefile
> +++ b/drivers/i2c/Makefile
> @@ -29,6 +29,7 @@ COBJS-$(CONFIG_BFIN_TWI_I2C) += bfin-twi_i2c.o
>  COBJS-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o
>  COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o
>  COBJS-$(CONFIG_I2C_MVTWSI) += mvtwsi.o
> +COBJS-$(CONFIG_I2C_MV) += mv_i2c.o

Mvtwsi and mv_i2c are two i2c drivers for Marvell.
Can you merge these two?

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


[U-Boot] [PATCH V2] ARMV7: S5P: Fixed register offset in mmc.h

2011-03-22 Thread Chander Kashyap
The MMC registers are accessed through struct s5p_mmc member
variables. MMC controller "control4" register offset is set
to 0x8C as per data sheet. The size of struct s5p_mmc is also
corrected.

Signed-off-by: Chander Kashyap 
Signed-off-by: Tushar Behera 
---
 arch/arm/include/asm/arch-s5pc1xx/mmc.h |5 +++--
 arch/arm/include/asm/arch-s5pc2xx/mmc.h |5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/arch-s5pc1xx/mmc.h 
b/arch/arm/include/asm/arch-s5pc1xx/mmc.h
index 48de64d..d458d3b 100644
--- a/arch/arm/include/asm/arch-s5pc1xx/mmc.h
+++ b/arch/arm/include/asm/arch-s5pc1xx/mmc.h
@@ -53,10 +53,11 @@ struct s5p_mmc {
unsigned char   res3[0x34];
unsigned intcontrol2;
unsigned intcontrol3;
+   unsigned char   res4[4];
unsigned intcontrol4;
-   unsigned char   res4[0x6e];
+   unsigned char   res5[0x6e];
unsigned short  hcver;
-   unsigned char   res5[0xFFF02];
+   unsigned char   res6[0xFFF00];
 };
 
 struct mmc_host {
diff --git a/arch/arm/include/asm/arch-s5pc2xx/mmc.h 
b/arch/arm/include/asm/arch-s5pc2xx/mmc.h
index 528150d..04827ca 100644
--- a/arch/arm/include/asm/arch-s5pc2xx/mmc.h
+++ b/arch/arm/include/asm/arch-s5pc2xx/mmc.h
@@ -53,10 +53,11 @@ struct s5p_mmc {
unsigned char   res3[0x34];
unsigned intcontrol2;
unsigned intcontrol3;
+   unsigned char   res4[4];
unsigned intcontrol4;
-   unsigned char   res4[0x6e];
+   unsigned char   res5[0x6e];
unsigned short  hcver;
-   unsigned char   res5[0xFF02];
+   unsigned char   res6[0xFF00];
 };
 
 struct mmc_host {
-- 
1.7.1

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


Re: [U-Boot] [PATCH V3 5/5] I2C: add i2c support for Armada100 platform

2011-03-22 Thread Prafulla Wadaskar


> -Original Message-
> From: Lei Wen [mailto:lei...@marvell.com]
> Sent: Thursday, March 17, 2011 12:15 PM
> To: Heiko Schocher; Wolfgang Denk; Prafulla Wadaskar; u-
> b...@lists.denx.de; Marek Vasut; Ashish Karkare; Prabhanjan Sarnaik;
> adrian.w...@gmail.com
> Subject: [PATCH V3 5/5] I2C: add i2c support for Armada100 platform
> 
> Signed-off-by: Lei Wen 
> ---
> Changelog:
> V3:
> clean code sytle issue
> Add i2c clock enable code include in I2C configure define block
> 
>  arch/arm/cpu/arm926ejs/armada100/cpu.c|   16 +++
>  arch/arm/include/asm/arch-armada100/mfp.h |   40 --
> ---
>  board/Marvell/aspenite/aspenite.c |5 +++
>  include/configs/aspenite.h|   12 
>  4 files changed, 55 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c
> b/arch/arm/cpu/arm926ejs/armada100/cpu.c
> index 62aa175..c21938e 100644
> --- a/arch/arm/cpu/arm926ejs/armada100/cpu.c
> +++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c
> @@ -62,6 +62,16 @@ int arch_cpu_init(void)
>   /* Enable GPIO clock */
>   writel(APBC_APBCLK, &apb1clkres->gpio);
> 
> +#ifdef CONFIG_I2C_MV
> + /* Enable general I2C clock */
> + writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0);
> + writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0);
> +
> + /* Enable power I2C clock */
> + writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1);
> + writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1);
> +#endif
> +
>   /*
>* Enable Functional and APB clock at 14.7456MHz
>* for configured UART console
> @@ -90,3 +100,9 @@ int print_cpuinfo(void)
>   return 0;
>  }
>  #endif
> +
> +#ifdef CONFIG_I2C_MV
> +void i2c_clk_enable(void)
> +{
> +}

Empty function, you can better ifdef calling line

> +#endif
> diff --git a/arch/arm/include/asm/arch-armada100/mfp.h
> b/arch/arm/include/asm/arch-armada100/mfp.h
> index d21a79f..73783a7 100644
> --- a/arch/arm/include/asm/arch-armada100/mfp.h
> +++ b/arch/arm/include/asm/arch-armada100/mfp.h
> @@ -37,28 +37,32 @@
>   *   offset, pull,pF, drv,dF, edge,eF ,afn,aF
>   */
>  /* UART1 */
> -#define MFP107_UART1_TXD MFP_REG(0x01ac) | MFP_AF1 | MFP_DRIVE_FAST
> -#define MFP107_UART1_RXD MFP_REG(0x01ac) | MFP_AF2 | MFP_DRIVE_FAST
> -#define MFP108_UART1_RXD MFP_REG(0x01b0) | MFP_AF1 | MFP_DRIVE_FAST
> -#define MFP108_UART1_TXD MFP_REG(0x01b0) | MFP_AF2 | MFP_DRIVE_FAST
> -#define MFP109_UART1_CTS MFP_REG(0x01b4) | MFP_AF1 | MFP_DRIVE_MEDIUM
> -#define MFP109_UART1_RTS MFP_REG(0x01b4) | MFP_AF2 | MFP_DRIVE_MEDIUM
> -#define MFP110_UART1_RTS MFP_REG(0x01b8) | MFP_AF1 | MFP_DRIVE_MEDIUM
> -#define MFP110_UART1_CTS MFP_REG(0x01b8) | MFP_AF2 | MFP_DRIVE_MEDIUM
> -#define MFP111_UART1_RI  MFP_REG(0x01bc) | MFP_AF1 |
> MFP_DRIVE_MEDIUM
> -#define MFP111_UART1_DSR MFP_REG(0x01bc) | MFP_AF2 | MFP_DRIVE_MEDIUM
> -#define MFP112_UART1_DTR MFP_REG(0x01c0) | MFP_AF1 | MFP_DRIVE_MEDIUM
> -#define MFP112_UART1_DCD MFP_REG(0x01c0) | MFP_AF2 | MFP_DRIVE_MEDIUM
> +#define MFP107_UART1_TXD (MFP_REG(0x01ac) | MFP_AF1 | MFP_DRIVE_FAST)
> +#define MFP107_UART1_RXD (MFP_REG(0x01ac) | MFP_AF2 | MFP_DRIVE_FAST)
> +#define MFP108_UART1_RXD (MFP_REG(0x01b0) | MFP_AF1 | MFP_DRIVE_FAST)
> +#define MFP108_UART1_TXD (MFP_REG(0x01b0) | MFP_AF2 | MFP_DRIVE_FAST)
> +#define MFP109_UART1_CTS (MFP_REG(0x01b4) | MFP_AF1 | MFP_DRIVE_MEDIUM)
> +#define MFP109_UART1_RTS (MFP_REG(0x01b4) | MFP_AF2 | MFP_DRIVE_MEDIUM)
> +#define MFP110_UART1_RTS (MFP_REG(0x01b8) | MFP_AF1 | MFP_DRIVE_MEDIUM)
> +#define MFP110_UART1_CTS (MFP_REG(0x01b8) | MFP_AF2 | MFP_DRIVE_MEDIUM)
> +#define MFP111_UART1_RI  (MFP_REG(0x01bc) | MFP_AF1 |
> MFP_DRIVE_MEDIUM)
> +#define MFP111_UART1_DSR (MFP_REG(0x01bc) | MFP_AF2 | MFP_DRIVE_MEDIUM)
> +#define MFP112_UART1_DTR (MFP_REG(0x01c0) | MFP_AF1 | MFP_DRIVE_MEDIUM)
> +#define MFP112_UART1_DCD (MFP_REG(0x01c0) | MFP_AF2 | MFP_DRIVE_MEDIUM)
> 
>  /* UART2 */
> -#define MFP47_UART2_RXD  MFP_REG(0x0028) | MFP_AF6 |
> MFP_DRIVE_MEDIUM
> -#define MFP48_UART2_TXD  MFP_REG(0x002c) | MFP_AF6 |
> MFP_DRIVE_MEDIUM
> -#define MFP88_UART2_RXD  MFP_REG(0x0160) | MFP_AF2 |
> MFP_DRIVE_MEDIUM
> -#define MFP89_UART2_TXD  MFP_REG(0x0164) | MFP_AF2 |
> MFP_DRIVE_MEDIUM
> +#define MFP47_UART2_RXD  (MFP_REG(0x0028) | MFP_AF6 |
> MFP_DRIVE_MEDIUM)
> +#define MFP48_UART2_TXD  (MFP_REG(0x002c) | MFP_AF6 |
> MFP_DRIVE_MEDIUM)
> +#define MFP88_UART2_RXD  (MFP_REG(0x0160) | MFP_AF2 |
> MFP_DRIVE_MEDIUM)
> +#define MFP89_UART2_TXD  (MFP_REG(0x0164) | MFP_AF2 |
> MFP_DRIVE_MEDIUM)
> 
>  /* UART3 */
> -#define MFPO8_UART3_RXD  MFP_REG(0x06c) | MFP_AF2 |
> MFP_DRIVE_MEDIUM
> -#define MFPO9_UART3_TXD  MFP_REG(0x070) | MFP_AF2 |
> MFP_DRI

[U-Boot] [PATCH 1/1] fsl_esdhc: Fix multi-block read restriction on i.MX53 eSDHCv2

2011-03-22 Thread Jason Liu
For freescale i.MX53 eSDHCv2, when using CMD12, cmdtype need
to be set to ABORT, otherwise, next read command will hang.

This is a software Software Restrictions in i.MX53 reference manual:

29.7.8 Multi-block Read
For pre-defined multi-block read operation, that is,the number of blocks
to read has been defined by previous CMD23 for MMC, or pre-defined number
of blocks in CMD53 for SDIO/SDCombo,or whatever multi-block read without
abort command at card side, an abort command, either automatic or manual
CMD12/CMD52, is still required by ESDHC after the pre-defined number of
blocks are done, to drive the internal state machine to idle mode. In this
case, the card may not respond to this extra abort command and ESDHC will
get Response Timeout.  It is recommended to manually send an abort command
with RSPTYP[1:0] both bits cleared.

Signed-off-by: Jason Liu 
---
 drivers/mmc/fsl_esdhc.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index f3cccbe..5c3618b 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -99,6 +99,10 @@ uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data 
*data)
else if (cmd->resp_type & MMC_RSP_PRESENT)
xfertyp |= XFERTYP_RSPTYP_48;
 
+#ifdef CONFIG_MX53
+   if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
+   xfertyp |= XFERTYP_CMDTYP_ABORT;
+#endif
return XFERTYP_CMD(cmd->cmdidx) | xfertyp;
 }
 
-- 
1.7.1

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


Re: [U-Boot] [PATCH] ARMV7: S5PC110: Fixed register offset in mmc.h

2011-03-22 Thread Tushar Behera
Hi,

On 22 March 2011 14:33, Minkyu Kang  wrote:
> Dear Chander Kashyap,
>
> On 22 March 2011 13:27, Chander Kashyap  wrote:
>>    MMC controller "control4" register offset set to
>>    0x8C as per data sheet.
>>    Added missed out reserved field.
>>    Updated padding field size.
>>
>> Signed-off-by: Chander Kashyap 
>> ---
>>  arch/arm/include/asm/arch-s5pc1xx/mmc.h |    5 +++--
>>  1 files changed, 3 insertions(+), 2 deletions(-)
>>
>
> Your patches are OK.
> But, please make single patch including s5pc1xx and s5pc2xx.
>
We will re-submit a single patch with both the changes.

> 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
>



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


Re: [U-Boot] [PATCH V3 3/5] I2C: add i2c support for Pantheon platform

2011-03-22 Thread Prafulla Wadaskar


> -Original Message-
> From: Lei Wen [mailto:lei...@marvell.com]
> Sent: Thursday, March 17, 2011 12:15 PM
> To: Heiko Schocher; Wolfgang Denk; Prafulla Wadaskar; u-
> b...@lists.denx.de; Marek Vasut; Ashish Karkare; Prabhanjan Sarnaik;
> adrian.w...@gmail.com
> Subject: [PATCH V3 3/5] I2C: add i2c support for Pantheon platform
> 
> Add i2c support to dkb board with pantheon soc.
> 
> Signed-off-by: Lei Wen 
> ---
> Changelog:
> V3:
> clean code sytle issue
> Add i2c clock enable code include in I2C configure define block
> 
>  arch/arm/cpu/arm926ejs/pantheon/cpu.c|   12 
>  arch/arm/include/asm/arch-pantheon/cpu.h |4 +++-
>  arch/arm/include/asm/arch-pantheon/mfp.h |6 --
>  board/Marvell/dkb/dkb.c  |4 
>  include/configs/dkb.h|   11 +++
>  5 files changed, 34 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/pantheon/cpu.c
> b/arch/arm/cpu/arm926ejs/pantheon/cpu.c
> index 9ddc77c..8b2eafa 100644
> --- a/arch/arm/cpu/arm926ejs/pantheon/cpu.c
> +++ b/arch/arm/cpu/arm926ejs/pantheon/cpu.c
> @@ -59,6 +59,12 @@ int arch_cpu_init(void)
>   /* Enable GPIO clock */
>   writel(APBC_APBCLK, &apbclkres->gpio);
> 
> +#ifdef CONFIG_I2C_MV
> + /* Enable I2C clock */
> + writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apbclkres->twsi);
> + writel(APBC_FNCLK | APBC_APBCLK, &apbclkres->twsi);
> +#endif
> +
>   icache_enable();
> 
>   return 0;
> @@ -76,3 +82,9 @@ int print_cpuinfo(void)
>   return 0;
>  }
>  #endif
> +
> +#ifdef CONFIG_I2C_MV
> +void i2c_clk_enable(void)
> +{
> +}

Empty function !!

> +#endif
> diff --git a/arch/arm/include/asm/arch-pantheon/cpu.h
> b/arch/arm/include/asm/arch-pantheon/cpu.h
> index 30f4393..60955c5 100644
> --- a/arch/arm/include/asm/arch-pantheon/cpu.h
> +++ b/arch/arm/include/asm/arch-pantheon/cpu.h
> @@ -50,7 +50,9 @@ struct panthapb_registers {
>   u32 uart0;  /*0x000*/
>   u32 uart1;  /*0x004*/
>   u32 gpio;   /*0x008*/
> - u8 pad0[0x034 - 0x08 - 4];
> + u8 pad0[0x02c - 0x08 - 4];
> + u32 twsi;   /*0x02c*/
> + u8 pad1[0x034 - 0x2c - 4];
>   u32 timers; /*0x034*/
>  };
> 
> diff --git a/arch/arm/include/asm/arch-pantheon/mfp.h
> b/arch/arm/include/asm/arch-pantheon/mfp.h
> index fb291cf..e939196 100644
> --- a/arch/arm/include/asm/arch-pantheon/mfp.h
> +++ b/arch/arm/include/asm/arch-pantheon/mfp.h
> @@ -32,8 +32,10 @@
>   * offset, pull,pF, drv,dF, edge,eF ,afn,aF
>   */
>  /* UART2 */
> -#define MFP47_UART2_RXD  MFP_REG(0x198) | MFP_AF6 |
> MFP_DRIVE_MEDIUM
> -#define MFP48_UART2_TXD  MFP_REG(0x19c) | MFP_AF6 |
> MFP_DRIVE_MEDIUM
> +#define MFP47_UART2_RXD  (MFP_REG(0x198) | MFP_AF6 |
> MFP_DRIVE_MEDIUM)
> +#define MFP48_UART2_TXD  (MFP_REG(0x19c) | MFP_AF6 |
> MFP_DRIVE_MEDIUM)
> +#define MFP53_CI2C_SCL   (MFP_REG(0x1b0) | MFP_AF2 |
> MFP_DRIVE_MEDIUM)
> +#define MFP54_CI2C_SDA   (MFP_REG(0x1b4) | MFP_AF2 |
> MFP_DRIVE_MEDIUM)
> 
>  /* More macros can be defined here... */
> 
> diff --git a/board/Marvell/dkb/dkb.c b/board/Marvell/dkb/dkb.c
> index 72a2d2a..00f73e7 100644
> --- a/board/Marvell/dkb/dkb.c
> +++ b/board/Marvell/dkb/dkb.c
> @@ -36,6 +36,10 @@ int board_early_init_f(void)
>   MFP47_UART2_RXD,
>   MFP48_UART2_TXD,
> 
> + /* I2C */
> + MFP53_CI2C_SCL,
> + MFP54_CI2C_SDA,
> +
>   MFP_EOC /*End of configureation*/
>   };
>   /* configure MFP's */
> diff --git a/include/configs/dkb.h b/include/configs/dkb.h
> index 638af5e..1b18c44 100644
> --- a/include/configs/dkb.h
> +++ b/include/configs/dkb.h
> @@ -56,6 +56,17 @@
>  #include "mv-common.h"
> 
>  #undef CONFIG_ARCH_MISC_INIT
> +
> +/*
> + * I2C definition
> + */
> +#define CONFIG_CMD_I2C
> +#define CONFIG_I2C_MV1
> +#define CONFIG_PXA_I2C_REG   0xd4011000
> +#define CONFIG_HARD_I2C  1
> +#define CONFIG_SYS_I2C_SPEED 0
> +#define CONFIG_SYS_I2C_SLAVE 0xfe
> +
What about if I don't want to include this support
These configuration must if ifdefed with CONFIG_CMD_I2C which will be defined 
in board config file.

Regards..
Prafulla . .

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


Re: [U-Boot] [PATCH V3 2/5] mv_i2c: use structure to replace the direclty define

2011-03-22 Thread Prafulla Wadaskar


> -Original Message-
> From: Lei Wen [mailto:lei...@marvell.com]
> Sent: Thursday, March 17, 2011 12:15 PM
> To: Heiko Schocher; Wolfgang Denk; Prafulla Wadaskar; u-
> b...@lists.denx.de; Marek Vasut; Ashish Karkare; Prabhanjan Sarnaik;
> adrian.w...@gmail.com
> Subject: [PATCH V3 2/5] mv_i2c: use structure to replace the direclty
> define
> 
> Signed-off-by: Lei Wen 
> ---
> Changelog:
> V3:
> clean code sytle issue
> 
>  arch/arm/cpu/pxa/cpu.c   |   11 +++
>  arch/arm/include/asm/arch-pxa/pxa-regs.h |   56 -
>  board/innokom/innokom.c  |9 +--
>  drivers/i2c/mv_i2c.c |  133 ++-
> --
>  drivers/i2c/mv_i2c.h |   83 +++
>  include/configs/innokom.h|1 +
>  include/configs/xm250.h  |1 +
>  7 files changed, 161 insertions(+), 133 deletions(-)
>  create mode 100644 drivers/i2c/mv_i2c.h
> 
...snip...
> diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
> index 09756a4..152ea43 100644
> --- a/drivers/i2c/mv_i2c.c
> +++ b/drivers/i2c/mv_i2c.c
> @@ -8,6 +8,9 @@
>   * (C) Copyright 2003 Pengutronix e.K.
>   * Robert Schwebel 
>   *
> + * (C) Copyright 2011 Marvell Inc.
> + * Lei Wen 
> + *
>   * See file CREDITS for list of people who contributed to this
>   * project.
>   *
> @@ -34,44 +37,16 @@
>  #include 
> 
>  #ifdef CONFIG_HARD_I2C
> -
> -/*
> - *   - CONFIG_SYS_I2C_SPEED
> - *   - I2C_PXA_SLAVE_ADDR
> - */
> -
> -#include 
> -#include 
>  #include 
> -
> -#if (CONFIG_SYS_I2C_SPEED == 40)
> -#define I2C_ICR_INIT (ICR_FM | ICR_BEIE | ICR_IRFIE | ICR_ITEIE |
> ICR_GCD \
> - | ICR_SCLE)
> -#else
> -#define I2C_ICR_INIT (ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD |
> ICR_SCLE)
> -#endif
> -
> -#define I2C_ISR_INIT 0x7FF
> +#include "mv_i2c.h"
> 
>  #ifdef DEBUG_I2C
>  #define PRINTD(x) printf x
>  #else
>  #define PRINTD(x)
>  #endif
> -
> -/* Shall the current transfer have a start/stop condition? */
> -#define I2C_COND_NORMAL  0
> -#define I2C_COND_START   1
> -#define I2C_COND_STOP2
> -
> -/* Shall the current transfer be ack/nacked or being waited for it? */
> -#define I2C_ACKNAK_WAITACK   1
> -#define I2C_ACKNAK_SENDACK   2
> -#define I2C_ACKNAK_SENDNAK   4
> -
> -/* Specify who shall transfer the data (master or slave) */
> -#define I2C_READ 0
> -#define I2C_WRITE1
> +#define PXAI2C_AND(reg, val) writel(readl(reg) & val, reg)
> +#define PXAI2C_OR(reg, val)  writel(readl(reg) | val, reg)

With reference to the file name MVI2C_ is better macro name to be used here.
Applicable for s/pxa/mv/g in the entire file too
 
> 
>  /* All transfers are described by this data structure */
>  struct i2c_msg {
> @@ -81,27 +56,37 @@ struct i2c_msg {
>   u8 data;
>  };
> 
> +struct pxa_i2c {
> + u32 ibmr;
> + u32 pad0;
> + u32 idbr;
> + u32 pad1;
> + u32 icr;
> + u32 pad2;
> + u32 isr;
> + u32 pad3;
> + u32 isar;
> +};

Please document the long names of these register with their offsets.

> +
> +static struct pxa_i2c *base = (struct pxa_i2c *)CONFIG_PXA_I2C_REG;
> +
...snip...
>   if (msg->acknack == I2C_ACKNAK_SENDACK)
> - writel(readl(ICR) & ~ICR_ACKNAK, ICR);
> - writel(readl(ICR) & ~ICR_ALDIE, ICR);
> - writel(readl(ICR) | ICR_TB, ICR);
> + PXAI2C_AND(&base->icr, ~ICR_ACKNAK);
> + PXAI2C_AND(&base->icr, ~ICR_ALDIE);
> + PXAI2C_OR(&base->icr, ICR_TB);

What are benefits of those macros?
To me this looks ugly and looses readability.

...snip...
> diff --git a/drivers/i2c/mv_i2c.h b/drivers/i2c/mv_i2c.h
> new file mode 100644
> index 000..41af0d9
> --- /dev/null
> +++ b/drivers/i2c/mv_i2c.h
> @@ -0,0 +1,83 @@
> +/*
> + * (C) Copyright 2011
> + * Marvell Inc, 
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#ifndef _MV_I2C_H_
> +#define _MV_I2C_H_
> +extern void i2c_clk_enable(void);
> +
> +/* Shall the current transfer have a start/stop condition? */
> +#define I2C_COND_NORMAL  0
> +#define I2C_COND

[U-Boot] FIT tftp-autoupdate image

2011-03-22 Thread Andreas Friesen
Hello folks,

I'm trying to generate a FIT tftp-autoupdate image for MPC5200b Board.
I'm using u-boot 2010.12 / dtc 1.2.0. / Kernel 2.6.36.6 ; 

Hier is my its file :
-- 8<
/dts-v1/;

/ {
description = "Automatic Software Update: kernel, rootfs, FDT, FPGA ";
timestamp = <1300774787>;
#address-cells = <1>;
images {
kernel@0 {
description = "linux kernel image";
data = /incbin/("./uImage");
arch = "ppc";
type = "firmware";
load = <0xFF00>;
compression = "none";
hash@1 {
algo = "sha1";
};
};
rootfs@0 {
description = "RootFS image";
data = /incbin/("./rootfs.img");
arch = "ppc";
type = "firmware";
load = <0xFF20>;
compression = "none";
hash@1 {
algo = "sha1";
};
};
fpga@0 {
description = "FPGA Firmware"; 
data = /incbin/("./fpga.bin");
arch = "ppc";
compression = "none";
type = "firmware";
load = <0xFFF6>;
hash@1 {
algo = "sha1";
};
};
fdt@0 {
description = "FDT binary";
data = /incbin/("./mxa.dtb");
arch = "ppc";
compression = "none";
type = "firmware";
load = "<0xFFFE>"; <--- 
!!
hash@1 {
algo = "sha1";
};
};
};
 
};
8<--
$ mkimage -f  mxa_autoupdate.its  mxa.itb
Registered Kirkwood Boot Image support
Registered Freescale i.MX 51 Boot Image support
Registered FIT Image support
Registered Default Image support
FIT format handling
Trying to execute "dtc -I dts -O dtb -p 500 mxa_autoupdate.its > 
mxa_autoupdate.itb.tmp"
DTC: dts->dtb  on file "mxa_autoupdate.its"
Added timestamp successfully
FIT description: Automatic Software Update: kernel, rootfs, FDT, FPGA 
Created: Tue Mar 22 07:19:47 2011
 Image 0 (kernel@0)
  Description:  linux kernel image
  Type: Firmware
  Compression:  uncompressed
  Data Size:1222870 Bytes = 1194.21 kB = 1.17 MB
  Architecture: PowerPC
  Load Address: 0xff00
  Hash node:'hash@1'
  Hash algo:sha1
  Hash value:   e619b777d20246fe5b4f5b6ed2ad6ebe44c54fdf
  Hash len: 20
 Image 1 (rootfs@0)
  Description:  RootFS image
  Type: Firmware
  Compression:  uncompressed
  Data Size:753664 Bytes = 736.00 kB = 0.72 MB
  Architecture: PowerPC
  Load Address: 0xff20
  Hash node:'hash@1'
  Hash algo:sha1
  Hash value:   eaf7b46387c0a912b81cb1cd38f8af616ed746a6
  Hash len: 20
 Image 2 (fpga@0)
  Description:  FPGA Firmware
  Type: Firmware
  Compression:  uncompressed
  Data Size:212392 Bytes = 207.41 kB = 0.20 MB
  Architecture: PowerPC
  Load Address: 0xfff6
  Hash node:'hash@1'
  Hash algo:sha1
  Hash value:   65a54dc977a7287c499816108bc18eb19989aa0e
  Hash len: 20
 Image 3 (fdt@0)
  Description:  FDT binary
  Type: Firmware
  Compression:  uncompressed
  Data Size:2 Bytes = 19.53 kB = 0.02 MB
  Architecture: PowerPC
  Load Address: 0x3c307846  <- ???
  Hash node:'hash@1'
  Hash algo:sha1
  Hash value:   067d8484ef45bfb0efe9d3b1caf17e0f37748aa4
  Hash len: 20
Can't get configurations parent node '/configurations' (FDT_ERR_NOTFOUND)

- >8 --

Auto-update from TFTP: trying update file 'mxa.itb'
Using FEC device
TFTP from server 192.168.1.10; our IP address is 192.168.1.58
Filename 'mxa.itb'.
Load address: 0x10
Loading: #
 #
 #
done
Bytes transferred = 2210382 (21ba4e hex)
Processing update 'kernel@0' :sha1+ 
Erasing 0xff00 - 0xff13
.. done
Erased 10 sectors
Copying to flash...done
Processing update 'rootfs@0' :sha1+ 
Erasing 0xff20 - 0xff2b
.. done
Erased 6 sectors
Copying to flash...done
Processing update 'fpga@0' :sha1+ 
Erasing 0xfff6 - 0xfff9
.. done
Erased 2 sectors
Copying to flash...done
Processing update 'fdt@0' :sha1+ 
Error: end address (0x3c30c665) 

Re: [U-Boot] [PATCH V5 2/4] SMDK2410: remove unneeded config.mk

2011-03-22 Thread David Müller (ELSOFT AG)
Minkyu Kang wrote:
>> IMHO "Zero" should be correct with activated ARM reloc.
> 
> Sorry but I can't understand.
> Why?
> Please let me know.

Excerpt from doc/README.arm-relocation:

maybe adapt CONFIG_SYS_TEXT_BASE (this must be checked from board
maintainers)
This *must* be done for boards, which boot from NOR flash


The SMDK2410 is booting from NOR flash (at least it is currently
configured that way) and flash is mapped at address 0.


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


Re: [U-Boot] [PATCH 00/22] U-Boot MMC SPL for OMAP4

2011-03-22 Thread Aneesh V
Chander,

On Tuesday 22 March 2011 02:20 PM, Chander M. Kashyap wrote:
> Hi,
> 1. Please change spl directory name to mmc_spl in line with nand_spl.
> regards,
> chander

Please have a look at the commit message of 07/22.
This is done intentionally to be generic enough to be used for any
media. We intend to add NAND support to the same SPL for OMAP3/4. You
can potentially have the same SPL support MMC *and* NAND. Where it
loads the U-Boot from will depend on a switch setting on the board.

best regards,
Aneesh

>
>
>
> On Mon, Mar 21, 2011 at 1:51 PM, Aneesh V  > wrote:
>
> Hi,
>
> Are there anymore comments on this series?
>
> On Monday 28 February 2011 05:16 PM, Aneesh V wrote:
>  > This series adds mmc SPL support for OMAP4. This is essentially
>  > an up-streaming effort for TI's x-loader for OMAP4 using the SPL
>  > framework
>  >
>  > This work partly draws upon previous work done for x-loader by:
>  >   Santosh Shilimkar >
>  >   Rajendra Nayakmailto:rna...@ti.com>>
>  > and many others
>  >
>  > Features supported:
>  > * Clock init - DPLL locking, clock domains/modules enabling
>  > * SDRAM/DMM initialization
>  > * Mux initialization
>  > * MMC raw read support
>  > * MMC FAT read support
>  >
>  > Improvments over x-loader:
>  > * Code completely revamped
>  > * DPLL programming that works for all SYS_CLK frequencies
>  > * Automatic SDRAM identification and initialization
>  > * Board dependent parts(especially mux) deferred to u-boot. So, same
>  >SPL will work for Panda and SDP and most likely on any other board
>  >that comes along
>  > * Determination of u-boot size to avoid reading extra content while
>  >loading U-Boot
>  > * Modular apporach to enable future addition of support for all
> OMAP3/4
>  >platforms
>  >
>  > Aneesh V (21):
>  >omap: add miscellaneous utility macros for bit-field operations
>  >omap4: add OMAP4430 revision check
>  >armv7: start.S: provide a hook for saving boot params
>  >omap4: save parameters passed by ROM code to SPL
>  >arm: new labels in the linker script file
>  >Add generic spl infrastructure
>  >armv7: start.S: add SPL support
>  >omap: add spl support
>  >omap4: add spl support for OMAP4 SDP
>  >omap4: add serial console support to SPL
>  >omap4: utility function to identify the context of hw init
>  >omap4: separate mux settings into essential and non essential
> parts
>  >omap4: correct mux data for sdp4430
>  >omap4: add clock support
>  >omap4: add sdram init support
>  >omap4: calculate EMIF register values
>  >omap4: automatic sdram detection
>  >armv7: embed u-boot size within u-boot for use from SPL
>  >omap: add MMC support to SPL
>  >omap: spl: add FAT support over MMC
>  >omap4: add spl support for OMAP4 Panda
>  >
>  > John Rigby (1):
>  >mkimage: Add OMAP boot image support
>  >
>  >   Makefile   |   11 +
>  >   arch/arm/cpu/armv7/cpu.c   |7 +
>  >   arch/arm/cpu/armv7/omap-common/Makefile|1 +
>  >   .../{omap4/lowlevel_init.S =>  omap-common/utils.c} |   58 +-
>  >   arch/arm/cpu/armv7/omap4/Makefile  |3 +
>  >   arch/arm/cpu/armv7/omap4/board.c   |  117 ++-
>  >   arch/arm/cpu/armv7/omap4/clocks.c  |  717
> +++
>  >   arch/arm/cpu/armv7/omap4/emif.c| 1303
> 
>  >   arch/arm/cpu/armv7/omap4/lowlevel_init.S   |   31 +
>  >   arch/arm/cpu/armv7/omap4/omap4_mux_data.h  |   76 ++
>  >   arch/arm/cpu/armv7/omap4/sdram_elpida.c|  267 
>  >   arch/arm/cpu/armv7/start.S |   50 +-
>  >   arch/arm/cpu/armv7/u-boot.lds  |4 +
>  >   arch/arm/include/asm/arch-omap4/clocks.h   |  504 
>  >   arch/arm/include/asm/arch-omap4/emif.h | 1021
> +++
>  >   arch/arm/include/asm/arch-omap4/omap4.h|   50 +-
>  >   arch/arm/include/asm/arch-omap4/sys_proto.h|   60 +-
>  >   .../omap4/lowlevel_init.S =>  include/asm/armv7.h}  |   32 +-
>  >   arch/arm/include/asm/global_data.h |5 +
>  >   arch/arm/include/asm/omap_common.h |  106 ++
>  >   board/ti/panda/panda.c |   25 +-
>  >   board/ti/{sdp4430/sdp.h =>  panda/panda_mux_data.h} |   76 +-
>  >   board/ti/sdp4430/config.mk 
>|3 +-
>  >   board/ti/sdp4430/sdp.c |   25

Re: [U-Boot] [PATCH] ARMV7: S5PC110: Fixed register offset in mmc.h

2011-03-22 Thread Minkyu Kang
Dear Chander Kashyap,

On 22 March 2011 13:27, Chander Kashyap  wrote:
>    MMC controller "control4" register offset set to
>    0x8C as per data sheet.
>    Added missed out reserved field.
>    Updated padding field size.
>
> Signed-off-by: Chander Kashyap 
> ---
>  arch/arm/include/asm/arch-s5pc1xx/mmc.h |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>

Your patches are OK.
But, please make single patch including s5pc1xx and s5pc2xx.

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 V5 1/4] SMDK2410: activate ARM relocation feature

2011-03-22 Thread David Müller (ELSOFT AG)
Minkyu Kang wrote:
>> You are talking about the "#undef", right?
> 
> Right. :)

Ok, will be done.

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


Re: [U-Boot] [PATCH V5 2/4] SMDK2410: remove unneeded config.mk

2011-03-22 Thread Minkyu Kang
Dear David Müller,

On 22 March 2011 17:44, "David Müller (ELSOFT AG)"  wrote:
> Minkyu Kang wrote:
>>> +#define CONFIG_SYS_TEXT_BASE   0x0
>>
>> Zero is right? Maybe 0x33F8?
>
> IMHO "Zero" should be correct with activated ARM reloc.
>

Sorry but I can't understand.
Why?
Please let me know.

-- 
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 00/22] U-Boot MMC SPL for OMAP4

2011-03-22 Thread Chander M. Kashyap
Hi,
1. Please change spl directory name to mmc_spl in line with nand_spl.
regards,
chander



On Mon, Mar 21, 2011 at 1:51 PM, Aneesh V  wrote:

> Hi,
>
> Are there anymore comments on this series?
>
> On Monday 28 February 2011 05:16 PM, Aneesh V wrote:
> > This series adds mmc SPL support for OMAP4. This is essentially
> > an up-streaming effort for TI's x-loader for OMAP4 using the SPL
> > framework
> >
> > This work partly draws upon previous work done for x-loader by:
> >   Santosh Shilimkar
> >   Rajendra Nayak
> > and many others
> >
> > Features supported:
> > * Clock init - DPLL locking, clock domains/modules enabling
> > * SDRAM/DMM initialization
> > * Mux initialization
> > * MMC raw read support
> > * MMC FAT read support
> >
> > Improvments over x-loader:
> > * Code completely revamped
> > * DPLL programming that works for all SYS_CLK frequencies
> > * Automatic SDRAM identification and initialization
> > * Board dependent parts(especially mux) deferred to u-boot. So, same
> >SPL will work for Panda and SDP and most likely on any other board
> >that comes along
> > * Determination of u-boot size to avoid reading extra content while
> >loading U-Boot
> > * Modular apporach to enable future addition of support for all OMAP3/4
> >platforms
> >
> > Aneesh V (21):
> >omap: add miscellaneous utility macros for bit-field operations
> >omap4: add OMAP4430 revision check
> >armv7: start.S: provide a hook for saving boot params
> >omap4: save parameters passed by ROM code to SPL
> >arm: new labels in the linker script file
> >Add generic spl infrastructure
> >armv7: start.S: add SPL support
> >omap: add spl support
> >omap4: add spl support for OMAP4 SDP
> >omap4: add serial console support to SPL
> >omap4: utility function to identify the context of hw init
> >omap4: separate mux settings into essential and non essential parts
> >omap4: correct mux data for sdp4430
> >omap4: add clock support
> >omap4: add sdram init support
> >omap4: calculate EMIF register values
> >omap4: automatic sdram detection
> >armv7: embed u-boot size within u-boot for use from SPL
> >omap: add MMC support to SPL
> >omap: spl: add FAT support over MMC
> >omap4: add spl support for OMAP4 Panda
> >
> > John Rigby (1):
> >mkimage: Add OMAP boot image support
> >
> >   Makefile   |   11 +
> >   arch/arm/cpu/armv7/cpu.c   |7 +
> >   arch/arm/cpu/armv7/omap-common/Makefile|1 +
> >   .../{omap4/lowlevel_init.S =>  omap-common/utils.c} |   58 +-
> >   arch/arm/cpu/armv7/omap4/Makefile  |3 +
> >   arch/arm/cpu/armv7/omap4/board.c   |  117 ++-
> >   arch/arm/cpu/armv7/omap4/clocks.c  |  717 +++
> >   arch/arm/cpu/armv7/omap4/emif.c| 1303
> 
> >   arch/arm/cpu/armv7/omap4/lowlevel_init.S   |   31 +
> >   arch/arm/cpu/armv7/omap4/omap4_mux_data.h  |   76 ++
> >   arch/arm/cpu/armv7/omap4/sdram_elpida.c|  267 
> >   arch/arm/cpu/armv7/start.S |   50 +-
> >   arch/arm/cpu/armv7/u-boot.lds  |4 +
> >   arch/arm/include/asm/arch-omap4/clocks.h   |  504 
> >   arch/arm/include/asm/arch-omap4/emif.h | 1021
> +++
> >   arch/arm/include/asm/arch-omap4/omap4.h|   50 +-
> >   arch/arm/include/asm/arch-omap4/sys_proto.h|   60 +-
> >   .../omap4/lowlevel_init.S =>  include/asm/armv7.h}  |   32 +-
> >   arch/arm/include/asm/global_data.h |5 +
> >   arch/arm/include/asm/omap_common.h |  106 ++
> >   board/ti/panda/panda.c |   25 +-
> >   board/ti/{sdp4430/sdp.h =>  panda/panda_mux_data.h} |   76 +-
> >   board/ti/sdp4430/config.mk |3 +-
> >   board/ti/sdp4430/sdp.c |   25 +-
> >   .../{panda/panda.h =>  sdp4430/sdp4430_mux_data.h}  |  128 +--
> >   common/image.c |1 +
> >   include/configs/omap4_panda.h  |   24 +
> >   include/configs/omap4_sdp4430.h|   24 +
> >   include/image.h|1 +
> >   spl/board/ti/panda/Makefile|  219 
> >   spl/board/ti/sdp4430/Makefile  |  219 
> >   spl/board/ti/spl-omap.c|  189 +++
> >   .../armv7/u-boot.lds =>  spl/board/ti/spl-omap.lds  |   70 +-
> >   tools/Makefile |2 +
> >   tools/mkimage.c|2 +
> >   tools/mkimage.h|1 +
> >   tools/omapimage.c  |  229 
> >   .../omap4/lowlevel_init.S =>  tools/omapimage.h |   49 +-
> >   3

Re: [U-Boot] [PATCH V5 1/4] SMDK2410: activate ARM relocation feature

2011-03-22 Thread Minkyu Kang
Dear David Müller,

On 22 March 2011 17:44, "David Müller (ELSOFT AG)"  wrote:
> Minkyu Kang wrote:
>>> +/* additions for new relocation code, must be added to all boards */
>>> +#undef CONFIG_SYS_ARM_WITHOUT_RELOC
>>
>> Please remove this define.
>>
>>> +#define CONFIG_SYS_SDRAM_BASE  PHYS_SDRAM_1
>>> +#define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_SDRAM_BASE + 0x1000 - \
>>> +                               GENERATED_GBL_DATA_SIZE)
>
> You are talking about the "#undef", right?

Right. :)

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 V5 2/4] SMDK2410: remove unneeded config.mk

2011-03-22 Thread David Müller (ELSOFT AG)
Minkyu Kang wrote:
>> +#define CONFIG_SYS_TEXT_BASE   0x0
> 
> Zero is right? Maybe 0x33F8?

IMHO "Zero" should be correct with activated ARM reloc.

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


Re: [U-Boot] [PATCH V5 1/4] SMDK2410: activate ARM relocation feature

2011-03-22 Thread David Müller (ELSOFT AG)
Minkyu Kang wrote:
>> +/* additions for new relocation code, must be added to all boards */
>> +#undef CONFIG_SYS_ARM_WITHOUT_RELOC
> 
> Please remove this define.
> 
>> +#define CONFIG_SYS_SDRAM_BASE  PHYS_SDRAM_1
>> +#define CONFIG_SYS_INIT_SP_ADDR(CONFIG_SYS_SDRAM_BASE + 0x1000 - \
>> +   GENERATED_GBL_DATA_SIZE)

You are talking about the "#undef", right?

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


Re: [U-Boot] [PATCH v3 00/23] keymile board update

2011-03-22 Thread Holger Brunck
Hello Prafulla,

Heiko Schocher wrote:
> Prafulla Wadaskar wrote:

> 
>> Since there is heavy rework,
>> Also take a look at mv-common.h that we have created for armada100 and 
>> Kirkwood common boards configs. With this we had an abstraction where mostly 
>> files are only added to any new board support.
> 
> Ok, I look in it, maybe we can use them to simplify the
> config files for the kirkwood based boards.
> 

thanks for the proposal. I had a look at mv-common.h and yes there are many
config options which would be ok for us. But there are many which are not suited
for us e.g.:
CONFIG_SYS_MAXARGS (we got 32)
CONFIG_CONS_INDEX  (we have one board in the queue were the serial console is on
UART1)
CONFIG_SYS_PROMPT

others are in keymile-common.h because they are valid also for our powerpc
boards e.g.:
CONFIG_SYS_LONGHELP
CONFIG_AUTO_COMPLETE

So I don't think that this header would help us to simplify our code.

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


Re: [U-Boot] [PATCH v6 4/7] jz4740 nand driver

2011-03-22 Thread Xiangfu Liu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/08/2011 07:44 AM, Scott Wood wrote:
>> +#if defined(CONFIG_QI_LB60)
>> > +#define KEY_U_OUT   (32 * 2 + 16)
>> > +#define KEY_U_IN(32 * 3 + 19)
>> > +  __gpio_as_input(KEY_U_IN);
>> > +  __gpio_enable_pull(KEY_U_IN);
>> > +  __gpio_as_output(KEY_U_OUT);
>> > +  __gpio_clear_pin(KEY_U_OUT);
>> > +
>> > +  if (__gpio_get_pin(KEY_U_IN) == 0)
>> > +  usb_boot();
>> > +#endif
>> > +#endif
> This stuff does not belong in the NAND driver; it belongs under your board
> or cpu directory.
> 

I have tried to move those 'usb_boot' to board files. the only problem is 
I have to run this 'usb_boot' very early. after CPU load the real u-boot to 
memory
the usb_boot will not working. I will try to found more info about this. 
then explain more in next email.

thanks Scott Wood for your feedback.

I will keeping working. until the code is good enough :)

- -- 
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2IWZcACgkQRRAEFRxkgLTVvwCfaw7jKe7ZVzycMS+gN2lFdV2t
mEYAoIFahfXxtoiXs565cuN4vAuDdlIR
=tdrU
-END PGP SIGNATURE-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v6 2/7] this is jz4740 head file

2011-03-22 Thread Xiangfu Liu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/15/2011 10:27 AM, Shinya Kuribayashi wrote:
> This  is used by files in PATCH v6 1/7.  Please fold
> this patch into the v6 1/7.  That should be ok.

ok. will do that in next patches. 

thanks again

- -- 
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2IWJEACgkQRRAEFRxkgLRP0wCeIQOwWuYAiODMuN5mlVtSMXt7
YYwAnjs6C7ljE5Rl1RZAe6u2AYG4T8sL
=gAnu
-END PGP SIGNATURE-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v6 1/7] those files are jz4740 base files

2011-03-22 Thread Xiangfu Liu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/15/2011 10:26 AM, Shinya Kuribayashi wrote:
>> +++ b/arch/mips/cpu/xburst/jz_serial.c
> [...]
>> > +/*
>> > + * serial_init - initialize a channel
>> > + *
>> > + * This routine initializes the number of data bits, parity
>> > + * and set the selected baud rate. Interrupts are disabled.
>> > + * Set the modem control signals if the option is selected.
>> > + *
>> > + * RETURNS: N/A
>> > + */
>> > +struct jz4740_uart *uart = (struct jz4740_uart *) CONFIG_SYS_UART_BASE;
>> > +
> Can we make this static?

yes. sure. thanks for point out

- -- 
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2IWHcACgkQRRAEFRxkgLRs5wCfftxO5qxhizl9V//tIKZu7qZz
F68AnjWK9zwRCKcH1jtGlMF5bblGNZDJ
=CxrY
-END PGP SIGNATURE-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v6 1/7] those files are jz4740 base files

2011-03-22 Thread Xiangfu Liu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/15/2011 10:38 AM, Shinya Kuribayashi wrote:
> Please pay more attention to coding style issues.
> - Comments with multiple lines
> - Trailing whitespaces
> - Inconsistent tab and space usages
> - Follow the basic Linux CodingStyle guide
> 
> and so on.

thanks for your patch. I will fix the others.
by the way is there a tools can check those things?

- -- 
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2IWFYACgkQRRAEFRxkgLRD6gCdHkGTEkkR3yRPDwUBIr6xzGnq
7sgAmQFtIiOHuXlJ5iIkZLM7tIOL6H62
=OrTO
-END PGP SIGNATURE-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH Vx 1/1] mx53loco: set mmc env to MMC slot1

2011-03-22 Thread Jason Liu
2011/3/22 Jason Liu :
> mx53loco board has two MMC slots, one is for MicroSD,
> the other one is for normal SD, but the final board
> design is to only boot from MicroSD. So, make the mmc
> env default to slot1(MicroSD slot)

Sorry for the patch title issue, something like PATCH Vx 1/1,
I will resend it. sorry for the noise.

BR,
Jason

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


[U-Boot] FIT tftp-autoupdate image

2011-03-22 Thread Andreas Friesen
Hello folks,

I'm trying to generate a FIT tftp-autoupdate image for MPC5200b Board.
I'm using u-boot 2010.12 / dtc 1.2.0. / Kernel 2.6.36.6 ;

Hier is my its file :
-- 8<
/dts-v1/;

/ {
  description = "Automatic Software Update: kernel, rootfs, FDT, FPGA ";
  timestamp = <1300774787>;
#address-cells = <1>;
  images {
   kernel@0 {
  description = "linux kernel image";
  data = /incbin/("./uImage");
  arch = "ppc";
  type = "firmware";
  load = <0xFF00>;
   compression = "none";
   hash@1 {
  algo = "sha1";
  };
  };
   rootfs@0 {
  description = "RootFS image";
  data = /incbin/("./rootfs.img");
  arch = "ppc";
  type = "firmware";
  load = <0xFF20>;
  compression = "none";
   hash@1 {
  algo = "sha1";
  };
  };
  fpga@0 {
  description = "FPGA Firmware";
  data = /incbin/("./fpga.bin");
  arch = "ppc";
  compression = "none";
  type = "firmware";
  load = <0xFFF6>;
  hash@1 {
  algo = "sha1";
  };
  };
  fdt@0 {
  description = "FDT binary";
  data = /incbin/("./mxa.dtb");
  arch = "ppc";
  compression = "none";
  type = "firmware";
  load = "<0xFFFE>"; <--- !!
   hash@1 {
   algo = "sha1";
  };
  };
  };

};
8<--
$ mkimage -f  mxa_autoupdate.its  mxa.itb
Registered Kirkwood Boot Image support
Registered Freescale i.MX 51 Boot Image support
Registered FIT Image support
Registered Default Image support
FIT format handling
Trying to execute "dtc -I dts -O dtb -p 500 mxa_autoupdate.its >
mxa_autoupdate.itb.tmp"
DTC: dts->dtb  on file "mxa_autoupdate.its"
Added timestamp successfully
FIT description: Automatic Software Update: kernel, rootfs, FDT, FPGA
Created: Tue Mar 22 07:19:47 2011
 Image 0 (kernel@0)
  Description:  linux kernel image
  Type: Firmware
  Compression:  uncompressed
  Data Size:1222870 Bytes = 1194.21 kB = 1.17 MB
  Architecture: PowerPC
  Load Address: 0xff00
  Hash node:'hash@1'
  Hash algo:sha1
  Hash value:   e619b777d20246fe5b4f5b6ed2ad6ebe44c54fdf
  Hash len: 20
 Image 1 (rootfs@0)
  Description:  RootFS image
  Type: Firmware
  Compression:  uncompressed
  Data Size:753664 Bytes = 736.00 kB = 0.72 MB
  Architecture: PowerPC
  Load Address: 0xff20
  Hash node:'hash@1'
  Hash algo:sha1
  Hash value:   eaf7b46387c0a912b81cb1cd38f8af616ed746a6
  Hash len: 20
 Image 2 (fpga@0)
  Description:  FPGA Firmware
  Type: Firmware
  Compression:  uncompressed
  Data Size:212392 Bytes = 207.41 kB = 0.20 MB
  Architecture: PowerPC
  Load Address: 0xfff6
  Hash node:'hash@1'
  Hash algo:sha1
  Hash value:   65a54dc977a7287c499816108bc18eb19989aa0e
  Hash len: 20
 Image 3 (fdt@0)
  Description:  FDT binary
  Type: Firmware
  Compression:  uncompressed
  Data Size:2 Bytes = 19.53 kB = 0.02 MB
  Architecture: PowerPC
  Load Address: 0x3c307846  <- ???
  Hash node:'hash@1'
  Hash algo:sha1
  Hash value:   067d8484ef45bfb0efe9d3b1caf17e0f37748aa4
  Hash len: 20
Can't get configurations parent node '/configurations' (FDT_ERR_NOTFOUND)

- >8 --

Auto-update from TFTP: trying update file 'mxa.itb'
Using FEC device
TFTP from server 192.168.1.10; our IP address is 192.168.1.58
Filename 'mxa.itb'.
Load address: 0x10
Loading: #
 #
 #
done
Bytes transferred = 2210382 (21ba4e hex)
Processing update 'kernel@0' :sha1+
Erasing 0xff00 - 0xff13
.. done
Erased 10 sectors
Copying to flash...done
Processing update 'rootfs@0' :sha1+
Erasing 0xff20 - 0xff2b
.. done
Erased 6 sectors
Copying to flash...done
Processing update 'fpga@0' :sha1+
Erasing 0xfff6 - 0xfff9
.. done
Erased 2 sectors
Copying to flash...done
Processing update 'fdt@0' :sha1+
Error: end address (0x3c30c665) not in flash! <-
??
Error: can't flash update, aborting
Hit any key to stop autoboot:  0

-8<-

Does anyone know what the problem is?

Thanks in advance.

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


[U-Boot] [PATCH] mx53loco: set mmc env to MMC slot1

2011-03-22 Thread Jason Liu
mx53loco board has two MMC slots, one is for MicroSD,
the other one is for normal SD, but the final board
design is to only boot from MicroSD. So, make the mmc
env default to slot1(MicroSD slot)

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

diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 8c30012..585e8c8 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -191,6 +191,6 @@
 #define CONFIG_ENV_OFFSET  (6 * 64 * 1024)
 #define CONFIG_ENV_SIZE(8 * 1024)
 #define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 1
+#define CONFIG_SYS_MMC_ENV_DEV 0
 
 #endif /* __CONFIG_H */
-- 
1.7.1

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


[U-Boot] maillist

2011-03-22 Thread vwvwvwww vwvwvwww
maillist
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH Vx 1/1] mx53loco: set mmc env to MMC slot1

2011-03-22 Thread Jason Liu
mx53loco board has two MMC slots, one is for MicroSD,
the other one is for normal SD, but the final board
design is to only boot from MicroSD. So, make the mmc
env default to slot1(MicroSD slot)

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

diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 8c30012..585e8c8 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -191,6 +191,6 @@
 #define CONFIG_ENV_OFFSET  (6 * 64 * 1024)
 #define CONFIG_ENV_SIZE(8 * 1024)
 #define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 1
+#define CONFIG_SYS_MMC_ENV_DEV 0
 
 #endif /* __CONFIG_H */
-- 
1.7.1

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