Re: [U-Boot] [PATCH] Origen: Correct equation to calculate PLL output frequency

2013-07-01 Thread Minkyu Kang
On 01/07/13 17:41, Rajeshwari Birje wrote:
> Hi Minkyu Kang,
> 
> As per the user manual I have for EXYNOS5 it is
> FOUT = MDIV * FIN / (PDIV * 2^SDIV)

What is your version of manual?
If possible, could you please send it to me?

> 
> Regards,
> Rajeshwari Shinde.
> 
> On Mon, Jul 1, 2013 at 1:56 PM, Minkyu Kang  wrote:
>> On 01/07/13 16:42, Rajeshwari Shinde wrote:
>>> EXYNOS4 user manual equation for calculating PLL output is
>>> FOUT= MDIV x FIN/(PDIV x 2^(SDIV -1))
>>> hence updating accordingly.
>>>
>>> Signed-off-by: Rajeshwari Shinde 
>>> ---
>>>  arch/arm/cpu/armv7/exynos/clock.c |   11 +--
>>>  1 files changed, 9 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm/cpu/armv7/exynos/clock.c 
>>> b/arch/arm/cpu/armv7/exynos/clock.c
>>> index e1c4246..af0fa5b 100644
>>> --- a/arch/arm/cpu/armv7/exynos/clock.c
>>> +++ b/arch/arm/cpu/armv7/exynos/clock.c
>>> @@ -116,8 +116,15 @@ static int exynos_get_pll_clk(int pllreg, unsigned int 
>>> r, unsigned int k)
>>>   /* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV) */
>>>   fout = (m + k / 1024) * (freq / (p * (1 << s)));
>>>   } else {
>>> - /* FOUT = MDIV * FIN / (PDIV * 2^SDIV) */
>>> - fout = m * (freq / (p * (1 << s)));
>>> + if (cpu_is_exynos4()) {
>>> + if (s < 1)
>>> + s = 1;
>>> + /* FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1)) */
>>> + fout = m * (freq / (p * (1 << (s - 1;
>>> + } else {
>>> + /* FOUT = MDIV * FIN / (PDIV * 2^SDIV) */
>>> + fout = m * (freq / (p * (1 << s)));
>>> + }
>>>   }
>>>
>>>   return fout;
>>>
>>
>> I checked about it.
>> It was wrong, but your patch doesn't fit too.
>>
>> exynos4210
>> FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1))
>>
>> exynos4412
>> FOUT = MDIV * FIN / (PDIV * 2^SDIV)
>>
>> exynos5250
>> FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1))
>>
>> At past, our code was,
>> FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1))
>> It was changed by Akshay's patch.
>>
>>
>> commit 234370cab4b2f096e095fe8f3284fd39740a4023
>> Author: Akshay Saraswat 
>> Date:   Fri Mar 22 02:26:36 2013 +
>>
>> Exynos5: clock: Update the equation to calculate PLL output frequency
>>
>> According to the latest exynos5 user manual, the equation for
>> calculating PLL output was changed to
>> FOUT= MDIV x FIN/(PDIV x 2^SDIV)
>> earlier it was
>> FOUT= MDIV x FIN/(PDIV x 2^(SDIV -1))
>> So updating the clock code accordingly.
>>
>> Signed-off-by: Hatim Ali 
>> Signed-off-by: Akshay Saraswat 
>> Acked-by: Simon Glass 
>>
>>
>> According to Akshay's patch.
>> exynos5250 should be
>> FOUT = MDIV * FIN / (PDIV * 2^SDIV)
>> but my manual (I'm not sure that is latest version) shows
>> FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1))
>>
>> Akshay,
>> please check this.
>>
>> Rajeshwari,
>> Thank you for raise this issue,
>> I'll check it and resend the patch.
>>
>> Thanks,
>> Minkyu Kang.
>> ___
>> U-Boot mailing list
>> U-Boot@lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
> 
> 
> 

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


[U-Boot] [PATCH] cosmetic: README.SPL: fix a typo

2013-07-01 Thread Masahiro Yamada
Signed-off-by: Masahiro Yamada 
---
 doc/README.SPL | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/README.SPL b/doc/README.SPL
index 4e1cb28..ac9a213 100644
--- a/doc/README.SPL
+++ b/doc/README.SPL
@@ -77,7 +77,7 @@ an SPL CPU in boards.cfg as follows:
 
normal_cpu:spl_cpu
 
-This this case CPU will be set to "normal_cpu" during the main u-boot
+This case CPU will be set to "normal_cpu" during the main u-boot
 build and "spl_cpu" during the SPL build.
 
 
-- 
1.8.1.2

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


Re: [U-Boot] [ANN] v2013.07-rc2

2013-07-01 Thread Lubomir Popov
Hi Tom, Marek,

On Fri, Jun 28, 2013 at 5:12 PM, Tom Rini  wrote:
> Hey all,
>
> I've tagged and pushed v2013.07-rc2.  A bit more over the place than I
> should have gone, but picked up a lot of things that have been
> outstanding for a while.  The big thing is a refactor of the boot loop.
> Everything should be working right now, but please test.  Related to
> this is the ability to have crytpographically signed images.  It's like
> secure boot in UEFI land, but hopefully without the kerfuffle.
>
> If you've got changes outstanding still, please start gently poking
> custodians with patchwork links.  I've got a good bit of stuff I need to
> deal with myself still, but please prod me all the same.

What about Michael's patch

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

It is a bug fix actually (and happens to affect two of our boards ;) ).

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


Re: [U-Boot] [PATCH 2/3] tools/proftool: add missing definition

2013-07-01 Thread Andreas Bießmann
Hi Jeroen,

On 01.07.13 22:12, Jeroen Hofstee wrote:
> Hello Andreas,
> 
> On 07/01/2013 08:45 PM, Jeroen Hofstee wrote:
>> Hello Andreas,
>>
>> On 06/30/2013 01:15 PM, Andreas Bießmann wrote:
>>> BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a
>>> simple
>>> define for them.
>>>
>>> Signed-off-by: Andreas Bießmann 
>>> ---
>>>   +#ifndef REG_NOERROR
>>> +/* BSD regex.h do not expose REG_NOERROR */
>>> +# define REG_NOERROR 0
>>> +#endif
>>> +
>> I think a neater solutions is to actually remove the REG_NOERROR.
>> From man regexec, GNU 2011-09-27: "regexec() returns zero for a
>> successful match or REG_NOMATCH for failure.". Opengroup specs
>> will mention the same. REG_NOERROR is not mentioned at all.
>>
>> e.g.:
>>
>> if (err) {
>> regex_report_error(&item->regex, err, "match",
>>item->name);
>> break;
>> }
>>
>> should do the job in a portable way (and reads a bit better,
>> as well). But this is only a cosmetic comment, the patch by
>> itself should do the job.
>>
> Just realized this is more then cosmetic. Also GNU will not have
> REG_NOERROR defined since it is an enum, so it will always
> take the #ifndef REG_NOERROR road, which boils down to !! 0.
> 
> So this needs a new version instead of hiding how this works.

you are right, v2 is on the way ...

> p.s. Simon, Andreas sorry for spamming, selected the wrong email...

Ouch, sorry! Just realized that I took the wrong mail too.

Best regards

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


[U-Boot] [PATCH v2 3/3] Makefile: fix readelf usage

2013-07-01 Thread Andreas Bießmann
Some OS (like OS X) do not provide a generic readelf. We should enforce to use
the toochain provided readelf instead, to do so use $(CROSS_COMPILE)readelf.

Signed-off-by: Andreas Bießmann 
Tested-by: Lubomir Popov 
---
Changes in v2: None

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index ba1c10b..446c2f8 100644
--- a/Makefile
+++ b/Makefile
@@ -747,7 +747,7 @@ endif   # config.mk
 # ARM relocations should all be R_ARM_RELATIVE.
 checkarmreloc: $(obj)u-boot
@if test "R_ARM_RELATIVE" != \
-   "`readelf -r $< | cut -d ' ' -f 4 | grep R_ARM | sort -u`"; \
+   "`$(CROSS_COMPILE)readelf -r $< | cut -d ' ' -f 4 | grep R_ARM 
| sort -u`"; \
then echo "$< contains relocations other than \
R_ARM_RELATIVE"; false; fi
 
-- 
1.8.3.1

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


[U-Boot] [PATCH v2 2/3] tools/proftool: remove REG_NOERROR

2013-07-01 Thread Andreas Bießmann
Remove non portable usage of REG_NOERROR.
BSD (like OS X) variants of regex.h do not declare REG_NOERROR, even GNU
regex(3) do mention REG_NOERROR, just remove it.

Signed-off-by: Andreas Bießmann 
---
Changes in v2:
 - remove REG_NOERROR instead of defining it conditionally (as Jeroen
   suggested)

 tools/proftool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/proftool.c b/tools/proftool.c
index a48ed28..aa05e77 100644
--- a/tools/proftool.c
+++ b/tools/proftool.c
@@ -333,7 +333,7 @@ static void check_trace_config_line(struct 
trace_configline_info *item)
if (err == REG_NOMATCH)
continue;
 
-   if (err != REG_NOERROR) {
+   if (err) {
regex_report_error(&item->regex, err, "match",
   item->name);
break;
-- 
1.8.3.1

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


[U-Boot] [PATCH v2 1/3] lib/rsa/rsa-sig.c: compile on OS X

2013-07-01 Thread Andreas Bießmann
Interfaces exposed by error.h seems not to be used in rsa-sig.c, remove it.
This also fixes an compile error on OS X:

---8<---
u-boot/lib/rsa/rsa-sign.c:23:19: error: error.h: No such file or directory
--->8---

Signed-off-by: Andreas Bießmann 
Tested-by: Lubomir Popov 
---
Changes in v2: None

 lib/rsa/rsa-sign.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index a75ae24..e30d8ca 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -20,7 +20,6 @@
 #include "mkimage.h"
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
1.8.3.1

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


Re: [U-Boot] [PATCH v3 1/2] exynos5250: Add arndale board support

2013-07-01 Thread Minkyu Kang
Dear Inderpal Singh,

On 02/07/13 13:41, Inderpal Singh wrote:
> Arndale board is based on samsung's exynos5250 soc.
> 
> Signed-off-by: Inderpal Singh 
> ---
>  MAINTAINERS  |4 +
>  board/samsung/arndale/Makefile   |   58 +++
>  board/samsung/arndale/arndale.c  |  103 +
>  board/samsung/arndale/arndale_spl.c  |   66 +++
>  board/samsung/arndale/clock_init.c   |  655 
> ++
>  board/samsung/arndale/clock_init.h   |  149 +++
>  board/samsung/arndale/dmc_common.c   |  199 +
>  board/samsung/arndale/dmc_init_ddr3.c|  228 +++
>  board/samsung/arndale/lowlevel_init.S|   92 +
>  board/samsung/arndale/mmc_boot.c |   58 +++
>  board/samsung/arndale/setup.h|  569 ++
>  board/samsung/dts/exynos5250-arndale.dts |   23 ++
>  boards.cfg   |1 +
>  include/configs/arndale.h|   36 ++
>  14 files changed, 2241 insertions(+)
>  create mode 100644 board/samsung/arndale/Makefile
>  create mode 100644 board/samsung/arndale/arndale.c
>  create mode 100644 board/samsung/arndale/arndale_spl.c
>  create mode 100644 board/samsung/arndale/clock_init.c
>  create mode 100644 board/samsung/arndale/clock_init.h
>  create mode 100644 board/samsung/arndale/dmc_common.c
>  create mode 100644 board/samsung/arndale/dmc_init_ddr3.c
>  create mode 100644 board/samsung/arndale/lowlevel_init.S
>  create mode 100644 board/samsung/arndale/mmc_boot.c
>  create mode 100644 board/samsung/arndale/setup.h
>  create mode 100644 board/samsung/dts/exynos5250-arndale.dts
>  create mode 100644 include/configs/arndale.h
> 

This patch seems to conflict with Rajeshwari's patch.
http://patchwork.ozlabs.org/patch/256058/

So, this patch  will be pending until merge.

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


[U-Boot] [PATCH v2 0/3] Adopt u-boot build to OS X

2013-07-01 Thread Andreas Bießmann

Latest changes to mkimage, Makefile and added proftool broke compilation on OS
X. This series makes u-boot build clean again with some little adoptions.

Patch 'lib/rsa/rsa-sig.c: compile on OS X' supersedes
http://patchwork.ozlabs.org/patch/255283/

Changes in v2:
 - remove REG_NOERROR instead of defining it conditionally (as Jeroen
   suggested)

Andreas Bießmann (3):
  lib/rsa/rsa-sig.c: compile on OS X
  tools/proftool: remove REG_NOERROR
  Makefile: fix readelf usage

 Makefile   | 2 +-
 lib/rsa/rsa-sign.c | 1 -
 tools/proftool.c   | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

-- 
1.8.3.1

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


Re: [U-Boot] [PATCH v3 0/2] Add Arndale board support

2013-07-01 Thread Chander Kashyap
Dear Inder,

On 2 July 2013 10:11, Inderpal Singh  wrote:
> The Arndale board is based on samsung's exynos5250 SOC.
> For spl generation, it depends on the patch at [5].
>
> First patch provides the basic arndale board support. The second patch
> adds the MMC support.
>
> Changes in v2:
> - split from earlier patchset at [3] as per Minkyu
> - Removed checkpatch errors pointed out by Wolfgang
> - rebased to latest u-boot-samsung master branch
> - created mmc_boot.c to remove dependency on consolidation
>   patch at [4]
> - split the mmc support to new patch as it depends on [2]
>
> [1] http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/162883
> [2] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/159887
> [3] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/157101
> [4] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/156272
>
> Changes in v3:
> - Used dt based serial
> - rebased to latest u-boot-samsung master branch
>
> [5] http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/164824
>
> Inderpal Singh (2):
>   exynos5250: Add arndale board support
>   exynos5250: arndale: Add mmc support
>
>  MAINTAINERS  |4 +
>  board/samsung/arndale/Makefile   |   58 +++
>  board/samsung/arndale/arndale.c  |  117 ++
>  board/samsung/arndale/arndale_spl.c  |   66 +++
>  board/samsung/arndale/clock_init.c   |  655 
> ++
>  board/samsung/arndale/clock_init.h   |  149 +++
>  board/samsung/arndale/dmc_common.c   |  199 +
>  board/samsung/arndale/dmc_init_ddr3.c|  228 +++
>  board/samsung/arndale/lowlevel_init.S|   92 +
>  board/samsung/arndale/mmc_boot.c |   58 +++
>  board/samsung/arndale/setup.h|  569 ++
>  board/samsung/dts/exynos5250-arndale.dts |   41 ++
>  boards.cfg   |1 +
>  include/configs/arndale.h|   36 ++
>  14 files changed, 2273 insertions(+)
>  create mode 100644 board/samsung/arndale/Makefile
>  create mode 100644 board/samsung/arndale/arndale.c
>  create mode 100644 board/samsung/arndale/arndale_spl.c
>  create mode 100644 board/samsung/arndale/clock_init.c
>  create mode 100644 board/samsung/arndale/clock_init.h
>  create mode 100644 board/samsung/arndale/dmc_common.c
>  create mode 100644 board/samsung/arndale/dmc_init_ddr3.c
>  create mode 100644 board/samsung/arndale/lowlevel_init.S
>  create mode 100644 board/samsung/arndale/mmc_boot.c
>  create mode 100644 board/samsung/arndale/setup.h
>  create mode 100644 board/samsung/dts/exynos5250-arndale.dts
>  create mode 100644 include/configs/arndale.h
>
> --
> 1.7.9.5
>
Looks good.

Acked-by: Chander Kashyap 


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


Re: [U-Boot] Pull request: u-boot-video/master

2013-07-01 Thread Anatolij Gustschin
On Mon, 1 Jul 2013 23:11:07 -0300
Otavio Salvador  wrote:
...
> You didn' t put the splashpos fix.

I would prefer to wait a few days, so other people will have a chance
to review and comment. Also I didn't test the splashpos fix yet, it
was only compile-tested.

Thanks,

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


Re: [U-Boot] [PATCH 4/4 V2] EXYNOS: Move files from board/samsung to arch/arm.

2013-07-01 Thread Minkyu Kang
Dear Rajeshwari,

On 01/07/13 19:02, Rajeshwari Shinde wrote:
> This patch performs the following:
> 
> 1) Convert the assembly code for memory and clock initialization to C code.
> 2) Move the memory and clock init codes from board/samsung to arch/arm
> 3) Creat a common lowlevel_init file across Exynos4 and Exynos5. Converted
>the common lowlevel_init from assembly to C-code
> 4) Made spl_boot.c and tzpc_init.c common for both exynos4 and exynos5.
> 5) Enable CONFIG_SKIP_LOWLEVEL_INIT as stack pointer initialisation is already
>done in _main.
> 6) exynos-uboot-spl.lds made common across SMDKV310, Origen and SMDK5250.
> 
> TEST: Tested SD-MMC boot on SMDK5250 and Origen.
>   Tested USB and SPI boot on SMDK5250
>   Compile tested for SMDKV310.
> 
> Signed-off-by: Rajeshwari Shinde 
> ---
> Changes in V2:
>   - Rebased on latest u-boot-samsung tree.
>   - Incorporated review comments from Minkyu Kang.  
>  arch/arm/cpu/armv7/exynos/Makefile |   17 +-
>  .../arm/cpu/armv7/exynos}/clock_init.h |0
>  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   94 +
>  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   27 +-
>  arch/arm/cpu/armv7/exynos/common_setup.h   |   43 ++
>  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
>  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   17 +-
>  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  295 ++
>  .../arm/cpu/armv7/exynos/exynos4_setup.h   |   97 +-
>  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   28 +-
>  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   72 
>  .../arm/cpu/armv7/exynos}/spl_boot.c   |   77 +++-
>  board/samsung/origen/Makefile  |   11 +-
>  board/samsung/origen/lowlevel_init.S   |  357 -
>  board/samsung/origen/mem_setup.S   |  421 
> 
>  board/samsung/origen/mmc_boot.c|   58 ---
>  board/samsung/smdk5250/Makefile|   14 +-
>  board/samsung/smdkv310/Makefile|   10 +-
>  board/samsung/smdkv310/lowlevel_init.S |  414 ---
>  board/samsung/smdkv310/mem_setup.S |  365 -
>  board/samsung/smdkv310/mmc_boot.c  |   60 ---
>  include/configs/exynos5250-dt.h|8 +-
>  include/configs/origen.h   |9 +-
>  include/configs/smdkv310.h |8 +-
>  24 files changed, 743 insertions(+), 1766 deletions(-)
>  rename {board/samsung/smdk5250 => arch/arm/cpu/armv7/exynos}/clock_init.h 
> (100%)
>  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
>  rename board/samsung/smdk5250/clock_init.c => 
> arch/arm/cpu/armv7/exynos/clock_init_exynos5.c (97%)
>  create mode 100644 arch/arm/cpu/armv7/exynos/common_setup.h
>  rename {board/samsung/smdk5250 => arch/arm/cpu/armv7/exynos}/dmc_common.c 
> (97%)
>  rename {board/samsung/smdk5250 => arch/arm/cpu/armv7/exynos}/dmc_init_ddr3.c 
> (96%)
>  create mode 100644 arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c
>  rename board/samsung/origen/origen_setup.h => 
> arch/arm/cpu/armv7/exynos/exynos4_setup.h (86%)
>  rename board/samsung/smdk5250/setup.h => 
> arch/arm/cpu/armv7/exynos/exynos5_setup.h (96%)
>  create mode 100644 arch/arm/cpu/armv7/exynos/lowlevel_init.c
>  rename {board/samsung/smdk5250 => arch/arm/cpu/armv7/exynos}/spl_boot.c (73%)
>  delete mode 100644 board/samsung/origen/lowlevel_init.S
>  delete mode 100644 board/samsung/origen/mem_setup.S
>  delete mode 100644 board/samsung/origen/mmc_boot.c
>  delete mode 100644 board/samsung/smdkv310/lowlevel_init.S
>  delete mode 100644 board/samsung/smdkv310/mem_setup.S
>  delete mode 100644 board/samsung/smdkv310/mmc_boot.c
> 
> diff --git a/arch/arm/cpu/armv7/exynos/Makefile 
> b/arch/arm/cpu/armv7/exynos/Makefile
> index b2f9152..4661155 100644
> --- a/arch/arm/cpu/armv7/exynos/Makefile
> +++ b/arch/arm/cpu/armv7/exynos/Makefile
> @@ -22,10 +22,19 @@ include $(TOPDIR)/config.mk
>  
>  LIB  = $(obj)lib$(SOC).o
>  
> -COBJS+= clock.o power.o soc.o system.o pinmux.o tzpc.o
> -
> -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
> -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
> +COBJS-y  += clock.o power.o soc.o system.o pinmux.o tzpc.o
> +
> +ifdef CONFIG_SPL_BUILD
> +COBJS-$(CONFIG_EXYNOS5)  += clock_init_exynos5.o
> +COBJS-$(CONFIG_EXYNOS5)  += dmc_common.o dmc_init_ddr3.o
> +COBJS-$(CONFIG_EXYNOS4210)+= dmc_init_exynos4.o clock_init_exynos4.o
> +COBJS-y  += spl_boot.o
> +COBJS-y  += lowlevel_init.o
> +endif
> +
> +COBJS   := $(COBJS-y)
> +SRCS := $(COBJS:.o=.c)
> +OBJS := $(addprefix $(obj),$(COBJS))
>  
>  all:  $(obj).depend $(LIB)
>  
> diff --git a/board/samsung/smdk5250/clock_init.h 
> b/arch/arm/cpu/armv7/exynos/clock_init.h
> similarity index 100%
> rename from board/samsung/smdk5250/clock_init.h
> rena

Re: [U-Boot] Reminder mail [Fwd: Kernel bring Up fail in NOR boot for custom board]]

2013-07-01 Thread Shrimanth
Dear Marek Vasut,

The same kernel image works fine in P1020 RDB board with NOR flash boot.

When the same kernel image is used for our custom board with P1012
processor we are getting kernel panic.

We are also suspecting on memory, How do we trace it ?

Note: The same kernel image is used for our custom board with P1012
processor with NAND flash boot & its also working fine.

Rgds
Shrimanth

On Mon, 2013-07-01 at 15:10 +0200, Marek Vasut wrote:

> Dear Shrimanth,
> 
> > Reminder Mail
> > 
> > Please reply ASAP.
> 
> I believe the remarks above won't help you, neither will top-posting.
> 
> The problem looks to be either DRAM setup being incorrect or kernel problem.
> 
> > -- Forwarded Message 
> > From: Shrimanth 
> > To: joe.hershber...@ni.com, Marek Vasut , s...@denx.de,
> > u-boot@lists.denx.de, Scott Wood 
> > Cc: Manukumar , PJM
> > 
> > Subject: [Fwd: Kernel bring Up fail in NOR boot for custom board]
> > Date: Thu, 27 Jun 2013 11:04:54 +0530
> > 
> > Dear Scott Wood,
> > 
> > 1. Board Bring Up(u-boot and kernel) in Nand Flash
> > With the setting of cpu = 533MHz,ddr = 533MHz and lbc =
> > 66.66MHz.
> > we can able to make u-boot up and kernel with all drivers
> > modules are up and prompt is appeared.
> > 
> > 2. Board Bring Up(u-boot and kernel) in Nor Flash
> > With the setting of cpu = 533MHz,ddr = 533MHz and lbc =
> > 16.66MHz.
> > we can able to make u-boot up and kernel is not up.
> > i.e, the drivers in kernel are unevenly initialized and getting
> > into kernel panic state.
> > I have attached the file that shows above mentioned behavio1
> > please find the attachments.
> > 
> >  If the cpu frequency is reduced to 266Mhz and DDR with
> >  533.33MHz. kernel initialize further but result is same
> >  as above(kernel panic).
> > 
> > 
> > NOTE: we have observed that if same kernel image is put in
> > the Reference Design Board(P1021RDB-PC) it is working fine.
> > 
> > >From u-boot we have tried changing OR & BR values along with LAW and
> > 
> > TLB values..Are we missing something??
> > 
> > As our Deveopment is stuck please reply ASAP
> > 
> > 
> > Regards
> 
> Best regards,
> Marek Vasut
> 


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


Re: [U-Boot] [PATCH v4 2/2] socfpga: Adding System Manager driver

2013-07-01 Thread Chin Liang See
Dear Wolfgang,

On Tue, 2013-07-02 at 06:24 +0200, ZY - wd wrote:
> Dear Chin Liang See,
> 
> In message <1372719771-4329-1-git-send-email-cl...@altera.com> you wrote:
> > Adding the generated pin mux
> > configuration by Preloader Generator tool
> 
> In addition to the license issue, please chose a descriptive subject.
> It is not really helpful when all patches of a series have the same
> subject line.
> 

Sure, I can fix this.

Thanks
Chin Liang

> Best regards,
> 
> Wolfgang Denk
> 


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


[U-Boot] [PATCH v3 0/2] Add Arndale board support

2013-07-01 Thread Inderpal Singh
The Arndale board is based on samsung's exynos5250 SOC.
For spl generation, it depends on the patch at [5].

First patch provides the basic arndale board support. The second patch
adds the MMC support.

Changes in v2:
- split from earlier patchset at [3] as per Minkyu
- Removed checkpatch errors pointed out by Wolfgang
- rebased to latest u-boot-samsung master branch
- created mmc_boot.c to remove dependency on consolidation
  patch at [4]
- split the mmc support to new patch as it depends on [2]

[1] http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/162883
[2] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/159887
[3] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/157101
[4] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/156272 

Changes in v3:
- Used dt based serial
- rebased to latest u-boot-samsung master branch

[5] http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/164824

Inderpal Singh (2):
  exynos5250: Add arndale board support
  exynos5250: arndale: Add mmc support

 MAINTAINERS  |4 +
 board/samsung/arndale/Makefile   |   58 +++
 board/samsung/arndale/arndale.c  |  117 ++
 board/samsung/arndale/arndale_spl.c  |   66 +++
 board/samsung/arndale/clock_init.c   |  655 ++
 board/samsung/arndale/clock_init.h   |  149 +++
 board/samsung/arndale/dmc_common.c   |  199 +
 board/samsung/arndale/dmc_init_ddr3.c|  228 +++
 board/samsung/arndale/lowlevel_init.S|   92 +
 board/samsung/arndale/mmc_boot.c |   58 +++
 board/samsung/arndale/setup.h|  569 ++
 board/samsung/dts/exynos5250-arndale.dts |   41 ++
 boards.cfg   |1 +
 include/configs/arndale.h|   36 ++
 14 files changed, 2273 insertions(+)
 create mode 100644 board/samsung/arndale/Makefile
 create mode 100644 board/samsung/arndale/arndale.c
 create mode 100644 board/samsung/arndale/arndale_spl.c
 create mode 100644 board/samsung/arndale/clock_init.c
 create mode 100644 board/samsung/arndale/clock_init.h
 create mode 100644 board/samsung/arndale/dmc_common.c
 create mode 100644 board/samsung/arndale/dmc_init_ddr3.c
 create mode 100644 board/samsung/arndale/lowlevel_init.S
 create mode 100644 board/samsung/arndale/mmc_boot.c
 create mode 100644 board/samsung/arndale/setup.h
 create mode 100644 board/samsung/dts/exynos5250-arndale.dts
 create mode 100644 include/configs/arndale.h

-- 
1.7.9.5

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


[U-Boot] [PATCH v3 2/2] exynos5250: arndale: Add mmc support

2013-07-01 Thread Inderpal Singh
This patch adds mmc support to the arndale board.

Signed-off-by: Inderpal Singh 
---
 board/samsung/arndale/arndale.c  |   14 ++
 board/samsung/dts/exynos5250-arndale.dts |   18 ++
 2 files changed, 32 insertions(+)

diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c
index 627583b..7f8a568 100644
--- a/board/samsung/arndale/arndale.c
+++ b/board/samsung/arndale/arndale.c
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -64,6 +65,19 @@ void dram_init_banksize(void)
}
 }
 
+#ifdef CONFIG_GENERIC_MMC
+int board_mmc_init(bd_t *bis)
+{
+   int ret;
+   /* dwmmc initializattion for available channels */
+   ret = exynos_dwmmc_init(gd->fdt_blob);
+   if (ret)
+   debug("dwmmc init failed\n");
+
+   return ret;
+}
+#endif
+
 static int board_uart_init(void)
 {
int err, uart_id, ret = 0;
diff --git a/board/samsung/dts/exynos5250-arndale.dts 
b/board/samsung/dts/exynos5250-arndale.dts
index 3081ab4..948275a 100644
--- a/board/samsung/dts/exynos5250-arndale.dts
+++ b/board/samsung/dts/exynos5250-arndale.dts
@@ -20,4 +20,22 @@
serial0 = "/serial@12C2";
console = "/serial@12C2";
};
+
+   mmc@1220 {
+   samsung,bus-width = <8>;
+   samsung,timing = <1 3 3>;
+   };
+
+   mmc@1221 {
+   status = "disabled";
+   };
+
+   mmc@1222 {
+   samsung,bus-width = <4>;
+   samsung,timing = <1 2 3>;
+   };
+
+   mmc@1223 {
+   status = "disabled";
+   };
 };
-- 
1.7.9.5

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


[U-Boot] [PATCH] CONFIG: EXYNOS5: Replace misnomer SMDK5250 with EXYNOS5250 and update Makefiles

2013-07-01 Thread Inderpal Singh
Update the Makefiles so that all boards can use the same spl generation tool

Signed-off-by: Inderpal Singh 
---
This is needed for the Arndale board support patch just sent
after sending this one.

 Makefile|2 +-
 include/configs/exynos5250-dt.h |2 +-
 tools/Makefile  |4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index af4c3c0..d8c5d3f 100644
--- a/Makefile
+++ b/Makefile
@@ -821,7 +821,7 @@ clean:
   $(obj)tools/gdb/{astest,gdbcont,gdbsend}   \
   $(obj)tools/gen_eth_addr$(obj)tools/img2srec   \
   $(obj)tools/mk{env,}image   $(obj)tools/mpc86x_clk \
-  $(obj)tools/mk{smdk5250,}spl   \
+  $(obj)tools/mk{$(BOARD),}spl   \
   $(obj)tools/mxsboot\
   $(obj)tools/ncb $(obj)tools/ubsha1 \
   $(obj)tools/kernel-doc/docproc
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index 1c9eca2..a782880 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -29,7 +29,7 @@
 #define CONFIG_SAMSUNG /* in a SAMSUNG core */
 #define CONFIG_S5P /* S5P Family */
 #define CONFIG_EXYNOS5 /* which is in a Exynos5 Family */
-#define CONFIG_SMDK5250/* which is in a SMDK5250 */
+#define CONFIG_EXYNOS5250
 
 #include   /* get chip and board defs */
 
diff --git a/tools/Makefile b/tools/Makefile
index 4630f03..5eb14c5 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -68,7 +68,7 @@ BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
 BIN_FILES-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX)
 BIN_FILES-y += mkenvimage$(SFX)
 BIN_FILES-y += mkimage$(SFX)
-BIN_FILES-$(CONFIG_SMDK5250) += mksmdk5250spl$(SFX)
+BIN_FILES-$(CONFIG_EXYNOS5250) += mk$(BOARD)spl$(SFX)
 BIN_FILES-$(CONFIG_MX23) += mxsboot$(SFX)
 BIN_FILES-$(CONFIG_MX28) += mxsboot$(SFX)
 BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX)
@@ -100,7 +100,7 @@ NOPED_OBJ_FILES-y += image-host.o
 NOPED_OBJ_FILES-y += omapimage.o
 NOPED_OBJ_FILES-y += mkenvimage.o
 NOPED_OBJ_FILES-y += mkimage.o
-OBJ_FILES-$(CONFIG_SMDK5250) += mkexynosspl.o
+OBJ_FILES-$(CONFIG_EXYNOS5250) += mkexynosspl.o
 OBJ_FILES-$(CONFIG_MX23) += mxsboot.o
 OBJ_FILES-$(CONFIG_MX28) += mxsboot.o
 OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o
-- 
1.7.9.5

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


Re: [U-Boot] [PATCH v4 2/2] socfpga: Adding System Manager driver

2013-07-01 Thread Wolfgang Denk
Dear Chin Liang See,

In message <1372719771-4329-1-git-send-email-cl...@altera.com> you wrote:
> Adding the generated pin mux
> configuration by Preloader Generator tool

In addition to the license issue, please chose a descriptive subject.
It is not really helpful when all patches of a series have the same
subject line.

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
This all sounds complicated, but it mostly does excatly what you  ex-
pect. It's just difficult for us to explain what you expect...
   - L. Wall & R. L. Schwartz, _Programming Perl_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 1/2] socfpga: Adding System Manager driver

2013-07-01 Thread Wolfgang Denk
Dear Chin Liang See,

In message <1372719578-4247-1-git-send-email-cl...@altera.com> you wrote:
> Adding System Manager driver which will configure the
> pin mux for real hardware Cyclone V development kit
> (not Virtual Platform)

License clash:

> +/*
> + * Copyright Altera Corporation (C) 2013. All rights reserved
> + *
> + * This program is free software; you can redistribute it
> + * and/or modify it under the terms and conditions of the
> + * GNU General Public License, version 2, as published by
> + * the Free Software Foundation.

Please remove the "All rights reserved", and add the " or (at your
option) any later version" clause as documented at [1].

[1] http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign
Bullet # 3

Please fix globally for all your patches / code.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
This is an unauthorized cybernetic announcement.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/1] socfpga: Creating driver for Reset Manager

2013-07-01 Thread Wolfgang Denk
Dear Chin Liang See,

In message <1372718641-4066-1-git-send-email-cl...@altera.com> you wrote:
> Consolidating reset code into reset_manager.c.
> Also separating reset configuration for virtual target
> and real hardware Cyclone V development kit
...
> --- /dev/null
> +++ b/arch/arm/cpu/armv7/socfpga/reset_manager.c
> @@ -0,0 +1,52 @@
> +/*
> + * Copyright Altera Corporation (C) 2013. All rights reserved

Please get rid of the "All rights reserved" clause.

> + * This program is free software; you can redistribute it
> + * and/or modify it under the terms and conditions of the
> + * GNU General Public License, version 2, as published by
> + * the Free Software Foundation.

New code for U-Boot must be released under GPLv2+, so please add the
"or (at your option) any later version" clause.


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
Q:  Do you know what the death rate around here is?
A:  One per person.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2][v2] board/bsc9132qds: Configure DSP DDR controller

2013-07-01 Thread Priyanka Jain
BSC9132 SoC has two separate DDR controllers for PowerPC side and DSP side
DDR. They are mapped to PowerPC and DSP CCSR space respectively.
BSC9132QDS has two on-board MC34716EP DDR3 memory one connected to PowerPC
and other to DSP side controller.

Configure DSP DDR controller similar to PowerPC side DDR controller as
memories are exactly similar.

Signed-off-by: Manish Jaggi 
Signed-off-by: Priyanka Jain 
---
 Changes for v2: Added Manish's email-id

 arch/powerpc/include/asm/immap_85xx.h   |6 ++
 board/freescale/bsc9132qds/bsc9132qds.c |   22 ++
 2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/immap_85xx.h 
b/arch/powerpc/include/asm/immap_85xx.h
index db70d04..ae9a016 100644
--- a/arch/powerpc/include/asm/immap_85xx.h
+++ b/arch/powerpc/include/asm/immap_85xx.h
@@ -3047,6 +3047,12 @@ struct ccsr_pman {
 #define CONFIG_SYS_MPC85xx_GUTS_OFFSET 0xE
 #define CONFIG_SYS_FSL_SRIO_OFFSET 0xC
 
+#if defined(CONFIG_BSC9132)
+#define CONFIG_SYS_FSL_DSP_CCSR_DDR_OFFSET 0x1
+#define CONFIG_SYS_FSL_DSP_CCSR_DDR_ADDR \
+   (CONFIG_SYS_FSL_DSP_CCSRBAR + CONFIG_SYS_FSL_DSP_CCSR_DDR_OFFSET)
+#endif
+
 #define CONFIG_SYS_FSL_CPC_ADDR\
(CONFIG_SYS_CCSRBAR + CONFIG_SYS_FSL_CPC_OFFSET)
 #define CONFIG_SYS_FSL_QMAN_ADDR \
diff --git a/board/freescale/bsc9132qds/bsc9132qds.c 
b/board/freescale/bsc9132qds/bsc9132qds.c
index ddc9d0a..b084c1b 100644
--- a/board/freescale/bsc9132qds/bsc9132qds.c
+++ b/board/freescale/bsc9132qds/bsc9132qds.c
@@ -141,6 +141,27 @@ void board_config_serdes_mux(void)
}
 }
 
+/* Configure DSP DDR controller */
+void dsp_ddr_configure(void)
+{
+   /*
+*There are separate DDR-controllers for DSP and PowerPC side DDR.
+*copy the ddr controller settings from PowerPC side DDR controller
+*to the DSP DDR controller as connected DDR memories are similar.
+*/
+   ccsr_ddr_t __iomem *pa_ddr =
+   (ccsr_ddr_t __iomem *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
+   ccsr_ddr_t temp_ddr;
+   ccsr_ddr_t __iomem *dsp_ddr =
+   (ccsr_ddr_t __iomem *)CONFIG_SYS_FSL_DSP_CCSR_DDR_ADDR;
+
+   memcpy(&temp_ddr, pa_ddr, sizeof(ccsr_ddr_t));
+   temp_ddr.cs0_bnds = CONFIG_SYS_DDR1_CS0_BNDS;
+   temp_ddr.sdram_cfg &= ~SDRAM_CFG_MEM_EN;
+   memcpy(dsp_ddr, &temp_ddr, sizeof(ccsr_ddr_t));
+   dsp_ddr->sdram_cfg |= SDRAM_CFG_MEM_EN;
+}
+
 int board_early_init_r(void)
 {
 #ifndef CONFIG_SYS_NO_FLASH
@@ -169,6 +190,7 @@ int board_early_init_r(void)
0, flash_esel+1, BOOKE_PAGESZ_64M, 1);
 #endif
board_config_serdes_mux();
+   dsp_ddr_configure();
return 0;
 }
 
-- 
1.7.4.1



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


[U-Boot] [PATCH 1/2][v2] board/bsc9132qds: Add DSP side tlb and laws

2013-07-01 Thread Priyanka Jain
BSC9132QDS is a Freescale Reference Design Board for BSC9132 SoC which is a
integrated device that contains two powerpc e500v2 cores and two DSP
starcores.

To support DSP starcore
-Creating LAW and TLB for DSP-CCSR space.
-Creating LAW for DSP-core subsystem M2 and M3 memory
-Creating LAW for 1GB DDR which is connected exclusively to DSP-cores

Signed-off-by: Manish Jaggi 
Signed-off-by: Priyanka Jain 
---
 Changes for v2: Added Manish's email-id

 README|8 
 arch/powerpc/include/asm/config_mpc85xx.h |4 
 arch/powerpc/include/asm/fsl_law.h|6 +-
 board/freescale/bsc9132qds/law.c  |8 
 board/freescale/bsc9132qds/tlb.c  |5 +
 include/configs/BSC9132QDS.h  |4 
 6 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/README b/README
index e8359f8..99a2c02 100644
--- a/README
+++ b/README
@@ -422,10 +422,18 @@ The following options need to be configured:
This is the value to write into CCSR offset 0x18600
according to the A004510 workaround.
 
+   CONFIG_SYS_FSL_DSP_DDR_ADDR
+   This value denotes start offset of DDR memory which is
+   connected exclusively to the DSP cores.
+
CONFIG_SYS_FSL_DSP_M2_RAM_ADDR
This value denotes start offset of M2 memory
which is directly connected to the DSP core.
 
+   CONFIG_SYS_FSL_DSP_M3_RAM_ADDR
+   This value denotes start offset of M3 memory which is directly
+   connected to the DSP core.
+
CONFIG_SYS_FSL_DSP_CCSRBAR_DEFAULT
This value denotes start offset of DSP CCSR space.
 
diff --git a/arch/powerpc/include/asm/config_mpc85xx.h 
b/arch/powerpc/include/asm/config_mpc85xx.h
index 1d46b14..16ef7df 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -506,6 +506,10 @@
 #define CONFIG_TSECV2
 #define CONFIG_SYS_FSL_SEC_COMPAT  4
 #define CONFIG_NUM_DDR_CONTROLLERS 2
+#define CONFIG_SYS_FSL_DSP_DDR_ADDR0x4000
+#define CONFIG_SYS_FSL_DSP_M2_RAM_ADDR 0xb000
+#define CONFIG_SYS_FSL_DSP_M3_RAM_ADDR 0xc000
+#define CONFIG_SYS_FSL_DSP_CCSRBAR_DEFAULT 0xff60
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT  3
 #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff70
 #define CONFIG_NAND_FSL_IFC
diff --git a/arch/powerpc/include/asm/fsl_law.h 
b/arch/powerpc/include/asm/fsl_law.h
index bea1636..fa51e59 100644
--- a/arch/powerpc/include/asm/fsl_law.h
+++ b/arch/powerpc/include/asm/fsl_law.h
@@ -82,7 +82,7 @@ enum law_trgt_if {
 #ifndef CONFIG_MPC8641
LAW_TRGT_IF_PCIE_1 = 0x02,
 #endif
-#if defined(CONFIG_BSC9131)
+#if defined(CONFIG_BSC9131) || defined(CONFIG_BSC9132)
LAW_TRGT_IF_OCN_DSP = 0x03,
 #else
 #if !defined(CONFIG_MPC8572) && !defined(CONFIG_P2020)
@@ -94,7 +94,11 @@ enum law_trgt_if {
LAW_TRGT_IF_DSP_CCSR = 0x09,
LAW_TRGT_IF_DDR_INTRLV = 0x0b,
LAW_TRGT_IF_RIO = 0x0c,
+#if defined(CONFIG_BSC9132)
+   LAW_TRGT_IF_CLASS_DSP = 0x0d,
+#else
LAW_TRGT_IF_RIO_2 = 0x0d,
+#endif
LAW_TRGT_IF_DPAA_SWP_SRAM = 0x0e,
LAW_TRGT_IF_DDR = 0x0f,
LAW_TRGT_IF_DDR_2 = 0x16,   /* 2nd controller */
diff --git a/board/freescale/bsc9132qds/law.c b/board/freescale/bsc9132qds/law.c
index b4bce99..99ea56b 100644
--- a/board/freescale/bsc9132qds/law.c
+++ b/board/freescale/bsc9132qds/law.c
@@ -32,6 +32,14 @@ struct law_entry law_table[] = {
 #ifdef CONFIG_SYS_FPGA_BASE_PHYS
SET_LAW(CONFIG_SYS_FPGA_BASE_PHYS, LAW_SIZE_128K, LAW_TRGT_IF_IFC),
 #endif
+   SET_LAW(CONFIG_SYS_FSL_DSP_CCSRBAR_PHYS, LAW_SIZE_1M,
+   LAW_TRGT_IF_DSP_CCSR),
+   SET_LAW(CONFIG_SYS_FSL_DSP_M2_RAM_ADDR, LAW_SIZE_32M,
+   LAW_TRGT_IF_OCN_DSP),
+   SET_LAW(CONFIG_SYS_FSL_DSP_M3_RAM_ADDR, LAW_SIZE_32K,
+   LAW_TRGT_IF_CLASS_DSP),
+   SET_LAW(CONFIG_SYS_FSL_DSP_DDR_ADDR, LAW_SIZE_1G,
+   LAW_TRGT_IF_CLASS_DSP)
 };
 
 int num_law_entries = ARRAY_SIZE(law_table);
diff --git a/board/freescale/bsc9132qds/tlb.c b/board/freescale/bsc9132qds/tlb.c
index 0ec9a85..734f3f8 100644
--- a/board/freescale/bsc9132qds/tlb.c
+++ b/board/freescale/bsc9132qds/tlb.c
@@ -57,6 +57,11 @@ struct fsl_e_tlb_entry tlb_table[] = {
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
0, 1, BOOKE_PAGESZ_1M, 1),
 
+   /* CCSRBAR (DSP) */
+   SET_TLB_ENTRY(1, CONFIG_SYS_FSL_DSP_CCSRBAR,
+ CONFIG_SYS_FSL_DSP_CCSRBAR_PHYS, MAS3_SW|MAS3_SR,
+ MAS2_I|MAS2_G, 0, 2, BOOKE_PAGESZ_1M, 1),
+
 #ifndef CONFIG_SPL_BUILD
SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE_PHYS,
MAS3_SX|MAS3_SR, MAS2_W|MAS2_G,
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index 3aa4443..91105eb 100644
--- a/include/con

Re: [U-Boot] [PATCH v2] net: Use ARRAY_SIZE at appropriate places

2013-07-01 Thread Axel Lin
>>> diff --git a/drivers/net/npe/IxEthDBFeatures.c 
>>> b/drivers/net/npe/IxEthDBFeatures.c
>>> index c5b680a..d43efaa 100644
>>> --- a/drivers/net/npe/IxEthDBFeatures.c
>>> +++ b/drivers/net/npe/IxEthDBFeatures.c
>>> @@ -143,22 +143,22 @@ void ixEthDBFeatureCapabilityScan(void)
>>>  IX_ENSURE(sizeof (ixEthDBTrafficClassDefinitions) != 0, 
>>> "DB: no traffic class definitions found, check IxEthDBQoS.h");
>>>
>>>  /* find the traffic class definition index compatible with 
>>> the current NPE A functionality ID */
>>> -for (trafficClassDefinitionIndex = 0 ;
>>> -trafficClassDefinitionIndex < sizeof 
>>> (ixEthDBTrafficClassDefinitions) / sizeof 
>>> (ixEthDBTrafficClassDefinitions[0]);
>>> -trafficClassDefinitionIndex++)
>>> -{
>>> -if 
>>> (ixEthDBTrafficClassDefinitions[trafficClassDefinitionIndex][IX_ETH_DB_NPE_A_FUNCTIONALITY_ID_INDEX]
>>>  == npeAImageId.functionalityId)
>>> -{
>>> -/* found it */
>>> -break;
>>> -}
>>> -}
>>> +   for (trafficClassDefinitionIndex = 0;
>>> +   trafficClassDefinitionIndex <
>>> +   ARRAY_SIZE(ixEthDBTrafficClassDefinitions);
>>> +   trafficClassDefinitionIndex++) {
>>> +   if 
>>> (ixEthDBTrafficClassDefinitions[trafficClassDefinitionIndex][IX_ETH_DB_NPE_A_FUNCTIONALITY_ID_INDEX]
>>>  == npeAImageId.functionalityId) {
>>> +   /* found it */
>>> +   break;
>>> +   }
>>> +   }
>>>
>> Above for loop along with if should be a block separable, means
>>
>> for (trafficClassDefinitionIndex = 0;
>>  trafficClassDefinitionIndex <
>>  ARRAY_SIZE(ixEthDBTrafficClassDefinitions);
>>  trafficClassDefinitionIndex++) {
>>  if (..) {
>
> Previous msg sent intermediately,
>
> See my exact comment here.
>
> for (trafficClassDefinitionIndex = 0;
>trafficClassDefinitionIndex <
>ARRAY_SIZE(ixEthDBTrafficClassDefinitions);
>trafficClassDefinitionIndex++) {
>if (..) {
>
> The above way is easy to understand where the code block starts, It
> just my opinion you may find the different way
> but it should be understandable where should code block start for a
> given condition statement.
>

Hi Jagan,

I thogut I just proved v2 is worse than v1, but obviously you don't think so.

In v1:
 drivers/net/npe/IxEthDBFeatures.c | 4 ++--
In v2:
 drivers/net/npe/IxEthDBFeatures.c | 28 ++--

The intention of this patch is really simple and clear in v1 - to use
ARRAY_SIZE.

Note, the checkpatch issue is not introduced by this patch.
It is because the original file does not pass checkpath at all.

If you do apply v2 to you should be able to see my comment in v2:
The whole file in drivers/net/npe/IxEthDBFeatures.c uses 4 spaces as indent,
only the lines touched by this patch uses tab as indent (to make
checkpatch happy).
Note: tab takes 8 spaces. The indent looks really odd after apply v2.

I just cannot convince myself v2 is better.
I do think we should use v1 and you can send a separate patch to fix all
checkpatch warnings if you want.

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


Re: [U-Boot] [PATCH v2] exynos5250: move board specific configs to board specific config file

2013-07-01 Thread Simon Glass
Hi,

On Mon, Jul 1, 2013 at 7:28 PM, Inderpal Singh wrote:

> Hi Simon,
>
>
> On 28 June 2013 21:20, Simon Glass  wrote:
>
>> Hi Inderpal,
>>
>> On Thu, Jun 20, 2013 at 12:10 AM, Inderpal Singh <
>> inderpal.si...@linaro.org> wrote:
>>
>>> Hi Simon,
>>>
>>> Thanks for review.
>>>
>>>
>>> On 11 June 2013 19:57, Simon Glass  wrote:
>>>
 Hi,

 On Fri, Jun 7, 2013 at 4:56 AM, Inderpal Singh <
 inderpal.si...@linaro.org> wrote:

> Not all boards based on exynos5250 have SPI flash, same serial port
> and might
> not require display and the same lds script. Hence move them to board
> specific
> config file.
>

 At least for the serial port this should be controlled by the device
 tree. There are quite a lot of pending patches for exynos, one of which
 enables this and removes the need for the CONFIG_SERIAL3 define.

 If you want to have a look, I pushed them to:

 http://git.denx.de/u-boot-x86.git in branch 'snow'

>>>
>>> I was not aware of this patchset. Thanks for pointing out. I will update
>>> my patchset to use DT for serial.
>>>
>>>

>
> Signed-off-by: Inderpal Singh 
> ---
> v1 was posted as the second patch of [1]
>
> Changes in v2:
> - split from the patchset at [1]
> - moved CONFIG_LCD and CONFIG_SPI_FLASH
> - rebased to latest u-boot-samsung master branch
>
> [1] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/157101
>
>  include/configs/exynos5250-dt.h |   11 +--
>  include/configs/smdk5250.h  |   16 ++--
>  include/configs/snow.h  |   16 ++--
>  3 files changed, 29 insertions(+), 14 deletions(-)
>
> diff --git a/include/configs/exynos5250-dt.h
> b/include/configs/exynos5250-dt.h
> index 03b07b2..22e47eb 100644
> --- a/include/configs/exynos5250-dt.h
> +++ b/include/configs/exynos5250-dt.h
> @@ -29,7 +29,6 @@
>  #define CONFIG_SAMSUNG /* in a SAMSUNG core */
>  #define CONFIG_S5P /* S5P Family */
>  #define CONFIG_EXYNOS5 /* which is in a Exynos5
> Family */
> -#define CONFIG_SMDK5250/* which is in a
> SMDK5250 */
>

 This is a misnomer - it actually means Exynos 5250 I think. The only
 thing it controls is the generation of the SPL packaging tool. So for now
 it should be defined for all Exynos5250 boards.

>>>
>>> Yes its a misnomer. I will change the name to CONFIG_EXYNOS5250.
>>>
>>
>> Sounds good.
>>
>>
>>>
>>>


>
>  #include   /* get chip and board defs */
>
> @@ -78,7 +77,6 @@
>  #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + (4 << 20))
>
>  /* select serial console configuration */
> -#define CONFIG_SERIAL3 /* use SERIAL 3 */
>  #define CONFIG_BAUDRATE115200
>  #define EXYNOS5_DEFAULT_UART_OFFSET0x01
>
> @@ -148,8 +146,6 @@
>  #define CONFIG_SPL
>  #define COPY_BL2_FNPTR_ADDR0x02020030
>
> -/* specific .lds file */
> -#define CONFIG_SPL_LDSCRIPT
>  "board/samsung/smdk5250/smdk5250-uboot-spl.lds"
>

 Again I suspect this is a misnomer.

>>>
>>>  Since all boards might not need this lds file, so how about moving lds
>>> file to board/samsung/common and renaming it to exynos5250-uboot-spl.lds.
>>> The boards needing this will have to include in their respective config
>>> files.
>>> Let me know your opinion.
>>>
>>
>> OK, so long has you know of boards that don't need it?
>>
>>
>>>
>>>


>  #define CONFIG_SPL_TEXT_BASE   0x02023400
>  #define CONFIG_SPL_MAX_FOOTPRINT   (14 * 1024)
>
> @@ -158,7 +154,7 @@
>  /* Miscellaneous configurable options */
>  #define CONFIG_SYS_LONGHELP/* undef to save memory */
>  #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser
>  */
> -#define CONFIG_SYS_PROMPT  "SMDK5250 # "
> +#define CONFIG_SYS_PROMPT  "EXYNOS5250 # "
>  #define CONFIG_SYS_CBSIZE  256 /* Console I/O Buffer
> Size */
>  #define CONFIG_SYS_PBSIZE  384 /* Print Buffer Size */
>  #define CONFIG_SYS_MAXARGS 16  /* max number of
> command args */
> @@ -198,7 +194,6 @@
>  /* FLASH and environment organization */
>  #define CONFIG_SYS_NO_FLASH
>  #undef CONFIG_CMD_IMLS
> -#define CONFIG_IDENT_STRING" for SMDK5250"
>
>  #define CONFIG_SYS_MMC_ENV_DEV 0
>
> @@ -247,9 +242,6 @@
>  #define CONFIG_I2C_EDID
>
>  /* SPI */
> -#define CONFIG_ENV_IS_IN_SPI_FLASH
> -#define CONFIG_SPI_FLASH
> -
>  #ifdef CONFIG_SPI_FLASH
>  #define CONFIG_EXYNOS_SPI
>  #define CONFIG_CMD_SF
> @@ -306,7 +298,6 @@
>  #define C

[U-Boot] test HYP mode in arch/arm/cpu/armv7/start.S

2013-07-01 Thread TigerLiu
Hi, experts:
I found it would determine whether CPU was in HYP mode or not before
switching to SVC mode in reset handler.

So, why need to test HYP mode?
So, which case could cause CPU in HYP mode during U-Boot boot stage?

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


Re: [U-Boot] Pull request: u-boot-video/master

2013-07-01 Thread Otavio Salvador
On Mon, Jul 1, 2013 at 7:13 PM, Anatolij Gustschin  wrote:
> Hello Tom,
>
> The following changes since commit e6bf18dba2a21bebf2c421b1c2e188225f6485a1:
>
>   Prepare v2013.07-rc2 (2013-06-28 18:03:51 -0400)
>
> are available in the git repository at:
>
>   git://git.denx.de/u-boot-video.git master
>
> for you to fetch changes up to 327598945b1365ca6ba3fe96c9bd45320999:
>
>   omap: cm_t35: Fix cm_t35 for weak splash_screen_prepare (2013-07-01 
> 21:47:40 +0200)
>
> 
> Piotr Wilczek (2):
>   drivers:video:s6e8ax0: change data_to_send array to static
>   lcd: align bmp header when uncopmressing image
>
> Robert Winkler (3):
>   video: lcd: Add CONFIG_SPLASH_SCREEN_PREPARE support to CONFIG_VIDEO
>   video: lcd: Make splash_screen_prepare weak, remove config macro
>   omap: cm_t35: Fix cm_t35 for weak splash_screen_prepare
>
> Stephen Warren (1):
>   lcd: remove unaligned access in lcd_dt_simplefb_configure_node()

You didn' t put the splashpos fix.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 1/2] socfpga: Adding System Manager driver

2013-07-01 Thread Chin Liang See
Adding System Manager driver which will configure the
pin mux for real hardware Cyclone V development kit
(not Virtual Platform)

Signed-off-by: Chin Liang See 
Reviewed-by: Pavel Machek 
Cc: Wolfgang Denk 
CC: Pavel Machek 
Cc: Dinh Nguyen 
---
Changes for v2:
   - Fixed the word wrap issue within patch
Changes for v3:
   - Fixed the long subject of the patch
   - Fixed the comment within the code
Changes for v4:
   - Added change log for each revision change

 arch/arm/cpu/armv7/socfpga/Makefile|2 +-
 arch/arm/cpu/armv7/socfpga/spl.c   |6 +++
 arch/arm/cpu/armv7/socfpga/system_manager.c|   41 
 .../include/asm/arch-socfpga/socfpga_base_addrs.h  |1 +
 arch/arm/include/asm/arch-socfpga/system_manager.h |   34 
 board/altera/socfpga_cyclone5/Makefile |4 +-
 include/configs/socfpga_cyclone5.h |1 +
 7 files changed, 87 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/socfpga/system_manager.c
 create mode 100644 arch/arm/include/asm/arch-socfpga/system_manager.h

diff --git a/arch/arm/cpu/armv7/socfpga/Makefile 
b/arch/arm/cpu/armv7/socfpga/Makefile
index 518e67a..cf2829a 100644
--- a/arch/arm/cpu/armv7/socfpga/Makefile
+++ b/arch/arm/cpu/armv7/socfpga/Makefile
@@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk
 LIB=  $(obj)lib$(SOC).o
 
 SOBJS  := lowlevel_init.o
-COBJS-y:= misc.o timer.o reset_manager.o
+COBJS-y:= misc.o timer.o reset_manager.o system_manager.o
 COBJS-$(CONFIG_SPL_BUILD) += spl.o
 
 COBJS  := $(COBJS-y)
diff --git a/arch/arm/cpu/armv7/socfpga/spl.c b/arch/arm/cpu/armv7/socfpga/spl.c
index 84216eb..28d8c99 100644
--- a/arch/arm/cpu/armv7/socfpga/spl.c
+++ b/arch/arm/cpu/armv7/socfpga/spl.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -36,6 +37,11 @@ u32 spl_boot_device(void)
  */
 void spl_board_init(void)
 {
+#ifndef CONFIG_SOCFPGA_VIRTUAL_TARGET
+   /* configure the pin muxing through system manager */
+   sysmgr_pinmux_init();
+#endif /* CONFIG_SOCFPGA_VIRTUAL_TARGET */
+
/* de-assert reset for peripherals and bridges based on handoff */
reset_deassert_peripherals_handoff();
 
diff --git a/arch/arm/cpu/armv7/socfpga/system_manager.c 
b/arch/arm/cpu/armv7/socfpga/system_manager.c
new file mode 100644
index 000..d893e97
--- /dev/null
+++ b/arch/arm/cpu/armv7/socfpga/system_manager.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright Altera Corporation (C) 2013. All rights reserved
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms and conditions of the
+ * GNU General Public License, version 2, as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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, see
+ * .
+ */
+
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Configure all the pin muxes
+ */
+void sysmgr_pinmux_init(void)
+{
+   unsigned long offset = CONFIG_SYSMGR_PINMUXGRP_OFFSET;
+
+   const unsigned long *pval = sys_mgr_init_table;
+   unsigned long i;
+
+   for (i = 0; i < ARRAY_SIZE(sys_mgr_init_table);
+   i++, offset += sizeof(unsigned long)) {
+   writel(*pval++, (SOCFPGA_SYSMGR_ADDRESS + offset));
+   }
+}
+
+
diff --git a/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h 
b/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h
index f353eb2..819c280 100644
--- a/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h
+++ b/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h
@@ -23,5 +23,6 @@
 #define SOCFPGA_UART1_ADDRESS 0xffc03000
 #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd0
 #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000
+#define SOCFPGA_SYSMGR_ADDRESS 0xffd08000
 
 #endif /* _SOCFPGA_BASE_ADDRS_H_ */
diff --git a/arch/arm/include/asm/arch-socfpga/system_manager.h 
b/arch/arm/include/asm/arch-socfpga/system_manager.h
new file mode 100644
index 000..ef9e464
--- /dev/null
+++ b/arch/arm/include/asm/arch-socfpga/system_manager.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright Altera Corporation (C) 2013. All rights reserved
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms and conditions of the
+ * GNU General Public License, version 2, as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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

[U-Boot] [PATCH v4 2/2] socfpga: Adding System Manager driver

2013-07-01 Thread Chin Liang See
Adding the generated pin mux
configuration by Preloader Generator tool

Signed-off-by: Chin Liang See 
Reviewed-by: Pavel Machek 
Cc: Wolfgang Denk 
CC: Pavel Machek 
Cc: Dinh Nguyen 
---
Changes for v2:
   - Fixed the word wrap issue within patch
Changes for v3:
   - Fixed the long subject of the patch
Changes for v4:
   - Added change log for each revision change

 board/altera/socfpga_cyclone5/pinmux_config.c |  214 +
 board/altera/socfpga_cyclone5/pinmux_config.h |   54 +++
 2 files changed, 268 insertions(+)
 create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.c
 create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.h

diff --git a/board/altera/socfpga_cyclone5/pinmux_config.c 
b/board/altera/socfpga_cyclone5/pinmux_config.c
new file mode 100644
index 000..8b09005
--- /dev/null
+++ b/board/altera/socfpga_cyclone5/pinmux_config.c
@@ -0,0 +1,214 @@
+/* This file is generated by Preloader Generator */
+
+#include "pinmux_config.h"
+
+/* pin mux configuration data */
+unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = {
+   0, /* EMACIO0 - Unused */
+   2, /* EMACIO1 - USB */
+   2, /* EMACIO2 - USB */
+   2, /* EMACIO3 - USB */
+   2, /* EMACIO4 - USB */
+   2, /* EMACIO5 - USB */
+   2, /* EMACIO6 - USB */
+   2, /* EMACIO7 - USB */
+   2, /* EMACIO8 - USB */
+   0, /* EMACIO9 - Unused */
+   2, /* EMACIO10 - USB */
+   2, /* EMACIO11 - USB */
+   2, /* EMACIO12 - USB */
+   2, /* EMACIO13 - USB */
+   0, /* EMACIO14 - N/A */
+   0, /* EMACIO15 - N/A */
+   0, /* EMACIO16 - N/A */
+   0, /* EMACIO17 - N/A */
+   0, /* EMACIO18 - N/A */
+   0, /* EMACIO19 - N/A */
+   3, /* FLASHIO0 - SDMMC */
+   3, /* FLASHIO1 - SDMMC */
+   3, /* FLASHIO2 - SDMMC */
+   3, /* FLASHIO3 - SDMMC */
+   0, /* FLASHIO4 - SDMMC */
+   0, /* FLASHIO5 - SDMMC */
+   0, /* FLASHIO6 - SDMMC */
+   0, /* FLASHIO7 - SDMMC */
+   0, /* FLASHIO8 - SDMMC */
+   3, /* FLASHIO9 - SDMMC */
+   3, /* FLASHIO10 - SDMMC */
+   3, /* FLASHIO11 - SDMMC */
+   3, /* GENERALIO0 - TRACE */
+   3, /* GENERALIO1 - TRACE */
+   3, /* GENERALIO2 - TRACE */
+   3, /* GENERALIO3 - TRACE  */
+   3, /* GENERALIO4 - TRACE  */
+   3, /* GENERALIO5 - TRACE  */
+   3, /* GENERALIO6 - TRACE  */
+   3, /* GENERALIO7 - TRACE  */
+   3, /* GENERALIO8 - TRACE  */
+   3, /* GENERALIO9 - SPIM0 */
+   3, /* GENERALIO10 - SPIM0 */
+   3, /* GENERALIO11 - SPIM0 */
+   3, /* GENERALIO12 - SPIM0 */
+   2, /* GENERALIO13 - CAN0 */
+   2, /* GENERALIO14 - CAN0 */
+   3, /* GENERALIO15 - I2C0 */
+   3, /* GENERALIO16 - I2C0 */
+   2, /* GENERALIO17 - UART0 */
+   2, /* GENERALIO18 - UART0 */
+   0, /* GENERALIO19 - N/A */
+   0, /* GENERALIO20 - N/A */
+   0, /* GENERALIO21 - N/A */
+   0, /* GENERALIO22 - N/A */
+   0, /* GENERALIO23 - N/A */
+   0, /* GENERALIO24 - N/A */
+   0, /* GENERALIO25 - N/A */
+   0, /* GENERALIO26 - N/A */
+   0, /* GENERALIO27 - N/A */
+   0, /* GENERALIO28 - N/A */
+   0, /* GENERALIO29 - N/A */
+   0, /* GENERALIO30 - N/A */
+   0, /* GENERALIO31 - N/A */
+   2, /* MIXED1IO0 - EMAC */
+   2, /* MIXED1IO1 - EMAC */
+   2, /* MIXED1IO2 - EMAC */
+   2, /* MIXED1IO3 - EMAC */
+   2, /* MIXED1IO4 - EMAC */
+   2, /* MIXED1IO5 - EMAC */
+   2, /* MIXED1IO6 - EMAC */
+   2, /* MIXED1IO7 - EMAC */
+   2, /* MIXED1IO8 - EMAC */
+   2, /* MIXED1IO9 - EMAC */
+   2, /* MIXED1IO10 - EMAC */
+   2, /* MIXED1IO11 - EMAC */
+   2, /* MIXED1IO12 - EMAC */
+   2, /* MIXED1IO13 - EMAC */
+   0, /* MIXED1IO14 - Unused */
+   3, /* MIXED1IO15 - QSPI */
+   3, /* MIXED1IO16 - QSPI */
+   3, /* MIXED1IO17 - QSPI */
+   3, /* MIXED1IO18 - QSPI */
+   3, /* MIXED1IO19 - QSPI */
+   3, /* MIXED1IO20 - QSPI */
+   0, /* MIXED1IO21 - GPIO */
+   0, /* MIXED2IO0 - N/A */
+   0, /* MIXED2IO1 - N/A */
+   0, /* MIXED2IO2 - N/A */
+   0, /* MIXED2IO3 - N/A */
+   0, /* MIXED2IO4 - N/A */
+   0, /* MIXED2IO5 - N/A */
+   0, /* MIXED2IO6 - N/A */
+   0, /* MIXED2IO7 - N/A */
+   0, /* GPLINMUX48 */
+   0, /* GPLINMUX49 */
+   0, /* GPLINMUX50 */
+   0, /* GPLINMUX51 */
+   0, /* GPLINMUX52 */
+   0, /* GPLINMUX53 */
+   0, /* GPLINMUX54 */
+   0, /* GPLINMUX55 */
+   0, /* GPLINMUX56 */
+   0, /* GPLINMUX57 */
+   0, /* GPLINMUX58 */
+   0, /* GPLINMUX59 */
+   0, /* GPLINMUX60 */
+   0, /* GPLINMUX61 */
+   0, /* GPLINMUX62 */
+   0, /* GPLINMUX63 */
+   0, /* GPLINMUX64 */
+   0, /* GPLINMUX65 */
+   0, /* GPLINMUX66 */
+   0, /* GPLINMUX67 */
+   0, /* GPLINMUX68 */
+   0, /* GPLINMUX69 */
+   0, /* GPLINMUX70 */
+   1, /* GPLMUX0 */
+   1, /

[U-Boot] [PATCH v3 1/1] socfpga: Creating driver for Reset Manager

2013-07-01 Thread Chin Liang See
Consolidating reset code into reset_manager.c.
Also separating reset configuration for virtual target
and real hardware Cyclone V development kit

Signed-off-by: Chin Liang See 
Cc: Wolfgang Denk 
CC: Pavel Machek 
Cc: Dinh Nguyen 
---
Changes for v2:
   - Fixed the long subject of the patch
   - Consolidated the reset_manager structure between virtual target and dev kit
Changes for v3:
   - Added change log for each revision change
   - Removed the < > between the date of copyright header

 arch/arm/cpu/armv7/socfpga/Makefile   |2 +-
 arch/arm/cpu/armv7/socfpga/misc.c |   27 ---
 arch/arm/cpu/armv7/socfpga/reset_manager.c|   52 +
 arch/arm/include/asm/arch-socfpga/reset_manager.h |   10 ++--
 4 files changed, 60 insertions(+), 31 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/socfpga/reset_manager.c

diff --git a/arch/arm/cpu/armv7/socfpga/Makefile 
b/arch/arm/cpu/armv7/socfpga/Makefile
index 376a4bd..518e67a 100644
--- a/arch/arm/cpu/armv7/socfpga/Makefile
+++ b/arch/arm/cpu/armv7/socfpga/Makefile
@@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk
 LIB=  $(obj)lib$(SOC).o
 
 SOBJS  := lowlevel_init.o
-COBJS-y:= misc.o timer.o
+COBJS-y:= misc.o timer.o reset_manager.o
 COBJS-$(CONFIG_SPL_BUILD) += spl.o
 
 COBJS  := $(COBJS-y)
diff --git a/arch/arm/cpu/armv7/socfpga/misc.c 
b/arch/arm/cpu/armv7/socfpga/misc.c
index fa16424..59f5b94 100644
--- a/arch/arm/cpu/armv7/socfpga/misc.c
+++ b/arch/arm/cpu/armv7/socfpga/misc.c
@@ -17,36 +17,9 @@
 
 #include 
 #include 
-#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static const struct socfpga_reset_manager *reset_manager_base =
-   (void *)SOCFPGA_RSTMGR_ADDRESS;
-
-/*
- * Write the reset manager register to cause reset
- */
-void reset_cpu(ulong addr)
-{
-   /* request a warm reset */
-   writel(RSTMGR_CTRL_SWWARMRSTREQ_LSB, &reset_manager_base->ctrl);
-   /*
-* infinite loop here as watchdog will trigger and reset
-* the processor
-*/
-   while (1)
-   ;
-}
-
-/*
- * Release peripherals from reset based on handoff
- */
-void reset_deassert_peripherals_handoff(void)
-{
-   writel(0, &reset_manager_base->per_mod_reset);
-}
-
 int dram_init(void)
 {
gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
diff --git a/arch/arm/cpu/armv7/socfpga/reset_manager.c 
b/arch/arm/cpu/armv7/socfpga/reset_manager.c
new file mode 100644
index 000..b64db68
--- /dev/null
+++ b/arch/arm/cpu/armv7/socfpga/reset_manager.c
@@ -0,0 +1,52 @@
+/*
+ * Copyright Altera Corporation (C) 2013. All rights reserved
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms and conditions of the
+ * GNU General Public License, version 2, as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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, see
+ * .
+ */
+
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static const struct socfpga_reset_manager *reset_manager_base =
+   (void *)SOCFPGA_RSTMGR_ADDRESS;
+
+/*
+ * Write the reset manager register to cause reset
+ */
+void reset_cpu(ulong addr)
+{
+   /* request a warm reset */
+   writel((1 << RSTMGR_CTRL_SWWARMRSTREQ_LSB),
+   &reset_manager_base->ctrl);
+   /*
+* infinite loop here as watchdog will trigger and reset
+* the processor
+*/
+   while (1)
+   ;
+}
+
+/*
+ * Release peripherals from reset based on handoff
+ */
+void reset_deassert_peripherals_handoff(void)
+{
+   writel(0, &reset_manager_base->per_mod_reset);
+}
+
+
diff --git a/arch/arm/include/asm/arch-socfpga/reset_manager.h 
b/arch/arm/include/asm/arch-socfpga/reset_manager.h
index d9d2c1c..4930914 100644
--- a/arch/arm/include/asm/arch-socfpga/reset_manager.h
+++ b/arch/arm/include/asm/arch-socfpga/reset_manager.h
@@ -22,16 +22,20 @@ void reset_cpu(ulong addr);
 void reset_deassert_peripherals_handoff(void);
 
 struct socfpga_reset_manager {
-   u32 padding1;
+   u32 status;
u32 ctrl;
-   u32 padding2;
-   u32 padding3;
+   u32 counts;
+   u32 padding1;
u32 mpu_mod_reset;
u32 per_mod_reset;
u32 per2_mod_reset;
u32 brg_mod_reset;
 };
 
+#if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET)
+#define RSTMGR_CTRL_SWWARMRSTREQ_LSB 2
+#else
 #define RSTMGR_CTRL_SWWARMRSTREQ_LSB 1
+#endif
 
 #endif /* _RESET_MANAGER_H_ */
-- 
1.7.9.5


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/li

Re: [U-Boot] [PATCH] bmp: Respect "splashpos" if it is defined

2013-07-01 Thread Otavio Salvador
On Mon, Jul 1, 2013 at 7:01 PM, Anatolij Gustschin  wrote:
> Hello Otavio,
>
> Sorry for delay.
>
> On Thu,  6 Jun 2013 14:57:23 -0300
> Otavio Salvador  wrote:
> ...
>> +#ifdef CONFIG_SPLASH_SCREEN_ALIGN
>> + s = getenv("splashpos");
>> + if (s != NULL) {
>> + if (s[0] == 'm')
>> + x = BMP_ALIGN_CENTER;
>> + else
>> + x = simple_strtol(s, NULL, 0);
>> +
>> + s = strchr(s + 1, ',');
>> + if (s != NULL) {
>> + if (s[1] == 'm')
>> + y = BMP_ALIGN_CENTER;
>> + else
>> + y = simple_strtol(s + 1, NULL, 0);
>> + }
>> + }
>> +#endif /* CONFIG_SPLASH_SCREEN_ALIGN */
>
> This code is already there in two other drivers, we should better
> add a common function for "splashpos" checking and use it here.
> I'll submit a patch shortly.

Agreed; I just acked the patch ... it looks great, thanks!

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] video: consolidate splash screen alignment code

2013-07-01 Thread Otavio Salvador
On Mon, Jul 1, 2013 at 7:04 PM, Anatolij Gustschin  wrote:
> Code for checking "splashpos" environment variable is
> duplicated in drivers, move it to the common function.
> Call this function also in the bmp display command to
> consider "splashpos" settings.
>
> Signed-off-by: Anatolij Gustschin 

Awesome!

Acked-by: Otavio Salvador 

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/3] arm: add support for LaCie CloudBox

2013-07-01 Thread Prafulla Wadaskar
> -Original Message-
> From: Frédéric Leroy [mailto:fr...@starox.org]
> Sent: 01 July 2013 18:28
> To: u-boot@lists.denx.de
> Cc: Wolfgang Denk; Prafulla Wadaskar; Albert ARIBAUD;
> Simon Guinot
> Subject: [PATCH v3 0/3] arm: add support for LaCie
> CloudBox
> 
> This series adds support for the LaCie Cloudbox v2
> device.
> 
> Changes in v3:
> 
> - prepare other LaCie boards for led patch
> - fix Machine ID
> - use one commit for adding device
> 
> Changes in v2:
> 
> - sort unsorted #ifdef list in lacie_kw.h
> - add entry to MAINTAINERS
> - remove unused GPIO definitions
> - remove empty misc_init_r()
> - add Machine ID
> - Use #define values for ethernet phy init
> - checkpatch compliant
> 
> Frédéric Leroy (3):
>   lacie_kw: sort #ifdef lists by CONFIG_ identifiers
>   LaCie/common: Uses #defines for ethernet phy leds
> setup
>   arm: add support for LaCie CloudBox
> 
>  MAINTAINERS   |   4 +
>  board/LaCie/cloudbox/Makefile |  46 +++
>  board/LaCie/cloudbox/cloudbox.c   |  94
> +
>  board/LaCie/cloudbox/cloudbox.h   |  36 
>  board/LaCie/cloudbox/kwbimage.cfg | 167
> ++
>  board/LaCie/common/common.c   |  13 ++-
>  boards.cfg|   1 +
>  include/configs/lacie_kw.h|  45 ++
>  8 files changed, 388 insertions(+), 18 deletions(-)
>  create mode 100644 board/LaCie/cloudbox/Makefile
>  create mode 100644 board/LaCie/cloudbox/cloudbox.c
>  create mode 100644 board/LaCie/cloudbox/cloudbox.h
>  create mode 100644 board/LaCie/cloudbox/kwbimage.cfg
> 

Dear Frédéric Leroy

I express my great apology for not providing review comments in time. I am very 
busy with some priority task.

I would be free by 16th July to do the right justification with the review of 
all the patches on my plate.

This is applicable to all other patches too, those seeks my attention on the 
mailing list.

For any urgent matters, may be Albert can pull the Marvell specific stuffs 
directly (if he thinks this is okay).

Once again sorry for inconvenience :(

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


[U-Boot] Pull request: u-boot-video/master

2013-07-01 Thread Anatolij Gustschin
Hello Tom,

The following changes since commit e6bf18dba2a21bebf2c421b1c2e188225f6485a1:

  Prepare v2013.07-rc2 (2013-06-28 18:03:51 -0400)

are available in the git repository at:

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

for you to fetch changes up to 327598945b1365ca6ba3fe96c9bd45320999:

  omap: cm_t35: Fix cm_t35 for weak splash_screen_prepare (2013-07-01 21:47:40 
+0200)


Piotr Wilczek (2):
  drivers:video:s6e8ax0: change data_to_send array to static
  lcd: align bmp header when uncopmressing image

Robert Winkler (3):
  video: lcd: Add CONFIG_SPLASH_SCREEN_PREPARE support to CONFIG_VIDEO
  video: lcd: Make splash_screen_prepare weak, remove config macro
  omap: cm_t35: Fix cm_t35 for weak splash_screen_prepare

Stephen Warren (1):
  lcd: remove unaligned access in lcd_dt_simplefb_configure_node()

 README |8 
 board/compulab/cm_t35/cm_t35.c |2 +-
 common/Makefile|1 +
 common/cmd_bmp.c   |   42 ++--
 common/lcd.c   |   22 ++---
 common/splash.c|   31 +
 doc/README.splashprepare   |8 
 drivers/video/cfb_console.c|5 +++--
 drivers/video/s6e8ax0.c|   26 -
 include/configs/cm_t35.h   |1 -
 include/lcd.h  |4 ++--
 include/splash.h   |   29 +++
 12 files changed, 122 insertions(+), 57 deletions(-)
 create mode 100644 common/splash.c
 create mode 100644 doc/README.splashprepare
 create mode 100644 include/splash.h

Please pull. Thanks!

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


[U-Boot] [PATCH] video: consolidate splash screen alignment code

2013-07-01 Thread Anatolij Gustschin
Code for checking "splashpos" environment variable is
duplicated in drivers, move it to the common function.
Call this function also in the bmp display command to
consider "splashpos" settings.

Signed-off-by: Anatolij Gustschin 
---
 common/cmd_bmp.c|3 +++
 common/lcd.c|   19 ++-
 common/splash.c |   25 +
 drivers/video/cfb_console.c |   24 ++--
 include/splash.h|7 +++
 5 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index 946031d..a7c5fbd 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 static int bmp_info (ulong addr);
@@ -125,6 +126,8 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int 
argc, char * const ar
ulong addr;
int x = 0, y = 0;
 
+   splash_get_pos(&x, &y);
+
switch (argc) {
case 1: /* use load_addr as default address */
addr = load_addr;
diff --git a/common/lcd.c b/common/lcd.c
index 95006aa..50ea4d6 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -1089,23 +1089,8 @@ static void *lcd_logo(void)
return (void *)lcd_base;
 
addr = simple_strtoul (s, NULL, 16);
-#ifdef CONFIG_SPLASH_SCREEN_ALIGN
-   s = getenv("splashpos");
-   if (s != NULL) {
-   if (s[0] == 'm')
-   x = BMP_ALIGN_CENTER;
-   else
-   x = simple_strtol(s, NULL, 0);
-
-   s = strchr(s + 1, ',');
-   if (s != NULL) {
-   if (s[1] == 'm')
-   y = BMP_ALIGN_CENTER;
-   else
-   y = simple_strtol (s + 1, NULL, 0);
-   }
-   }
-#endif /* CONFIG_SPLASH_SCREEN_ALIGN */
+
+   splash_get_pos(&x, &y);
 
if (bmp_display(addr, x, y) == 0)
return (void *)lcd_base;
diff --git a/common/splash.c b/common/splash.c
index c744497..18885f1 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -20,6 +20,7 @@
  *
  */
 
+#include 
 #include 
 
 int __splash_screen_prepare(void)
@@ -29,3 +30,27 @@ int __splash_screen_prepare(void)
 
 int splash_screen_prepare(void)
__attribute__ ((weak, alias("__splash_screen_prepare")));
+
+
+#ifdef CONFIG_SPLASH_SCREEN_ALIGN
+void splash_get_pos(int *x, int *y)
+{
+   char *s = getenv("splashpos");
+
+   if (!s)
+   return;
+
+   if (s[0] == 'm')
+   *x = BMP_ALIGN_CENTER;
+   else
+   *x = simple_strtol(s, NULL, 0);
+
+   s = strchr(s + 1, ',');
+   if (s != NULL) {
+   if (s[1] == 'm')
+   *y = BMP_ALIGN_CENTER;
+   else
+   *y = simple_strtol(s + 1, NULL, 0);
+   }
+}
+#endif /* CONFIG_SPLASH_SCREEN_ALIGN */
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 785bbcf..e384b71 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -222,11 +222,7 @@
 #if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
 #include 
 #include 
-
-#ifdef CONFIG_SPLASH_SCREEN_ALIGN
-#define BMP_ALIGN_CENTER   0x7FFF
-#endif
-
+#include 
 #endif
 
 /*
@@ -1976,23 +1972,7 @@ static void *video_logo(void)
__maybe_unused ulong addr;
__maybe_unused char *s;
 
-#ifdef CONFIG_SPLASH_SCREEN_ALIGN
-   s = getenv("splashpos");
-   if (s != NULL) {
-   if (s[0] == 'm')
-   video_logo_xpos = BMP_ALIGN_CENTER;
-   else
-   video_logo_xpos = simple_strtol(s, NULL, 0);
-
-   s = strchr(s + 1, ',');
-   if (s != NULL) {
-   if (s[1] == 'm')
-   video_logo_ypos = BMP_ALIGN_CENTER;
-   else
-   video_logo_ypos = simple_strtol(s + 1, NULL, 0);
-   }
-   }
-#endif /* CONFIG_SPLASH_SCREEN_ALIGN */
+   splash_get_pos(&video_logo_xpos, &video_logo_ypos);
 
 #ifdef CONFIG_SPLASH_SCREEN
s = getenv("splashimage");
diff --git a/include/splash.h b/include/splash.h
index a8dd151..89ee7b2 100644
--- a/include/splash.h
+++ b/include/splash.h
@@ -25,5 +25,12 @@
 
 int splash_screen_prepare(void);
 
+#ifdef CONFIG_SPLASH_SCREEN_ALIGN
+void splash_get_pos(int *x, int *y);
+#else
+static inline void splash_get_pos(int *x, int *y) { }
+#endif
+
+#define BMP_ALIGN_CENTER   0x7FFF
 
 #endif
-- 
1.7.9.5

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


Re: [U-Boot] [PATCH] bmp: Respect "splashpos" if it is defined

2013-07-01 Thread Anatolij Gustschin
Hello Otavio,

Sorry for delay.

On Thu,  6 Jun 2013 14:57:23 -0300
Otavio Salvador  wrote:
...
> +#ifdef CONFIG_SPLASH_SCREEN_ALIGN
> + s = getenv("splashpos");
> + if (s != NULL) {
> + if (s[0] == 'm')
> + x = BMP_ALIGN_CENTER;
> + else
> + x = simple_strtol(s, NULL, 0);
> +
> + s = strchr(s + 1, ',');
> + if (s != NULL) {
> + if (s[1] == 'm')
> + y = BMP_ALIGN_CENTER;
> + else
> + y = simple_strtol(s + 1, NULL, 0);
> + }
> + }
> +#endif /* CONFIG_SPLASH_SCREEN_ALIGN */

This code is already there in two other drivers, we should better
add a common function for "splashpos" checking and use it here.
I'll submit a patch shortly.

Thanks,

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


[U-Boot] [PATCH v4 1/1] socfpga: Adding configuration for development kit

2013-07-01 Thread Chin Liang See
socfpga: Separating the configuration file for Virtual
 Target and real hardware Cyclone V development kit

Signed-off-by: Chin Liang See 
---
Changes for v2:
   - Fixed the word wrap issue within patch
Changes for v3:
   - Fixed the long subject of the patch
Changes for v4:
   - Added change log for each revision change

 include/configs/socfpga_cyclone5.h |   28 +---
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/include/configs/socfpga_cyclone5.h
b/include/configs/socfpga_cyclone5.h
index 5633d2a..be3799b 100644
--- a/include/configs/socfpga_cyclone5.h
+++ b/include/configs/socfpga_cyclone5.h
@@ -22,6 +22,8 @@
 /*
  * High level configuration
  */
+/* Virtual target or real hardware */
+#define CONFIG_SOCFPGA_VIRTUAL_TARGET
 
 #define CONFIG_ARMV7
 #define CONFIG_L2_OFF
@@ -32,11 +34,12 @@
 #define CONFIG_SINGLE_BOOTLOADER
 #define CONFIG_SOCFPGA
 
+/* base address for .text section */
+#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
 #define CONFIG_SYS_TEXT_BASE   0x0840
-#define V_NS16550_CLK  100
-#define CONFIG_BAUDRATE57600
-#define CONFIG_SYS_HZ  1000
-#define CONFIG_TIMER_CLOCK_KHZ 2400
+#else
+#define CONFIG_SYS_TEXT_BASE   0x0140
+#endif
 #define CONFIG_SYS_LOAD_ADDR   0x7fc0
 
 /* Console I/O Buffer Size */
@@ -165,7 +168,7 @@
 /* SDRAM Bank #1 */
 #define CONFIG_SYS_SDRAM_BASE  0x
 /* SDRAM memory size */
-#define PHYS_SDRAM_1_SIZE  0x8000
+#define PHYS_SDRAM_1_SIZE  0x4000
 
 #define PHYS_SDRAM_1   CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_START   0x
@@ -181,8 +184,13 @@
 #define CONFIG_SYS_NS16550_CLK  V_NS16550_CLK
 #define CONFIG_CONS_INDEX   1
 #define CONFIG_SYS_NS16550_COM1UART0_BASE
-
 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,
115200}
+#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
+#define V_NS16550_CLK  100
+#else
+#define V_NS16550_CLK  1
+#endif
+#define CONFIG_BAUDRATE115200
 
 /*
  * FLASH
@@ -195,9 +203,15 @@
 /* This timer use eosc1 where the clock frequency is fixed
  * throughout any condition */
 #define CONFIG_SYS_TIMERBASE   SOCFPGA_OSC1TIMER0_ADDRESS
-
 /* reload value when timer count to zero */
 #define TIMER_LOAD_VAL 0x
+/* Timer info */
+#define CONFIG_SYS_HZ  1000
+#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
+#define CONFIG_TIMER_CLOCK_KHZ 2400
+#else
+#define CONFIG_TIMER_CLOCK_KHZ 25000
+#endif
 
 #define CONFIG_ENV_IS_NOWHERE
 
-- 
1.7.9.5



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


Re: [U-Boot] [ANN] v2013.07-rc2

2013-07-01 Thread Robert Nelson
On Fri, Jun 28, 2013 at 5:12 PM, Tom Rini  wrote:
> Hey all,
>
> I've tagged and pushed v2013.07-rc2.  A bit more over the place than I
> should have gone, but picked up a lot of things that have been
> outstanding for a while.  The big thing is a refactor of the boot loop.
> Everything should be working right now, but please test.  Related to
> this is the ability to have crytpographically signed images.  It's like
> secure boot in UEFI land, but hopefully without the kerfuffle.
>
> If you've got changes outstanding still, please start gently poking
> custodians with patchwork links.  I've got a good bit of stuff I need to
> deal with myself still, but please prod me all the same.

So, the bootm refactor ( 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 )
also broke bootz/zImage...

Got it to atleast get past the "invalid OS" message via:

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 02a5013..a0b55ef 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -1744,6 +1744,12 @@ static int bootz_start(cmd_tbl_t *cmdtp, int
flag, int argc,
int ret;
void *zi_start, *zi_end;

+   memset(images, 0, sizeof(bootm_headers_t));
+
+   boot_start_lmb(images);
+
+   images->os.os = IH_OS_LINUX;
+
ret = do_bootm_states(cmdtp, flag, argc, argv, BOOTM_STATE_START,
  images, 1);

However it's still locking up at "Starting Kernel ..."

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] tools/proftool: add missing definition

2013-07-01 Thread Jeroen Hofstee

Hello Andreas,

On 07/01/2013 08:45 PM, Jeroen Hofstee wrote:

Hello Andreas,

On 06/30/2013 01:15 PM, Andreas Bießmann wrote:
BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a 
simple

define for them.

Signed-off-by: Andreas Bießmann 
---
  +#ifndef REG_NOERROR
+/* BSD regex.h do not expose REG_NOERROR */
+# define REG_NOERROR 0
+#endif
+

I think a neater solutions is to actually remove the REG_NOERROR.
From man regexec, GNU 2011-09-27: "regexec() returns zero for a
successful match or REG_NOMATCH for failure.". Opengroup specs
will mention the same. REG_NOERROR is not mentioned at all.

e.g.:

if (err) {
regex_report_error(&item->regex, err, "match",
   item->name);
break;
}

should do the job in a portable way (and reads a bit better,
as well). But this is only a cosmetic comment, the patch by
itself should do the job.


Just realized this is more then cosmetic. Also GNU will not have
REG_NOERROR defined since it is an enum, so it will always
take the #ifndef REG_NOERROR road, which boils down to !! 0.

So this needs a new version instead of hiding how this works.

Regards,
Jeroe

p.s. Simon, Andreas sorry for spamming, selected the wrong email...
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/3 v2] video: lcd: splash screen prepare changes

2013-07-01 Thread Anatolij Gustschin
Hello Robert,

On Wed, 26 Jun 2013 16:00:20 -0700
Robert Winkler  wrote:

> Hello all,
> 
> I haven't heard from anyone but Igor.  Does that mean it looks good?

Sorry for delay, I've applied this series now. Thanks!

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


Re: [U-Boot] compiled failed when turned off gcc optimazition

2013-07-01 Thread Wolfgang Denk
Dear Mike Dunn,

In message <51d1c455.9010...@newsguy.com> you wrote:
>
> But there's a good motivation for wanting to turn off optimization.

I disagree here.  If you are hunting down a problem, you want to be as
close at the original code as possible.  Disabling optimization is
such a dramatic change to the generated code that you actually debug a
different program.

> Single-stepping with a debugger at the C source level is almost useless.  I've
> since gotten better at single-stepping at the assembly level while using the
> mixed c and assembly view of gdb.

Hm... Did you read up the documentation, say [1], and try out these
recommendations?

[1] http://www.denx.de/wiki/view/DULG/DebuggingTricks

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You've no idea of what a poor opinion  I  have  of  myself,  and  how
little I deserve it.  - W. S. Gilbert
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-boot-2012.04 compilation for qemu-mips board

2013-07-01 Thread Wolfgang Denk
Dear krishna dwivedi,

In message  
you wrote:
>
> Thanks for yours valuable time and support.U-boot got compiled for
> qemu-mips board.

You really should read up on Netiquette, like [1] in general, and
especially [2]

[1] http://www.catb.org/~esr/faqs/smart-questions.html
[2] http://www.catb.org/~esr/faqs/smart-questions.html#followup

So far, you appear to ignore all well-meant advice you were given
here as you continue to top post / full quote.

At this point, it would be appropriate if you provided an explanation
what the error was, and how you fixed it.

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
Where would we be without rhetorical questions?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/3] btrfs: removed btrfs_mangle_name

2013-07-01 Thread Stefan Agner
The function btrfs_mangle_name limited path lenght to 20 characters. 
Since
the command parsing already checks spaces, the function is not needed at 
all.

---
 fs/btrfs/btrfs.c | 44 +---
 1 file changed, 1 insertion(+), 43 deletions(-)

diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c
index e4dfd67..84184f1 100644
--- a/fs/btrfs/btrfs.c
+++ b/fs/btrfs/btrfs.c
@@ -906,46 +906,6 @@ void btrfs_close_file(struct file *file)
free_file(file);
 }

-void btrfs_mangle_name(char *dst, const char *src)
-{
-   char *p = dst, ch, len;
-   int i = BTRFS_FILENAME_MAX-1;
-
-   len = strlen(src);
-   ch = *src;
-   while (!isspace(ch)) {
-   if (*src == '/') {
-   if (src[1] == '/') {
-   src++;
-   i--;
-   continue;
-   }
-   }
-   if (!len)
-   break;
-   i--;
-   len--;
-   *dst++ = *src++;
-   ch = *src;
-   }
-   while (1) {
-   if (dst == p)
-   break;
-   if (dst[-1] != '/')
-   break;
-   if ((dst[-1] == '/') && ((dst - 1) == p))
-   break;
-
-   dst--;
-   i++;
-   }
-
-   i++;
-   for (; i > 0; i--)
-   *dst++ = '\0';
-
-}
-
 int searchdir(const char *name)
 {
struct inode *inode = NULL;
@@ -1088,10 +1048,8 @@ int btrfs_open_file(const char *name, struct 
com32_filedata *filedata)

 {
int rv;
struct file *file;
-   char mangled_name[BTRFS_FILENAME_MAX];

-   btrfs_mangle_name(mangled_name, name);
-   rv = searchdir(mangled_name);
+   rv = searchdir(name);
if (rv < 0)
return rv;

--
1.8.3.1


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


[U-Boot] [PATCH 0/3] btrfs fixes

2013-07-01 Thread Stefan Agner

Hi,

My goal was booting from an ArchLinux btrfs filesystem on a BeagleBone 
Black
(am335x_evm). Therefor I patched U-Boot 2013.07-rc1 with the patches 
sent in
May by Adnan Ali (btrfs v12). After some tweaks and help from the IRC 
channel

I could successfully load the Kernel and the Device Tree Binary.

The PLATFORM_NO_UNALIGNED patch enables unaligned access. I had data 
aborts
without this option while reading the superblock. However, I could not 
figure

out which access to the struct leads to the data abort.

The path parsing allows to use paths with leading slash.

My git repository is also available at Github:
https://github.com/falstaff84/u-boot

Ali, could you review those patch and include it in your next 
submission? When
is your next submission planned? I'm happy to help testing/fixing 
remaining

problems...

Best regards,
Stefan Agner

Stefan Agner (3):
  btrfs: use PLATFORM_NO_UNALIGNED to allow unaligned access
  btrfs: Fix crash while path parsing
  btrfs: removed btrfs_mangle_name

 fs/btrfs/Makefile |  1 +
 fs/btrfs/btrfs.c  | 50 
--

 2 files changed, 5 insertions(+), 46 deletions(-)

--
1.8.3.1

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


[U-Boot] [PATCH 1/3] btrfs: use PLATFORM_NO_UNALIGNED to allow unaligned access

2013-07-01 Thread Stefan Agner
Reading the super block leads to data abort crashes. Enabling the no 
unaligned
option works around this. Since the format of the super block is fixed 
by
the on-disk format unaligned access might by necessary in order to have 
btrfs

support at all.

Signed-off-by: Stefan Agner 
---
 fs/btrfs/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
index a9e2021..104a06e 100644
--- a/fs/btrfs/Makefile
+++ b/fs/btrfs/Makefile
@@ -35,6 +35,7 @@ COBJS-$(CONFIG_FS_BTR) := btrfs.o
 SRCS   := $(AOBJS:.o=.S) $(COBJS-y:.o=.c)
 OBJS   := $(addprefix $(obj),$(AOBJS) $(COBJS-y))

+$(obj)btrfs.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)

 all:   $(LIB) $(AOBJS)

--
1.8.3.1



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


[U-Boot] [PATCH 2/3] btrfs: Fix crash while path parsing

2013-07-01 Thread Stefan Agner
When parsing a path with a leading slash, the root inode was freed which 
lead
to a crash. Path parsing is now improved and allows leading slashs like 
other

filesystem commands (e.g. ext4load).

Signed-off-by: Stefan Agner 
---
 fs/btrfs/btrfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c
index a7fcc16..e4dfd67 100644
--- a/fs/btrfs/btrfs.c
+++ b/fs/btrfs/btrfs.c
@@ -963,6 +963,9 @@ int searchdir(const char *name)
if (!pathbuf)
goto err;

+   while (*p == '/')
+   p++;
+
do {
 got_link:
if (*p == '/') {
@@ -1324,9 +1327,6 @@ int btrfs_ls(const char *dirn)
char *dirname = (char *)dirn;
struct _DIR_ *dir;

-   if (*dirname == '/' && *(dirname+1) == 0)
-   *dirname = '.';
-
dir = opendir(dirname);
if (dir == NULL)
return -1;
--
1.8.3.1



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


Re: [U-Boot] Pull request: nand flash

2013-07-01 Thread Tom Rini
On Fri, Jun 28, 2013 at 11:46:37AM -0500, Scott Wood wrote:

> The following changes since commit 2f998071254d566c71c34ef013aef1d9d0ec0fa3:
> 
>   image: Use ENOENT instead of ENOMEDIUM for better compatibility (2013-06-17 
> 09:56:42 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-nand-flash.git master
> 
> for you to fetch changes up to 8b6b51a617b8adc773cc82b4886738a6128caf7f:
> 
>   mtd/nand: docg4: fix compiler warnings (2013-06-26 16:19:58 -0500)
> 
> 
> Daniel Schwierzeck (1):
>   mtd: nand: fix initialization of BBT options
> 
> Heiko Schocher (1):
>   dfu, nand: before write a buffer to nand, erase the nand sectors
> 
> Mike Dunn (2):
>   mtd: nand/docg4: fix driver after Linux resync
>   mtd/nand: docg4: fix compiler warnings
> 
> Scott Wood (1):
>   nand: Don't call adjust_size_for_badblocks for erase
> 
>  common/cmd_nand.c   |  9 +
>  drivers/dfu/dfu_nand.c  | 18 --
>  drivers/mtd/nand/docg4.c| 26 ++
>  drivers/mtd/nand/docg4_spl.c| 15 +++
>  drivers/mtd/nand/jz4740_nand.c  |  2 +-
>  drivers/mtd/nand/nand_util.c|  4 
>  drivers/mtd/nand/s3c2410_nand.c |  4 +---
>  include/nand.h  |  2 ++
>  8 files changed, 46 insertions(+), 34 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH 3/3] Makefile: fix readelf usage

2013-07-01 Thread Lubomir Popov

> Some OS (like OS X) do not provide a generic readelf. We should enforce to use
> the toochain provided readelf instead, to do so use $(CROSS_COMPILE)readelf.
>
> Signed-off-by: Andreas Bießmann 
> ---

Tested-by: Lubomir Popov 

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


Re: [U-Boot] [PATCH 2/3] tools/proftool: add missing definition

2013-07-01 Thread Lubomir Popov

> BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a simple
> define for them.
>
> Signed-off-by: Andreas Bießmann 
> ---

Tested-by: Lubomir Popov 

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


Re: [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on OS X

2013-07-01 Thread Lubomir Popov
Hi Andreas,

> Interfaces exposed by error.h seems not to be used in rsa-sig.c, remove it.
> This also fixes an compile error on OS X:
>
> ---8<---
> u-boot/lib/rsa/rsa-sign.c:23:19: error: error.h: No such file or directory
> --->8---
>
> Signed-off-by: Andreas Bießmann 
> ---

Entire series

Tested-by: Lubomir Popov 

on MacOS X 10.8.3 with the following tools used for building U-Boot
for one ARM (OMAP) board:

arm-none-eabi-gcc (GCC) 4.7.2
GNU ld (GNU Binutils) 2.23.1

Best regards,
Lubo

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


Re: [U-Boot] [PATCH V4] lcd: align bmp header when uncopmressing image

2013-07-01 Thread Anatolij Gustschin
On Wed, 05 Jun 2013 08:14:30 +0200
Piotr Wilczek  wrote:

> When compressed image is loaded, it must be decompressed
> to an aligned address + 2 to avoid unaligned access exception
> on some ARM platforms.
> 
> Signed-off-by: Piotr Wilczek 
> Signed-off-by: Kyungmin Park 
> CC: Anatolij Gustschin 
> CC: Wolfgang Denk 
> ---
> Changes for V4:
> - dropped the if condition
> 
> Changes for V3:
> - add comment on why extra space is allocated for uncompressed bmp header
> - change the + 2 aligment method as Wolfgang Denk suggested
> 
> Changes for V2:
> - add additional space for uncompressed bmp header due to alignment 
> requirements
> - fix to 32-bit-aligned-address + 2 alignent
> 
>  common/cmd_bmp.c |   42 --
>  include/lcd.h|3 ++-
>  2 files changed, 30 insertions(+), 15 deletions(-)

Applied to u-boot-video/master (slightly corrected the comment
for gunzip_bmp()). Thanks!

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


Re: [U-Boot] [PATCH 2/3] tools/proftool: add missing definition

2013-07-01 Thread Jeroen Hofstee

Hello Andreas,

On 06/30/2013 01:15 PM, Andreas Bießmann wrote:

BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a simple
define for them.

Signed-off-by: Andreas Bießmann 
---
  
+#ifndef REG_NOERROR

+/* BSD regex.h do not expose REG_NOERROR */
+# define REG_NOERROR 0
+#endif
+

I think a neater solutions is to actually remove the REG_NOERROR.
From man regexec, GNU 2011-09-27: "regexec() returns zero for a
successful match or REG_NOMATCH for failure.". Opengroup specs
will mention the same. REG_NOERROR is not mentioned at all.

e.g.:

if (err) {
regex_report_error(&item->regex, err, "match",
   item->name);
break;
}

should do the job in a portable way (and reads a bit better,
as well). But this is only a cosmetic comment, the patch by
itself should do the job.

Regards,
Jeroen

p.s. Strictly speaking it is dead code actually...
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] socfpga: Move board/socfpga_cyclone5 to board/socfpga

2013-07-01 Thread dinguyen
From: Dinh Nguyen 

Because the SOCFPGA platform will include support for Cyclone V and
Arria V FPGA parts, renaming socfpga_cyclone5 folder to socfpga to
be more generic.

Signed-off-by: Dinh Nguyen 
Cc: Chin Liang See 
Cc: Wolfgang Denk 
CC: Pavel Machek 
---
 .../altera/{socfpga_cyclone5 => socfpga}/Makefile  |0
 .../socfpga_cyclone5.c |0
 boards.cfg |2 +-
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename board/altera/{socfpga_cyclone5 => socfpga}/Makefile (100%)
 rename board/altera/{socfpga_cyclone5 => socfpga}/socfpga_cyclone5.c (100%)

diff --git a/board/altera/socfpga_cyclone5/Makefile 
b/board/altera/socfpga/Makefile
similarity index 100%
rename from board/altera/socfpga_cyclone5/Makefile
rename to board/altera/socfpga/Makefile
diff --git a/board/altera/socfpga_cyclone5/socfpga_cyclone5.c 
b/board/altera/socfpga/socfpga_cyclone5.c
similarity index 100%
rename from board/altera/socfpga_cyclone5/socfpga_cyclone5.c
rename to board/altera/socfpga/socfpga_cyclone5.c
diff --git a/boards.cfg b/boards.cfg
index c0c4282..eea92d5 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -335,7 +335,7 @@ kzm9garm armv7   kzm9g  
 kmc
 armadillo-800eva arm armv7   armadillo-800eva
atmark-techno  rmobile
 zynq arm armv7   zynq
xilinx zynq
 zynq_dcc arm armv7   zynq
xilinx zynqzynq:ZYNQ_DCC
-socfpga_cyclone5arm armv7  socfpga_cyclone5
altera  socfpga
+socfpga_cyclone5arm armv7  socfpgaaltera   
socfpga
 actux1_4_16  arm ixp actux1  - 
 -   actux1:FLASH2X2
 actux1_4_32  arm ixp actux1  - 
 -   actux1:FLASH2X2,RAM_32MB
 actux1_8_16  arm ixp actux1  - 
 -   actux1:FLASH1X8
-- 
1.7.9.5


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


Re: [U-Boot] [PATCH] lcd: remove unaligned access in lcd_dt_simplefb_configure_node()

2013-07-01 Thread Anatolij Gustschin
On Thu, 13 Jun 2013 17:13:11 -0600
Stephen Warren  wrote:

> From: Stephen Warren 
> 
> Some ARM compilers may emit code that makes unaligned accesses when
> faced with constructs such as:
> 
> const char format[] = "r5g6b5";
> 
> Make this data static since it doesn't chagne; the compiler will simply
> place it into the .rodata section directly, and avoid any unaligned run-
> time initialization.
> 
> Signed-off-by: Stephen Warren 
> ---
>  common/lcd.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-video/master. Thanks!

Anatolij

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


Re: [U-Boot] [PATCH v3 0/3] arm: add support for LaCie CloudBox

2013-07-01 Thread Simon Guinot
On Mon, Jul 01, 2013 at 02:57:43PM +0200, Frédéric Leroy wrote:
> This series adds support for the LaCie Cloudbox v2 device.
> 
> Changes in v3:
> 
> - prepare other LaCie boards for led patch
> - fix Machine ID
> - use one commit for adding device
> 
> Changes in v2:
> 
> - sort unsorted #ifdef list in lacie_kw.h
> - add entry to MAINTAINERS
> - remove unused GPIO definitions
> - remove empty misc_init_r()
> - add Machine ID
> - Use #define values for ethernet phy init
> - checkpatch compliant
> 
> Frédéric Leroy (3):
>   lacie_kw: sort #ifdef lists by CONFIG_ identifiers
>   LaCie/common: Uses #defines for ethernet phy leds setup
>   arm: add support for LaCie CloudBox
> 
>  MAINTAINERS   |   4 +
>  board/LaCie/cloudbox/Makefile |  46 +++
>  board/LaCie/cloudbox/cloudbox.c   |  94 +
>  board/LaCie/cloudbox/cloudbox.h   |  36 
>  board/LaCie/cloudbox/kwbimage.cfg | 167 
> ++
>  board/LaCie/common/common.c   |  13 ++-
>  boards.cfg|   1 +
>  include/configs/lacie_kw.h|  45 ++
>  8 files changed, 388 insertions(+), 18 deletions(-)
>  create mode 100644 board/LaCie/cloudbox/Makefile
>  create mode 100644 board/LaCie/cloudbox/cloudbox.c
>  create mode 100644 board/LaCie/cloudbox/cloudbox.h
>  create mode 100644 board/LaCie/cloudbox/kwbimage.cfg

For the whole patch series:
Acked-by: Simon Guinot 

Regards,

Simon


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


Re: [U-Boot] [PATCH] lcd: remove unaligned access in lcd_dt_simplefb_configure_node()

2013-07-01 Thread Anatolij Gustschin
On Mon, 1 Jul 2013 12:35:46 -0400
Tom Rini  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 07/01/2013 12:30 PM, Stephen Warren wrote:
> > On 06/13/2013 05:13 PM, Stephen Warren wrote:
> >> From: Stephen Warren 
> >> 
> >> Some ARM compilers may emit code that makes unaligned accesses
> >> when faced with constructs such as:
> >> 
> >> const char format[] = "r5g6b5";
> >> 
> >> Make this data static since it doesn't chagne; the compiler will
> >> simply place it into the .rodata section directly, and avoid any
> >> unaligned run- time initialization.
> > 
> > I don't think this has been applied yet. Will it be applied for
> > this release? Should I resend the patch?
> 
> It's a bug fix and as such I want it.  Anatolij, there's a few "video"
> patches out there, are you going to grab things / has this spurred you
> to grab things or should I take a look around and pull up a patch set?
>  Thanks!

I'll look at video patches and grab them for release. Thanks for
reminding me!

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


Re: [U-Boot] compiled failed when turned off gcc optimazition

2013-07-01 Thread Mike Dunn
On 07/01/2013 04:37 AM, Wolfgang Denk wrote:
> Dear tiger...@viatech.com.cn,
> 
> please do not top post / full quote.
> 
> In message  
> you wrote:
>>
>> During debug u-boot with JTAG tools, maybe turning off optimizations was 
>> recommended.
> 
> Many people recommend many things. Even strange or non-working or
> incorrect or dangerous ones.


A while back I tried this for the Linux kernel, with similiar results.  I just
let it go without investigating further, guessing that maybe some tricks with
compiler directives were incompatible with turning off optimization.

But there's a good motivation for wanting to turn off optimization.
Single-stepping with a debugger at the C source level is almost useless.  I've
since gotten better at single-stepping at the assembly level while using the
mixed c and assembly view of gdb.

Mike

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


Re: [U-Boot] [PATCH] drivers:video:s6e8ax0: change data_to_send array to static

2013-07-01 Thread Anatolij Gustschin
On Fri, 24 May 2013 09:43:46 +0200
Piotr Wilczek  wrote:

> This patch change 'data_to_send' array to static to avoid
> unaligned access exeption on some platforms (ex Trats2).
> 
> Signed-off-by: Piotr Wilczek 
> Signed-off-by: Kyungmin Park 
> CC: Minkyu Kang 
> CC: Anatolij Gustschin 
> ---
>  drivers/video/s6e8ax0.c |   26 +-
>  1 file changed, 13 insertions(+), 13 deletions(-)

Applied to u-boot-video/master. Thanks!

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


Re: [U-Boot] [PATCH] powerpc/mpc85xx:Disable Debug TLB entry for non-minimal SPL

2013-07-01 Thread Scott Wood

On 07/01/2013 03:56:23 AM, Prabhakar Kushwaha wrote:

On 06/28/2013 09:49 PM, Scott Wood wrote:

On 06/28/2013 04:05:43 AM, Prabhakar Kushwaha wrote:

On 06/27/2013 12:36 AM, Scott Wood wrote:

On 06/25/2013 11:09:04 PM, Prabhakar Kushwaha wrote:

then it should be like this. slightly complex.
#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) &&  
!(defined(CONFIG_NAND_SPL) || \
(defined(CONFIG_SPL_BUILD) &&  
defined(CONFIG_SPL_INIT_MINIMAL)))


or
#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) &&  
(CONFIG_SYS_RAMBOOT) || \
(defined(CONFIG_SPL_BUILD) &&  
!defined(CONFIG_SPL_INIT_MINIMAL)))


The former:

http://lists.denx.de/pipermail/u-boot/2013-June/157201.html

The defines mentioned at this link and earlier written by me will  
not work as they are not taking care of SD boot and NOR boot  
scenario.


How so?


Below define will take care of all possible combination
 - NOR , SD, SPI boot
 - NAND_SPL
 - SPL with SPL_INIT_MINIMAL
 - SPL without SPL_INIT_MINIMAL

#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) &&  
!defined(CONFIG_NAND_SPL) && \
(!defined(CONFIG_SPL_BUILD) ||  
!defined(CONFIG_SPL_INIT_MINIMAL))


Took lot of time to figure out :)


That's equivalent to what I suggested in the above link.  You just  
replaced !(x && y) with (!x || !y).


Or relative to your original suggestion above, you replaced !(x ||  
(y && z)) with !x && (!y || !z).


They're all logically equivalent[1].  The question is just which one  
is most readable/intuitiv



We have below mentioned issues with defines :-

A)  Earlier suggested by me
#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) &&  
!(defined(CONFIG_NAND_SPL) || \

(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_INIT_MINIMAL)))

This will cause compile failure in SPL build.
in SPL build, CONFIG_NAND_SPL is not defined hence "1" making  
disable_tlb() present. As SPL + SPL_INIT_MINIMAL does not have TLB  
related functions means compilation error.


In that case CONFIG_SPL_BUILD and CONFIG_SPL_INIT_MINIMAL will be  
defined, which means (defined(CONFIG_NAND_SPL) ||  
(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_INIT_MINIMAL))) will  
be true, which means the negation will be false, which means the  
toplevel conjunction will be false, and disable_tlb() will not be  
called.


Again, unless I'm misreading something, this is 100% logically  
equivalent to your final suggestion.  I tried copy-and-pasting the  
above and had no problem building P2020RDB-PC_NAND.


B)  Define suggested at this link has  
"http://lists.denx.de/pipermail/u-boot/2013-June/157201.html "

#if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && \
!(defined(CONFIG_SPL_INIT_MINIMAL) && defined(CONFIG_SPL_BUILD))  
&& \

!defined(CONFIG_NAND_SPL)

here, during SD & NOR boot,  CONFIG_SPL_BUILD is not defined. hece  
complete define = 0.  this make disable_tlb not compile which is  
wrong.


If CONFIG_SPL_BUILD is not defined, then !(anything &&  
defined(CONFIG_SPL_BUILD)) will be true.  Since the other terms of the  
toplevel conjunction will also be true, disable_tlb will be compiled.


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


Re: [U-Boot] [PATCH v2] net: Use ARRAY_SIZE at appropriate places

2013-07-01 Thread Jagan Teki
On Mon, Jul 1, 2013 at 10:26 PM, Jagan Teki  wrote:
> Hi Axel,
>
> Thanks for your v2.
>
> On Sun, Jun 30, 2013 at 9:02 AM, Axel Lin  wrote:
>> Use ARRAY_SIZE instead of having similar implementation in each drivers.
>>
>> Signed-off-by: Axel Lin 
>> Cc: Albert Aribaud 
>> Cc: Ben Warren 
>> Cc: Jean-Christophe PLAGNIOL-VILLARD 
>> Cc: Joe Hershberger 
>> Cc: Marek Vasut 
>> Cc: Mike Frysinger 
>> Cc: Nobuhiro Iwamatsu 
>> Cc: TsiChungLiew 
>> Cc: Wolfgang Denk 
>> Cc: York Sun 
>>
>> Signed-off-by: Axel Lin 
>> ---
>> Hi Jagan Teki,
>> This is v2 per your request.
>>
>> v2:
>> Fix checkpatch issues, now checkpatch only shows below warnings:
>> a few WARNING: Avoid CamelCase
>> and a WARNING: line over 80 characters
>> #134: FILE: drivers/net/npe/IxEthDBFeatures.c:150:
>> +   if 
>> (ixEthDBTrafficClassDefinitions[trafficClassDefinitionIndex][IX_ETH_DB_NPE_A_FUNCTIONALITY_ID_INDEX]
>>  == npeAImageId.functionalityId) {
>
> I think you can fix this warning and may be you can send a separate
> patch for "CamelCase:"
> if you want.
>
> And also..
>
>>
>> Obviously, I prefer v1 for below reasons:
>> 1. The diff in v2 becomes bigger and makes it harder for review.
>> 2. The whole file in drivers/net/npe/IxEthDBFeatures.c uses 4 spaces as 
>> indent,
>>only the lines touched by this patch uses tab as indent (to make 
>> checkpatch happy).
>>This makes the code looks odd after apply v2, I don't think this is an 
>> improvement.
>>
>> Well, it's up to maintainer to pick up the version he prefer.
>>
>> Regards,
>> Axel
>>
>>  drivers/net/ax88180.c |  2 +-
>>  drivers/net/fsl_mcdmafec.c|  2 +-
>>  drivers/net/lan91c96.c|  2 +-
>>  drivers/net/mcffec.c  |  2 +-
>>  drivers/net/mcfmii.c  |  2 +-
>>  drivers/net/ne2000.c  |  2 +-
>>  drivers/net/npe/IxEthDBFeatures.c | 28 ++--
>>  drivers/net/npe/IxOsalIoMem.c |  3 +--
>>  drivers/net/npe/include/IxEthDBPortDefs.h |  2 +-
>>  drivers/net/npe/include/IxOsalTypes.h |  2 +-
>>  10 files changed, 23 insertions(+), 24 deletions(-)
>>
>> diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c
>> index f501768..7f0cfe5 100644
>> --- a/drivers/net/ax88180.c
>> +++ b/drivers/net/ax88180.c
>> @@ -157,7 +157,7 @@ static void ax88180_mac_reset (struct eth_device *dev)
>> OUTW (dev, MISC_RESET_MAC, MISC);
>> tmpval = INW (dev, MISC);
>>
>> -   for (i = 0; i < (sizeof (program_seq) / sizeof (program_seq[0])); 
>> i++)
>> +   for (i = 0; i < ARRAY_SIZE(program_seq); i++)
>> OUTW (dev, program_seq[i].value, program_seq[i].offset);
>>  }
>>
>> diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
>> index 63842cd..0e18764 100644
>> --- a/drivers/net/fsl_mcdmafec.c
>> +++ b/drivers/net/fsl_mcdmafec.c
>> @@ -520,7 +520,7 @@ int mcdmafec_initialize(bd_t * bis)
>> u32 tmp = CONFIG_SYS_INTSRAM + 0x2000;
>>  #endif
>>
>> -   for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) {
>> +   for (i = 0; i < ARRAY_SIZE(fec_info); i++) {
>>
>> dev =
>> (struct eth_device *)memalign(CONFIG_SYS_CACHELINE_SIZE,
>> diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
>> index 11d350e..47c15c4 100644
>> --- a/drivers/net/lan91c96.c
>> +++ b/drivers/net/lan91c96.c
>> @@ -779,7 +779,7 @@ static int lan91c96_detect_chip(struct eth_device *dev)
>> SMC_SELECT_BANK(dev, 3);
>> chip_id = (SMC_inw(dev, 0xA) & LAN91C96_REV_CHIPID) >> 4;
>> SMC_SELECT_BANK(dev, 0);
>> -   for (r = 0; r < sizeof(supported_chips) / sizeof(struct id_type); 
>> r++)
>> +   for (r = 0; r < ARRAY_SIZE(supported_chips); r++)
>> if (chip_id == supported_chips[r].id)
>> return r;
>> return 0;
>> diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
>> index ed7459c..7ae6320 100644
>> --- a/drivers/net/mcffec.c
>> +++ b/drivers/net/mcffec.c
>> @@ -559,7 +559,7 @@ int mcffec_initialize(bd_t * bis)
>> u32 tmp = CONFIG_SYS_INIT_RAM_ADDR + 0x1000;
>>  #endif
>>
>> -   for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) {
>> +   for (i = 0; i < ARRAY_SIZE(fec_info); i++) {
>>
>> dev =
>> (struct eth_device *)memalign(CONFIG_SYS_CACHELINE_SIZE,
>> diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c
>> index 5e64dbd..63bc8f8 100644
>> --- a/drivers/net/mcfmii.c
>> +++ b/drivers/net/mcfmii.c
>> @@ -186,7 +186,7 @@ int mii_discover_phy(struct eth_device *dev)
>> printf("PHY @ 0x%x pass %d\n", phyno, pass);
>>  #endif
>>
>> -   for (i = 0; (i < (sizeof(phyinfo) / 
>> sizeof(phy_info_t)))
>> +   for (i = 0; (i < ARRAY_SIZE(phyinfo))
>> && (phyinfo[i].phyid != 0); i++) {
>>   

Re: [U-Boot] [PATCH 6/7 v6] nand: tpl : introduce the TPL based on the SPL

2013-07-01 Thread Scott Wood

On 07/01/2013 03:48:16 AM, Zhang Ying-B40530 wrote:

I haven't subscribe the mail list and I didn't find the patch
"creates a separate autoconf.mk". Can you tell me where I can
find it? Thanks.


Search in http://patchwork.ozlabs.org/project/uboot/list/

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


Re: [U-Boot] [PATCH v2] net: Use ARRAY_SIZE at appropriate places

2013-07-01 Thread Jagan Teki
Hi Axel,

Thanks for your v2.

On Sun, Jun 30, 2013 at 9:02 AM, Axel Lin  wrote:
> Use ARRAY_SIZE instead of having similar implementation in each drivers.
>
> Signed-off-by: Axel Lin 
> Cc: Albert Aribaud 
> Cc: Ben Warren 
> Cc: Jean-Christophe PLAGNIOL-VILLARD 
> Cc: Joe Hershberger 
> Cc: Marek Vasut 
> Cc: Mike Frysinger 
> Cc: Nobuhiro Iwamatsu 
> Cc: TsiChungLiew 
> Cc: Wolfgang Denk 
> Cc: York Sun 
>
> Signed-off-by: Axel Lin 
> ---
> Hi Jagan Teki,
> This is v2 per your request.
>
> v2:
> Fix checkpatch issues, now checkpatch only shows below warnings:
> a few WARNING: Avoid CamelCase
> and a WARNING: line over 80 characters
> #134: FILE: drivers/net/npe/IxEthDBFeatures.c:150:
> +   if 
> (ixEthDBTrafficClassDefinitions[trafficClassDefinitionIndex][IX_ETH_DB_NPE_A_FUNCTIONALITY_ID_INDEX]
>  == npeAImageId.functionalityId) {

I think you can fix this warning and may be you can send a separate
patch for "CamelCase:"
if you want.

And also..

>
> Obviously, I prefer v1 for below reasons:
> 1. The diff in v2 becomes bigger and makes it harder for review.
> 2. The whole file in drivers/net/npe/IxEthDBFeatures.c uses 4 spaces as 
> indent,
>only the lines touched by this patch uses tab as indent (to make 
> checkpatch happy).
>This makes the code looks odd after apply v2, I don't think this is an 
> improvement.
>
> Well, it's up to maintainer to pick up the version he prefer.
>
> Regards,
> Axel
>
>  drivers/net/ax88180.c |  2 +-
>  drivers/net/fsl_mcdmafec.c|  2 +-
>  drivers/net/lan91c96.c|  2 +-
>  drivers/net/mcffec.c  |  2 +-
>  drivers/net/mcfmii.c  |  2 +-
>  drivers/net/ne2000.c  |  2 +-
>  drivers/net/npe/IxEthDBFeatures.c | 28 ++--
>  drivers/net/npe/IxOsalIoMem.c |  3 +--
>  drivers/net/npe/include/IxEthDBPortDefs.h |  2 +-
>  drivers/net/npe/include/IxOsalTypes.h |  2 +-
>  10 files changed, 23 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c
> index f501768..7f0cfe5 100644
> --- a/drivers/net/ax88180.c
> +++ b/drivers/net/ax88180.c
> @@ -157,7 +157,7 @@ static void ax88180_mac_reset (struct eth_device *dev)
> OUTW (dev, MISC_RESET_MAC, MISC);
> tmpval = INW (dev, MISC);
>
> -   for (i = 0; i < (sizeof (program_seq) / sizeof (program_seq[0])); i++)
> +   for (i = 0; i < ARRAY_SIZE(program_seq); i++)
> OUTW (dev, program_seq[i].value, program_seq[i].offset);
>  }
>
> diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
> index 63842cd..0e18764 100644
> --- a/drivers/net/fsl_mcdmafec.c
> +++ b/drivers/net/fsl_mcdmafec.c
> @@ -520,7 +520,7 @@ int mcdmafec_initialize(bd_t * bis)
> u32 tmp = CONFIG_SYS_INTSRAM + 0x2000;
>  #endif
>
> -   for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) {
> +   for (i = 0; i < ARRAY_SIZE(fec_info); i++) {
>
> dev =
> (struct eth_device *)memalign(CONFIG_SYS_CACHELINE_SIZE,
> diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
> index 11d350e..47c15c4 100644
> --- a/drivers/net/lan91c96.c
> +++ b/drivers/net/lan91c96.c
> @@ -779,7 +779,7 @@ static int lan91c96_detect_chip(struct eth_device *dev)
> SMC_SELECT_BANK(dev, 3);
> chip_id = (SMC_inw(dev, 0xA) & LAN91C96_REV_CHIPID) >> 4;
> SMC_SELECT_BANK(dev, 0);
> -   for (r = 0; r < sizeof(supported_chips) / sizeof(struct id_type); r++)
> +   for (r = 0; r < ARRAY_SIZE(supported_chips); r++)
> if (chip_id == supported_chips[r].id)
> return r;
> return 0;
> diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
> index ed7459c..7ae6320 100644
> --- a/drivers/net/mcffec.c
> +++ b/drivers/net/mcffec.c
> @@ -559,7 +559,7 @@ int mcffec_initialize(bd_t * bis)
> u32 tmp = CONFIG_SYS_INIT_RAM_ADDR + 0x1000;
>  #endif
>
> -   for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) {
> +   for (i = 0; i < ARRAY_SIZE(fec_info); i++) {
>
> dev =
> (struct eth_device *)memalign(CONFIG_SYS_CACHELINE_SIZE,
> diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c
> index 5e64dbd..63bc8f8 100644
> --- a/drivers/net/mcfmii.c
> +++ b/drivers/net/mcfmii.c
> @@ -186,7 +186,7 @@ int mii_discover_phy(struct eth_device *dev)
> printf("PHY @ 0x%x pass %d\n", phyno, pass);
>  #endif
>
> -   for (i = 0; (i < (sizeof(phyinfo) / 
> sizeof(phy_info_t)))
> +   for (i = 0; (i < ARRAY_SIZE(phyinfo))
> && (phyinfo[i].phyid != 0); i++) {
> if (phyinfo[i].phyid == phytype) {
>  #ifdef ET_DEBUG
> diff --git a/drivers/net/ne2000.c b/drivers/net/ne2000.c
> index 3939158..e6cd3e9 100644
> --- a/drivers/net/ne2000.c
> +++ b/drivers/ne

Re: [U-Boot] Regression due to 020bbcb "usb: hub: Power-cycle on root-hub ports"

2013-07-01 Thread Stephen Warren
On 07/01/2013 07:49 AM, Vivek Gautam wrote:
> Hi Marek,
> 
> 
> On Sun, Jun 30, 2013 at 10:08 PM, Marek Vasut  wrote:
>> Dear Stephen Warren,
>>
>>> (Sorry to those on to/cc; I'm resending this so it goes to the correct
>>> mailing list)
> 
> Dear Stephen,
> sorry for the delay in responding to this.
> 
>>>
>>> Commit 020bbcb "usb: hub: Power-cycle on root-hub ports" causes a
>>> regression on Tegra systems.
>>>
>>> The first time "usb start" is executed, it appears to work correctly.
>>> However, any subsequent time it is executed, it takes a long time, and
>>> eventually fails to find any USB devices.
>>>
>>> This situation can happen quite often; for example, if the user forgets
>>> to plug in a USB device before booting, runs "usb start", realizes that,
>>> then plugs it in and runs "usb start" again. This is compounded on at
>>> least one of the Tegra boards, since CONFIG_PREBOOT is set to "usb
>>> start" on systems (laptops/clamshells) which have built-in USB keyboards.
>>>
>>> If I simply revert this patch, then everything works again. (Yes,
>>> reverting requires fixing a small merge conflict.)
>>>
>>> Do you have any idea what the problem can be? I'm tempted to simply ask
>>> for the patch to be reverted since it causes a regression.
>>>
>>> Thanks for any idea how to fix this!
>>
>> BUMP? Vivek, any ideas? Otherwise I'm reverting this.
...
> There's one BUG that i could see in " 0bf796f " commit.
> Now that we parallelized the sequence to power cycle ports, so if
> get_port_status for any port failed,
> it returns from hub_power_on() and not power-on any of the port.
> 
> Below is the change i suggest.
...
> can you please confirm if you problem is related to this BUG in the
> sequence of power-cycling the ports.

I applied that change, and it does not solve the problem on Tegra, nor
do I see any of the messages that were changed from debug to printf.
Below is the log:

U-Boot 2013.04-00281-g0e8ef51 (Jul 01 2013 - 10:33:36)

TEGRA20
Board: NVIDIA Seaboard
DRAM:  1 GiB
NAND:  512 MiB
MMC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
In:tegra-kbc
Out:   lcd
Err:   lcd
Net:   Net Initialization Skipped
No ethernet found.
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices... 2 USB Device(s) found
USB2:   lowlevel init failed
   scanning usb for storage devices... 0 Storage Device(s) found
   scanning usb for ethernet devices...
Warning: asx0 using MAC address from net device
1 Ethernet Device(s) found
Hit any key to stop autoboot:  0


Tegra20 (SeaBoard) # usb start
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found

(there's a much longer pause when scanning this bus every time except
the very first)

USB2:   lowlevel init failed
   scanning usb for storage devices... 0 Storage Device(s) found
   scanning usb for ethernet devices... 0 Ethernet Device(s) found


Tegra20 (SeaBoard) # usb start
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
USB2:   lowlevel init failed
   scanning usb for storage devices... 0 Storage Device(s) found
   scanning usb for ethernet devices... 0 Ethernet Device(s) found

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


Re: [U-Boot] [PATCH] lcd: remove unaligned access in lcd_dt_simplefb_configure_node()

2013-07-01 Thread Tom Rini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/01/2013 12:30 PM, Stephen Warren wrote:
> On 06/13/2013 05:13 PM, Stephen Warren wrote:
>> From: Stephen Warren 
>> 
>> Some ARM compilers may emit code that makes unaligned accesses
>> when faced with constructs such as:
>> 
>> const char format[] = "r5g6b5";
>> 
>> Make this data static since it doesn't chagne; the compiler will
>> simply place it into the .rodata section directly, and avoid any
>> unaligned run- time initialization.
> 
> I don't think this has been applied yet. Will it be applied for
> this release? Should I resend the patch?

It's a bug fix and as such I want it.  Anatolij, there's a few "video"
patches out there, are you going to grab things / has this spurred you
to grab things or should I take a look around and pull up a patch set?
 Thanks!

- -- 
Tom
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJR0a/hAAoJENk4IS6UOR1WiV4P/RtMBhLZRq8fW9NNCaVupJC9
Y2F7kOnDOGR9jdvyWbTXA5Xvw8hMa+zx0ue3tGPf2y2rl4/EL2IPLS/PudwqTMHt
n5PnTAdadOUC09OZiRz8GBENis6RBFp6xHVKDxkvdTlVx5/wItOKKfLDW60n7hM+
4++VALba8/Ii6mWBRFdTyUEPcPCeVQxsKkfzeYrXwtBuKeEZ8f9upohfc19gscBU
pGm0wsb48mJGwk8Kq0JtDmVzak4paTptJAnlA6wcqOd2MRTw7crRuVhvyLymCNki
VcFtgwLI6sK7y0ohi1y3vJepL0soXGxswSRFYg2xyr8a+80uC3ZGUfkObddo+074
gGMDK7B58KVD/ZBlhsj+qpzAHUDsjRVBV01wvuTZ0FHE5DBJMISX1sYJihhLrxjc
DNX+a62guUW3Zc0xJIoHckwTh7FbXgiGK+0VtJHC3ueIw0ABRs3Q2PGDa3Ud3FvA
Y392ht9ftakbfIDQa/QTcw3h7VXIKfKWON621if/prsPg3GBbFV/P6AVar1NqzPR
imZQdyPJimkVZs/bFjFKqH/SvYIwFuoA8jwca84XZ2kbN8aZdcgXq+GKUq83Wkyn
rTr6K6c9lTixSpcpqOZMnkmT0hqglpnlVLzwZ6ONYUwtlbWK3zc6ZafxbQ2rWSLq
nuQ/vigESYDEfCYIWOuQ
=EA3R
-END PGP SIGNATURE-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] lcd: remove unaligned access in lcd_dt_simplefb_configure_node()

2013-07-01 Thread Stephen Warren
On 06/13/2013 05:13 PM, Stephen Warren wrote:
> From: Stephen Warren 
> 
> Some ARM compilers may emit code that makes unaligned accesses when
> faced with constructs such as:
> 
> const char format[] = "r5g6b5";
> 
> Make this data static since it doesn't chagne; the compiler will simply
> place it into the .rodata section directly, and avoid any unaligned run-
> time initialization.

I don't think this has been applied yet. Will it be applied for this
release? Should I resend the patch?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 2/2] socfpga: Adding System Manager driver

2013-07-01 Thread Chin Liang See
socfpga: Adding the generated pin mux
configuration by Preloader Generator tool

Signed-off-by: Chin Liang See 
Reviewed-by: Pavel Machek 
---
 board/altera/socfpga_cyclone5/pinmux_config.c |  214
+
 board/altera/socfpga_cyclone5/pinmux_config.h |   54 +++
 2 files changed, 268 insertions(+)
 create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.c
 create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.h

diff --git a/board/altera/socfpga_cyclone5/pinmux_config.c
b/board/altera/socfpga_cyclone5/pinmux_config.c
new file mode 100644
index 000..8b09005
--- /dev/null
+++ b/board/altera/socfpga_cyclone5/pinmux_config.c
@@ -0,0 +1,214 @@
+/* This file is generated by Preloader Generator */
+
+#include "pinmux_config.h"
+
+/* pin mux configuration data */
+unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = {
+   0, /* EMACIO0 - Unused */
+   2, /* EMACIO1 - USB */
+   2, /* EMACIO2 - USB */
+   2, /* EMACIO3 - USB */
+   2, /* EMACIO4 - USB */
+   2, /* EMACIO5 - USB */
+   2, /* EMACIO6 - USB */
+   2, /* EMACIO7 - USB */
+   2, /* EMACIO8 - USB */
+   0, /* EMACIO9 - Unused */
+   2, /* EMACIO10 - USB */
+   2, /* EMACIO11 - USB */
+   2, /* EMACIO12 - USB */
+   2, /* EMACIO13 - USB */
+   0, /* EMACIO14 - N/A */
+   0, /* EMACIO15 - N/A */
+   0, /* EMACIO16 - N/A */
+   0, /* EMACIO17 - N/A */
+   0, /* EMACIO18 - N/A */
+   0, /* EMACIO19 - N/A */
+   3, /* FLASHIO0 - SDMMC */
+   3, /* FLASHIO1 - SDMMC */
+   3, /* FLASHIO2 - SDMMC */
+   3, /* FLASHIO3 - SDMMC */
+   0, /* FLASHIO4 - SDMMC */
+   0, /* FLASHIO5 - SDMMC */
+   0, /* FLASHIO6 - SDMMC */
+   0, /* FLASHIO7 - SDMMC */
+   0, /* FLASHIO8 - SDMMC */
+   3, /* FLASHIO9 - SDMMC */
+   3, /* FLASHIO10 - SDMMC */
+   3, /* FLASHIO11 - SDMMC */
+   3, /* GENERALIO0 - TRACE */
+   3, /* GENERALIO1 - TRACE */
+   3, /* GENERALIO2 - TRACE */
+   3, /* GENERALIO3 - TRACE  */
+   3, /* GENERALIO4 - TRACE  */
+   3, /* GENERALIO5 - TRACE  */
+   3, /* GENERALIO6 - TRACE  */
+   3, /* GENERALIO7 - TRACE  */
+   3, /* GENERALIO8 - TRACE  */
+   3, /* GENERALIO9 - SPIM0 */
+   3, /* GENERALIO10 - SPIM0 */
+   3, /* GENERALIO11 - SPIM0 */
+   3, /* GENERALIO12 - SPIM0 */
+   2, /* GENERALIO13 - CAN0 */
+   2, /* GENERALIO14 - CAN0 */
+   3, /* GENERALIO15 - I2C0 */
+   3, /* GENERALIO16 - I2C0 */
+   2, /* GENERALIO17 - UART0 */
+   2, /* GENERALIO18 - UART0 */
+   0, /* GENERALIO19 - N/A */
+   0, /* GENERALIO20 - N/A */
+   0, /* GENERALIO21 - N/A */
+   0, /* GENERALIO22 - N/A */
+   0, /* GENERALIO23 - N/A */
+   0, /* GENERALIO24 - N/A */
+   0, /* GENERALIO25 - N/A */
+   0, /* GENERALIO26 - N/A */
+   0, /* GENERALIO27 - N/A */
+   0, /* GENERALIO28 - N/A */
+   0, /* GENERALIO29 - N/A */
+   0, /* GENERALIO30 - N/A */
+   0, /* GENERALIO31 - N/A */
+   2, /* MIXED1IO0 - EMAC */
+   2, /* MIXED1IO1 - EMAC */
+   2, /* MIXED1IO2 - EMAC */
+   2, /* MIXED1IO3 - EMAC */
+   2, /* MIXED1IO4 - EMAC */
+   2, /* MIXED1IO5 - EMAC */
+   2, /* MIXED1IO6 - EMAC */
+   2, /* MIXED1IO7 - EMAC */
+   2, /* MIXED1IO8 - EMAC */
+   2, /* MIXED1IO9 - EMAC */
+   2, /* MIXED1IO10 - EMAC */
+   2, /* MIXED1IO11 - EMAC */
+   2, /* MIXED1IO12 - EMAC */
+   2, /* MIXED1IO13 - EMAC */
+   0, /* MIXED1IO14 - Unused */
+   3, /* MIXED1IO15 - QSPI */
+   3, /* MIXED1IO16 - QSPI */
+   3, /* MIXED1IO17 - QSPI */
+   3, /* MIXED1IO18 - QSPI */
+   3, /* MIXED1IO19 - QSPI */
+   3, /* MIXED1IO20 - QSPI */
+   0, /* MIXED1IO21 - GPIO */
+   0, /* MIXED2IO0 - N/A */
+   0, /* MIXED2IO1 - N/A */
+   0, /* MIXED2IO2 - N/A */
+   0, /* MIXED2IO3 - N/A */
+   0, /* MIXED2IO4 - N/A */
+   0, /* MIXED2IO5 - N/A */
+   0, /* MIXED2IO6 - N/A */
+   0, /* MIXED2IO7 - N/A */
+   0, /* GPLINMUX48 */
+   0, /* GPLINMUX49 */
+   0, /* GPLINMUX50 */
+   0, /* GPLINMUX51 */
+   0, /* GPLINMUX52 */
+   0, /* GPLINMUX53 */
+   0, /* GPLINMUX54 */
+   0, /* GPLINMUX55 */
+   0, /* GPLINMUX56 */
+   0, /* GPLINMUX57 */
+   0, /* GPLINMUX58 */
+   0, /* GPLINMUX59 */
+   0, /* GPLINMUX60 */
+   0, /* GPLINMUX61 */
+   0, /* GPLINMUX62 */
+   0, /* GPLINMUX63 */
+   0, /* GPLINMUX64 */
+   0, /* GPLINMUX65 */
+   0, /* GPLINMUX66 */
+   0, /* GPLINMUX67 */
+   0, /* GPLINMUX68 */
+   0, /* GPLINMUX69 */
+   0, /* GPLINMUX70 */
+   1, /* GPLMUX0 */
+   1, /* GPLMUX1 */
+   1, /* GPLMUX2 */
+   1, /* GPLMUX3 */
+   1, /* GPLMUX4 */
+   1, /* GPLMUX5 */
+   1, /* GPLMUX6 */
+   1, /* GPLMUX7 */
+   1, /* GPLMUX8 */
+   1, /* GPLMUX9 */
+   1, /* 

[U-Boot] [PATCH v3 1/2] socfpga: Adding System Manager driver

2013-07-01 Thread Chin Liang See
socfpga: Adding System Manager driver which
will configure the pin mux for real hardware Cyclone V
development kit (not Virtual Platform)

Signed-off-by: Chin Liang See 
Reviewed-by: Pavel Machek 
---
 arch/arm/cpu/armv7/socfpga/Makefile|2 +-
 arch/arm/cpu/armv7/socfpga/spl.c   |6 +++
 arch/arm/cpu/armv7/socfpga/system_manager.c|   41

 .../include/asm/arch-socfpga/socfpga_base_addrs.h  |1 +
 arch/arm/include/asm/arch-socfpga/system_manager.h |   34

 board/altera/socfpga_cyclone5/Makefile |4 +-
 include/configs/socfpga_cyclone5.h |1 +
 7 files changed, 87 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/socfpga/system_manager.c
 create mode 100644 arch/arm/include/asm/arch-socfpga/system_manager.h

diff --git a/arch/arm/cpu/armv7/socfpga/Makefile
b/arch/arm/cpu/armv7/socfpga/Makefile
index 518e67a..cf2829a 100644
--- a/arch/arm/cpu/armv7/socfpga/Makefile
+++ b/arch/arm/cpu/armv7/socfpga/Makefile
@@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk
 LIB=  $(obj)lib$(SOC).o
 
 SOBJS  := lowlevel_init.o
-COBJS-y:= misc.o timer.o reset_manager.o
+COBJS-y:= misc.o timer.o reset_manager.o system_manager.o
 COBJS-$(CONFIG_SPL_BUILD) += spl.o
 
 COBJS  := $(COBJS-y)
diff --git a/arch/arm/cpu/armv7/socfpga/spl.c
b/arch/arm/cpu/armv7/socfpga/spl.c
index 84216eb..28d8c99 100644
--- a/arch/arm/cpu/armv7/socfpga/spl.c
+++ b/arch/arm/cpu/armv7/socfpga/spl.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -36,6 +37,11 @@ u32 spl_boot_device(void)
  */
 void spl_board_init(void)
 {
+#ifndef CONFIG_SOCFPGA_VIRTUAL_TARGET
+   /* configure the pin muxing through system manager */
+   sysmgr_pinmux_init();
+#endif /* CONFIG_SOCFPGA_VIRTUAL_TARGET */
+
/* de-assert reset for peripherals and bridges based on handoff */
reset_deassert_peripherals_handoff();
 
diff --git a/arch/arm/cpu/armv7/socfpga/system_manager.c
b/arch/arm/cpu/armv7/socfpga/system_manager.c
new file mode 100644
index 000..d893e97
--- /dev/null
+++ b/arch/arm/cpu/armv7/socfpga/system_manager.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright Altera Corporation (C) 2013. All rights reserved
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms and conditions of the
+ * GNU General Public License, version 2, as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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, see
+ * .
+ */
+
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Configure all the pin muxes
+ */
+void sysmgr_pinmux_init(void)
+{
+   unsigned long offset = CONFIG_SYSMGR_PINMUXGRP_OFFSET;
+
+   const unsigned long *pval = sys_mgr_init_table;
+   unsigned long i;
+
+   for (i = 0; i < ARRAY_SIZE(sys_mgr_init_table);
+   i++, offset += sizeof(unsigned long)) {
+   writel(*pval++, (SOCFPGA_SYSMGR_ADDRESS + offset));
+   }
+}
+
+
diff --git a/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h
b/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h
index f353eb2..819c280 100644
--- a/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h
+++ b/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h
@@ -23,5 +23,6 @@
 #define SOCFPGA_UART1_ADDRESS 0xffc03000
 #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd0
 #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000
+#define SOCFPGA_SYSMGR_ADDRESS 0xffd08000
 
 #endif /* _SOCFPGA_BASE_ADDRS_H_ */
diff --git a/arch/arm/include/asm/arch-socfpga/system_manager.h
b/arch/arm/include/asm/arch-socfpga/system_manager.h
new file mode 100644
index 000..ef9e464
--- /dev/null
+++ b/arch/arm/include/asm/arch-socfpga/system_manager.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright Altera Corporation (C) 2013. All rights reserved
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms and conditions of the
+ * GNU General Public License, version 2, as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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, see
+ * .
+ */
+
+#ifndef_SYSTEM_MANAGER_H_
+#define_SYSTEM_MANAGER_H_
+
+#ifndef __ASSEMBLY__
+
+void sysmgr_pinmux_init(void);
+
+/* declaration for handof

[U-Boot] [PATCH v2 1/1] socfpga: Creating driver for Reset Manager

2013-07-01 Thread Chin Liang See
socfpga: Consolidating reset code into reset_manager.c.
 Also separating reset configuration for virtual target
 and real hardware Cyclone V development kit

Signed-off-by: Chin Liang See 
---
 arch/arm/cpu/armv7/socfpga/Makefile   |2 +-
 arch/arm/cpu/armv7/socfpga/misc.c |   27 ---
 arch/arm/cpu/armv7/socfpga/reset_manager.c|   52
+
 arch/arm/include/asm/arch-socfpga/reset_manager.h |   10 ++--
 4 files changed, 60 insertions(+), 31 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/socfpga/reset_manager.c

diff --git a/arch/arm/cpu/armv7/socfpga/Makefile
b/arch/arm/cpu/armv7/socfpga/Makefile
index 376a4bd..518e67a 100644
--- a/arch/arm/cpu/armv7/socfpga/Makefile
+++ b/arch/arm/cpu/armv7/socfpga/Makefile
@@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk
 LIB=  $(obj)lib$(SOC).o
 
 SOBJS  := lowlevel_init.o
-COBJS-y:= misc.o timer.o
+COBJS-y:= misc.o timer.o reset_manager.o
 COBJS-$(CONFIG_SPL_BUILD) += spl.o
 
 COBJS  := $(COBJS-y)
diff --git a/arch/arm/cpu/armv7/socfpga/misc.c
b/arch/arm/cpu/armv7/socfpga/misc.c
index fa16424..59f5b94 100644
--- a/arch/arm/cpu/armv7/socfpga/misc.c
+++ b/arch/arm/cpu/armv7/socfpga/misc.c
@@ -17,36 +17,9 @@
 
 #include 
 #include 
-#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static const struct socfpga_reset_manager *reset_manager_base =
-   (void *)SOCFPGA_RSTMGR_ADDRESS;
-
-/*
- * Write the reset manager register to cause reset
- */
-void reset_cpu(ulong addr)
-{
-   /* request a warm reset */
-   writel(RSTMGR_CTRL_SWWARMRSTREQ_LSB, &reset_manager_base->ctrl);
-   /*
-* infinite loop here as watchdog will trigger and reset
-* the processor
-*/
-   while (1)
-   ;
-}
-
-/*
- * Release peripherals from reset based on handoff
- */
-void reset_deassert_peripherals_handoff(void)
-{
-   writel(0, &reset_manager_base->per_mod_reset);
-}
-
 int dram_init(void)
 {
gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
diff --git a/arch/arm/cpu/armv7/socfpga/reset_manager.c
b/arch/arm/cpu/armv7/socfpga/reset_manager.c
new file mode 100644
index 000..b64db68
--- /dev/null
+++ b/arch/arm/cpu/armv7/socfpga/reset_manager.c
@@ -0,0 +1,52 @@
+/*
+ * Copyright Altera Corporation (C) <2013>. All rights reserved
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms and conditions of the
+ * GNU General Public License, version 2, as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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, see
+ * .
+ */
+
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static const struct socfpga_reset_manager *reset_manager_base =
+   (void *)SOCFPGA_RSTMGR_ADDRESS;
+
+/*
+ * Write the reset manager register to cause reset
+ */
+void reset_cpu(ulong addr)
+{
+   /* request a warm reset */
+   writel((1 << RSTMGR_CTRL_SWWARMRSTREQ_LSB),
+   &reset_manager_base->ctrl);
+   /*
+* infinite loop here as watchdog will trigger and reset
+* the processor
+*/
+   while (1)
+   ;
+}
+
+/*
+ * Release peripherals from reset based on handoff
+ */
+void reset_deassert_peripherals_handoff(void)
+{
+   writel(0, &reset_manager_base->per_mod_reset);
+}
+
+
diff --git a/arch/arm/include/asm/arch-socfpga/reset_manager.h
b/arch/arm/include/asm/arch-socfpga/reset_manager.h
index d9d2c1c..4930914 100644
--- a/arch/arm/include/asm/arch-socfpga/reset_manager.h
+++ b/arch/arm/include/asm/arch-socfpga/reset_manager.h
@@ -22,16 +22,20 @@ void reset_cpu(ulong addr);
 void reset_deassert_peripherals_handoff(void);
 
 struct socfpga_reset_manager {
-   u32 padding1;
+   u32 status;
u32 ctrl;
-   u32 padding2;
-   u32 padding3;
+   u32 counts;
+   u32 padding1;
u32 mpu_mod_reset;
u32 per_mod_reset;
u32 per2_mod_reset;
u32 brg_mod_reset;
 };
 
+#if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET)
+#define RSTMGR_CTRL_SWWARMRSTREQ_LSB 2
+#else
 #define RSTMGR_CTRL_SWWARMRSTREQ_LSB 1
+#endif
 
 #endif /* _RESET_MANAGER_H_ */
-- 
1.7.9.5


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


[U-Boot] [PATCH v3 1/1] socfpga: Adding configuration for development kit

2013-07-01 Thread Chin Liang See
socfpga: Separating the configuration file for Virtual
 Target and real hardware Cyclone V development kit

Signed-off-by: Chin Liang See 
---
 include/configs/socfpga_cyclone5.h |   28 +---
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/include/configs/socfpga_cyclone5.h
b/include/configs/socfpga_cyclone5.h
index 5633d2a..be3799b 100644
--- a/include/configs/socfpga_cyclone5.h
+++ b/include/configs/socfpga_cyclone5.h
@@ -22,6 +22,8 @@
 /*
  * High level configuration
  */
+/* Virtual target or real hardware */
+#define CONFIG_SOCFPGA_VIRTUAL_TARGET
 
 #define CONFIG_ARMV7
 #define CONFIG_L2_OFF
@@ -32,11 +34,12 @@
 #define CONFIG_SINGLE_BOOTLOADER
 #define CONFIG_SOCFPGA
 
+/* base address for .text section */
+#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
 #define CONFIG_SYS_TEXT_BASE   0x0840
-#define V_NS16550_CLK  100
-#define CONFIG_BAUDRATE57600
-#define CONFIG_SYS_HZ  1000
-#define CONFIG_TIMER_CLOCK_KHZ 2400
+#else
+#define CONFIG_SYS_TEXT_BASE   0x0140
+#endif
 #define CONFIG_SYS_LOAD_ADDR   0x7fc0
 
 /* Console I/O Buffer Size */
@@ -165,7 +168,7 @@
 /* SDRAM Bank #1 */
 #define CONFIG_SYS_SDRAM_BASE  0x
 /* SDRAM memory size */
-#define PHYS_SDRAM_1_SIZE  0x8000
+#define PHYS_SDRAM_1_SIZE  0x4000
 
 #define PHYS_SDRAM_1   CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_START   0x
@@ -181,8 +184,13 @@
 #define CONFIG_SYS_NS16550_CLK  V_NS16550_CLK
 #define CONFIG_CONS_INDEX   1
 #define CONFIG_SYS_NS16550_COM1UART0_BASE
-
 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,
115200}
+#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
+#define V_NS16550_CLK  100
+#else
+#define V_NS16550_CLK  1
+#endif
+#define CONFIG_BAUDRATE115200
 
 /*
  * FLASH
@@ -195,9 +203,15 @@
 /* This timer use eosc1 where the clock frequency is fixed
  * throughout any condition */
 #define CONFIG_SYS_TIMERBASE   SOCFPGA_OSC1TIMER0_ADDRESS
-
 /* reload value when timer count to zero */
 #define TIMER_LOAD_VAL 0x
+/* Timer info */
+#define CONFIG_SYS_HZ  1000
+#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
+#define CONFIG_TIMER_CLOCK_KHZ 2400
+#else
+#define CONFIG_TIMER_CLOCK_KHZ 25000
+#endif
 
 #define CONFIG_ENV_IS_NOWHERE
 
-- 
1.7.9.5


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


Re: [U-Boot] Regression due to 020bbcb "usb: hub: Power-cycle on root-hub ports"

2013-07-01 Thread Vivek Gautam
Hi Marek,


On Sun, Jun 30, 2013 at 10:08 PM, Marek Vasut  wrote:
> Dear Stephen Warren,
>
>> (Sorry to those on to/cc; I'm resending this so it goes to the correct
>> mailing list)

Dear Stephen,
sorry for the delay in responding to this.

>>
>> Commit 020bbcb "usb: hub: Power-cycle on root-hub ports" causes a
>> regression on Tegra systems.
>>
>> The first time "usb start" is executed, it appears to work correctly.
>> However, any subsequent time it is executed, it takes a long time, and
>> eventually fails to find any USB devices.
>>
>> This situation can happen quite often; for example, if the user forgets
>> to plug in a USB device before booting, runs "usb start", realizes that,
>> then plugs it in and runs "usb start" again. This is compounded on at
>> least one of the Tegra boards, since CONFIG_PREBOOT is set to "usb
>> start" on systems (laptops/clamshells) which have built-in USB keyboards.
>>
>> If I simply revert this patch, then everything works again. (Yes,
>> reverting requires fixing a small merge conflict.)
>>
>> Do you have any idea what the problem can be? I'm tempted to simply ask
>> for the patch to be reverted since it causes a regression.
>>
>> Thanks for any idea how to fix this!
>
> BUMP? Vivek, any ideas? Otherwise I'm reverting this.

Tried this at my end on smdk5250 board, and since we have 3 ports on
EHCI (which we haven't defined in 5250's config --
CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS);
the issue was very much reproducible.

For this following commits should be under scan:
0bf796f usb: hub: Parallelize power-cycling of root-hub ports
020bbcb usb: hub: Power-cycle on root-hub ports

There's one BUG that i could see in " 0bf796f " commit.
Now that we parallelized the sequence to power cycle ports, so if
get_port_status for any port failed,
it returns from hub_power_on() and not power-on any of the port.

Below is the change i suggest.

diff --git a/common/usb_hub.c b/common/usb_hub.c
index 774ba63..437a51f 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -127,7 +127,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
for (i = 0; i < dev->maxchild; i++) {
ret = usb_get_port_status(dev, i + 1, portsts);
if (ret < 0) {
-   debug("port %d: get_port_status failed\n", i + 1);
+   printf("port %d: get_port_status failed\n", i + 1);
return;
}

@@ -142,12 +142,10 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
 */
portstatus = le16_to_cpu(portsts->wPortStatus);
if (portstatus & (USB_PORT_STAT_POWER << 1)) {
-   debug("port %d: Port power change failed\n", i + 1);
+   printf("port %d: Port power change failed\n", i + 1);
return;
}
-   }

-   for (i = 0; i < dev->maxchild; i++) {
usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
debug("port %d returns %lX\n", i + 1, dev->status);
}


Dear Stephen,

can you please confirm if you problem is related to this BUG in the
sequence of power-cycling the ports.

With this change i can see that USB 2.0 does not detect attached
device for the first time we give 'usb start',
but subsequently every time it comes and detects the device.
But similar behavior is observed when i revert both of above mentioned
commits, so this i should look into.



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


Re: [U-Boot] [PATCH v2 1/1] socfpga: Separating the configuration file for Virtual Target and real hardware Cyclone V development kit

2013-07-01 Thread Chin Liang See
Hi Wolfgang,

On Sat, 2013-06-29 at 00:47 +0200, ZY - wd wrote:
> Dear Chin Liang See,
> 
> In message <1372451028.11240.2.ca...@drezykow-virtualbox.altera.com> you 
> wrote:
> > socfpga: Separating the configuration file for Virtual
> >  Target and real hardware Cyclone V development kit
> 
> Please keep the Subject SHORT - it should be 50 characters or less!
> 
> And please do not repeat the Subject in the commit messgae - this is
> redundant and thus makes no sense.
> 
> Chose a short  and descriptive Subject, and provide prosa in the
> commit mesage.
> 

Noted with thanks.
Let me fix it on next revision

Chin Liang

> Thanks!!
> 
> 
> Wolfgang Denk
> 


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


Re: [U-Boot] [PATCH 1/1] socfpga: Consolidating reset code into reset_manager.c. Also separating reset configuration for virtual target and real hardware Cyclone V development kit

2013-07-01 Thread Chin Liang See
Hi Pavel,

On Mon, 2013-07-01 at 12:46 +0200, ZY - pavel wrote:
> Hi!
> 
> > > > @@ -21,6 +21,7 @@
> > > >  void reset_cpu(ulong addr);
> > > >  void reset_deassert_peripherals_handoff(void);
> > > > 
> > > > +#if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET)
> > > >  struct socfpga_reset_manager {
> > > >  u32padding1;
> > > >  u32ctrl;
> > > > @@ -31,7 +32,23 @@ struct socfpga_reset_manager {
> > > >  u32per2_mod_reset;
> > > >  u32brg_mod_reset;
> > > >  };
> > > > +#else
> > > > +struct socfpga_reset_manager {
> > > > +u32status;
> > > > +u32ctrl;
> > > > +u32counts;
> > > > +u32padding1;
> > > > +u32mpu_mod_reset;
> > > > +u32per_mod_reset;
> > > > +u32per2_mod_reset;
> > > > +u32brg_mod_reset;
> > > > +};
> > > > +#endif
> > > > 
> > > 
> > > Is it really needed to have two definitions of the struct? AFAICT,
> > > structures are same, except that some padding fields have names on
> > > real hardware. Thus, if we simply use "real-hardware" version on the
> > > emulator, it should work. Perhaps with some comments "this is not
> > > emulated on virtual target"...?
> > 
> > We decided to leave the Virtual Platform code support within existing
> > code. We need to do that as we have some discrepancy between the real
> > hardware and the virtual platform. But this is only applicable for
> > Altera specific IP. :)
> 
> That is okay... But notice that structure is same on both real
> hardware and virtual platform... (Just some fields have "paddingX"
> instead of name on virtual platform). If you remove the #ifdef it will
> work just fine.
> 
> (You could add /* this is unimplemented on virtual platform */, or
> maybe even per-field ifdef. It will still be more readable.)

Oh.. I got your point now :)
Its a good suggestion and let me do it for next revision.

Chin Liang

> 
> Thanks,
>   Pavel


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


Re: [U-Boot] [PATCH v2 1/1] socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V

2013-07-01 Thread Chin Liang See
Hi Pavel,

On Mon, 2013-07-01 at 12:42 +0200, ZY - pavel wrote:
> On Fri 2013-06-28 16:20:48, Chin Liang See wrote:
> > socfpga: Adding System Manager driver which will
> >  configure the pin mux for real hardware Cyclone V 
> >  development kit (not Virtual Platform)
> > 
> > Signed-off-by: Chin Liang See 
> 
> 
> > +DECLARE_GLOBAL_DATA_PTR;
> > +
> > +/*
> > + * Configure all the pin mux
> > + */
> 
> As noted before, I'm not sure this is correct english. Otherwise,
> patch looks good to me.
> 

Sorry as I thought I already done that.
Let me fix it on next revision.

Chin Liang

> Reviewed-by: Pavel Machek 
>   Pavel
> 


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


Re: [U-Boot] [PATCH 1/1] socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V

2013-07-01 Thread Chin Liang See
Hi Pavel,

On Mon, 2013-07-01 at 12:39 +0200, ZY - pavel wrote:
> Hi!
> 
> > > > --- /dev/null
> > > > +++ b/board/altera/socfpga_cyclone5/pinmux_config.c
> > > > @@ -0,0 +1,213 @@
> > > > +
> > > > +#include "pinmux_config.h"
> > > > +
> > > > +/* pin mux configuration data */
> > > > +unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = {
> > > > +   0, /* EMACIO0 - Unused */
> > > > +   2, /* EMACIO1 - USB */
> > > > +   2, /* EMACIO2 - USB */
> > > > +   2, /* EMACIO3 - USB */
> > > 
> > > Is this table auto-generated somehow?
> > > 
> > > If so, comment about that would be nice.
> > > 
> > > If not, perhaps we could put more than one entry on line, to make it
> > > shorter?
> > 
> > Yup, its auto generated by tools.
> > I will put comment to note this.
> 
> Thanks!
> 
> You can add Reviewed-by: Pavel Machek  on the next
> version.
> 

Thanks

> In future, would it make sense to separate auto-generated and manual
> parts? It might be good to have something like pinmux_config.i file
> with just inner part of the table...
> 

Sure, I will split them into 2 patches on next version

Chin Liang

>   Pavel


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


Re: [U-Boot] U-boot-2012.04 compilation for qemu-mips board

2013-07-01 Thread krishna dwivedi
Hi Wolfgang,

Thanks for yours valuable time and support.U-boot got compiled for
qemu-mips board.

Regards,
Krishna


On Mon, Jul 1, 2013 at 5:19 PM, Wolfgang Denk  wrote:

> Dear krishna dwivedi,
>
> please stop top posting / full quoting.
>
> In message  agan2ilvqknsojcnchp3qk...@mail.gmail.com> you wrote:
> >
> > I knew i have to run make qemu_mips_config before make allI am using ELDK
> > 5.3 toolchain and compiling u-boot recipe came as a part of ELDK..But in
> > yocto environment,we use bitbake instead of make.I already tried make:
> > [unknown@h229 build]$ make qemu_mips_config
> > make: *** No rule to make target `qemu_mips_config'.  Stop.
> >
> > I guess i need command analogous to make qemu_mips_config to run before
> > bitbake u-boot.
>
> No.  You must make sure that your u-boot recipe contains the correct
> commands to run make qemu_mips_config first.
>
> But this is actually a bitbake / Yocto issue, and as such off topic
> here.
>
> 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
> Quantum Mechanics is God's version of "Trust me."
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/6] Upstream environment changes being used in Yocto/OE

2013-07-01 Thread Otavio Salvador
On Mon, Jul 1, 2013 at 10:30 AM, Tom Rini  wrote:
> On Mon, Jul 01, 2013 at 10:25:46AM -0300, Otavio Salvador wrote:
>> On Mon, Jul 1, 2013 at 10:20 AM, Tom Rini  wrote:
>> > On Fri, Jun 28, 2013 at 06:56:46PM -0300, Fabio Estevam wrote:
>> >
>> >> On Fri, Jun 28, 2013 at 6:52 PM, Otavio Salvador
>> >>  wrote:
>> >> > This changes were being done in every version of U-Boot and it
>> >> > makes sense to try to merge them upstream.
>> >> >
>> >> > Please review them and ack/nack them.
>> >>
>> >> I think the series look good:
>> >>
>> >> Reviewed-by: Fabio Estevam 
>> >
>> > We aren't breaking compat with other distros, are we?  In TI-land where
>> > (for better or worse) we often have a FAT partition we're dealing with
>> > too, we use (and can have OE spit out) a uEnv.txt file that's
>> > user-editable and imported to the environment that would update these
>> > variables.  I suspect there's not an easy analog here but I thought I'd
>> > bring it up.
>>
>> We've not used uEnv.txt files for this in Freescale's Yocto support
>> but patched the U-Boot source code to make it work out of box. I think
>> these patches could go in now that Freescale is using Yocto more
>> extensivelly for ARM platforms so we avoid  same patches to be ported
>> for every new U-Boot release.
>
> Right well and good.  But part of the reason we use it here is that
> meta-various-ti-things may use a different layout from
> meta-community-oriented-distro and this lets us handle both with just a
> tweak in the various-ti-things layer to add a text file.  Again, may not
> apply here and that's fine.  Heck, we're trying to move more towards
> always just using the community layout.

Yes and we also have support to read a user provided file, but we
leave it for customizations not to use by default.

... yes, community layout is the way to go ;)

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/6] Upstream environment changes being used in Yocto/OE

2013-07-01 Thread Tom Rini
On Mon, Jul 01, 2013 at 10:25:46AM -0300, Otavio Salvador wrote:
> On Mon, Jul 1, 2013 at 10:20 AM, Tom Rini  wrote:
> > On Fri, Jun 28, 2013 at 06:56:46PM -0300, Fabio Estevam wrote:
> >
> >> On Fri, Jun 28, 2013 at 6:52 PM, Otavio Salvador
> >>  wrote:
> >> > This changes were being done in every version of U-Boot and it
> >> > makes sense to try to merge them upstream.
> >> >
> >> > Please review them and ack/nack them.
> >>
> >> I think the series look good:
> >>
> >> Reviewed-by: Fabio Estevam 
> >
> > We aren't breaking compat with other distros, are we?  In TI-land where
> > (for better or worse) we often have a FAT partition we're dealing with
> > too, we use (and can have OE spit out) a uEnv.txt file that's
> > user-editable and imported to the environment that would update these
> > variables.  I suspect there's not an easy analog here but I thought I'd
> > bring it up.
> 
> We've not used uEnv.txt files for this in Freescale's Yocto support
> but patched the U-Boot source code to make it work out of box. I think
> these patches could go in now that Freescale is using Yocto more
> extensivelly for ARM platforms so we avoid  same patches to be ported
> for every new U-Boot release.

Right well and good.  But part of the reason we use it here is that
meta-various-ti-things may use a different layout from
meta-community-oriented-distro and this lets us handle both with just a
tweak in the various-ti-things layer to add a text file.  Again, may not
apply here and that's fine.  Heck, we're trying to move more towards
always just using the community layout.

-- 
Tom


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


Re: [U-Boot] [PATCH 0/6] Upstream environment changes being used in Yocto/OE

2013-07-01 Thread Otavio Salvador
On Mon, Jul 1, 2013 at 10:20 AM, Tom Rini  wrote:
> On Fri, Jun 28, 2013 at 06:56:46PM -0300, Fabio Estevam wrote:
>
>> On Fri, Jun 28, 2013 at 6:52 PM, Otavio Salvador
>>  wrote:
>> > This changes were being done in every version of U-Boot and it
>> > makes sense to try to merge them upstream.
>> >
>> > Please review them and ack/nack them.
>>
>> I think the series look good:
>>
>> Reviewed-by: Fabio Estevam 
>
> We aren't breaking compat with other distros, are we?  In TI-land where
> (for better or worse) we often have a FAT partition we're dealing with
> too, we use (and can have OE spit out) a uEnv.txt file that's
> user-editable and imported to the environment that would update these
> variables.  I suspect there's not an easy analog here but I thought I'd
> bring it up.

We've not used uEnv.txt files for this in Freescale's Yocto support
but patched the U-Boot source code to make it work out of box. I think
these patches could go in now that Freescale is using Yocto more
extensivelly for ARM platforms so we avoid  same patches to be ported
for every new U-Boot release.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/6] Upstream environment changes being used in Yocto/OE

2013-07-01 Thread Tom Rini
On Fri, Jun 28, 2013 at 06:56:46PM -0300, Fabio Estevam wrote:

> On Fri, Jun 28, 2013 at 6:52 PM, Otavio Salvador
>  wrote:
> > This changes were being done in every version of U-Boot and it
> > makes sense to try to merge them upstream.
> >
> > Please review them and ack/nack them.
> 
> I think the series look good:
> 
> Reviewed-by: Fabio Estevam 

We aren't breaking compat with other distros, are we?  In TI-land where
(for better or worse) we often have a FAT partition we're dealing with
too, we use (and can have OE spit out) a uEnv.txt file that's
user-editable and imported to the environment that would update these
variables.  I suspect there's not an easy analog here but I thought I'd
bring it up.

-- 
Tom


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


Re: [U-Boot] Reminder mail [Fwd: Kernel bring Up fail in NOR boot for custom board]]

2013-07-01 Thread Marek Vasut
Dear Shrimanth,

> Reminder Mail
> 
> Please reply ASAP.

I believe the remarks above won't help you, neither will top-posting.

The problem looks to be either DRAM setup being incorrect or kernel problem.

> -- Forwarded Message 
> From: Shrimanth 
> To: joe.hershber...@ni.com, Marek Vasut , s...@denx.de,
> u-boot@lists.denx.de, Scott Wood 
> Cc: Manukumar , PJM
> 
> Subject: [Fwd: Kernel bring Up fail in NOR boot for custom board]
> Date: Thu, 27 Jun 2013 11:04:54 +0530
> 
> Dear Scott Wood,
> 
> 1. Board Bring Up(u-boot and kernel) in Nand Flash
> With the setting of cpu = 533MHz,ddr = 533MHz and lbc =
> 66.66MHz.
> we can able to make u-boot up and kernel with all drivers
> modules are up and prompt is appeared.
> 
> 2. Board Bring Up(u-boot and kernel) in Nor Flash
> With the setting of cpu = 533MHz,ddr = 533MHz and lbc =
> 16.66MHz.
> we can able to make u-boot up and kernel is not up.
> i.e, the drivers in kernel are unevenly initialized and getting
> into kernel panic state.
> I have attached the file that shows above mentioned behavio1
> please find the attachments.
> 
>  If the cpu frequency is reduced to 266Mhz and DDR with
>  533.33MHz. kernel initialize further but result is same
>  as above(kernel panic).
> 
> 
> NOTE: we have observed that if same kernel image is put in
> the Reference Design Board(P1021RDB-PC) it is working fine.
> 
> >From u-boot we have tried changing OR & BR values along with LAW and
> 
> TLB values..Are we missing something??
> 
> As our Deveopment is stuck please reply ASAP
> 
> 
> Regards

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


[U-Boot] [PATCH] cmd_bootm.c: Correct check/return for unsupported sub-command

2013-07-01 Thread Tom Rini
With the do_bootm_states re-organization, we have the call to any
potential sub-commands in a single spot.  If one fails, we can then stop
right there and return to the caller.  Prior to these calls we have
already ensured that ret is zero so we will not be returning this error
for some other case.

Signed-off-by: Tom Rini 
---
 common/cmd_bootm.c |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 02a5013..a36e019 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -669,6 +669,13 @@ static int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int 
argc,
if (!ret && (states & BOOTM_STATE_OS_PREP))
ret = boot_fn(BOOTM_STATE_OS_PREP, argc, argv, images);
 
+   /* Check for unsupported subcommand. */
+   if (ret) {
+   puts("subcommand not supported\n");
+   return ret;
+   }
+
+
 #ifdef CONFIG_TRACE
/* Pretend to run the OS, then run a user command */
if (!ret && (states & BOOTM_STATE_OS_FAKE_GO)) {
@@ -699,8 +706,6 @@ err:
bootstage_error(BOOTSTAGE_ID_DECOMP_UNIMPL);
else if (ret == BOOTM_ERR_RESET)
do_reset(cmdtp, flag, argc, argv);
-   else
-   puts("subcommand not supported\n");
 
return ret;
 }
-- 
1.7.9.5

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


[U-Boot] [PATCH v3 0/3] arm: add support for LaCie CloudBox

2013-07-01 Thread Frédéric Leroy
This series adds support for the LaCie Cloudbox v2 device.

Changes in v3:

- prepare other LaCie boards for led patch
- fix Machine ID
- use one commit for adding device

Changes in v2:

- sort unsorted #ifdef list in lacie_kw.h
- add entry to MAINTAINERS
- remove unused GPIO definitions
- remove empty misc_init_r()
- add Machine ID
- Use #define values for ethernet phy init
- checkpatch compliant

Frédéric Leroy (3):
  lacie_kw: sort #ifdef lists by CONFIG_ identifiers
  LaCie/common: Uses #defines for ethernet phy leds setup
  arm: add support for LaCie CloudBox

 MAINTAINERS   |   4 +
 board/LaCie/cloudbox/Makefile |  46 +++
 board/LaCie/cloudbox/cloudbox.c   |  94 +
 board/LaCie/cloudbox/cloudbox.h   |  36 
 board/LaCie/cloudbox/kwbimage.cfg | 167 ++
 board/LaCie/common/common.c   |  13 ++-
 boards.cfg|   1 +
 include/configs/lacie_kw.h|  45 ++
 8 files changed, 388 insertions(+), 18 deletions(-)
 create mode 100644 board/LaCie/cloudbox/Makefile
 create mode 100644 board/LaCie/cloudbox/cloudbox.c
 create mode 100644 board/LaCie/cloudbox/cloudbox.h
 create mode 100644 board/LaCie/cloudbox/kwbimage.cfg

-- 
1.8.1.2

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


[U-Boot] [PATCH v3 1/3] lacie_kw: sort #ifdef lists by CONFIG_ identifiers

2013-07-01 Thread Frédéric Leroy
Signed-off-by: Frédéric Leroy 
---
 include/configs/lacie_kw.h | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h
index e2b3b21..cac616a 100644
--- a/include/configs/lacie_kw.h
+++ b/include/configs/lacie_kw.h
@@ -21,29 +21,29 @@
 /*
  * Machine number definition
  */
-#if defined(CONFIG_INETSPACE_V2)
+#if defined(CONFIG_D2NET_V2)
+#define CONFIG_MACH_TYPE   MACH_TYPE_D2NET_V2
+#define CONFIG_IDENT_STRING" D2 v2"
+#elif defined(CONFIG_INETSPACE_V2)
 #define CONFIG_MACH_TYPE   MACH_TYPE_INETSPACE_V2
 #define CONFIG_IDENT_STRING" IS v2"
-#elif defined(CONFIG_NETSPACE_V2)
-#define CONFIG_MACH_TYPE   MACH_TYPE_NETSPACE_V2
-#define CONFIG_IDENT_STRING" NS v2"
+#elif defined(CONFIG_NET2BIG_V2)
+#define CONFIG_MACH_TYPE   MACH_TYPE_NET2BIG_V2
+#define CONFIG_IDENT_STRING" 2Big v2"
 #elif defined(CONFIG_NETSPACE_LITE_V2)
 #define MACH_TYPE_NETSPACE_LITE_V2 2983 /* missing in mach-types.h */
 #define CONFIG_MACH_TYPE   MACH_TYPE_NETSPACE_LITE_V2
 #define CONFIG_IDENT_STRING" NS v2 Lite"
+#elif defined(CONFIG_NETSPACE_MAX_V2)
+#define CONFIG_MACH_TYPE   MACH_TYPE_NETSPACE_MAX_V2
+#define CONFIG_IDENT_STRING" NS Max v2"
 #elif defined(CONFIG_NETSPACE_MINI_V2)
 #define MACH_TYPE_NETSPACE_MINI_V2 2831 /* missing in mach-types.h */
 #define CONFIG_MACH_TYPE   MACH_TYPE_NETSPACE_MINI_V2
 #define CONFIG_IDENT_STRING" NS v2 Mini"
-#elif defined(CONFIG_NETSPACE_MAX_V2)
-#define CONFIG_MACH_TYPE   MACH_TYPE_NETSPACE_MAX_V2
-#define CONFIG_IDENT_STRING" NS Max v2"
-#elif defined(CONFIG_D2NET_V2)
-#define CONFIG_MACH_TYPE   MACH_TYPE_D2NET_V2
-#define CONFIG_IDENT_STRING" D2 v2"
-#elif defined(CONFIG_NET2BIG_V2)
-#define CONFIG_MACH_TYPE   MACH_TYPE_NET2BIG_V2
-#define CONFIG_IDENT_STRING" 2Big v2"
+#elif defined(CONFIG_NETSPACE_V2)
+#define CONFIG_MACH_TYPE   MACH_TYPE_NETSPACE_V2
+#define CONFIG_IDENT_STRING" NS v2"
 #else
 #error "Unknown board"
 #endif
-- 
1.8.1.2

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


[U-Boot] [PATCH v3 2/3] LaCie/common: Uses #defines for ethernet phy leds setup

2013-07-01 Thread Frédéric Leroy
The CloudBox device have a different ethernet phy setup than other ns2
devices.
Prepare source to use different init registers

Signed-off-by: Frédéric Leroy 
---
 board/LaCie/common/common.c | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/board/LaCie/common/common.c b/board/LaCie/common/common.c
index a62bf9f..85480e7 100644
--- a/board/LaCie/common/common.c
+++ b/board/LaCie/common/common.c
@@ -21,6 +21,12 @@
 #define MV88E1116_RGMII_TXTM_CTRL  (1 << 4)
 #define MV88E1116_RGMII_RXTM_CTRL  (1 << 5)
 
+#if !defined(MII_MARVELL_LED_REG)
+# define MII_MARVELL_LED_REG 16
+# define MII_MARVELL_LED_MASK 0xf0
+# define MII_MARVELL_LED_VALUE 0x0f
+#endif
+
 void mv_phy_88e1116_init(const char *name, u16 phyaddr)
 {
u16 reg;
@@ -53,9 +59,10 @@ void mv_phy_88e1318_init(const char *name, u16 phyaddr)
 * Set control mode 4 for LED[0].
 */
miiphy_write(name, phyaddr, MII_MARVELL_PHY_PAGE, 3);
-   miiphy_read(name, phyaddr, 16, ®);
-   reg |= 0xf;
-   miiphy_write(name, phyaddr, 16, reg);
+   miiphy_read(name, phyaddr, MII_MARVELL_LED_REG, ®);
+   reg &= MII_MARVELL_LED_MASK;
+   reg |= MII_MARVELL_LED_VALUE;
+   miiphy_write(name, phyaddr, MII_MARVELL_LED_REG, reg);
 
/*
 * Enable RGMII delay on Tx and Rx for CPU port
-- 
1.8.1.2

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


[U-Boot] [PATCH v3 3/3] arm: add support for LaCie CloudBox

2013-07-01 Thread Frédéric Leroy
The LaCie CloudBox device is a Kirkwood based nas :

- SoC: Marvell 88F6702 1000Mhz
- SDRAM memory: 256MB DDR2 400Mhz
- Gigabit ethernet: PHY Marvell 88E1318
- Flash memory: SPI NOR 512KB (Macronix MX25L4005A)
- 1 push button
- 1 reset switch
- 1 SATA port
- 1 LED (bi-color, blue and red)

Signed-off-by: Frédéric Leroy 
---
 MAINTAINERS   |   4 +
 board/LaCie/cloudbox/Makefile |  46 +++
 board/LaCie/cloudbox/cloudbox.c   |  94 +
 board/LaCie/cloudbox/cloudbox.h   |  36 
 board/LaCie/cloudbox/kwbimage.cfg | 167 ++
 boards.cfg|   1 +
 include/configs/lacie_kw.h|  21 -
 7 files changed, 366 insertions(+), 3 deletions(-)
 create mode 100644 board/LaCie/cloudbox/Makefile
 create mode 100644 board/LaCie/cloudbox/cloudbox.c
 create mode 100644 board/LaCie/cloudbox/cloudbox.h
 create mode 100644 board/LaCie/cloudbox/kwbimage.cfg

diff --git a/MAINTAINERS b/MAINTAINERS
index 3e70b03..9bf561d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -770,6 +770,10 @@ Sergey Lapin 
 
afeb9260ARM926EJS (AT91SAM9260 SoC)
 
+Frederic Leroy 
+
+   cloudboxARM926EJS (Kirkwood SoC)
+
 Valentin Longchamp 
 
km_kirkwood ARM926EJS (Kirkwood SoC)
diff --git a/board/LaCie/cloudbox/Makefile b/board/LaCie/cloudbox/Makefile
new file mode 100644
index 000..d656951
--- /dev/null
+++ b/board/LaCie/cloudbox/Makefile
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2013 Frederic Leroy 
+#
+# Based on Kirkwood support:
+# (C) Copyright 2009
+# Marvell Semiconductor 
+# Written-by: Prafulla Wadaskar 
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+
+include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := $(BOARD).o ../common/common.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/LaCie/cloudbox/cloudbox.c b/board/LaCie/cloudbox/cloudbox.c
new file mode 100644
index 000..51b1f96
--- /dev/null
+++ b/board/LaCie/cloudbox/cloudbox.c
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2013 Frederic Leroy 
+ *
+ * Based on Kirkwood support:
+ * (C) Copyright 2009
+ * Marvell Semiconductor 
+ * Written-by: Prafulla Wadaskar 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "cloudbox.h"
+#include "../common/common.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f(void)
+{
+   /* Gpio configuration */
+   kw_config_gpio(CLOUDBOX_OE_VAL_LOW, CLOUDBOX_OE_VAL_HIGH,
+  CLOUDBOX_OE_LOW, CLOUDBOX_OE_HIGH);
+
+   /* Multi-Purpose Pins Functionality configuration */
+   static const u32 kwmpp_config[] = {
+   MPP0_SPI_SCn,
+   MPP1_SPI_MOSI,
+   MPP2_SPI_SCK,
+   MPP3_SPI_MISO,
+   MPP4_GPIO, /* hard disk power */
+   MPP6_SYSRST_OUTn,
+   MPP8_TW_SDA,
+   MPP9_TW_SCK,
+   MPP10_UART0_TXD,
+   MPP11_UART0_RXD,
+   MPP14_GPIO, /* LED red control */
+   MPP15_SATA0_ACTn, /* LED blue control */
+   MPP16_GPIO, /* power push buton */
+   MPP17_GPIO, /* board power off */
+   MPP20_GPIO, /* Ethernet PHY interrupt (WoL) */
+   0
+   };
+   kirkwood_mpp_conf(kwmpp_config, NULL);
+
+   return 0;
+}
+
+int board_init

Re: [U-Boot] U-boot-2012.04 compilation for qemu-mips board

2013-07-01 Thread Wolfgang Denk
Dear krishna dwivedi,

please stop top posting / full quoting.

In message  
you wrote:
>
> I knew i have to run make qemu_mips_config before make allI am using ELDK
> 5.3 toolchain and compiling u-boot recipe came as a part of ELDK..But in
> yocto environment,we use bitbake instead of make.I already tried make:
> [unknown@h229 build]$ make qemu_mips_config
> make: *** No rule to make target `qemu_mips_config'.  Stop.
> 
> I guess i need command analogous to make qemu_mips_config to run before
> bitbake u-boot.

No.  You must make sure that your u-boot recipe contains the correct
commands to run make qemu_mips_config first.

But this is actually a bitbake / Yocto issue, and as such off topic
here.

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
Quantum Mechanics is God's version of "Trust me."
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] compiled failed when turned off gcc optimazition

2013-07-01 Thread Wolfgang Denk
Dear tiger...@viatech.com.cn,

please do not top post / full quote.

In message  you 
wrote:
>
> During debug u-boot with JTAG tools, maybe turning off optimizations was 
> recommended.

Many people recommend many things. Even strange or non-working or
incorrect or dangerous ones.

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
There's no future in time travel.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-boot2013:07-Recompile with -fPIC error for mips64 board

2013-07-01 Thread Amit Virdi

Krishna,

On 7/1/2013 4:15 PM, krishna dwivedi wrote:

Hi Wolfgang,

Can you please let me know on which mips board you have compiled this
u-boot now.



Please understand that the u-boot community supports only those 
platforms whose support has been mainlined. If you are making changes to 
the u-boot for your custom board, then the community may not be of much 
help. For your case, you must contact your hardware provider (Cavium or 
whatever it is).


You can see all the MIPS boards supported by the community by looking at 
boards.cfg file.


And please follow the community rules strictly (such as avoiding top 
posting etc.) if you want a genuine response. Otherwise, your messages 
would be considered simply as noise and no one would bother to respond.


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


Re: [U-Boot] U-boot2013:07-Recompile with -fPIC error for mips64 board

2013-07-01 Thread krishna dwivedi
Hi Amit,

Sure.But i am trying to compile U-boot for default board qemu-mips without
any changes  that is supported in boards.cfg.

Regards,
Krishna




On Mon, Jul 1, 2013 at 4:24 PM, Amit Virdi  wrote:

> Krishna,
>
>
> On 7/1/2013 4:15 PM, krishna dwivedi wrote:
>
>> Hi Wolfgang,
>>
>> Can you please let me know on which mips board you have compiled this
>> u-boot now.
>>
>>
> Please understand that the u-boot community supports only those platforms
> whose support has been mainlined. If you are making changes to the u-boot
> for your custom board, then the community may not be of much help. For your
> case, you must contact your hardware provider (Cavium or whatever it is).
>
> You can see all the MIPS boards supported by the community by looking at
> boards.cfg file.
>
> And please follow the community rules strictly (such as avoiding top
> posting etc.) if you want a genuine response. Otherwise, your messages
> would be considered simply as noise and no one would bother to respond.
>
> Regards
> Amit Virdi
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC] [UBOOT] [PATCH v2 0/4] DWC back port from Linux kernel

2013-07-01 Thread Marek Vasut
Dear Dan Murphy,

> This patch series has been generated in an effort to get comments on
> the implementation of the dwc code within the uBoot.
> 
> V2 incorporates comments to first port the kernel header backward to uBoot
> and then produce the uBoot changes so the uBoot changes are easily
> distinguishable from the original kernel source.
> 
> The first patch is the one of major concern as this patch will make an
> attempt to commonize the usb headers so that there is re-use and prepare
> the usb headers for future usb code back ports from the linux kernel.
> 
> This code will compile for omap5 and omap4 but fails for am335x.
> Before I invest anymore time in this I would like to understand if there
> are any comments on the overall implemenation.

Ok, the code is nicely contained and can be easily resynced with mainline. 
Please continue and sorry for the long delay.

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


Re: [U-Boot] [RFC] [UBOOT] [PATCH v2 2/4] USB: Adapt the usb-compat.h to uboot and fix compiler errors

2013-07-01 Thread Marek Vasut
Dear Dan Murphy,

> Adapt the usb-compat.h to uBoot.
> 
> Use #ifndef __UBOOT__ for code that is not applicable to uBoot.
> Use #ifdef __UBOOT__ to add code that is uBoot specific.
> 
> Create linux-compat.h - Linux kernel compatibility definitions that do not
> exist in the uBoot.  Moved the compatibility definitions from
> lin_gadget_compat.h to this file as well.
> 
> Create usb-mod-devicetable.h - Is a partial back port of mod_devicetable.h
> in the linux kernel only taking the portion needed for USB
> 
> Already existing header files were modified to pick up the new header
> files.
> 
> Currently musb will not compile.
> 
> Signed-off-by: Dan Murphy 
> ---
>  drivers/usb/musb-new/musb_host.h|1 +
>  drivers/usb/musb-new/usb-compat.h   |   30 
>  include/linux/usb/gadget.h  |  184 +++-
>  include/linux/usb/linux-compat.h|  234
> +++ include/linux/usb/usb-compat.h  | 
> 186 +--- include/linux/usb/usb-mod-devicetable.h | 
> 131 +
>  include/usb.h   |  119 +---
>  include/usb/lin_gadget_compat.h |   29 +---
>  8 files changed, 685 insertions(+), 229 deletions(-)
>  create mode 100644 include/linux/usb/linux-compat.h
>  create mode 100644 include/linux/usb/usb-mod-devicetable.h

Did you actually compile-test this so it doesn't break any USB gadgets?

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


Re: [U-Boot] [PATCH v2] blackfin: Fix using gd->baudrate before setting its value

2013-07-01 Thread Sonic Zhang
Acked-by: Sonic Zhang

On Mon, Jul 1, 2013 at 1:16 PM, Axel Lin  wrote:
> Current code uses gd->baudrate before setting its value.
> Besides, I got below build warning which is introduced by
> commit ddb5c5be "blackfin: add baudrate to bdinfo".
>
> board.c:235:3: warning: passing argument 1 of 'simple_strtoul' makes pointer 
> from integer without a cast [enabled by default]
> include/vsprintf.h:27:7: note: expected 'const char *' but argument is of 
> type 'unsigned int'
>
> This patch ensures we get the baudrate setting before using it.
>
> Signed-off-by: Axel Lin 
> ---
> v2: The change is based on Sonic 's suggestion:
> move "gd->bd->bi_baudrate = gd->baudrate;" into init_baudrate()
>
>  arch/blackfin/lib/board.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
> index f1d5547..460c97d 100644
> --- a/arch/blackfin/lib/board.c
> +++ b/arch/blackfin/lib/board.c
> @@ -63,6 +63,7 @@ static int display_banner(void)
>  static int init_baudrate(void)
>  {
> gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
> +   gd->bd->bi_baudrate = gd->baudrate;
> return 0;
>  }
>
> @@ -231,8 +232,6 @@ static int global_board_data_init(void)
> bd->bi_sclk = get_sclk();
> bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
> bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
> -   bd->bi_baudrate = (gd->baudrate > 0)
> -   ? simple_strtoul(gd->baudrate, NULL, 10) : CONFIG_BAUDRATE;
>
> return 0;
>  }
> --
> 1.8.1.2
>
>
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] socfpga: Consolidating reset code into reset_manager.c. Also separating reset configuration for virtual target and real hardware Cyclone V development kit

2013-07-01 Thread Pavel Machek
Hi!

> > > @@ -21,6 +21,7 @@
> > >  void reset_cpu(ulong addr);
> > >  void reset_deassert_peripherals_handoff(void);
> > > 
> > > +#if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET)
> > >  struct socfpga_reset_manager {
> > >  u32padding1;
> > >  u32ctrl;
> > > @@ -31,7 +32,23 @@ struct socfpga_reset_manager {
> > >  u32per2_mod_reset;
> > >  u32brg_mod_reset;
> > >  };
> > > +#else
> > > +struct socfpga_reset_manager {
> > > +u32status;
> > > +u32ctrl;
> > > +u32counts;
> > > +u32padding1;
> > > +u32mpu_mod_reset;
> > > +u32per_mod_reset;
> > > +u32per2_mod_reset;
> > > +u32brg_mod_reset;
> > > +};
> > > +#endif
> > > 
> > 
> > Is it really needed to have two definitions of the struct? AFAICT,
> > structures are same, except that some padding fields have names on
> > real hardware. Thus, if we simply use "real-hardware" version on the
> > emulator, it should work. Perhaps with some comments "this is not
> > emulated on virtual target"...?
> 
> We decided to leave the Virtual Platform code support within existing
> code. We need to do that as we have some discrepancy between the real
> hardware and the virtual platform. But this is only applicable for
> Altera specific IP. :)

That is okay... But notice that structure is same on both real
hardware and virtual platform... (Just some fields have "paddingX"
instead of name on virtual platform). If you remove the #ifdef it will
work just fine.

(You could add /* this is unimplemented on virtual platform */, or
maybe even per-field ifdef. It will still be more readable.)

Thanks,
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-boot2013:07-Recompile with -fPIC error for mips64 board

2013-07-01 Thread krishna dwivedi
Hi Wolfgang,

Can you please let me know on which mips board you have compiled this
u-boot now.

Regards,
Krishna


On Mon, Jul 1, 2013 at 3:28 PM, Wolfgang Denk  wrote:

> Dear krishna dwivedi,
>
> please don't top post / full quote!!
>
> In message  m1evpjpkmmib0yvnmvqjnca5wznv...@mail.gmail.com> you wrote:
> >
> > Can you please reply on this.
>
> I can reply, but I cannot help you.
>
> > > I am using xlp832 mips64  netlogic board.I referred these steps from
> > > u-boot README file.
> > > Configuration:
> > > TARGET  archCPU
> > > BoardName
> > > brcm8xx  mipsmips64  brcm8xx
> > > -  -
> > > Options
> > > brcm8xx:SYS_BIG_ENDIAN
>
> This board is not part of the mainline distribution, so we have never
> seen the actual code for it.  we cannot help you with unknown
> out-of-tree code.  Also, you don't follow the recommended way to build
> the code, as I've pointed out before.
>
> With out-of-tree code you're basically on your own.
>
> 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
> That said, there may be good reasons for what you did beyond obsequi-
> ous sycophantic parody. Perhaps you might be so kind as to elucidate.
>  -- Tom Christiansen in <5ldjbm$jtk$1...@csnews.cs.colorado.edu>
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/1] socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V

2013-07-01 Thread Pavel Machek
On Fri 2013-06-28 16:20:48, Chin Liang See wrote:
> socfpga: Adding System Manager driver which will
>  configure the pin mux for real hardware Cyclone V 
>  development kit (not Virtual Platform)
> 
> Signed-off-by: Chin Liang See 


> +DECLARE_GLOBAL_DATA_PTR;
> +
> +/*
> + * Configure all the pin mux
> + */

As noted before, I'm not sure this is correct english. Otherwise,
patch looks good to me.

Reviewed-by: Pavel Machek 
Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V

2013-07-01 Thread Pavel Machek
Hi!

> > > --- /dev/null
> > > +++ b/board/altera/socfpga_cyclone5/pinmux_config.c
> > > @@ -0,0 +1,213 @@
> > > +
> > > +#include "pinmux_config.h"
> > > +
> > > +/* pin mux configuration data */
> > > +unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = {
> > > +   0, /* EMACIO0 - Unused */
> > > +   2, /* EMACIO1 - USB */
> > > +   2, /* EMACIO2 - USB */
> > > +   2, /* EMACIO3 - USB */
> > 
> > Is this table auto-generated somehow?
> > 
> > If so, comment about that would be nice.
> > 
> > If not, perhaps we could put more than one entry on line, to make it
> > shorter?
> 
> Yup, its auto generated by tools.
> I will put comment to note this.

Thanks!

You can add Reviewed-by: Pavel Machek  on the next
version.

In future, would it make sense to separate auto-generated and manual
parts? It might be good to have something like pinmux_config.i file
with just inner part of the table...

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] exynos5250: move board specific configs to board specific config file

2013-07-01 Thread Inderpal Singh
Hi Simon,


On 28 June 2013 21:20, Simon Glass  wrote:

> Hi Inderpal,
>
> On Thu, Jun 20, 2013 at 12:10 AM, Inderpal Singh <
> inderpal.si...@linaro.org> wrote:
>
>> Hi Simon,
>>
>> Thanks for review.
>>
>>
>> On 11 June 2013 19:57, Simon Glass  wrote:
>>
>>> Hi,
>>>
>>> On Fri, Jun 7, 2013 at 4:56 AM, Inderpal Singh <
>>> inderpal.si...@linaro.org> wrote:
>>>
 Not all boards based on exynos5250 have SPI flash, same serial port and
 might
 not require display and the same lds script. Hence move them to board
 specific
 config file.

>>>
>>> At least for the serial port this should be controlled by the device
>>> tree. There are quite a lot of pending patches for exynos, one of which
>>> enables this and removes the need for the CONFIG_SERIAL3 define.
>>>
>>> If you want to have a look, I pushed them to:
>>>
>>> http://git.denx.de/u-boot-x86.git in branch 'snow'
>>>
>>
>> I was not aware of this patchset. Thanks for pointing out. I will update
>> my patchset to use DT for serial.
>>
>>
>>>

 Signed-off-by: Inderpal Singh 
 ---
 v1 was posted as the second patch of [1]

 Changes in v2:
 - split from the patchset at [1]
 - moved CONFIG_LCD and CONFIG_SPI_FLASH
 - rebased to latest u-boot-samsung master branch

 [1] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/157101

  include/configs/exynos5250-dt.h |   11 +--
  include/configs/smdk5250.h  |   16 ++--
  include/configs/snow.h  |   16 ++--
  3 files changed, 29 insertions(+), 14 deletions(-)

 diff --git a/include/configs/exynos5250-dt.h
 b/include/configs/exynos5250-dt.h
 index 03b07b2..22e47eb 100644
 --- a/include/configs/exynos5250-dt.h
 +++ b/include/configs/exynos5250-dt.h
 @@ -29,7 +29,6 @@
  #define CONFIG_SAMSUNG /* in a SAMSUNG core */
  #define CONFIG_S5P /* S5P Family */
  #define CONFIG_EXYNOS5 /* which is in a Exynos5 Family
 */
 -#define CONFIG_SMDK5250/* which is in a
 SMDK5250 */

>>>
>>> This is a misnomer - it actually means Exynos 5250 I think. The only
>>> thing it controls is the generation of the SPL packaging tool. So for now
>>> it should be defined for all Exynos5250 boards.
>>>
>>
>> Yes its a misnomer. I will change the name to CONFIG_EXYNOS5250.
>>
>
> Sounds good.
>
>
>>
>>
>>>
>>>

  #include   /* get chip and board defs */

 @@ -78,7 +77,6 @@
  #define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + (4 << 20))

  /* select serial console configuration */
 -#define CONFIG_SERIAL3 /* use SERIAL 3 */
  #define CONFIG_BAUDRATE115200
  #define EXYNOS5_DEFAULT_UART_OFFSET0x01

 @@ -148,8 +146,6 @@
  #define CONFIG_SPL
  #define COPY_BL2_FNPTR_ADDR0x02020030

 -/* specific .lds file */
 -#define CONFIG_SPL_LDSCRIPT
  "board/samsung/smdk5250/smdk5250-uboot-spl.lds"

>>>
>>> Again I suspect this is a misnomer.
>>>
>>
>>  Since all boards might not need this lds file, so how about moving lds
>> file to board/samsung/common and renaming it to exynos5250-uboot-spl.lds.
>> The boards needing this will have to include in their respective config
>> files.
>> Let me know your opinion.
>>
>
> OK, so long has you know of boards that don't need it?
>
>
>>
>>
>>>
>>>
  #define CONFIG_SPL_TEXT_BASE   0x02023400
  #define CONFIG_SPL_MAX_FOOTPRINT   (14 * 1024)

 @@ -158,7 +154,7 @@
  /* Miscellaneous configurable options */
  #define CONFIG_SYS_LONGHELP/* undef to save memory */
  #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser
  */
 -#define CONFIG_SYS_PROMPT  "SMDK5250 # "
 +#define CONFIG_SYS_PROMPT  "EXYNOS5250 # "
  #define CONFIG_SYS_CBSIZE  256 /* Console I/O Buffer
 Size */
  #define CONFIG_SYS_PBSIZE  384 /* Print Buffer Size */
  #define CONFIG_SYS_MAXARGS 16  /* max number of
 command args */
 @@ -198,7 +194,6 @@
  /* FLASH and environment organization */
  #define CONFIG_SYS_NO_FLASH
  #undef CONFIG_CMD_IMLS
 -#define CONFIG_IDENT_STRING" for SMDK5250"

  #define CONFIG_SYS_MMC_ENV_DEV 0

 @@ -247,9 +242,6 @@
  #define CONFIG_I2C_EDID

  /* SPI */
 -#define CONFIG_ENV_IS_IN_SPI_FLASH
 -#define CONFIG_SPI_FLASH
 -
  #ifdef CONFIG_SPI_FLASH
  #define CONFIG_EXYNOS_SPI
  #define CONFIG_CMD_SF
 @@ -306,7 +298,6 @@
  #define CONFIG_SHA256

  /* Display */
 -#define CONFIG_LCD
  #ifdef CONFIG_LCD
  #define CONFIG_EXYNOS_FB
  #define CONFIG_EXYNOS_DP
 diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h

Re: [U-Boot] [PATCH 0/4 V2] EXYNOS: Convert Assembly code to c and make it common

2013-07-01 Thread Rajeshwari Birje
Hi Minkyu Kang,

Can we please get this merged soon after your review as it is effort
to rebase and test this each time.

On Mon, Jul 1, 2013 at 3:32 PM, Rajeshwari Shinde
 wrote:
> Convert the assembly code in board/samsung to c and move the same to arch/arm.
> lds file made common across SMDKV310, Origen and SMDK5250.
> Add the power reset and exit wakeup api for exynos.
> Initialise GPIO for uart in Origen and SMDKV310 using pinmux.
>
> Changes in V2:
> - Rebased on latest u-boot-samsung tree.
> - Incorporated review comments from Simon glass and
> Minkyu Kang.
>
> Rajeshwari Shinde (4):
>   EXYNOS: Add API for power reset and exit wakeup
>   EXYNOS: LDS file move to common
>   EXYNOS4210: Configure GPIO for uart
>   EXYNOS: Move files from board/samsung to arch/arm.
>
>  arch/arm/cpu/armv7/exynos/Makefile |   17 +-
>  .../arm/cpu/armv7/exynos}/clock_init.h |0
>  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   94 +
>  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   27 +-
>  arch/arm/cpu/armv7/exynos/common_setup.h   |   43 ++
>  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
>  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   17 +-
>  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  295 ++
>  .../arm/cpu/armv7/exynos/exynos4_setup.h   |   97 +-
>  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   28 +-
>  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   72 
>  arch/arm/cpu/armv7/exynos/pinmux.c |   40 ++
>  arch/arm/cpu/armv7/exynos/power.c  |   50 +++
>  .../arm/cpu/armv7/exynos}/spl_boot.c   |   77 +++-
>  arch/arm/include/asm/arch-exynos/power.h   |   12 +
>  .../exynos-uboot-spl.lds}  |0
>  board/samsung/origen/Makefile  |   11 +-
>  board/samsung/origen/lowlevel_init.S   |  357 -
>  board/samsung/origen/mem_setup.S   |  421 
> 
>  board/samsung/origen/mmc_boot.c|   58 ---
>  board/samsung/origen/origen.c  |   46 +++
>  board/samsung/smdk5250/Makefile|   14 +-
>  board/samsung/smdkv310/Makefile|   10 +-
>  board/samsung/smdkv310/lowlevel_init.S |  414 ---
>  board/samsung/smdkv310/mem_setup.S |  365 -
>  board/samsung/smdkv310/mmc_boot.c  |   60 ---
>  board/samsung/smdkv310/smdkv310.c  |   46 +++
>  include/configs/exynos5250-dt.h|   10 +-
>  include/configs/origen.h   |   10 +-
>  include/configs/smdkv310.h |9 +-
>  30 files changed, 940 insertions(+), 1767 deletions(-)
>  rename {board/samsung/smdk5250 => arch/arm/cpu/armv7/exynos}/clock_init.h 
> (100%)
>  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
>  rename board/samsung/smdk5250/clock_init.c => 
> arch/arm/cpu/armv7/exynos/clock_init_exynos5.c (97%)
>  create mode 100644 arch/arm/cpu/armv7/exynos/common_setup.h
>  rename {board/samsung/smdk5250 => arch/arm/cpu/armv7/exynos}/dmc_common.c 
> (97%)
>  rename {board/samsung/smdk5250 => arch/arm/cpu/armv7/exynos}/dmc_init_ddr3.c 
> (96%)
>  create mode 100644 arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c
>  rename board/samsung/origen/origen_setup.h => 
> arch/arm/cpu/armv7/exynos/exynos4_setup.h (86%)
>  rename board/samsung/smdk5250/setup.h => 
> arch/arm/cpu/armv7/exynos/exynos5_setup.h (96%)
>  create mode 100644 arch/arm/cpu/armv7/exynos/lowlevel_init.c
>  rename {board/samsung/smdk5250 => arch/arm/cpu/armv7/exynos}/spl_boot.c (73%)
>  rename board/samsung/{smdk5250/smdk5250-uboot-spl.lds => 
> common/exynos-uboot-spl.lds} (100%)
>  delete mode 100644 board/samsung/origen/lowlevel_init.S
>  delete mode 100644 board/samsung/origen/mem_setup.S
>  delete mode 100644 board/samsung/origen/mmc_boot.c
>  delete mode 100644 board/samsung/smdkv310/lowlevel_init.S
>  delete mode 100644 board/samsung/smdkv310/mem_setup.S
>  delete mode 100644 board/samsung/smdkv310/mmc_boot.c
>
> --
> 1.7.4.4
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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


Re: [U-Boot] U-boot-2012.04 compilation for qemu-mips board

2013-07-01 Thread krishna dwivedi
Hi Wolfgang,

I knew i have to run make qemu_mips_config before make allI am using ELDK
5.3 toolchain and compiling u-boot recipe came as a part of ELDK..But in
yocto environment,we use bitbake instead of make.I already tried make:
[unknown@h229 build]$ make qemu_mips_config
make: *** No rule to make target `qemu_mips_config'.  Stop.

I guess i need command analogous to make qemu_mips_config to run before
bitbake u-boot.

Regards,
Krishna


On Mon, Jul 1, 2013 at 3:31 PM, Wolfgang Denk  wrote:

> Dear krishna dwivedi,
>
> In message  x3c0...@mail.gmail.com> you wrote:
> >
> > Board Configuration:
> >
> > TargetArch CPU
> > BoardName
> > qemu_mipsmipsmips32  qemu-mips
>
> This builds fine for me:
>
> + MAKEALL_LOGDIR=/work/wd/tmp-mips-LOG
> + BUILD_DIR=/work/wd/tmp-mips
> + ./MAKEALL qemu_mips
> Configuring for qemu_mips - Board: qemu-mips, Options: SYS_BIG_ENDIAN
>textdata bss dec hex filename
>  2055207482  217512  430514   691b2 /work/wd/tmp-mips/u-boot
>
> - SUMMARY 
> Boards compiled: 1
> --
>
> > While bitbake u-boot:
> >
> > Log data follows:
> > | DEBUG: Executing shell function do_compile
> > | NOTE: make -j 4 CROSS_COMPILE=mips-poky-linux- CC=mips-poky-linux-gcc
> > --sysroot=/home/netlogic/eldk/build/tmp/sysroots/qemumips all
> > | awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }'
> > boards.cfg > .boards.depend
> > | System not configured - see README
> > | make: *** [all] Error 1
> > | ERROR: oe_runmake failed
> >
> > Anyone please let me know what could be issue here.
>
> You must run "make qemu_mips_config" before you can run "make all".
>
> 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 fundamental principle of  science,  the  definition  almost,  is
> this: the sole test of the validity of any idea is experiment."
> - Richard P. Feynman
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] compiled failed when turned off gcc optimazition

2013-07-01 Thread TigerLiu
Hi, Denk:
During debug u-boot with JTAG tools, maybe turning off optimizations was 
recommended.

Best wishes,
-邮件原件-
发件人: Wolfgang Denk [mailto:w...@denx.de] 
发送时间: 2013年7月1日 18:03
收件人: Tiger Liu
抄送: u-boot@lists.denx.de
主题: Re: [U-Boot] compiled failed when turned off gcc optimazition

Dear tiger...@viatech.com.cn,

In message  you 
wrote:
>
> I tried to turn off gcc optimazition by changing config.mk file:
> OPTFLAGS= -O0 #-fomit-frame-pointer
> 
> But failed to compile u-boot, it tipped:

Don't do it, then.

Q: why would you want to switch off optimization?  That's almost
always a bad idea...

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
I have made mistakes, but have never made the mistake of  claiming  I
never made one. - James G. Bennet
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] compiled failed when turned off gcc optimazition

2013-07-01 Thread Wolfgang Denk
Dear tiger...@viatech.com.cn,

In message  you 
wrote:
>
> I tried to turn off gcc optimazition by changing config.mk file:
> OPTFLAGS= -O0 #-fomit-frame-pointer
> 
> But failed to compile u-boot, it tipped:

Don't do it, then.

Q: why would you want to switch off optimization?  That's almost
always a bad idea...

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
I have made mistakes, but have never made the mistake of  claiming  I
never made one. - James G. Bennet
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


  1   2   >