Re: [U-Boot] [PATCH V2 2/5] omap-common: add nand spl support

2011-07-28 Thread Aneesh V
Dear Simon, Andreas,

On Tuesday 26 July 2011 02:12 PM, Simon Schwarz wrote:
 Dear Andreas,

 On 07/26/2011 08:07 AM, Andreas Bießmann wrote:
 Dear Simon,

 Am 25.07.2011 um 20:05 schrieb Simon Schwarz:

 Add NAND support for the new SPL structure.

 ---
 This patch didn't exist before V2!

 V2 changes:
 ADD Some define-barriers for OMAP3 to only use NAND
 ADD nand_load_image() - inits the OMAP gpmc, loads the images - parses the
 header
 CHG cosmetic
 ADD do_reset() implementation for omap-common spl
 ADD nand_copy_image to nand.h
 ADD CPP barriers for mmc and nand support. The parts depending on library
 support are only compiled if the respective library is included.

 Transition from V1 to V2 also includes that this patch is now based on
 - the new SPL layout by Aneesh V and Daniel Schwierzeck
 - the OMAP4 SPL patches by Aneesh V

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com
 ---
 arch/arm/cpu/armv7/omap-common/spl.c |   43 
 ++
 arch/arm/include/asm/omap_common.h   |2 +
 include/nand.h   |3 ++
 3 files changed, 48 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
 b/arch/arm/cpu/armv7/omap-common/spl.c
 index d177652..3a0093d 100644
 --- a/arch/arm/cpu/armv7/omap-common/spl.c
 +++ b/arch/arm/cpu/armv7/omap-common/spl.c
 @@ -26,6 +26,7 @@
 #includeasm/u-boot.h
 #includeasm/utils.h
 #includeasm/arch/sys_proto.h
 +#includenand.h
 #includemmc.h
 #includefat.h
 #includetimestamp_autogenerated.h
 @@ -107,6 +108,7 @@ static void parse_image_header(const struct 
 image_header *header)
 }
 }

 +#ifdef CONFIG_SPL_MMC_SUPPORT
 static void mmc_load_image_raw(struct mmc *mmc)
 {
 u32 image_size_sectors, err;
 @@ -140,7 +142,9 @@ end:
 hang();
 }
 }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */

 +#ifdef CONFIG_SPL_MMC_SUPPORT
 static void mmc_load_image_fat(struct mmc *mmc)
 {
 s32 err;
 @@ -173,7 +177,9 @@ end:
 hang();
 }
 }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */

 +#ifdef CONFIG_SPL_MMC_SUPPORT
 static void mmc_load_image(void)
 {
 struct mmc *mmc;
 @@ -206,6 +212,26 @@ static void mmc_load_image(void)
 hang();
 }
 }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */
 +
 +#ifdef CONFIG_SPL_NAND_SUPPORT
 +static void nand_load_image(void)
 +{
 +   gpmc_init();
 +   nand_init();
 +   nand_copy_image(CONFIG_SYS_NAND_U_BOOT_OFFS, 
 CONFIG_SYS_NAND_U_BOOT_SIZE,
 +   (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
 +#ifdef CONFIG_NAND_ENV_DST
 +   nand_copy_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
 +   (uchar *)CONFIG_NAND_ENV_DST);
 +#ifdef CONFIG_ENV_OFFSET_REDUND
 +   nand_copy_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
 +   (uchar *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
 +#endif
 +#endif
 +   parse_image_header((struct image_header *)CONFIG_SYS_NAND_U_BOOT_DST);
 +}
 +#endif /* CONFIG_SPL_NAND_SUPPORT */

 void jump_to_image_no_args(void)
 {
 @@ -228,10 +254,17 @@ void board_init_r(gd_t *id, ulong dummy)
 boot_device = omap_boot_device();
 debug(boot device - %d\n, boot_device);
 switch (boot_device) {
 +#ifdef CONFIG_SPL_MMC_SUPPORT
 case BOOT_DEVICE_MMC1:
 case BOOT_DEVICE_MMC2:
 mmc_load_image();
 break;
 +#endif
 +#ifdef CONFIG_SPL_NAND_SUPPORT
 +   case BOOT_DEVICE_NAND:
 +   nand_load_image();
 +   break;
 +#endif
 default:
 printf(SPL: Un-supported Boot Device - %d!!!\n, boot_device);
 hang();
 @@ -259,7 +292,9 @@ void preloader_console_init(void)
 gd-flags |= GD_FLG_RELOC;
 gd-baudrate = CONFIG_BAUDRATE;

 +#ifndef CONFIG_OMAP34XX

 Well .. that was discussed with Aneesh in another mail. I prefer Aneesh 
 decides how the interface should be:
a) OMAP3 provides setup_clocks_for_console() and remove the UART stuff 
 from per_clocks_enable()
b) remove setup_clocks_for_console() here and require 
 preloader_console_init() to have the clocks enabled before

 Totally agree. I just wait for a reply by Aneesh and will change it.

I am fine with either. (a) will allow us to have a debug traces in
prcm_init()(only for SPL) and also print SPL banner a little earlier.
I leave it to active OMAP3 users to decide this.

If you want to go with (b) please do it as below (my patches are
already in u-boot-arm, it will be good if you could do this in your
patch).

---
diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
b/arch/arm/cpu/armv7/omap-common/spl.c
index d177652..d380b3e 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -259,7 +259,6 @@ void preloader_console_init(void)
gd-flags |= GD_FLG_RELOC;
gd-baudrate = CONFIG_BAUDRATE;

-   setup_clocks_for_console();
serial_init();  /* serial communications setup */

/* Avoid a second U-Boot coming from this string */
diff --git a/arch/arm/cpu/armv7/omap4/board.c 
b/arch/arm/cpu/armv7/omap4/board.c
index 

Re: [U-Boot] [PATCH] mx53: use CONFIG_SYS_L2CACHE_OFF in config file

2011-07-28 Thread Stefano Babic
On 07/28/2011 07:56 AM, Jason Liu wrote:
 Hi, Stefano,

Hi Jason,


 It's used before, if you checkout tag: v2011.06

 #ifndef CONFIG_L2_OFF
/* turn off L2 cache */
l2_cache_disable();
/* invalidate L2 cache also */
invalidate_dcache(get_device_type());
 #endif
i = 0;
/* mem barrier to sync up things */
asm(mcr p15, 0, %0, c7, c10, 4: :r(i));

 #ifndef CONFIG_L2_OFF
l2_cache_enable();
 #endif

However, as far as I can understand, L2 cache is disabled until
explicitely enabled.



 I still think we need explicitly disable L2 cache first

I am still checking this point. My concern is to understand if in the
current code we need to do something or not. If there is no code to
enable L2 cache (I have not found), there should be no need to disable
it. After a reset, L2 cache is disabled, am I right ?
Why do you think we have to explicitely disable it ? Am I missing
something ?

. If it only
 omap related, I don't think we need
 CONFIG_SYS_L2CACHE_OFF for the global u-boot. If you grep the
 CONFIG_SYS_L2CACHE_OFF
 under include/configs, you will see a lot of define other than omap platform.

Nevertheless we have to decide if we need it for the MX5. If we manage
enable/disable L2 Cache for the MX5, we need it, else not. As I can see
in the actual code, we do not manage L2 Cache.

 It's due to it enable dcache by default if not define
 CONFIG_SYS_DCACHE_OFF explicitly.
 mxc_fec driver need be fixed or re-write to consider cache safe. I
 agree to disable d-cache first.
 
 Do I need submit patch to disable D-CACHE first?

let's see if we agree on the following points:

- CONFIG_L2_OFF is obsolete, as you pointed out, and must be removed

- CONFIG_SYS_L2CACHE_OFF is needed for MX5 if we have code to enable /
disable it. Let me know if you agree that L2 cache is disabled after a
reset. Then we do not need this define until we explicitely enable it as
default, as now for D cache.

- because of D Cache issues in the driver, it is better to disable D
Cache for MX5 processors.

I think, if we agree on these point, we can manage the changes in a
single patch (changes are made on the same files, that is the
configuration file for the boards), and it is enough to add a useful
comment to explain what we do.

  And another issue
 for imx51 is that
 mmc command does not work correctly sometimes such as saveenv. Do you
 notice that?

I admit I have not tested recently and I have not noted this issue. Last
time was after some changes in MMC code.

I am sure we get the same issues for D Cache as for the FEC. In fact,
for powerpc the fsl_esdhc.c enables cache snooping and does not need to
invalidate buffers. We have no counterpart for MX5.

Best regards,
Stefano Babic

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


[U-Boot] [PATCH 1/2] SMDKV310: MMC SPL: Remove unwanted dummy functions

2011-07-28 Thread Chander Kashyap
Removed dummy functions in mmc_spl/board/samsung/smdkv310/mmc_boot.c,
@mmc_boot.c
void do_undefined_instruction(struct pt_regs *pt_regs);
void do_software_interrupt(struct pt_regs *pt_regs);
void do_prefetch_abort(struct pt_regs *pt_regs);
void do_data_abort(struct pt_regs *pt_regs);
void do_not_used(struct pt_regs *pt_regs);
void do_fiq(struct pt_regs *pt_regs);
void do_irq(struct pt_regs *pt_regs);

not required as called conditionally in start.S
@start.S
\#ifdef CONFIG_SPL_BUILD
_undefined_instruction: .word _undefined_instruction
_software_interrupt:.word _software_interrupt
_prefetch_abort:.word _prefetch_abort
_data_abort:.word _data_abort
_not_used:  .word _not_used
_irq:   .word _irq
_fiq:   .word _fiq
_pad:   .word 0x12345678 /* now 16*4=64 */
\#else
_undefined_instruction: .word undefined_instruction
_software_interrupt:.word software_interrupt
_prefetch_abort:.word prefetch_abort
_data_abort:.word data_abort
_not_used:  .word not_used
_irq:   .word irq
_fiq:   .word fiq
_pad:   .word 0x12345678 /* now 16*4=64 */
\#endif
e.g.
undefined_instruction:
get_bad_stack
bad_save_user_regs
bl  do_undefined_instruction

Signed-off-by: Chander Kashyap chander.kash...@linaro.org
---
 mmc_spl/board/samsung/smdkv310/Makefile   |1 +
 mmc_spl/board/samsung/smdkv310/mmc_boot.c |   30 -
 2 files changed, 1 insertions(+), 30 deletions(-)

diff --git a/mmc_spl/board/samsung/smdkv310/Makefile 
b/mmc_spl/board/samsung/smdkv310/Makefile
index de2c1a2..1589f28 100644
--- a/mmc_spl/board/samsung/smdkv310/Makefile
+++ b/mmc_spl/board/samsung/smdkv310/Makefile
@@ -34,6 +34,7 @@ include $(TOPDIR)/config.mk
 LDSCRIPT= $(TOPDIR)/mmc_spl/board/$(BOARDDIR)/u-boot.lds
 LDFLAGS= -Bstatic -T $(mmcobj)u-boot.lds -Ttext 
$(CONFIG_SYS_TEXT_BASE) $(PLATFORM_LDFLAGS)
 AFLAGS += -DCONFIG_MMC_SPL
+AFLAGS += -DCONFIG_SPL_BUILD
 CFLAGS += -DCONFIG_MMC_SPL
 CFLAGS += -DCONFIG_SPL_BUILD
 
diff --git a/mmc_spl/board/samsung/smdkv310/mmc_boot.c 
b/mmc_spl/board/samsung/smdkv310/mmc_boot.c
index dea1b86..2f3e463 100644
--- a/mmc_spl/board/samsung/smdkv310/mmc_boot.c
+++ b/mmc_spl/board/samsung/smdkv310/mmc_boot.c
@@ -57,33 +57,3 @@ void board_init_r(gd_t *id, ulong dest_addr)
 void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
 {
 }
-
-void do_undefined_instruction(struct pt_regs *pt_regs)
-{
-}
-
-void do_software_interrupt(struct pt_regs *pt_regs)
-{
-}
-
-void do_prefetch_abort(struct pt_regs *pt_regs)
-{
-}
-
-void do_data_abort(struct pt_regs *pt_regs)
-{
-}
-
-void do_not_used(struct pt_regs *pt_regs)
-{
-}
-
-void do_fiq(struct pt_regs *pt_regs)
-{
-}
-
-#ifndef CONFIG_USE_IRQ
-void do_irq(struct pt_regs *pt_regs)
-{
-}
-#endif
-- 
1.7.4.1

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


Re: [U-Boot] [PATCH v2 1/3] arm: add CONFIG_MACH_TYPE setting and documentation

2011-07-28 Thread Chander Kashyap
Dear Igor,


On 27 July 2011 18:34, Igor Grinberg grinb...@compulab.co.il wrote:
 On 07/27/11 13:31, Chander Kashyap wrote:
 dear Igor,


 On 14 July 2011 21:15, Igor Grinberg grinb...@compulab.co.il wrote:
 CONFIG_MACH_TYPE is used to set the machine type number in the
 common arm code instead of setting it in the board code.
 Boards with dynamically discoverable machine types can still set the
 machine type number in the board code.

 Signed-off-by: Igor Grinberg grinb...@compulab.co.il
 ---
 v2:     Document the option as mandatory.
        Move the bi_arch_number setting to board_init_f()

  README               |   10 ++
  arch/arm/lib/board.c |    4 
  2 files changed, 14 insertions(+), 0 deletions(-)

 diff --git a/README b/README
 index 446966d..0b6802d 100644
 --- a/README
 +++ b/README
 @@ -442,6 +442,16 @@ The following options need to be configured:
                crash. This is needed for buggy hardware (uc101) where
                no pull down resistor is connected to the signal IDE5V_DD7.

 +               CONFIG_MACH_TYPE        [relevant for ARM only][mandatory]
 +
 +               This setting is mandatory for all boards that have only one
 +               machine type and must be used to specify the machine type
 +               number as it appears in the ARM machine registry
 +               (see http://www.arm.linux.org.uk/developer/machines/).
 +               Only boards that have multiple machine types supported
 +               in a single configuration file and the machine type is
 +               runtime discoverable, do not have to use this setting.
 +
  - vxWorks boot parameters:

                bootvx constructs a valid bootline using the following
 diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
 index 169dfeb..9901694 100644
 --- a/arch/arm/lib/board.c
 +++ b/arch/arm/lib/board.c
 @@ -281,6 +281,10 @@ void board_init_f (ulong bootflag)

        gd-mon_len = _bss_end_ofs;

 +#ifdef CONFIG_MACH_TYPE
 +       gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 +#endif
 +
 bd structure is not initialised by this time.
 It leads to u-boot hanging for my board.
 I fixed this problem but modifying it. Below is the patch attached for the 
 same.

 Then how does it work for boards setting the gd-bd-bi_arch_number
 in board_early_init_f() function?
can you please point out any board which sets in board_early_init_f() ?

        for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
                if ((*init_fnc_ptr)() != 0) {
                        hang ();
 --
 1.7.3.4

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

 From d8df2f0ca9f08470c0cb88307fea4a66f41147a5 Mon Sep 17 00:00:00 2001
 From: Chander Kashyap chander.kash...@linaro.org
 Date: Wed, 27 Jul 2011 15:10:59 +0530
 Subject: [PATCH] ARM: Fix wrong initialisation of bi_arch_number

 bi_arch_number is initialised using
 @arch/arm/lib/board.c
 \#ifdef CONFIG_MACH_TYPE
         gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 \#endif

 bd structure is not intialized by this time.
 This leads to u-boot hanging when CONFIG_MACH_TYPE is defined.

 Signed-off-by: Chander Kashyap chander.kash...@linaro.org
 ---
  arch/arm/lib/board.c |    7 +++
  1 files changed, 3 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
 index bcbf697..98a9bcc 100644
 --- a/arch/arm/lib/board.c
 +++ b/arch/arm/lib/board.c
 @@ -281,10 +281,6 @@ void board_init_f (ulong bootflag)

       gd-mon_len = _bss_end_ofs;

 -#ifdef CONFIG_MACH_TYPE
 -     gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 -#endif
 -
       for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
               if ((*init_fnc_ptr)() != 0) {
                       hang ();
 @@ -380,6 +376,9 @@ void board_init_f (ulong bootflag)
       gd-bd = bd;
       debug (Reserving %zu Bytes for Board Info at: %08lx\n,
                       sizeof (bd_t), addr_sp);
 +#ifdef CONFIG_MACH_TYPE
 +     gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 +#endif

 This is problematic...
 There are boards that rely on this setting in early init function calls.
 For them it should be set before the init_sequence array is run.
 I will rethink this once again.
as per my understanding board_init_f() is the first initialisation call.


 Thanks for testing...


 --
 Regards,
 Igor.





-- 
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] [PATCH v6] unify version_string

2011-07-28 Thread Andreas Bießmann
Dear all,

Am 18.07.2011 20:24, schrieb Andreas Bießmann:
 This patch removes the architecture specific implementation of
 version_string where possible. Some architectures use a special place
 and therefore we provide U_BOOT_VERSION_STRING definition and a common
 weak symbol version_string.
 
 Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com
 CC: Mike Frysinger vap...@gentoo.org
 CC: Peter Pan pppeterpp...@gmail.com
 Acked-by: Mike Frysinger vap...@gentoo.org

any comments on this patch?

regards

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


Re: [U-Boot] [PATCH V4 3/5] nand spl: add NAND Library to new SPL

2011-07-28 Thread Aneesh V
Hi Scott,

On Thursday 28 July 2011 03:31 AM, Scott Wood wrote:
 On Wed, 27 Jul 2011 20:25:44 +0530
 V, Aneeshane...@ti.com  wrote:

 Hi Simon, Scott,

 On Wed, Jul 27, 2011 at 2:52 PM, Simon Schwarz
 simonschwarz...@googlemail.com  wrote:
 Dear Scott Wood,

 On 07/26/2011 08:04 PM, Scott Wood wrote:
 You're assuming all NAND SPLs will want nand_ecc -- this will not fit in
 most current ones.

 True. I changed it to:
 ifdef CONFIG_SPL_BUILD
 COBJS-y += nand_spl.o
 ifdef CONFIG_OMAP34XX

 -ffunction-sections, -fdata-sections and --gc-sections are enabled globally
 for SPL. Source files are #ifdef'ed out in Makefile's for SPL primarily to
 reduce build time.

 Ah, right.

 I would suggest to enable the super set of all files needed for all SPL's
 in these Makefile's and not clutter it with any more #ifdef's

 It's not relevant for nand_ecc, but there will still be a cases where
 we'll want to select particular object files because we're selecting from
 alternatives that provide the same symbols, or where an object file has
 dependencies that are not met for this target.

Agree. Perhaps those should only be the cases where we need additional
'ifdef's

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


Re: [U-Boot] RFC [PATCH 5/5 v5] dreamplug: use MACH_TYPE_DREAMPLUG

2011-07-28 Thread Bdale Garbee
On Wed, 27 Jul 2011 22:08:23 -0400, Jason u-b...@lakedaemon.net wrote:
 Since every Dreamplug on the market sets and uses MACH_TYPE_GURUPLUG, I
 think it's reasonable to use it (hopefully merged into u-boot) until the
 linux-arm tree gets sorted out and they accept new boards / machids.
 Then, the last patch can be added.

If we're going to re-flash a bunch of Dreamplug units with new u-boot,
I'd prefer we go ahead and set a new id.  If that means we have to carry
around a local kernel patch for a while until the new id gets merged
into the kernel.org tree, that seems much easier to cope with than
having to flash yet another new u-boot later?

Bdale


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


Re: [U-Boot] [PATCH] panic: add noreturn attribute

2011-07-28 Thread Wolfgang Denk
Dear Mike Frysinger,

In message 
CAJaTeTqTEC2XHdbSeZHLWYhhSkdBXqDx1mFSBzuUaeWEyru=z...@mail.gmail.com you 
wrote:

  Arghh... this is causing build warnings for ALL boards:
 
 no, it isnt all boards.  if you look at the code, you see it's based
 on the CONFIG_PANIC_HANG define.  and all my boards enable that, so i
 didnt see any warnings.

That's why the documentation says: Before sending the patch, you must
run the MAKEALL script on your patched source tree and make sure that
no errors or warnings are reported for any of the boards. ... Please
also run MAKEALL for at least one other architecture than the one you
made your modifications in.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If God had wanted us to use the metric system, Jesus would have  had
10 apostles.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/5] omap-common: add nand spl support

2011-07-28 Thread Simon Schwarz
Dear Scott Wood,

On 07/27/2011 11:38 PM, Scott Wood wrote:
 On Wed, 27 Jul 2011 10:42:22 +0200
 Simon Schwarzsimonschwarz...@googlemail.com  wrote:

 Dear Scott Wood,

 On 07/26/2011 08:06 PM, Scott Wood wrote:
 On Tue, 26 Jul 2011 14:09:15 +0200
 Simon Schwarzsimonschwarz...@googlemail.com   wrote:

 +#ifdef CONFIG_SPL_NAND_SUPPORT
 +static void nand_load_image(void)
 +{
 +  gpmc_init();
 +  nand_init();
 +  nand_copy_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
 +  CONFIG_SYS_NAND_U_BOOT_SIZE,
 +  (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
 +#ifdef CONFIG_NAND_ENV_DST
 +  nand_copy_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
 +  (uchar *)CONFIG_NAND_ENV_DST);
 +#ifdef CONFIG_ENV_OFFSET_REDUND
 +  nand_copy_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
 +  (uchar *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
 +#endif
 +#endif
 +  parse_image_header((struct image_header *)CONFIG_SYS_NAND_U_BOOT_DST);
 +}
 +#endif /* CONFIG_SPL_NAND_SUPPORT */

 I'm not sure that load versus copy conveys the difference between this
 function and the low-level nand_copy_image.

 The actual difference is that nand_load has an mtd_info struct as
 additional paramter.

 Hmm?  nand_load_image() takes no arguments.  I don't see a nand_load().

 The actual difference is that one is a low-level move this from here to
 there function, and the other is driving hardware init and then performing
 a series of calls to the low-level function, supplying the information
 about what is to be loaded where.

We have different code - sorry for the confusion. see below.


 The device to use is selected in nand_init and I
 don't see a reason why this should be passed around in the interface -
 in the spl all data is typically loaded from one chip - this also was
 the implementation before.

 Sure.

 Where is nand_copy_image() defined?
 It's in drivers/mtd/nand/nand_spl.c

 Where is drivers/mtd/nand/nand_spl.c?  It's not in Wolfgang's
 current tree, nor in u-boot-ti, and I didn't see it in these patches.  Did
 you forget to git add?
arrghh. You are right. I forgot a git add. V6 will change this...

 Note that there will not be one implementation of nand_copy_image suitable
 for all hardware, just as currently nand_spl/nand_boot.c is not used for
 all NAND SPL targets.

Hm. I know that. I just adapated the old nand_boot.c.

AFAIK the other implementations use prefixes for the function names - 
therefore we can just add them to the nand-spl-library and gcc will do 
the rest.

Regards  thx for the review!
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/3] arm: add CONFIG_MACH_TYPE setting and documentation

2011-07-28 Thread Igor Grinberg


On 07/28/11 09:41, Chander Kashyap wrote:
 Dear Igor,


 On 27 July 2011 18:34, Igor Grinberg grinb...@compulab.co.il wrote:
 On 07/27/11 13:31, Chander Kashyap wrote:
 dear Igor,


 On 14 July 2011 21:15, Igor Grinberg grinb...@compulab.co.il wrote:
 CONFIG_MACH_TYPE is used to set the machine type number in the
 common arm code instead of setting it in the board code.
 Boards with dynamically discoverable machine types can still set the
 machine type number in the board code.

 Signed-off-by: Igor Grinberg grinb...@compulab.co.il
 ---
 v2: Document the option as mandatory.
Move the bi_arch_number setting to board_init_f()

  README   |   10 ++
  arch/arm/lib/board.c |4 
  2 files changed, 14 insertions(+), 0 deletions(-)

 diff --git a/README b/README
 index 446966d..0b6802d 100644
 --- a/README
 +++ b/README
 @@ -442,6 +442,16 @@ The following options need to be configured:
crash. This is needed for buggy hardware (uc101) where
no pull down resistor is connected to the signal IDE5V_DD7.

 +   CONFIG_MACH_TYPE[relevant for ARM only][mandatory]
 +
 +   This setting is mandatory for all boards that have only one
 +   machine type and must be used to specify the machine type
 +   number as it appears in the ARM machine registry
 +   (see http://www.arm.linux.org.uk/developer/machines/).
 +   Only boards that have multiple machine types supported
 +   in a single configuration file and the machine type is
 +   runtime discoverable, do not have to use this setting.
 +
  - vxWorks boot parameters:

bootvx constructs a valid bootline using the following
 diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
 index 169dfeb..9901694 100644
 --- a/arch/arm/lib/board.c
 +++ b/arch/arm/lib/board.c
 @@ -281,6 +281,10 @@ void board_init_f (ulong bootflag)

gd-mon_len = _bss_end_ofs;

 +#ifdef CONFIG_MACH_TYPE
 +   gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 +#endif
 +
 bd structure is not initialised by this time.
 It leads to u-boot hanging for my board.
 I fixed this problem but modifying it. Below is the patch attached for the 
 same.
 Then how does it work for boards setting the gd-bd-bi_arch_number
 in board_early_init_f() function?
 can you please point out any board which sets in board_early_init_f() ?

board/esd/otc570/otc570.c

Also, I don't think we should restrict setting it to board_init() and later 
functions.

for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
if ((*init_fnc_ptr)() != 0) {
hang ();
 --
 1.7.3.4

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

 From d8df2f0ca9f08470c0cb88307fea4a66f41147a5 Mon Sep 17 00:00:00 2001
 From: Chander Kashyap chander.kash...@linaro.org
 Date: Wed, 27 Jul 2011 15:10:59 +0530
 Subject: [PATCH] ARM: Fix wrong initialisation of bi_arch_number

 bi_arch_number is initialised using
 @arch/arm/lib/board.c
 \#ifdef CONFIG_MACH_TYPE
 gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 \#endif

 bd structure is not intialized by this time.
 This leads to u-boot hanging when CONFIG_MACH_TYPE is defined.

 Signed-off-by: Chander Kashyap chander.kash...@linaro.org
 ---
  arch/arm/lib/board.c |7 +++
  1 files changed, 3 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
 index bcbf697..98a9bcc 100644
 --- a/arch/arm/lib/board.c
 +++ b/arch/arm/lib/board.c
 @@ -281,10 +281,6 @@ void board_init_f (ulong bootflag)

   gd-mon_len = _bss_end_ofs;

 -#ifdef CONFIG_MACH_TYPE
 - gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 -#endif
 -
   for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
   if ((*init_fnc_ptr)() != 0) {
   hang ();
 @@ -380,6 +376,9 @@ void board_init_f (ulong bootflag)
   gd-bd = bd;
   debug (Reserving %zu Bytes for Board Info at: %08lx\n,
   sizeof (bd_t), addr_sp);
 +#ifdef CONFIG_MACH_TYPE
 + gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 +#endif
 This is problematic...
 There are boards that rely on this setting in early init function calls.
 For them it should be set before the init_sequence array is run.
 I will rethink this once again.
 as per my understanding board_init_f() is the first initialisation call.

Yes, but there is the init_sequence[] array, which calls early board 
functions...
Also your proposed patch moves the initialization of bi_arch_number inside
#ifndef CONFIG_PRELOADER which is IMHO not right.




-- 
Regards,
Igor.

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


[U-Boot] [PATCH] fix cramfs resolve in case of two files, which start with same chars

2011-07-28 Thread Peter Feuerer
Hi,

when having two (or more) files in cramfs which start with same name, 
cramfs_resolve didn't check the filename length and thus returned 
potentially the wrong file.

kind regards,
--peter;

Signed-off-by: Peter Feuerer p...@sysgo.com

---
diff -ur u-boot-2011.06_original/fs/cramfs/cramfs.c 
u-boot-2011.06/fs/cramfs/cramfs.c
--- u-boot-2011.06_original/fs/cramfs/cramfs.c  2011-07-28 
09:48:10.0 +0200
+++ u-boot-2011.06/fs/cramfs/cramfs.c   2011-07-28 09:51:54.0 +0200
@@ -126,7 +126,8 @@
 namelen--;
 }

-   if (!strncmp (filename, name, namelen)) {
+   if (namelen == strlen (filename) 
+   !strncmp (filename, name, namelen)) {
 char *p = strtok (NULL, /);

 if (raw  (p == NULL || *p == '\0'))
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/3] arm: add CONFIG_MACH_TYPE setting and documentation

2011-07-28 Thread Chander Kashyap
On 28 July 2011 13:29, Igor Grinberg grinb...@compulab.co.il wrote:


 On 07/28/11 09:41, Chander Kashyap wrote:
 Dear Igor,


 On 27 July 2011 18:34, Igor Grinberg grinb...@compulab.co.il wrote:
 On 07/27/11 13:31, Chander Kashyap wrote:
 dear Igor,


 On 14 July 2011 21:15, Igor Grinberg grinb...@compulab.co.il wrote:
 CONFIG_MACH_TYPE is used to set the machine type number in the
 common arm code instead of setting it in the board code.
 Boards with dynamically discoverable machine types can still set the
 machine type number in the board code.

 Signed-off-by: Igor Grinberg grinb...@compulab.co.il
 ---
 v2:     Document the option as mandatory.
        Move the bi_arch_number setting to board_init_f()

  README               |   10 ++
  arch/arm/lib/board.c |    4 
  2 files changed, 14 insertions(+), 0 deletions(-)

 diff --git a/README b/README
 index 446966d..0b6802d 100644
 --- a/README
 +++ b/README
 @@ -442,6 +442,16 @@ The following options need to be configured:
                crash. This is needed for buggy hardware (uc101) where
                no pull down resistor is connected to the signal IDE5V_DD7.

 +               CONFIG_MACH_TYPE        [relevant for ARM only][mandatory]
 +
 +               This setting is mandatory for all boards that have only 
 one
 +               machine type and must be used to specify the machine type
 +               number as it appears in the ARM machine registry
 +               (see http://www.arm.linux.org.uk/developer/machines/).
 +               Only boards that have multiple machine types supported
 +               in a single configuration file and the machine type is
 +               runtime discoverable, do not have to use this setting.
 +
  - vxWorks boot parameters:

                bootvx constructs a valid bootline using the following
 diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
 index 169dfeb..9901694 100644
 --- a/arch/arm/lib/board.c
 +++ b/arch/arm/lib/board.c
 @@ -281,6 +281,10 @@ void board_init_f (ulong bootflag)

        gd-mon_len = _bss_end_ofs;

 +#ifdef CONFIG_MACH_TYPE
 +       gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux 
 */
 +#endif
 +
 bd structure is not initialised by this time.
 It leads to u-boot hanging for my board.
 I fixed this problem but modifying it. Below is the patch attached for the 
 same.
 Then how does it work for boards setting the gd-bd-bi_arch_number
 in board_early_init_f() function?
 can you please point out any board which sets in board_early_init_f() ?

 board/esd/otc570/otc570.c

 Also, I don't think we should restrict setting it to board_init() and later 
 functions.

        for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
                if ((*init_fnc_ptr)() != 0) {
                        hang ();
 --
 1.7.3.4

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

 From d8df2f0ca9f08470c0cb88307fea4a66f41147a5 Mon Sep 17 00:00:00 2001
 From: Chander Kashyap chander.kash...@linaro.org
 Date: Wed, 27 Jul 2011 15:10:59 +0530
 Subject: [PATCH] ARM: Fix wrong initialisation of bi_arch_number

 bi_arch_number is initialised using
 @arch/arm/lib/board.c
 \#ifdef CONFIG_MACH_TYPE
         gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 \#endif

 bd structure is not intialized by this time.
 This leads to u-boot hanging when CONFIG_MACH_TYPE is defined.

 Signed-off-by: Chander Kashyap chander.kash...@linaro.org
 ---
  arch/arm/lib/board.c |    7 +++
  1 files changed, 3 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
 index bcbf697..98a9bcc 100644
 --- a/arch/arm/lib/board.c
 +++ b/arch/arm/lib/board.c
 @@ -281,10 +281,6 @@ void board_init_f (ulong bootflag)

       gd-mon_len = _bss_end_ofs;

 -#ifdef CONFIG_MACH_TYPE
 -     gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 -#endif
 -
       for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
               if ((*init_fnc_ptr)() != 0) {
                       hang ();
 @@ -380,6 +376,9 @@ void board_init_f (ulong bootflag)
       gd-bd = bd;
       debug (Reserving %zu Bytes for Board Info at: %08lx\n,
                       sizeof (bd_t), addr_sp);
 +#ifdef CONFIG_MACH_TYPE
 +     gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 +#endif
 This is problematic...
 There are boards that rely on this setting in early init function calls.
 For them it should be set before the init_sequence array is run.
 I will rethink this once again.
 as per my understanding board_init_f() is the first initialisation call.

 Yes, but there is the init_sequence[] array, which calls early board 
 functions...
 Also your proposed patch moves the initialization of bi_arch_number inside
 #ifndef CONFIG_PRELOADER which is IMHO not right.
CONFIG_PRELOADER is only defined when building SPL.




 --
 Regards,
 Igor.





-- 

Re: [U-Boot] [PATCH 0/4] MIPS: make config options more generic

2011-07-28 Thread thomas.langer
Hi Daniel,

Daniel Schwierzeck wrote on 2011-07-27:

 This patch series contains cleanups and enhancements to consolidate
 the INCA-IP related config options and to make them more generic.
 Additionally, the cache operation mode is now configurable.
 All changes are needed to prepare the support of newer MIPS
 based Lantiq XWAY SoCs.


my ack to the complete series:

Acked-by: Thomas Langer thomas.lan...@lantiq.com

Best Regards,
Thomas


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


[U-Boot] [PATCH V6 0/5] OMAP3 and devkit8000 SPL support

2011-07-28 Thread Simon Schwarz
V1  Initial SPL support for OMAP3 was based on the old SPL
V2  Introduced major changes. It is based on the OMAP4-SPL patch by
Aneesh V and the new SPL Framework by Daniel Schwierzeck and Aneesh V
V3  Some small bug fixes and correct placed SOB.
V4  Corrected one bugfix and some style problems
V5  Exclude some nand objects from SPL, interface change for nand_spl
V6  Added nand_spl.c - git add mistake, some small changes

Simon Schwarz (5):
  omap3: Configure RAM bank 0 if in SPL
  omap-common: add nand spl support
  nand spl: add NAND Library to new SPL
  omap3: new SPL structure support
  devkit8000: Add nand-spl support for new SPL

 arch/arm/cpu/armv7/omap-common/spl.c|   47 +
 arch/arm/cpu/armv7/omap3/board.c|   37 -
 arch/arm/cpu/armv7/omap3/lowlevel_init.S|5 +
 arch/arm/cpu/armv7/omap3/sdrc.c |   30 +++-
 arch/arm/include/asm/arch-omap3/mem.h   |   36 
 arch/arm/include/asm/arch-omap3/sys_proto.h |1 +
 arch/arm/include/asm/omap_common.h  |1 +
 board/timll/devkit8000/devkit8000.c |2 +-
 doc/README.SPL  |2 +
 drivers/mtd/nand/Makefile   |6 +-
 drivers/mtd/nand/nand_spl.c |  268 +++
 drivers/mtd/nand/omap_gpmc.c|   68 +++
 include/configs/devkit8000.h|   46 +
 include/nand.h  |3 +
 spl/Makefile|2 +
 15 files changed, 549 insertions(+), 5 deletions(-)
 create mode 100644 drivers/mtd/nand/nand_spl.c

-- 
1.7.4.1

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


[U-Boot] [PATCH V6 1/5] omap3: Configure RAM bank 0 if in SPL

2011-07-28 Thread Simon Schwarz
OMAP3 relied on the memory config done by X-loader or Configuration Header. This
has to be reworked for the implementation of a SPL. This patch configures RAM
bank 0 if CONFIG_SPL_BUILD is set. Settings for Micron-RAM used by devkit8000
are added to mem.h

Signed-off-by: Simon Schwarz simonschwarz...@gmail.com
---
V1 changes:
ADD Settings for Micron RAM

V2 changes:
DEL spl_debug outputs if mem test fails/passes
CHG CONFIG_PRELOADER to CONFIG_SPL_BUILD

V3 changes:
nothing

V4 changes:
nothing

V5 changes:
nothing

V6 changes:
nothing

Transition from V1 to V2 also includes that this patch is now based on
- the new SPL layout by Aneesh V and Daniel Schwierzeck
- the OMAP4 SPL patches by Aneesh V

This is the successor of [U-Boot,3/5] devkit8000 nand_spl: Add RAM
configuration independent of x-loader or CH
(http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102114)
---
 arch/arm/cpu/armv7/omap3/sdrc.c   |   30 ++-
 arch/arm/include/asm/arch-omap3/mem.h |   36 +
 2 files changed, 65 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c
index 2a7970b..dac14d0 100644
--- a/arch/arm/cpu/armv7/omap3/sdrc.c
+++ b/arch/arm/cpu/armv7/omap3/sdrc.c
@@ -8,6 +8,9 @@
  * Copyright (C) 2004-2010
  * Texas Instruments Incorporated - http://www.ti.com/
  *
+ * Copyright (C) 2011
+ * Corscience GmbH  Co. KG - Simon Schwarz schw...@corscience.de
+ *
  * Author :
  * Vaibhav Hiremath hvaib...@ti.com
  *
@@ -133,13 +136,38 @@ void do_sdrc_init(u32 cs, u32 early)
sdelay(0x2);
}
 
+#ifdef CONFIG_SPL_BUILD
+   /* If we use a SPL there is no x-loader nor config header so we have
+* to do the job ourselfs
+*/
+   if (cs == CS0) {
+   sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE;
+
+   /* General SDRC config */
+   writel(V_MCFG, sdrc_base-cs[cs].mcfg);
+   writel(V_RFR_CTRL, sdrc_base-cs[cs].rfr_ctrl);
+
+   /* AC timings */
+   writel(V_ACTIMA_165, sdrc_actim_base0-ctrla);
+   writel(V_ACTIMB_165, sdrc_actim_base0-ctrlb);
+
+   /* Initialize */
+   writel(CMD_NOP, sdrc_base-cs[cs].manual);
+   writel(CMD_PRECHARGE, sdrc_base-cs[cs].manual);
+   writel(CMD_AUTOREFRESH, sdrc_base-cs[cs].manual);
+   writel(CMD_AUTOREFRESH, sdrc_base-cs[cs].manual);
+
+   writel(V_MR, sdrc_base-cs[cs].mr);
+   }
+#endif /* CONFIG_SPL_BUILD */
+
/*
 * SDRC timings are set up by x-load or config header
 * We don't need to redo them here.
 * Older x-loads configure only CS0
 * configure CS1 to handle this ommission
 */
-   if (cs) {
+   if (cs == CS1) {
sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE;
sdrc_actim_base1 = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE;
writel(readl(sdrc_base-cs[CS0].mcfg),
diff --git a/arch/arm/include/asm/arch-omap3/mem.h 
b/arch/arm/include/asm/arch-omap3/mem.h
index f165949..8e28f77 100644
--- a/arch/arm/include/asm/arch-omap3/mem.h
+++ b/arch/arm/include/asm/arch-omap3/mem.h
@@ -128,6 +128,33 @@ enum {
(MICRON_XSR_165  0) | (MICRON_TXP_165  8) | \
(MICRON_TWTR_165  16))
 
+#define MICRON_RAMTYPE 0x1
+#define MICRON_DDRTYPE 0x0
+#define MICRON_DEEPPD  0x1
+#define MICRON_B32NOT160x1
+#define MICRON_BANKALLOCATION  0x2
+#define MICRON_RAMSIZE ((PHYS_SDRAM_1_SIZE/(1024*1024))/2)
+#define MICRON_ADDRMUXLEGACY   0x1
+#define MICRON_CASWIDTH0x5
+#define MICRON_RASWIDTH0x2
+#define MICRON_LOCKSTATUS  0x0
+#define MICRON_V_MCFG ((MICRON_LOCKSTATUS  30) | (MICRON_RASWIDTH  24) | \
+   (MICRON_CASWIDTH  20) | (MICRON_ADDRMUXLEGACY  19) | \
+   (MICRON_RAMSIZE  8) | (MICRON_BANKALLOCATION  6) | \
+   (MICRON_B32NOT16  4) | (MICRON_DEEPPD  3) | \
+   (MICRON_DDRTYPE  2) | (MICRON_RAMTYPE))
+
+#define MICRON_ARCV2030
+#define MICRON_ARE 0x1
+#define MICRON_V_RFR_CTRL ((MICRON_ARCV  8) | (MICRON_ARE))
+
+#define MICRON_BL  0x2
+#define MICRON_SIL 0x0
+#define MICRON_CASL0x3
+#define MICRON_WBST0x0
+#define MICRON_V_MR ((MICRON_WBST  9) | (MICRON_CASL  4) | \
+   (MICRON_SIL  3) | (MICRON_BL))
+
 /*
  * NUMONYX part of IGEP v2 (165MHz optimized) 6.06ns
  *   ACTIMA
@@ -171,10 +198,15 @@ enum {
 #define V_ACTIMA_165 INFINEON_V_ACTIMA_165
 #define V_ACTIMB_165 INFINEON_V_ACTIMB_165
 #endif
+
 #ifdef CONFIG_OMAP3_MICRON_DDR
 #define V_ACTIMA_165 MICRON_V_ACTIMA_165
 #define V_ACTIMB_165 

[U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

2011-07-28 Thread Simon Schwarz
Add NAND support for the new SPL structure.

Signed-off-by: Simon Schwarz simonschwarz...@gmail.com
---
This patch didn't exist before V2!

V2 changes:
ADD Some define-barriers for OMAP3 to only use NAND
ADD nand_load_image() - inits the OMAP gpmc, loads the images - parses the
header
CHG cosmetic
ADD do_reset() implementation for omap-common spl
ADD nand_copy_image to nand.h
ADD CPP barriers for mmc and nand support. The parts depending on library
support are only compiled if the respective library is included.

V3 changes:
ADD Comment why setup_clocks_for_console() isn't called for OMAP3
CHG cosmetic (deleted empty line)
CHG rename of NAND_MODE_HW to NAND_MODE_HW_ECC
DEL NAND_MODE_SW. Not used.

V4 changes:
CHG cosmetic - style problems

V5 changes:
CHG renamed nand_copy_image to nand_spl_load_image
CHG offs paramter of nand_spl_load_image is of type loff_t now

V6 changes:
ADD call to nand_deselect after loading the images
ADD nand_deselect to nand.h

Transition from V1 to V2 also includes that this patch is now based on
- the new SPL layout by Aneesh V and Daniel Schwierzeck
- the OMAP4 SPL patches by Aneesh V
---
 arch/arm/cpu/armv7/omap-common/spl.c |   47 ++
 arch/arm/include/asm/omap_common.h   |1 +
 include/nand.h   |3 ++
 3 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
b/arch/arm/cpu/armv7/omap-common/spl.c
index d177652..7ec5c7c 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -26,6 +26,7 @@
 #include asm/u-boot.h
 #include asm/utils.h
 #include asm/arch/sys_proto.h
+#include nand.h
 #include mmc.h
 #include fat.h
 #include timestamp_autogenerated.h
@@ -107,6 +108,7 @@ static void parse_image_header(const struct image_header 
*header)
}
 }
 
+#ifdef CONFIG_SPL_MMC_SUPPORT
 static void mmc_load_image_raw(struct mmc *mmc)
 {
u32 image_size_sectors, err;
@@ -140,7 +142,9 @@ end:
hang();
}
 }
+#endif /* CONFIG_SPL_MMC_SUPPORT */
 
+#ifdef CONFIG_SPL_MMC_SUPPORT
 static void mmc_load_image_fat(struct mmc *mmc)
 {
s32 err;
@@ -173,7 +177,9 @@ end:
hang();
}
 }
+#endif /* CONFIG_SPL_MMC_SUPPORT */
 
+#ifdef CONFIG_SPL_MMC_SUPPORT
 static void mmc_load_image(void)
 {
struct mmc *mmc;
@@ -206,6 +212,28 @@ static void mmc_load_image(void)
hang();
}
 }
+#endif /* CONFIG_SPL_MMC_SUPPORT */
+
+#ifdef CONFIG_SPL_NAND_SUPPORT
+static void nand_load_image(void)
+{
+   gpmc_init();
+   nand_init();
+   nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
+   CONFIG_SYS_NAND_U_BOOT_SIZE,
+   (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
+#ifdef CONFIG_NAND_ENV_DST
+   nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
+   (uchar *)CONFIG_NAND_ENV_DST);
+#ifdef CONFIG_ENV_OFFSET_REDUND
+   nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
+   (uchar *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
+#endif
+#endif
+   nand_deselect();
+   parse_image_header((struct image_header *)CONFIG_SYS_NAND_U_BOOT_DST);
+}
+#endif /* CONFIG_SPL_NAND_SUPPORT */
 
 void jump_to_image_no_args(void)
 {
@@ -228,10 +256,17 @@ void board_init_r(gd_t *id, ulong dummy)
boot_device = omap_boot_device();
debug(boot device - %d\n, boot_device);
switch (boot_device) {
+#ifdef CONFIG_SPL_MMC_SUPPORT
case BOOT_DEVICE_MMC1:
case BOOT_DEVICE_MMC2:
mmc_load_image();
break;
+#endif
+#ifdef CONFIG_SPL_NAND_SUPPORT
+   case BOOT_DEVICE_NAND:
+   nand_load_image();
+   break;
+#endif
default:
printf(SPL: Un-supported Boot Device - %d!!!\n, boot_device);
hang();
@@ -259,7 +294,11 @@ void preloader_console_init(void)
gd-flags |= GD_FLG_RELOC;
gd-baudrate = CONFIG_BAUDRATE;
 
+/* Console clock for OMAP3 is already initialized by per_clocks_enable()
+ * called in board.c by s_init() */
+#ifndef CONFIG_OMAP34XX
setup_clocks_for_console();
+#endif
serial_init();  /* serial communications setup */
 
/* Avoid a second U-Boot coming from this string */
@@ -270,3 +309,11 @@ void preloader_console_init(void)
omap_rev_string(rev_string_buffer);
printf(Texas Instruments %s\n, rev_string_buffer);
 }
+
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+   debug(resetting cpu...);
+   reset_cpu(0);
+
+   return 0;
+}
diff --git a/arch/arm/include/asm/omap_common.h 
b/arch/arm/include/asm/omap_common.h
index d3cb857..13f6884 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -49,6 +49,7 @@ void preloader_console_init(void);
 #defineMMCSD_MODE_UNDEFINED0
 #define MMCSD_MODE_RAW 1
 #define MMCSD_MODE_FAT 

[U-Boot] [PATCH V6 3/5] nand spl: add NAND Library to new SPL

2011-07-28 Thread Simon Schwarz
Insert some NAND driver sources into NAND SPL library.

Signed-off-by: Simon Schwarz simonschwarz...@gmail.com
---
V1 changes:
CHG Default to HW ecc in SPL build
ADD nand_read_buf16 function, read buffer
ADD omap_dev_ready function, indicte if chip is ready

V2 changes:
DEL GPMC_WAIT0_PIN_ACTIVE define
CHG omap_dev_ready() renamed to  omap_spl_dev_ready(), does not use the
GPMC_WAIT0_PIN_ACTIVE-define anymore
CHG ogpmc_read_buf16 renamed omap_spl_read_buf16
ADD omap_spl_read_buf, 8x buf read function
ADD CONFIG_SPL_POWER_SUPPORT and CONFIG_SPL_NAND_SUPPORT to SPL
CHG cosmetic
CHG nand_base and nand_bbt aren't needed for SPL anymore
CHG omap_nand_switch_ecc is not compiled for SPL
ADD entry for CONFIG_SPL_POWER_SUPPORT and CONFIG_SPL_NAND_SUPPORT to README.SPL

V3 changes:
DEL cosmetic (empty line)

V4 changes:
nothing

V5 changes:
CHG nand_ecc.o is only compiled for SPL if CONFIG_OMAP34XX is set

V6 changes:
ADD nand_spl.c - git add, finally
DEL nand_ecc barrier ifdef for OMAP3

Transition from V1 to V2 also includes that this patch is now based on
- the new SPL layout by Aneesh V and Daniel Schwierzeck
- the OMAP4 SPL patches by Aneesh V

This Patch is related to [U-Boot,4/5] devkit8000 nand_spl: Add SPL NAND support
to omap_gpmc driver
(http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102115) in V1
---
 doc/README.SPL   |2 +
 drivers/mtd/nand/Makefile|6 +-
 drivers/mtd/nand/nand_spl.c  |  268 ++
 drivers/mtd/nand/omap_gpmc.c |   68 +++
 spl/Makefile |2 +
 5 files changed, 345 insertions(+), 1 deletions(-)
 create mode 100644 drivers/mtd/nand/nand_spl.c

diff --git a/doc/README.SPL b/doc/README.SPL
index ce8e19f..2987f43 100644
--- a/doc/README.SPL
+++ b/doc/README.SPL
@@ -60,3 +60,5 @@ CONFIG_SPL_SPI_FLASH_SUPPORT (drivers/mtd/spi/libspi_flash.o)
 CONFIG_SPL_SPI_SUPPORT (drivers/spi/libspi.o)
 CONFIG_SPL_FAT_SUPPORT (fs/fat/libfat.o)
 CONFIG_SPL_LIBGENERIC_SUPPORT (lib/libgeneric.o)
+CONFIG_SPL_POWER_SUPPORT (drivers/power/libpower.o)
+CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/libnand.o)
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 8b598f6..cdc9a14 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -26,12 +26,16 @@ include $(TOPDIR)/config.mk
 LIB:= $(obj)libnand.o
 
 ifdef CONFIG_CMD_NAND
+ifdef CONFIG_SPL_BUILD
+COBJS-y += nand_spl.o
+else
 COBJS-y += nand.o
 COBJS-y += nand_base.o
 COBJS-y += nand_bbt.o
-COBJS-y += nand_ecc.o
 COBJS-y += nand_ids.o
 COBJS-y += nand_util.o
+endif
+COBJS-y += nand_ecc.o
 
 COBJS-$(CONFIG_NAND_ATMEL) += atmel_nand.o
 COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o
diff --git a/drivers/mtd/nand/nand_spl.c b/drivers/mtd/nand/nand_spl.c
new file mode 100644
index 000..fc78885
--- /dev/null
+++ b/drivers/mtd/nand/nand_spl.c
@@ -0,0 +1,268 @@
+/*
+ * (C) Copyright 2006-2008
+ * Stefan Roese, DENX Software Engineering, s...@denx.de.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include nand.h
+#include asm/io.h
+
+int nand_curr_device = -1;
+static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
+static nand_info_t info;
+nand_info_t nand_info[CONFIG_SYS_MAX_NAND_DEVICE];
+static struct nand_chip nand_chip;
+
+#if (CONFIG_SYS_NAND_PAGE_SIZE = 512)
+/*
+ * NAND command for small page NAND devices (512)
+ */
+static int nand_command(struct mtd_info *mtd, int block, int page, int offs,
+   u8 cmd)
+{
+   struct nand_chip *this = mtd-priv;
+   int page_addr = page + block * CONFIG_SYS_NAND_PAGE_COUNT;
+
+   while (!this-dev_ready(mtd))
+   ;
+
+   /* Begin command latch cycle */
+   this-cmd_ctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE);
+   /* Set ALE and clear CLE to start address cycle */
+   /* Column address */
+   this-cmd_ctrl(mtd, offs, NAND_CTRL_ALE | NAND_CTRL_CHANGE);
+   this-cmd_ctrl(mtd, page_addr  0xff, NAND_CTRL_ALE); /* A[16:9] */
+   this-cmd_ctrl(mtd, (page_addr  8)  0xff,
+  NAND_CTRL_ALE); /* A[24:17] */
+#ifdef CONFIG_SYS_NAND_4_ADDR_CYCLE
+   /* One more address cycle for devices  32MiB */
+   this-cmd_ctrl(mtd, (page_addr  16)  0x0f,
+  NAND_CTRL_ALE); /* A[28:25] */
+#endif

[U-Boot] [PATCH V6 4/5] omap3: new SPL structure support

2011-07-28 Thread Simon Schwarz
Support for the new spl structure. Using the interface defined by Aneesh V for
OMAP4

Signed-off-by: Simon Schwarz simonschwarz...@gmail.com
---
V1 changes:
ADD support for early console output in SPL

V2 changes:
ADD include omap_common.h in board.c
ADD implement new omap common interface omap_boot_device, omap_boot_mode and
omap_rev_string (very basic)
CHG cosmetic
CHG Don't add ecc switch command in SPL
ADD save_boot_params stump with warning to implement it

V3 changes:
none

V4 changes:
CHG cosmetic - corrected style problem

V5 changes:
nothing

V6 changes:
nothing

Transition from V1 to V2 also includes that this patch is now based on
- the new SPL layout by Aneesh V and Daniel Schwierzeck
- the OMAP4 SPL patches by Aneesh V

This is in some parts a anccesstor of [U-Boot,2/5] devkit8000 nand_spl: omap3
support nand_spl boot
(http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102114) in V1
---
 arch/arm/cpu/armv7/omap3/board.c|   37 +-
 arch/arm/cpu/armv7/omap3/lowlevel_init.S|5 +++
 arch/arm/include/asm/arch-omap3/sys_proto.h |1 +
 3 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 4aaf97b..ee3285f 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -39,6 +39,7 @@
 #include asm/cache.h
 #include asm/armv7.h
 #include asm/omap_gpio.h
+#include asm/omap_common.h
 
 /* Declarations */
 extern omap3_sysinfo sysinfo;
@@ -56,6 +57,28 @@ static const struct gpio_bank gpio_bank_34xx[6] = {
 
 const struct gpio_bank *const omap_gpio_bank = gpio_bank_34xx;
 
+#ifdef CONFIG_SPL_BUILD
+/*
+* We use static variables because global data is not ready yet.
+* Initialized data is available in SPL right from the beginning.
+* We would not typically need to save these parameters in regular
+* U-Boot. This is needed only in SPL at the moment.
+*/
+u32 omap3_boot_device = BOOT_DEVICE_NAND;
+u32 omap3_boot_mode = NAND_MODE_HW_ECC;
+
+u32 omap_boot_device(void)
+{
+   return omap3_boot_device;
+}
+
+u32 omap_boot_mode(void)
+{
+   return omap3_boot_mode;
+}
+#endif /* CONFIG_SPL_BUILD */
+
+
 /**
  * Routine: delay
  * Description: spinning delay to use before udelay works
@@ -197,6 +220,10 @@ void s_init(void)
 
per_clocks_enable();
 
+#ifdef CONFIG_SPL_BUILD
+   preloader_console_init();
+#endif
+
if (!in_sdram)
mem_init();
 }
@@ -245,7 +272,7 @@ void abort(void)
 {
 }
 
-#ifdef CONFIG_NAND_OMAP_GPMC
+#if defined(CONFIG_NAND_OMAP_GPMC)  !defined(CONFIG_SPL_BUILD)
 /**
  * OMAP3 specific command to switch between NAND HW and SW ecc
  */
@@ -273,7 +300,7 @@ U_BOOT_CMD(
[hw/sw] - Switch between NAND hardware (hw) or software (sw) ecc 
algorithm
 );
 
-#endif /* CONFIG_NAND_OMAP_GPMC */
+#endif /* CONFIG_NAND_OMAP_GPMC  !CONFIG_SPL_BUILD */
 
 #ifdef CONFIG_DISPLAY_BOARDINFO
 /**
@@ -402,3 +429,9 @@ void v7_outer_cache_disable(void)
omap3_update_aux_cr(0, 0x2);
 }
 #endif
+
+void omap_rev_string(char *omap_rev_string)
+{
+   sprintf(omap_rev_string, OMAP3, sorry revision detection \
+unimplemented);
+}
diff --git a/arch/arm/cpu/armv7/omap3/lowlevel_init.S 
b/arch/arm/cpu/armv7/omap3/lowlevel_init.S
index 67e8ceb..48a7ec6 100644
--- a/arch/arm/cpu/armv7/omap3/lowlevel_init.S
+++ b/arch/arm/cpu/armv7/omap3/lowlevel_init.S
@@ -35,6 +35,11 @@
 _TEXT_BASE:
.word   CONFIG_SYS_TEXT_BASE/* sdram load addr from config.mk */
 
+.global save_boot_params
+save_boot_params:
+   #warning Please implement save_boot_params for OMAP3
+   bx lr
+
 .global omap3_gp_romcode_call
 omap3_gp_romcode_call:
PUSH {r4-r12, lr} @ Save all registers from ROM code!
diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h 
b/arch/arm/include/asm/arch-omap3/sys_proto.h
index 995e7cb..7b60051 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -71,4 +71,5 @@ void power_init_r(void);
 void dieid_num_r(void);
 void do_omap3_emu_romcode_call(u32 service_id, u32 parameters);
 void omap3_gp_romcode_call(u32 service_id, u32 parameter);
+void omap_rev_string(char *omap_rev_string);
 #endif
-- 
1.7.4.1

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


[U-Boot] [PATCH V6 5/5] devkit8000: Add nand-spl support for new SPL

2011-07-28 Thread Simon Schwarz
Add NAND SPL support to the devkit8000 config

Signed-off-by: Simon Schwarz simonschwarz...@gmail.com
---
V1 changes:
ADD devkit8000_nand to board.cfg
ADD nand_spl Makefile, llinker script, spl-devkit8000.c
ADD config ecc, SRAM, SPL to board config
ADD CONFIG_SYS_SRAM_START and _SIZE to board config
ADD CONFIG_SYS_SPL_TEXT_BASE, _MAX_SIZE and SPL_STACK to board config

V2 changes:
ADD CONFIG_SPL and LIBCOMMON, LIBDISK, I2C, LIBGENERIC, SERIAL, POWER, NAND and
CONFIG_SPL_LDSCRIPT to board config
CHG renamed CONFIG_SYS_SPL_* to CONFIG_SPL_*
ADD CONFIG_SYS_NAND_U_BOOT_START, _OFFS, _SIZE, _DST to board config: Where to
expect u-boot and where to load it.
ADD some barrier to not build board_eth_init in SPL
DEL no changes to board.cfg
DEL everything used the old nand_spl layout (Makefile, linker script,
spl-devkit8000.c)
CHG cosmetic

V3 changes:
CHG Deleted wrong comment

V4 changes:
CHG CONFIG_SYS_SRAM_SIZE NOW has the right value
CHG cosmetic - corrected style problems

V5 changes:
nothing

V6 changes:
nothing

Transition from V1 to V2 also includes that this patch is now based on
- the new SPL layout by Aneesh V and Daniel Schwierzeck
- the OMAP4 SPL patches by Aneesh V

This is the successor of [U-Boot,5/5] devkit8000 nand_spl: add nand_spl
support
(http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102111)
---
 board/timll/devkit8000/devkit8000.c |2 +-
 include/configs/devkit8000.h|   46 +++
 2 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/board/timll/devkit8000/devkit8000.c 
b/board/timll/devkit8000/devkit8000.c
index 95afaaa..9b53742 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -119,7 +119,7 @@ void set_muxconf_regs(void)
MUX_DEVKIT8000();
 }
 
-#ifdef CONFIG_DRIVER_DM9000
+#if defined(CONFIG_DRIVER_DM9000)  !defined(CONFIG_SPL_BUILD)
 /*
  * Routine: board_eth_init
  * Description: Setting up the Ethernet hardware.
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 125c690..022069d 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -307,4 +307,50 @@
 
CONFIG_SYS_INIT_RAM_SIZE - \
 
GENERATED_GBL_DATA_SIZE)
 
+/* SRAM config */
+#define CONFIG_SYS_SRAM_START  0x4020
+#define CONFIG_SYS_SRAM_SIZE   0x1
+
+/* Defines for SPL */
+#define CONFIG_SPL
+
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#define CONFIG_SPL_LIBDISK_SUPPORT
+#define CONFIG_SPL_I2C_SUPPORT
+#define CONFIG_SPL_LIBGENERIC_SUPPORT
+#define CONFIG_SPL_SERIAL_SUPPORT
+#define CONFIG_SPL_POWER_SUPPORT
+#define CONFIG_SPL_NAND_SUPPORT
+#define CONFIG_SPL_LDSCRIPT$(CPUDIR)/omap-common/u-boot-spl.lds
+
+#define CONFIG_SPL_TEXT_BASE   0x4020 /*CONFIG_SYS_SRAM_START*/
+#define CONFIG_SPL_MAX_SIZE0xB400  /* 45 K */
+#define CONFIG_SPL_STACK   LOW_LEVEL_SRAM_STACK
+
+#define CONFIG_SPL_BSS_START_ADDR  0x8000 /*CONFIG_SYS_SDRAM_BASE*/
+#define CONFIG_SPL_BSS_MAX_SIZE0x8
+
+/* NAND boot config */
+#define CONFIG_SYS_NAND_PAGE_COUNT 64
+#define CONFIG_SYS_NAND_PAGE_SIZE  2048
+#define CONFIG_SYS_NAND_OOBSIZE64
+#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
+#define CONFIG_SYS_NAND_BAD_BLOCK_POS  0
+#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
+   10, 11, 12, 13}
+
+#define CONFIG_SYS_NAND_ECCSIZE512
+#define CONFIG_SYS_NAND_ECCBYTES   3
+
+#define CONFIG_SYS_NAND_ECCSTEPS   (CONFIG_SYS_NAND_PAGE_SIZE / \
+   CONFIG_SYS_NAND_ECCSIZE)
+#define CONFIG_SYS_NAND_ECCTOTAL   (CONFIG_SYS_NAND_ECCBYTES * \
+   CONFIG_SYS_NAND_ECCSTEPS)
+
+#define CONFIG_SYS_NAND_U_BOOT_START   CONFIG_SYS_NAND_U_BOOT_DST
+
+#define CONFIG_SYS_NAND_U_BOOT_OFFS0x8
+#define CONFIG_SYS_NAND_U_BOOT_SIZE0x20
+#define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_SYS_TEXT_BASE
+
 #endif /* __CONFIG_H */
-- 
1.7.4.1

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


Re: [U-Boot] [PATCH V6 1/5] omap3: Configure RAM bank 0 if in SPL

2011-07-28 Thread Aneesh V
Hi Simon,

First of all sorry for giving my first comments on v6. But I didn't
have mail access for the last couple of days.

On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 OMAP3 relied on the memory config done by X-loader or Configuration Header. 
 This
 has to be reworked for the implementation of a SPL. This patch configures RAM
 bank 0 if CONFIG_SPL_BUILD is set. Settings for Micron-RAM used by devkit8000
 are added to mem.h

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com
 ---
 V1 changes:
 ADD Settings for Micron RAM

 V2 changes:
 DEL spl_debug outputs if mem test fails/passes
 CHG CONFIG_PRELOADER to CONFIG_SPL_BUILD

 V3 changes:
 nothing

 V4 changes:
 nothing

 V5 changes:
 nothing

 V6 changes:
 nothing

 Transition from V1 to V2 also includes that this patch is now based on
   - the new SPL layout by Aneesh V and Daniel Schwierzeck
   - the OMAP4 SPL patches by Aneesh V

 This is the successor of [U-Boot,3/5] devkit8000 nand_spl: Add RAM
 configuration independent of x-loader or CH
 (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102114)
 ---
   arch/arm/cpu/armv7/omap3/sdrc.c   |   30 ++-
   arch/arm/include/asm/arch-omap3/mem.h |   36 
 +
   2 files changed, 65 insertions(+), 1 deletions(-)

 diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c
 index 2a7970b..dac14d0 100644
 --- a/arch/arm/cpu/armv7/omap3/sdrc.c
 +++ b/arch/arm/cpu/armv7/omap3/sdrc.c
 @@ -8,6 +8,9 @@
* Copyright (C) 2004-2010
* Texas Instruments Incorporated - http://www.ti.com/
*
 + * Copyright (C) 2011
 + * Corscience GmbH  Co. KG - Simon Schwarzschw...@corscience.de
 + *
* Author :
* Vaibhav Hiremathhvaib...@ti.com
*
 @@ -133,13 +136,38 @@ void do_sdrc_init(u32 cs, u32 early)
   sdelay(0x2);
   }

 +#ifdef CONFIG_SPL_BUILD

Is this really specific to SPL. mem_init() should ideally be the same
for SPL and NOR u-boot, right? Maybe you could remove the #ifdef?

I think NOR boot is broken on OMAP3(somebody please correct me if I am
wrong). I think this may be one thing that helps to make it work again.

 + /* If we use a SPL there is no x-loader nor config header so we have
 +  * to do the job ourselfs
 +  */
 + if (cs == CS0) {
 + sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE;
 +
 + /* General SDRC config */
 + writel(V_MCFG,sdrc_base-cs[cs].mcfg);
 + writel(V_RFR_CTRL,sdrc_base-cs[cs].rfr_ctrl);
 +
 + /* AC timings */
 + writel(V_ACTIMA_165,sdrc_actim_base0-ctrla);
 + writel(V_ACTIMB_165,sdrc_actim_base0-ctrlb);
 +
 + /* Initialize */
 + writel(CMD_NOP,sdrc_base-cs[cs].manual);
 + writel(CMD_PRECHARGE,sdrc_base-cs[cs].manual);
 + writel(CMD_AUTOREFRESH,sdrc_base-cs[cs].manual);
 + writel(CMD_AUTOREFRESH,sdrc_base-cs[cs].manual);
 +
 + writel(V_MR,sdrc_base-cs[cs].mr);
 + }
 +#endif /* CONFIG_SPL_BUILD */


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


Re: [U-Boot] [PATCH v2 1/3] arm: add CONFIG_MACH_TYPE setting and documentation

2011-07-28 Thread Igor Grinberg
On 07/28/11 11:19, Chander Kashyap wrote:
 On 28 July 2011 13:29, Igor Grinberg grinb...@compulab.co.il wrote:

 On 07/28/11 09:41, Chander Kashyap wrote:
 Dear Igor,


 On 27 July 2011 18:34, Igor Grinberg grinb...@compulab.co.il wrote:
 On 07/27/11 13:31, Chander Kashyap wrote:
 dear Igor,


 On 14 July 2011 21:15, Igor Grinberg grinb...@compulab.co.il wrote:
 CONFIG_MACH_TYPE is used to set the machine type number in the
 common arm code instead of setting it in the board code.
 Boards with dynamically discoverable machine types can still set the
 machine type number in the board code.

 Signed-off-by: Igor Grinberg grinb...@compulab.co.il
 ---
 v2: Document the option as mandatory.
Move the bi_arch_number setting to board_init_f()

  README   |   10 ++
  arch/arm/lib/board.c |4 
  2 files changed, 14 insertions(+), 0 deletions(-)

 diff --git a/README b/README
 index 446966d..0b6802d 100644
 --- a/README
 +++ b/README
 @@ -442,6 +442,16 @@ The following options need to be configured:
crash. This is needed for buggy hardware (uc101) where
no pull down resistor is connected to the signal 
 IDE5V_DD7.

 +   CONFIG_MACH_TYPE[relevant for ARM 
 only][mandatory]
 +
 +   This setting is mandatory for all boards that have only 
 one
 +   machine type and must be used to specify the machine type
 +   number as it appears in the ARM machine registry
 +   (see http://www.arm.linux.org.uk/developer/machines/).
 +   Only boards that have multiple machine types supported
 +   in a single configuration file and the machine type is
 +   runtime discoverable, do not have to use this setting.
 +
  - vxWorks boot parameters:

bootvx constructs a valid bootline using the following
 diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
 index 169dfeb..9901694 100644
 --- a/arch/arm/lib/board.c
 +++ b/arch/arm/lib/board.c
 @@ -281,6 +281,10 @@ void board_init_f (ulong bootflag)

gd-mon_len = _bss_end_ofs;

 +#ifdef CONFIG_MACH_TYPE
 +   gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux 
 */
 +#endif
 +
 bd structure is not initialised by this time.
 It leads to u-boot hanging for my board.
 I fixed this problem but modifying it. Below is the patch attached for 
 the same.
 Then how does it work for boards setting the gd-bd-bi_arch_number
 in board_early_init_f() function?
 can you please point out any board which sets in board_early_init_f() ?
 board/esd/otc570/otc570.c

 Also, I don't think we should restrict setting it to board_init() and later 
 functions.

I've looked into the code a bit more deeply...
Currently, I don't see how the bd initialization can be done earlier than it is 
right now,
to let boards use it in board_early_init_f() function and other early functions.
I have not found any other initialization of bd on that architecture,
so this makes the otc570 misuse the bd pointer
(unless 0 is a valid pointer on that architecture, but then it is a total 
mess...)

for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) 
 {
if ((*init_fnc_ptr)() != 0) {
hang ();
 --
 1.7.3.4

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

 From d8df2f0ca9f08470c0cb88307fea4a66f41147a5 Mon Sep 17 00:00:00 2001
 From: Chander Kashyap chander.kash...@linaro.org
 Date: Wed, 27 Jul 2011 15:10:59 +0530
 Subject: [PATCH] ARM: Fix wrong initialisation of bi_arch_number

 bi_arch_number is initialised using
 @arch/arm/lib/board.c
 \#ifdef CONFIG_MACH_TYPE
 gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux 
 */
 \#endif

 bd structure is not intialized by this time.
 This leads to u-boot hanging when CONFIG_MACH_TYPE is defined.

 Signed-off-by: Chander Kashyap chander.kash...@linaro.org
 ---
  arch/arm/lib/board.c |7 +++
  1 files changed, 3 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
 index bcbf697..98a9bcc 100644
 --- a/arch/arm/lib/board.c
 +++ b/arch/arm/lib/board.c
 @@ -281,10 +281,6 @@ void board_init_f (ulong bootflag)

   gd-mon_len = _bss_end_ofs;

 -#ifdef CONFIG_MACH_TYPE
 - gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 -#endif
 -
   for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
   if ((*init_fnc_ptr)() != 0) {
   hang ();
 @@ -380,6 +376,9 @@ void board_init_f (ulong bootflag)
   gd-bd = bd;
   debug (Reserving %zu Bytes for Board Info at: %08lx\n,
   sizeof (bd_t), addr_sp);
 +#ifdef CONFIG_MACH_TYPE
 + gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
 +#endif
 This is problematic...
 There are boards that rely on this setting in early init function calls.
 

[U-Boot] [PATCH] arm: fix bd pointer dereference prior initialization

2011-07-28 Thread Igor Grinberg
gd-bd pointer has been used prior been initialized.
Move the relevant code after the initialization.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 arch/arm/lib/board.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index bcbf697..52e90db 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -281,10 +281,6 @@ void board_init_f (ulong bootflag)
 
gd-mon_len = _bss_end_ofs;
 
-#ifdef CONFIG_MACH_TYPE
-   gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
-#endif
-
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
if ((*init_fnc_ptr)() != 0) {
hang ();
@@ -409,6 +405,10 @@ void board_init_f (ulong bootflag)
post_run (NULL, POST_ROM | post_bootmode_get(0));
 #endif
 
+#ifdef CONFIG_MACH_TYPE
+   gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
+#endif
+
gd-bd-bi_baudrate = gd-baudrate;
/* Ram ist board specific, so move it to board code ... */
dram_init_banksize();
-- 
1.7.3.4

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


[U-Boot] [PATCH][v3] powerpc/85xx: enable USB2 gadget mode for corenet ds board

2011-07-28 Thread Shaohui Xie
to make USB2 worked in gadget mode, we need to set it's 'dr_mode' to
'peripheral' in hwconfig, but driver starts scan from 'usb1', it'll break
out if it cannot find 'usb1', so drop the 'else' clause to make driver scan
all the 'usbx'.

Signed-off-by: Shaohui Xie shaohui@freescale.com
---
changes for v3:
1. drop 'else'.
2. drop #define CONFIG_SYS_USB_DEVICE.

changes for v2:
1. fixed a typo in title.
2. Added some details in commit.

 arch/powerpc/cpu/mpc8xxx/fdt.c  |2 --
 board/freescale/corenet_ds/corenet_ds.c |1 +
 include/configs/corenet_ds.h|1 +
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index d9e3e7e..6c757f8 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -163,8 +163,6 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
usb1_defined = 1;
if (mode_idx  0  phy_idx  0)
printf(WARNING: invalid phy or mode\n);
-   } else {
-   break;
}
}
if (!usb1_defined) {
diff --git a/board/freescale/corenet_ds/corenet_ds.c 
b/board/freescale/corenet_ds/corenet_ds.c
index cf9b7b8..b1e7823 100644
--- a/board/freescale/corenet_ds/corenet_ds.c
+++ b/board/freescale/corenet_ds/corenet_ds.c
@@ -236,6 +236,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 #endif
 
fdt_fixup_liodn(blob);
+   fdt_fixup_dr_usb(blob, bd);
 }
 
 int board_eth_init(bd_t *bis)
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index c9cc22a..1d62146 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -580,6 +580,7 @@
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_CMD_EXT2
+#define CONFIG_HAS_FSL_DR_USB
 
 #define CONFIG_MMC
 
-- 
1.6.4


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


[U-Boot] [PATCH V0] omap-common: move early UART clock setup to s_init

2011-07-28 Thread Simon Schwarz
Moves the early UART clock setup setup_clocks_for_console() from
preloader_console_init() to s_init() of OMAP4.

Signed-off-by: Simon Schwarz simonschwarz...@gmail.com
---
 arch/arm/cpu/armv7/omap-common/spl.c |1 -
 arch/arm/cpu/armv7/omap4/board.c |1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
b/arch/arm/cpu/armv7/omap-common/spl.c
index d177652..d380b3e 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -259,7 +259,6 @@ void preloader_console_init(void)
gd-flags |= GD_FLG_RELOC;
gd-baudrate = CONFIG_BAUDRATE;
 
-   setup_clocks_for_console();
serial_init();  /* serial communications setup */
 
/* Avoid a second U-Boot coming from this string */
diff --git a/arch/arm/cpu/armv7/omap4/board.c b/arch/arm/cpu/armv7/omap4/board.c
index 5943d61..a9e90de 100644
--- a/arch/arm/cpu/armv7/omap4/board.c
+++ b/arch/arm/cpu/armv7/omap4/board.c
@@ -196,6 +196,7 @@ void s_init(void)
watchdog_init();
set_mux_conf_regs();
 #ifdef CONFIG_SPL_BUILD
+   setup_clocks_for_console();
preloader_console_init();
 #endif
prcm_init();
-- 
1.7.4.1

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


[U-Boot] [PATCH V0] omap-common: move early UART clock setup to board.c

2011-07-28 Thread Simon Schwarz
This patch moves the setup_clocks_for_console()-call from
preloader_console_init() to s_init().
This is done to use the same implementation for OMAP3 and OMAP4

For discussion see: 
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/104120

This is based on the following patches:
- New SPL framework
  - OMAP4 SPL
Both are already in u-boot-ti repo.

Simon Schwarz (1):
  omap-common: move early UART clock setup to s_init

 arch/arm/cpu/armv7/omap-common/spl.c |1 -
 arch/arm/cpu/armv7/omap4/board.c |1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

-- 
1.7.4.1

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


Re: [U-Boot] [PATCH] fix cramfs resolve in case of two files, which start with same chars

2011-07-28 Thread Wolfgang Denk
Dear Peter Feuerer,

In message 4e311948.1000...@sysgo.com you wrote:
 Hi,
 
 when having two (or more) files in cramfs which start with same name, 
 cramfs_resolve didn't check the filename length and thus returned 
 potentially the wrong file.
 
 kind regards,
 --peter;

Please move greetings out of the commit message.

 Signed-off-by: Peter Feuerer p...@sysgo.com
 
 ---
 diff -ur u-boot-2011.06_original/fs/cramfs/cramfs.c 
 u-boot-2011.06/fs/cramfs/cramfs.c
 --- u-boot-2011.06_original/fs/cramfs/cramfs.c  2011-07-28 
 09:48:10.0 +0200
 +++ u-boot-2011.06/fs/cramfs/cramfs.c   2011-07-28 09:51:54.0 +0200
 @@ -126,7 +126,8 @@
  namelen--;
  }
 
 -   if (!strncmp (filename, name, namelen)) {
 +   if (namelen == strlen (filename) 
 +   !strncmp (filename, name, namelen)) {

Please fix all the errors and warnings reported by checkpatch, and
resubmit.  Consider using git format-patch and git send-email.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It is surely a great calamity for  a  human  being  to  have  no  ob-
sessions.- Robert Bly
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V6 1/5] omap3: Configure RAM bank 0 if in SPL

2011-07-28 Thread Simon Schwarz
Hi Aneesh,

On 07/28/2011 10:50 AM, Aneesh V wrote:
 Hi Simon,

 First of all sorry for giving my first comments on v6. But I didn't
 have mail access for the last couple of days.

 On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 OMAP3 relied on the memory config done by X-loader or Configuration
 Header. This
 has to be reworked for the implementation of a SPL. This patch
 configures RAM
 bank 0 if CONFIG_SPL_BUILD is set. Settings for Micron-RAM used by
 devkit8000
 are added to mem.h

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com
 ---
 V1 changes:
 ADD Settings for Micron RAM

 V2 changes:
 DEL spl_debug outputs if mem test fails/passes
 CHG CONFIG_PRELOADER to CONFIG_SPL_BUILD

 V3 changes:
 nothing

 V4 changes:
 nothing

 V5 changes:
 nothing

 V6 changes:
 nothing

 Transition from V1 to V2 also includes that this patch is now based on
 - the new SPL layout by Aneesh V and Daniel Schwierzeck
 - the OMAP4 SPL patches by Aneesh V

 This is the successor of [U-Boot,3/5] devkit8000 nand_spl: Add RAM
 configuration independent of x-loader or CH
 (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102114)
 ---
 arch/arm/cpu/armv7/omap3/sdrc.c | 30 ++-
 arch/arm/include/asm/arch-omap3/mem.h | 36
 +
 2 files changed, 65 insertions(+), 1 deletions(-)

 diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c
 b/arch/arm/cpu/armv7/omap3/sdrc.c
 index 2a7970b..dac14d0 100644
 --- a/arch/arm/cpu/armv7/omap3/sdrc.c
 +++ b/arch/arm/cpu/armv7/omap3/sdrc.c
 @@ -8,6 +8,9 @@
 * Copyright (C) 2004-2010
 * Texas Instruments Incorporated - http://www.ti.com/
 *
 + * Copyright (C) 2011
 + * Corscience GmbH Co. KG - Simon Schwarzschw...@corscience.de
 + *
 * Author :
 * Vaibhav Hiremathhvaib...@ti.com
 *
 @@ -133,13 +136,38 @@ void do_sdrc_init(u32 cs, u32 early)
 sdelay(0x2);
 }

 +#ifdef CONFIG_SPL_BUILD

 Is this really specific to SPL. mem_init() should ideally be the same
 for SPL and NOR u-boot, right? Maybe you could remove the #ifdef?

 I think NOR boot is broken on OMAP3(somebody please correct me if I am
 wrong). I think this may be one thing that helps to make it work again.

I did this to not influence non-SPL code. But you are right since 
mem_init isn't called if it is already in RAM I can remove the #ifdefs 
- will do in V7.

 + /* If we use a SPL there is no x-loader nor config header so we have
 + * to do the job ourselfs
 + */
 + if (cs == CS0) {
 + sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE;
 +
 + /* General SDRC config */
 + writel(V_MCFG,sdrc_base-cs[cs].mcfg);
 + writel(V_RFR_CTRL,sdrc_base-cs[cs].rfr_ctrl);
 +
 + /* AC timings */
 + writel(V_ACTIMA_165,sdrc_actim_base0-ctrla);
 + writel(V_ACTIMB_165,sdrc_actim_base0-ctrlb);
 +
 + /* Initialize */
 + writel(CMD_NOP,sdrc_base-cs[cs].manual);
 + writel(CMD_PRECHARGE,sdrc_base-cs[cs].manual);
 + writel(CMD_AUTOREFRESH,sdrc_base-cs[cs].manual);
 + writel(CMD_AUTOREFRESH,sdrc_base-cs[cs].manual);
 +
 + writel(V_MR,sdrc_base-cs[cs].mr);
 + }
 +#endif /* CONFIG_SPL_BUILD */


 best regards,
 Aneesh

Regards, thanks for review!
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V0] omap-common: move early UART clock setup to s_init

2011-07-28 Thread Andreas Bießmann
Hi Simon,

Am 28.07.2011 11:22, schrieb Simon Schwarz:
 Moves the early UART clock setup setup_clocks_for_console() from
 preloader_console_init() to s_init() of OMAP4.

I recommend putting this in your 'devkit8000 nand_spl support' series
before the current '2/5 omap-common: add nand_spl support' and remove
the '#ifdef CONFIG_OMAP34XX' in that patch. Albert how do you think
about this?

 Signed-off-by: Simon Schwarz simonschwarz...@gmail.com
 ---
  arch/arm/cpu/armv7/omap-common/spl.c |1 -
  arch/arm/cpu/armv7/omap4/board.c |1 +
  2 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
 b/arch/arm/cpu/armv7/omap-common/spl.c
 index d177652..d380b3e 100644
 --- a/arch/arm/cpu/armv7/omap-common/spl.c
 +++ b/arch/arm/cpu/armv7/omap-common/spl.c
 @@ -259,7 +259,6 @@ void preloader_console_init(void)

I recommend adding some comment for preloader_console_init() saying
'this requires UART clocks to be enabled before' in this patch.

   gd-flags |= GD_FLG_RELOC;
   gd-baudrate = CONFIG_BAUDRATE;
  
 - setup_clocks_for_console();
   serial_init();  /* serial communications setup */
  
   /* Avoid a second U-Boot coming from this string */

regards

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


Re: [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

2011-07-28 Thread Aneesh V
Hi Simon,

On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 Add NAND support for the new SPL structure.

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com
 ---
 This patch didn't exist before V2!

 V2 changes:
 ADD Some define-barriers for OMAP3 to only use NAND
 ADD nand_load_image() - inits the OMAP gpmc, loads the images - parses the
   header
 CHG cosmetic
 ADD do_reset() implementation for omap-common spl
 ADD nand_copy_image to nand.h
 ADD CPP barriers for mmc and nand support. The parts depending on library
   support are only compiled if the respective library is included.

 V3 changes:
 ADD Comment why setup_clocks_for_console() isn't called for OMAP3
 CHG cosmetic (deleted empty line)
 CHG rename of NAND_MODE_HW to NAND_MODE_HW_ECC
 DEL NAND_MODE_SW. Not used.

 V4 changes:
 CHG cosmetic - style problems

 V5 changes:
 CHG renamed nand_copy_image to nand_spl_load_image
 CHG offs paramter of nand_spl_load_image is of type loff_t now

 V6 changes:
 ADD call to nand_deselect after loading the images
 ADD nand_deselect to nand.h

 Transition from V1 to V2 also includes that this patch is now based on
   - the new SPL layout by Aneesh V and Daniel Schwierzeck
   - the OMAP4 SPL patches by Aneesh V
 ---
   arch/arm/cpu/armv7/omap-common/spl.c |   47 
 ++
   arch/arm/include/asm/omap_common.h   |1 +
   include/nand.h   |3 ++
   3 files changed, 51 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
 b/arch/arm/cpu/armv7/omap-common/spl.c
 index d177652..7ec5c7c 100644
 --- a/arch/arm/cpu/armv7/omap-common/spl.c
 +++ b/arch/arm/cpu/armv7/omap-common/spl.c
 @@ -26,6 +26,7 @@
   #includeasm/u-boot.h
   #includeasm/utils.h
   #includeasm/arch/sys_proto.h
 +#includenand.h
   #includemmc.h
   #includefat.h
   #includetimestamp_autogenerated.h
 @@ -107,6 +108,7 @@ static void parse_image_header(const struct image_header 
 *header)
   }
   }

 +#ifdef CONFIG_SPL_MMC_SUPPORT
   static void mmc_load_image_raw(struct mmc *mmc)
   {
   u32 image_size_sectors, err;
 @@ -140,7 +142,9 @@ end:
   hang();
   }
   }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */

here..


 +#ifdef CONFIG_SPL_MMC_SUPPORT
   static void mmc_load_image_fat(struct mmc *mmc)
   {
   s32 err;
 @@ -173,7 +177,9 @@ end:
   hang();
   }
   }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */

and here..

You start the same the #ifdef again immediately after the #endif. Why
don't you club them together into just one #ifdef block.

Actually, since we have garbage collection of un-used functions, I
think doing the calls under #ifdef should be enough, which you have
taken care in board_init_r(). That may help to avoid some #ifdef
clutter.


 +#ifdef CONFIG_SPL_MMC_SUPPORT
   static void mmc_load_image(void)
   {
   struct mmc *mmc;
 @@ -206,6 +212,28 @@ static void mmc_load_image(void)
   hang();
   }
   }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */
 +
 +#ifdef CONFIG_SPL_NAND_SUPPORT
 +static void nand_load_image(void)
 +{
 + gpmc_init();
 + nand_init();
 + nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
 + CONFIG_SYS_NAND_U_BOOT_SIZE,
 + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
 +#ifdef CONFIG_NAND_ENV_DST
 + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
 + (uchar *)CONFIG_NAND_ENV_DST);
 +#ifdef CONFIG_ENV_OFFSET_REDUND
 + nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
 + (uchar *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
 +#endif
 +#endif
 + nand_deselect();
 + parse_image_header((struct image_header *)CONFIG_SYS_NAND_U_BOOT_DST);
 +}
 +#endif /* CONFIG_SPL_NAND_SUPPORT */

   void jump_to_image_no_args(void)
   {
 @@ -228,10 +256,17 @@ void board_init_r(gd_t *id, ulong dummy)
   boot_device = omap_boot_device();
   debug(boot device - %d\n, boot_device);
   switch (boot_device) {
 +#ifdef CONFIG_SPL_MMC_SUPPORT
   case BOOT_DEVICE_MMC1:
   case BOOT_DEVICE_MMC2:
   mmc_load_image();
   break;
 +#endif
 +#ifdef CONFIG_SPL_NAND_SUPPORT
 + case BOOT_DEVICE_NAND:
 + nand_load_image();
 + break;
 +#endif
   default:
   printf(SPL: Un-supported Boot Device - %d!!!\n, boot_device);
   hang();
 @@ -259,7 +294,11 @@ void preloader_console_init(void)
   gd-flags |= GD_FLG_RELOC;
   gd-baudrate = CONFIG_BAUDRATE;

 +/* Console clock for OMAP3 is already initialized by per_clocks_enable()
 + * called in board.c by s_init() */
 +#ifndef CONFIG_OMAP34XX
   setup_clocks_for_console();
 +#endif

Please do one of the solutions Andreas suggested instead of having that
ifndef.

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


Re: [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

2011-07-28 Thread Aneesh V
Hi Simon,

On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
[snip ..]
 +
 +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 +{
 + debug(resetting cpu...);
 + reset_cpu(0);
 +
 + return 0;
 +}

Can you explain the need of this do_reset()? I couldn't figure out
where it is used in SPL.

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


Re: [U-Boot] [PATCH] mx53: use CONFIG_SYS_L2CACHE_OFF in config file

2011-07-28 Thread Jason Liu
Hi, stefano,

2011/7/28 Stefano Babic sba...@denx.de:
 On 07/28/2011 07:56 AM, Jason Liu wrote:
 Hi, Stefano,

 Hi Jason,


 It's used before, if you checkout tag: v2011.06

 #ifndef CONFIG_L2_OFF
        /* turn off L2 cache */
        l2_cache_disable();
        /* invalidate L2 cache also */
        invalidate_dcache(get_device_type());
 #endif
        i = 0;
        /* mem barrier to sync up things */
        asm(mcr p15, 0, %0, c7, c10, 4: :r(i));

 #ifndef CONFIG_L2_OFF
        l2_cache_enable();
 #endif

 However, as far as I can understand, L2 cache is disabled until
 explicitely enabled.

Look at the meaning from the name X_OFF, if we define it, it tells
people that we want to disable it explicitly. If not define it, it underlying
tells that we want to enable it, right? So, if we remove this define L2_OFF
from board config file, it may cause confuse since we don't want to
enable it now.




 I still think we need explicitly disable L2 cache first

 I am still checking this point. My concern is to understand if in the
 current code we need to do something or not. If there is no code to
 enable L2 cache (I have not found), there should be no need to disable
 it. After a reset, L2 cache is disabled, am I right ?
 Why do you think we have to explicitely disable it ? Am I missing
 something ?

Currently, MX5 will disable L2 after reset. some points as above.


. If it only
 omap related, I don't think we need
 CONFIG_SYS_L2CACHE_OFF for the global u-boot. If you grep the
 CONFIG_SYS_L2CACHE_OFF
 under include/configs, you will see a lot of define other than omap 
 platform.

 Nevertheless we have to decide if we need it for the MX5. If we manage
 enable/disable L2 Cache for the MX5, we need it, else not. As I can see
 in the actual code, we do not manage L2 Cache.

Yes, currently, we don't manage L2.
But, I don't know whether the common code will be changed in the future,
if we don't disable L2 explicitly, it will enable L2 by default just
like d-cache.


 It's due to it enable dcache by default if not define
 CONFIG_SYS_DCACHE_OFF explicitly.
 mxc_fec driver need be fixed or re-write to consider cache safe. I
 agree to disable d-cache first.

 Do I need submit patch to disable D-CACHE first?

 let's see if we agree on the following points:

 - CONFIG_L2_OFF is obsolete, as you pointed out, and must be removed

 - CONFIG_SYS_L2CACHE_OFF is needed for MX5 if we have code to enable /
 disable it. Let me know if you agree that L2 cache is disabled after a
 reset. Then we do not need this define until we explicitely enable it as
 default, as now for D cache.

 - because of D Cache issues in the driver, it is better to disable D
 Cache for MX5 processors.

 I think, if we agree on these point, we can manage the changes in a
 single patch (changes are made on the same files, that is the
 configuration file for the boards), and it is enough to add a useful
 comment to explain what we do.

OK, after get agreement, I will do it soon with single patch.


  And another issue
 for imx51 is that
 mmc command does not work correctly sometimes such as saveenv. Do you
 notice that?

 I admit I have not tested recently and I have not noted this issue. Last
 time was after some changes in MMC code.

 I am sure we get the same issues for D Cache as for the FEC. In fact,
 for powerpc the fsl_esdhc.c enables cache snooping and does not need to
 invalidate buffers. We have no counterpart for MX5.

Yes, correct.

Jason


 Best regards,
 Stefano Babic

 --
 =
 DENX Software Engineering GmbH,     MD: Wolfgang Denk  Detlev Zundel
 HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
 Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
 =

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


Re: [U-Boot] [PATCH] mx53: use CONFIG_SYS_L2CACHE_OFF in config file

2011-07-28 Thread Stefano Babic
On 07/28/2011 12:22 PM, Jason Liu wrote:
 Hi, stefano,

Hi Jason,

 Look at the meaning from the name X_OFF, if we define it, it tells
 people that we want to disable it explicitly.

Yes, but is only dead code for MX5. It has sense only if we add
l2_cache_enable() and disable functions.

 If not define it, it underlying
 tells that we want to enable it, right?

No, it says nothing. A lot of boards has not set this CONFIG, but this
does not mean that L2 cache is enabled.

 So, if we remove this define L2_OFF
 from board config file, it may cause confuse since we don't want to
 enable it now.

IMHO it is confusing if we add it.

If we set them into the config file, it means that the L2 Cache is
enable simply dropping it, and this is not true, as there is not yet
support. Better to add it when we have really support for it.

 I am still checking this point. My concern is to understand if in the
 current code we need to do something or not. If there is no code to
 enable L2 cache (I have not found), there should be no need to disable
 it. After a reset, L2 cache is disabled, am I right ?
 Why do you think we have to explicitely disable it ? Am I missing
 something ?
 
 Currently, MX5 will disable L2 after reset. some points as above.

Ok, we agree

 Yes, currently, we don't manage L2.
 But, I don't know whether the common code will be changed in the future,
 if we don't disable L2 explicitly, it will enable L2 by default just
 like d-cache.

Well, we will check this issue when it will be needed. We cannot know
the future, it coul also be there is support for L2 Cache at that moment
for the i.MX5.

 I think, if we agree on these point, we can manage the changes in a
 single patch (changes are made on the same files, that is the
 configuration file for the boards), and it is enough to add a useful
 comment to explain what we do.
 
 OK, after get agreement, I will do it soon with single patch.

Ok, I think we agree how to proceed ;-)

 I am sure we get the same issues for D Cache as for the FEC. In fact,
 for powerpc the fsl_esdhc.c enables cache snooping and does not need to
 invalidate buffers. We have no counterpart for MX5.
 
 Yes, correct.

Best regards,
Stefano Babic


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


Re: [U-Boot] [PATCH V6 5/5] devkit8000: Add nand-spl support for new SPL

2011-07-28 Thread Aneesh V
On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 Add NAND SPL support to the devkit8000 config

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com
 ---
 V1 changes:
 ADD devkit8000_nand to board.cfg
 ADD nand_spl Makefile, llinker script, spl-devkit8000.c
 ADD config ecc, SRAM, SPL to board config
 ADD CONFIG_SYS_SRAM_START and _SIZE to board config
 ADD CONFIG_SYS_SPL_TEXT_BASE, _MAX_SIZE and SPL_STACK to board config

 V2 changes:
 ADD CONFIG_SPL and LIBCOMMON, LIBDISK, I2C, LIBGENERIC, SERIAL, POWER, NAND 
 and
   CONFIG_SPL_LDSCRIPT to board config
 CHG renamed CONFIG_SYS_SPL_* to CONFIG_SPL_*
 ADD CONFIG_SYS_NAND_U_BOOT_START, _OFFS, _SIZE, _DST to board config: Where to
   expect u-boot and where to load it.
 ADD some barrier to not build board_eth_init in SPL
 DEL no changes to board.cfg
 DEL everything used the old nand_spl layout (Makefile, linker script,
   spl-devkit8000.c)
 CHG cosmetic

 V3 changes:
 CHG Deleted wrong comment

 V4 changes:
 CHG CONFIG_SYS_SRAM_SIZE NOW has the right value
 CHG cosmetic - corrected style problems

 V5 changes:
 nothing

 V6 changes:
 nothing

 Transition from V1 to V2 also includes that this patch is now based on
   - the new SPL layout by Aneesh V and Daniel Schwierzeck
   - the OMAP4 SPL patches by Aneesh V

 This is the successor of [U-Boot,5/5] devkit8000 nand_spl: add nand_spl
 support
 (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102111)
 ---
   board/timll/devkit8000/devkit8000.c |2 +-
   include/configs/devkit8000.h|   46 
 +++
   2 files changed, 47 insertions(+), 1 deletions(-)

 diff --git a/board/timll/devkit8000/devkit8000.c 
 b/board/timll/devkit8000/devkit8000.c
 index 95afaaa..9b53742 100644
 --- a/board/timll/devkit8000/devkit8000.c
 +++ b/board/timll/devkit8000/devkit8000.c
 @@ -119,7 +119,7 @@ void set_muxconf_regs(void)
   MUX_DEVKIT8000();
   }

 -#ifdef CONFIG_DRIVER_DM9000
 +#if defined(CONFIG_DRIVER_DM9000)  !defined(CONFIG_SPL_BUILD)
   /*
* Routine: board_eth_init
* Description: Setting up the Ethernet hardware.
 diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
 index 125c690..022069d 100644
 --- a/include/configs/devkit8000.h
 +++ b/include/configs/devkit8000.h
 @@ -307,4 +307,50 @@

 CONFIG_SYS_INIT_RAM_SIZE - \

 GENERATED_GBL_DATA_SIZE)

 +/* SRAM config */
 +#define CONFIG_SYS_SRAM_START  0x4020
 +#define CONFIG_SYS_SRAM_SIZE   0x1

OMAP3 secure devices do not have this much public SRAM. So, the above
values wouldn't work for it. I suggest the following values:

#define CONFIG_SYS_SRAM_START  0x40208000
#define CONFIG_SYS_SRAM_SIZE   0x8000 /* 32 KB */

#define CONFIG_SPL_TEXT_BASECONFIG_SYS_SRAM_START
#define CONFIG_SPL_MAX_SIZE 0x7C00  /* 31 K  - set aside at least 
1K 
for stack*/

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


Re: [U-Boot] [PATCH V6 5/5] devkit8000: Add nand-spl support for new SPL

2011-07-28 Thread Simon Schwarz
Hi Aneesh,

On 07/28/2011 12:51 PM, Aneesh V wrote:
 On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 Add NAND SPL support to the devkit8000 config

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com
 ---
 V1 changes:
 ADD devkit8000_nand to board.cfg
 ADD nand_spl Makefile, llinker script, spl-devkit8000.c
 ADD config ecc, SRAM, SPL to board config
 ADD CONFIG_SYS_SRAM_START and _SIZE to board config
 ADD CONFIG_SYS_SPL_TEXT_BASE, _MAX_SIZE and SPL_STACK to board config

 V2 changes:
 ADD CONFIG_SPL and LIBCOMMON, LIBDISK, I2C, LIBGENERIC, SERIAL, POWER,
 NAND and
 CONFIG_SPL_LDSCRIPT to board config
 CHG renamed CONFIG_SYS_SPL_* to CONFIG_SPL_*
 ADD CONFIG_SYS_NAND_U_BOOT_START, _OFFS, _SIZE, _DST to board config:
 Where to
 expect u-boot and where to load it.
 ADD some barrier to not build board_eth_init in SPL
 DEL no changes to board.cfg
 DEL everything used the old nand_spl layout (Makefile, linker script,
 spl-devkit8000.c)
 CHG cosmetic

 V3 changes:
 CHG Deleted wrong comment

 V4 changes:
 CHG CONFIG_SYS_SRAM_SIZE NOW has the right value
 CHG cosmetic - corrected style problems

 V5 changes:
 nothing

 V6 changes:
 nothing

 Transition from V1 to V2 also includes that this patch is now based on
 - the new SPL layout by Aneesh V and Daniel Schwierzeck
 - the OMAP4 SPL patches by Aneesh V

 This is the successor of [U-Boot,5/5] devkit8000 nand_spl: add nand_spl
 support
 (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102111)
 ---
 board/timll/devkit8000/devkit8000.c | 2 +-
 include/configs/devkit8000.h | 46 +++
 2 files changed, 47 insertions(+), 1 deletions(-)

 diff --git a/board/timll/devkit8000/devkit8000.c
 b/board/timll/devkit8000/devkit8000.c
 index 95afaaa..9b53742 100644
 --- a/board/timll/devkit8000/devkit8000.c
 +++ b/board/timll/devkit8000/devkit8000.c
 @@ -119,7 +119,7 @@ void set_muxconf_regs(void)
 MUX_DEVKIT8000();
 }

 -#ifdef CONFIG_DRIVER_DM9000
 +#if defined(CONFIG_DRIVER_DM9000) !defined(CONFIG_SPL_BUILD)
 /*
 * Routine: board_eth_init
 * Description: Setting up the Ethernet hardware.
 diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
 index 125c690..022069d 100644
 --- a/include/configs/devkit8000.h
 +++ b/include/configs/devkit8000.h
 @@ -307,4 +307,50 @@
 CONFIG_SYS_INIT_RAM_SIZE - \
 GENERATED_GBL_DATA_SIZE)

 +/* SRAM config */
 +#define CONFIG_SYS_SRAM_START 0x4020
 +#define CONFIG_SYS_SRAM_SIZE 0x1

 OMAP3 secure devices do not have this much public SRAM. So, the above
 values wouldn't work for it. I suggest the following values:

 #define CONFIG_SYS_SRAM_START 0x40208000
 #define CONFIG_SYS_SRAM_SIZE 0x8000 /* 32 KB */

 #define CONFIG_SPL_TEXT_BASE CONFIG_SYS_SRAM_START
 #define CONFIG_SPL_MAX_SIZE 0x7C00 /* 31 K - set aside at least 1K for
 stack*/

What do you mean by secure devices? Custom processors? The datasheet i 
have says 64K for OMAP35x devices.

Since this is the configuration for the devkit8000 and these devices 
have 64K SRAM I would prefer to leave these settings as they are.

If the SPL is ported to other OMAP3 devs with just 32K they can change 
the settings then. (At the moment the NAND SPL has 19K so this won't be 
a problem)


 best regards,
 Aneesh

Regards  thanks for reviewing
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V6 3/5] nand spl: add NAND Library to new SPL

2011-07-28 Thread Aneesh V
On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 Insert some NAND driver sources into NAND SPL library.

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com

[snip ..]

 +
 +int nand_curr_device = -1;

Is nand_curr_device used anywhere?

 +static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
 +static nand_info_t info;
 +nand_info_t nand_info[CONFIG_SYS_MAX_NAND_DEVICE];

Is nand_info used anywhere?

 +static struct nand_chip nand_chip;

Is nand_chip used anywhere? I see that this definition is shadowed in
function nand_init().

 +
 +#if (CONFIG_SYS_NAND_PAGE_SIZE= 512)

[snip ..]

 +/*
 + * omap_spl_read_buf16 - [DEFAULT] read chip data into buffer
 + * @mtd:MTD device structure
 + * @buf:buffer to store date

typo: date instead of data.

 + * @len:number of bytes to read
 + *
 + * Default read function for 16bit buswith
 + *
 + * This function is based on nand_read_buf16 from nand_base.c. This version
 + * reads 32bit not 16bit although the bus only has 16bit.
 + */
 +static void omap_spl_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len)
 +{
 + int i;
 + struct nand_chip *chip = mtd-priv;
 + u32 *p = (u32 *) buf;

Why this variable p?

 + len= 2;
 +
 + for (i = 0; i  len; i++)
 + p[i] = readl(chip-IO_ADDR_R);
 +}

Should this function be called omap_spl_read_buf32() ?
Or still better, should this be added as nand_read_buf32() in
nand_base.c itself?

 +
 +/*
 + * omap_spl_read_buf - [DEFAULT] read chip data into buffer
 + * @mtd:MTD device structure
 + * @buf:buffer to store date
 + * @len:number of bytes to read
 + *
 + * Default read function for 8bit buswith
 + *
 + * This is the same function as this from nand_base.c nand_read_buf
 + */
 +static void omap_spl_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
 +{
 + int i;
 + struct nand_chip *chip = mtd-priv;
 +
 + for (i = 0; i  len; i++)
 + buf[i] = readb(chip-IO_ADDR_R);
 +}
 +#endif

What is the difference between this function and nand_read_buf() in
nand_base.c ?

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


Re: [U-Boot] RFC [PATCH 5/5 v5] dreamplug: use MACH_TYPE_DREAMPLUG

2011-07-28 Thread Jason
On Thu, Jul 28, 2011 at 09:25:48AM +0200, Bdale Garbee wrote:
 On Wed, 27 Jul 2011 22:08:23 -0400, Jason u-b...@lakedaemon.net wrote:
  Since every Dreamplug on the market sets and uses MACH_TYPE_GURUPLUG, I
  think it's reasonable to use it (hopefully merged into u-boot) until the
  linux-arm tree gets sorted out and they accept new boards / machids.
  Then, the last patch can be added.
 
 If we're going to re-flash a bunch of Dreamplug units with new u-boot,
 I'd prefer we go ahead and set a new id.  If that means we have to carry
 around a local kernel patch for a while until the new id gets merged
 into the kernel.org tree, that seems much easier to cope with than
 having to flash yet another new u-boot later?

I agree, which is why I included patch 5.  I've rebased my Linux
dreamplug patches against v3.0 and am doing some testing, Hopefully I
can push those out this weekend.  I'll add you folks to the CC when I do
that.

Do you think Linus, GregKH and others would flip if I suggested
arch/arm/staging/* ? ;-)

thx,

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


Re: [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

2011-07-28 Thread Simon Schwarz
On 07/28/2011 11:42 AM, Aneesh V wrote:
 Hi Simon,

 On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 Add NAND support for the new SPL structure.

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com
 ---
 This patch didn't exist before V2!

 V2 changes:
 ADD Some define-barriers for OMAP3 to only use NAND
 ADD nand_load_image() - inits the OMAP gpmc, loads the images - parses
 the
 header
 CHG cosmetic
 ADD do_reset() implementation for omap-common spl
 ADD nand_copy_image to nand.h
 ADD CPP barriers for mmc and nand support. The parts depending on library
 support are only compiled if the respective library is included.

 V3 changes:
 ADD Comment why setup_clocks_for_console() isn't called for OMAP3
 CHG cosmetic (deleted empty line)
 CHG rename of NAND_MODE_HW to NAND_MODE_HW_ECC
 DEL NAND_MODE_SW. Not used.

 V4 changes:
 CHG cosmetic - style problems

 V5 changes:
 CHG renamed nand_copy_image to nand_spl_load_image
 CHG offs paramter of nand_spl_load_image is of type loff_t now

 V6 changes:
 ADD call to nand_deselect after loading the images
 ADD nand_deselect to nand.h

 Transition from V1 to V2 also includes that this patch is now based on
 - the new SPL layout by Aneesh V and Daniel Schwierzeck
 - the OMAP4 SPL patches by Aneesh V
 ---
 arch/arm/cpu/armv7/omap-common/spl.c | 47
 ++
 arch/arm/include/asm/omap_common.h | 1 +
 include/nand.h | 3 ++
 3 files changed, 51 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/cpu/armv7/omap-common/spl.c
 b/arch/arm/cpu/armv7/omap-common/spl.c
 index d177652..7ec5c7c 100644
 --- a/arch/arm/cpu/armv7/omap-common/spl.c
 +++ b/arch/arm/cpu/armv7/omap-common/spl.c
 @@ -26,6 +26,7 @@
 #includeasm/u-boot.h
 #includeasm/utils.h
 #includeasm/arch/sys_proto.h
 +#includenand.h
 #includemmc.h
 #includefat.h
 #includetimestamp_autogenerated.h
 @@ -107,6 +108,7 @@ static void parse_image_header(const struct
 image_header *header)
 }
 }

 +#ifdef CONFIG_SPL_MMC_SUPPORT
 static void mmc_load_image_raw(struct mmc *mmc)
 {
 u32 image_size_sectors, err;
 @@ -140,7 +142,9 @@ end:
 hang();
 }
 }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */

 here..


 +#ifdef CONFIG_SPL_MMC_SUPPORT
 static void mmc_load_image_fat(struct mmc *mmc)
 {
 s32 err;
 @@ -173,7 +177,9 @@ end:
 hang();
 }
 }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */

 and here..

 You start the same the #ifdef again immediately after the #endif. Why
 don't you club them together into just one #ifdef block.
IMHO #ifdef each function makes it more readable but...


 Actually, since we have garbage collection of un-used functions, I
 think doing the calls under #ifdef should be enough, which you have
 taken care in board_init_r(). That may help to avoid some #ifdef
 clutter.
...I take this way :)

I had to define some MMC specific stuff in the board config (copied it 
from OMAP4 - not tested) and added __attribute__((unused)) to 
mmc_load_image to prevent the warning if the Library is not used.

Did this also for NAND.

- next version

Maybe it is a good idea to have some dummy values for the unused libs in 
SPL? With a compile-time warning that is emitted when no value is set 
but the library is activated.


 +#ifdef CONFIG_SPL_MMC_SUPPORT
 static void mmc_load_image(void)
 {
 struct mmc *mmc;
 @@ -206,6 +212,28 @@ static void mmc_load_image(void)
 hang();
 }
 }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */
 +
 +#ifdef CONFIG_SPL_NAND_SUPPORT
 +static void nand_load_image(void)
 +{
 + gpmc_init();
 + nand_init();
 + nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
 + CONFIG_SYS_NAND_U_BOOT_SIZE,
 + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
 +#ifdef CONFIG_NAND_ENV_DST
 + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
 + (uchar *)CONFIG_NAND_ENV_DST);
 +#ifdef CONFIG_ENV_OFFSET_REDUND
 + nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
 + (uchar *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
 +#endif
 +#endif
 + nand_deselect();
 + parse_image_header((struct image_header *)CONFIG_SYS_NAND_U_BOOT_DST);
 +}
 +#endif /* CONFIG_SPL_NAND_SUPPORT */

 void jump_to_image_no_args(void)
 {
 @@ -228,10 +256,17 @@ void board_init_r(gd_t *id, ulong dummy)
 boot_device = omap_boot_device();
 debug(boot device - %d\n, boot_device);
 switch (boot_device) {
 +#ifdef CONFIG_SPL_MMC_SUPPORT
 case BOOT_DEVICE_MMC1:
 case BOOT_DEVICE_MMC2:
 mmc_load_image();
 break;
 +#endif
 +#ifdef CONFIG_SPL_NAND_SUPPORT
 + case BOOT_DEVICE_NAND:
 + nand_load_image();
 + break;
 +#endif
 default:
 printf(SPL: Un-supported Boot Device - %d!!!\n, boot_device);
 hang();
 @@ -259,7 +294,11 @@ void preloader_console_init(void)
 gd-flags |= GD_FLG_RELOC;
 gd-baudrate = CONFIG_BAUDRATE;

 +/* Console clock for OMAP3 is already initialized by per_clocks_enable()
 + * called in board.c by s_init() */
 +#ifndef CONFIG_OMAP34XX
 setup_clocks_for_console();
 +#endif

 Please do one of the solutions Andreas suggested instead of having that
 ifndef.

This is done in the next version.


 br,
 Aneesh

Regards  as always thanks for 

Re: [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

2011-07-28 Thread Simon Schwarz
Hi Aneesh,

On 07/28/2011 11:58 AM, Aneesh V wrote:
 Hi Simon,

 On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 [snip ..]
 +
 +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 +{
 + debug(resetting cpu...);
 + reset_cpu(0);
 +
 + return 0;
 +}

 Can you explain the need of this do_reset()? I couldn't figure out
 where it is used in SPL.

Thats odd. I added this because of vsprintf - this calls do_reset() 
which is not included in the SPL. This was in an early stage of SPL and 
OMAP4 patches. Seems this is not needed anymore: will delete it for the 
next version.

 br,
 Aneesh

Regards  thx for the review!
Simon

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


Re: [U-Boot] [PATCH V0] omap-common: move early UART clock setup to board.c

2011-07-28 Thread Wolfgang Denk
Dear Simon Schwarz,

In message 1311844938-17278-1-git-send-email-simonschwarz...@gmail.com you 
wrote:
 This patch moves the setup_clocks_for_console()-call from
 preloader_console_init() to s_init().
 This is done to use the same implementation for OMAP3 and OMAP4
 
 For discussion see: 
 http://article.gmane.org/gmane.comp.boot-loaders.u-boot/104120
 
 This is based on the following patches:
 - New SPL framework
   - OMAP4 SPL
 Both are already in u-boot-ti repo.
 
 Simon Schwarz (1):
   omap-common: move early UART clock setup to s_init
 
  arch/arm/cpu/armv7/omap-common/spl.c |1 -
  arch/arm/cpu/armv7/omap4/board.c |1 +
  2 files changed, 1 insertions(+), 1 deletions(-)

There is no patch in this file anywhere.

Also, please omit the V0 part in the subject, it makes no sense.

Finally, please don't use the same subject for several changes.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It may be bad manners to talk with your mouth full, but it isn't  too
good either if you speak when your head is empty.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V0] omap-common: move early UART clock setup to s_init

2011-07-28 Thread Wolfgang Denk
Dear Simon Schwarz,

In message 1311844938-17278-2-git-send-email-simonschwarz...@gmail.com you 
wrote:
 Moves the early UART clock setup setup_clocks_for_console() from
 preloader_console_init() to s_init() of OMAP4.
 
 Signed-off-by: Simon Schwarz simonschwarz...@gmail.com
 ---
  arch/arm/cpu/armv7/omap-common/spl.c |1 -
  arch/arm/cpu/armv7/omap4/board.c |1 +
  2 files changed, 1 insertions(+), 1 deletions(-)

I'm unhappy about the subject.  not to mention again that you posted
another (empty) patch with basicly the same subject line, but you say
omap-common: in the subject, while the code looks to be OMAP4
specific?  This is kind of misleading.

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
365 Days of drinking Lo-Cal beer.   = 1 Lite-year
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] armv7: integrate cache maintenance support breaks km_kirkwood ethernet

2011-07-28 Thread Holger Brunck
Hi Aneesh,
today I did a rebase of my development branch to current u-boot master. And I
saw on our km_kirkwood board that our egiga0 interface isn't working anymore.

The CPU is a:
SoC:   Kirkwood 88F6281_A0

After bisecting the current tree I got:

c2dd0d45540397704de9b13287417d21049d34c6 is the first bad commit
commit c2dd0d45540397704de9b13287417d21049d34c6
Author: Aneesh V ane...@ti.com
Date:   Thu Jun 16 23:30:49 2011 +

armv7: integrate cache maintenance support

And indeed after reverting this commit on current HEAD my board is usable again.

Any ideas how to fix this problem?

Best regards
Holger Brunck

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


Re: [U-Boot] Building and Debuging U-Boot in Eclipse Helios On Window XP.pdf

2011-07-28 Thread Wolfgang Denk
Dear =?GB2312?B?wbrR17L9?=,

In message BANLkTi=y7dmkaw_3ofz2oo9nxzptvmd...@mail.gmail.com you wrote:

 I've Post an PDF Document to describe how to Build and Debug U-Boot in
 Eclipse Helios On Window XP.
 My Target CPU is at91sam9263. Debuger is J-link.
 here is the download link:
 
 http://www.at91.com/forum/viewtopic.php/t,20216/

Thanks for sharing this information.  I added a link on our doc page:
http://www.denx.de/wiki/U-Boot/Documentation

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
Punishment becomes ineffective after a certain point. Men become  in-
sensitive.
-- Eneg, Patterns of Force, stardate 2534.7
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ubifs: Fix bad free() sequence in ubifs_finddir()

2011-07-28 Thread Wolfgang Denk
Free private_data member element before freeing file structure.
This was causing malloc to crash. Also remove unnecessary variable
assigments as file structure gets free'd as well.

Signed-off-by: Rod Boyce ub...@teamboyce.co.uk
Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Stefan Roese s...@denx.de
---
As Rod appears to have disappeared I took the frredom to jump in and
fix this. - wd

 fs/ubifs/ubifs.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 5a5c739..61f70b2 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -360,6 +360,8 @@ out:
return err;
}
 
+   if (file-private_data)
+   kfree(file-private_data);
if (file)
free(file);
if (dentry)
@@ -367,10 +369,6 @@ out:
if (dir)
free(dir);
 
-   if (file-private_data)
-   kfree(file-private_data);
-   file-private_data = NULL;
-   file-f_pos = 2;
return 0;
 }
 
-- 
1.7.6

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


Re: [U-Boot] [PATCH 1/3] omap3evm: eth: split function setup_net_chip

2011-07-28 Thread Wolfgang Denk
Dear Sanjeev Premi,

In message 1308770649-3802-2-git-send-email-pr...@ti.com you wrote:
 In current implementation, the function sets up the ethernet
 chip and resets it. The steps to reset depend upon the board
 revision.
 
 The patch moves the reset actions to new function reset_net_chip().

Your patch does not add any such new function, so it will result in
compile errors?

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
miracle:  an  extremely  outstanding  or  unusual  event,  thing,  or
accomplishment.- Webster's Dictionary
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] omap3evm: Update ethernet reset sequence for Rev.G board

2011-07-28 Thread Wolfgang Denk
Dear Sanjeev Premi,

In message 1308770649-3802-3-git-send-email-pr...@ti.com you wrote:
 
 + if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1) {
 + gpio_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
 + pin = GPIO0;/* Output pin: GPIO Bank 3, pin 0 */
 + } else {
 + gpio_base = (struct gpio *)OMAP34XX_GPIO1_BASE;
 + pin = GPIO7;/* Output pin: GPIO Bank 0, pin 7 */

Is this bank 0 or bank 1?

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 are some things worth dying for.
-- Kirk, Errand of Mercy, stardate 3201.7
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] powerpc/eeprom: cleanup mac command

2011-07-28 Thread Wolfgang Denk
Dear York Sun,

In message 1309457195-8475-1-git-send-email-york...@freescale.com you wrote:
 Move mac command to board/freescale/common/sys_eeprom.c.
 Change the help message to be more helpful. Print argument format.
 Fix MAX_NUM_PORTS to comply with v1 NXID format.
 
 Signed-off-by: York Sun york...@freescale.com

Why are you turning a generic, board and architecture independent
command into a FSL specific one?

This makes no sense to me, NAK.

  board/freescale/common/sys_eeprom.c |   29 -
  common/Makefile |1 -
  common/cmd_mac.c|   49 
 ---
  3 files changed, 28 insertions(+), 51 deletions(-)
  delete mode 100644 common/cmd_mac.c

In case you ever move / rename a file:  please supply the options so
git will detect the move / copy / rename.

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 can fool some of the people all of the time, and You can fool all
of the people some of the time, but You can't fool mom.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/2] ext2: Fix checkpatch violations

2011-07-28 Thread Wolfgang Denk
Dear Anton Staaf,

In message 1309459537-312-2-git-send-email-robot...@chromium.org you wrote:
 Fix all checkpatch violations in the low level Ext2 block
 device reading code.  This is done in preparation for cleaning
 up the partial sector access code.
 
 Also replace hard coded function names in printfs with __func__
 macro, and correctly indent comments for style consistency
 not captured by checkpatch.
 
 Signed-off-by: Anton Staaf robot...@chromium.org
 Cc: Andy Fleming aflem...@freescale.com
 Cc: Detlev Zundel d...@denx.de
 ---
  fs/ext2/dev.c |   82 
 ++---
  1 files changed, 43 insertions(+), 39 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Half of the people in the world are below average.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/2] ext2: Simplify partial sector access logic

2011-07-28 Thread Wolfgang Denk
Dear Anton Staaf,

In message 1309459537-312-3-git-send-email-robot...@chromium.org you wrote:
 Previously reading zero full sectors (reading the end of one
 sector and the beginning of the next for example) was special
 cased and involved stack allocating a second sector buffer.  This
 change uses the same code path for this case as well as when there
 are a non-zero number of full sectors to access.  The result is
 easier to read and reduces the maximum stack used.
 
 Signed-off-by: Anton Staaf robot...@chromium.org
 Cc: Andy Fleming aflem...@freescale.com
 Cc: Detlev Zundel d...@denx.de
 ---
  fs/ext2/dev.c |   42 +++---
  1 files changed, 15 insertions(+), 27 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I can type faster than I can move a  mouse,  so  I  find  menu-driven
drawing packages time consuming and frustrating.  - W. R. Stevens
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] km/common: add printings to boardid commands

2011-07-28 Thread Wolfgang Denk
Dear Holger Brunck,

In message 1309854242-11354-2-git-send-email-holger.bru...@keymile.com you 
wrote:
 Be verbose if do_setboardid was called and print
 correct names of variables in do_checkboardidhwk.
 
 Signed-off-by: Holger Brunck holger.bru...@keymile.com
 cc: Valentin Longchamp valentin.longch...@keymile.com
 cc: Heiko Schocher h...@denx.de
 cc: Wolfgang Denk w...@denx.de
 ---
  board/keymile/common/common.c |6 +-
  1 files changed, 5 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Build a system that even a fool can use and only a fool will want  to
use it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4] km/common: use u-boot.kwb for u-boot update function on arm

2011-07-28 Thread Wolfgang Denk
Dear Holger Brunck,

In message 1309854242-11354-3-git-send-email-holger.bru...@keymile.com you 
wrote:
 Now we use the standard u-boot make to build the Kirkwood binary.
 The output file is u-boot.kwb. So use this name for the tftp
 update function to avoid confusion, because this is the binary we
 need on Kirkwood.
 
 Signed-off-by: Holger Brunck holger.bru...@keymile.com
 cc: Valentin Longchamp valentin.longch...@keymile.com
 cc: Heiko Schocher h...@denx.de
 cc: Wolfgang Denk w...@denx.de
 ---
  include/configs/km/keymile-common.h |1 -
  include/configs/km/km-powerpc.h |1 +
  include/configs/km/km_arm.h |1 +
  3 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

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


Re: [U-Boot] [PATCH 3/4] km/common: moved eeprom config to pbec specific part

2011-07-28 Thread Wolfgang Denk
Dear Holger Brunck,

In message 1309854242-11354-4-git-send-email-holger.bru...@keymile.com you 
wrote:
 From: Stefan Bigler stefan.big...@keymile.com
 
 Moved eeprom config to specific part, to allow bigger eeprom write pages
 for km_kirkwood designs. Write page only used for env eeprom in std use
 cases. 24C128 has page size of 64bytes - 8 time faster.
 
 Signed-off-by: Stefan Bigler stefan.big...@keymile.com
 cc: Valentin Longchamp valentin.longch...@keymile.com
 cc: Heiko Schocher h...@denx.de
 cc: Wolfgang Denk w...@denx.de
 ---
  include/configs/km/keymile-common.h |6 --
  include/configs/km/km-powerpc.h |6 ++
  include/configs/km/km_arm.h |6 ++
  3 files changed, 12 insertions(+), 6 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The optimum committee has no members.
   - Norman Augustine
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] km/common: i2c deblock: enabled print of i2c deblock status

2011-07-28 Thread Wolfgang Denk
Dear Holger Brunck,

In message 1309854242-11354-5-git-send-email-holger.bru...@keymile.com you 
wrote:
 From: Stefan Bigler stefan.big...@keymile.com
 
 Enable printout of i2c deblocking status if chips were in block
 state or deblocking failed.
 
 Signed-off-by: Stefan Bigler stefan.big...@keymile.com
 cc: Valentin Longchamp valentin.longch...@keymile.com
 cc: Heiko Schocher h...@denx.de
 cc: Wolfgang Denk w...@denx.de
 ---
  board/keymile/common/common.c |3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
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] RFC [PATCH 5/5 v5] dreamplug: use MACH_TYPE_DREAMPLUG

2011-07-28 Thread Bdale Garbee
On Thu, 28 Jul 2011 08:43:53 -0400, Jason u-b...@lakedaemon.net wrote:
 I agree, which is why I included patch 5.  I've rebased my Linux
 dreamplug patches against v3.0 and am doing some testing, Hopefully I
 can push those out this weekend.  I'll add you folks to the CC when I do
 that.

Great, I'll look forward to them.  We're getting dangerously close to
having all the right bits in hand to issue an initial developer's image
for the Dreamplug on behalf of the FreedomBox Foundation.  Really
appreciate your timely help with this part!

 Do you think Linus, GregKH and others would flip if I suggested
 arch/arm/staging/* ? ;-)

;-)  

Bdale


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


Re: [U-Boot] Nand Erase/Write Fails with mtd error -5

2011-07-28 Thread Wolfgang Denk
Dear Bouhara Kamel,

In message 1310410277.25591.yahoomai...@web24917.mail.ird.yahoo.com you wrote:

 Hello,  Im getting a trouble with mtd on my imx27 27 board, I can't write or 
 erase it on U-Boot-1.3.4, here is the log :  U-Boot run update_all
...
 Anyone have an idea of the problem here? 

Well, v1.3.4 is 3 years old and as such hopelessly out of date.
Please do yourself (and us) a favour and update to current code, then
try again.

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
Military secrets are the most fleeting of all.
-- Spock, The Enterprise Incident, stardate 5027.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V6 3/5] nand spl: add NAND Library to new SPL

2011-07-28 Thread Simon Schwarz
Hi Aneesh,

On 07/28/2011 01:54 PM, Aneesh V wrote:
 On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 Insert some NAND driver sources into NAND SPL library.

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com

 [snip ..]

 +
 +int nand_curr_device = -1;

 Is nand_curr_device used anywhere?

Was used in nand.c - this isn't included anymore - deleted


 +static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
 +static nand_info_t info;
 +nand_info_t nand_info[CONFIG_SYS_MAX_NAND_DEVICE];

 Is nand_info used anywhere?

Same as above - deleted.


 +static struct nand_chip nand_chip;

 Is nand_chip used anywhere? I see that this definition is shadowed in
 function nand_init().

Deleted the double definition.

nand_chip is used in:
- nand_command
- nand_is_bad_block
- nand_read_page
- nand_init
- nand_deselect


 +
 +#if (CONFIG_SYS_NAND_PAGE_SIZE= 512)

 [snip ..]

 +/*
 + * omap_spl_read_buf16 - [DEFAULT] read chip data into buffer
 + * @mtd: MTD device structure
 + * @buf: buffer to store date

 typo: date instead of data.


see below for solution (btw. this typo comes from nand_base.c)

 + * @len: number of bytes to read
 + *
 + * Default read function for 16bit buswith
 + *
 + * This function is based on nand_read_buf16 from nand_base.c. This
 version
 + * reads 32bit not 16bit although the bus only has 16bit.
 + */
 +static void omap_spl_read_buf16(struct mtd_info *mtd, uint8_t *buf,
 int len)
 +{
 + int i;
 + struct nand_chip *chip = mtd-priv;
 + u32 *p = (u32 *) buf;

 Why this variable p?
It is used to cast the 8-bit buffer variable into a 32bit one. Actually 
the same is done for the 16bit implementation. (There it is the adaption 
to the bus width - why 32bit here see below)

 + len= 2;
 +
 + for (i = 0; i len; i++)
 + p[i] = readl(chip-IO_ADDR_R);
 +}

 Should this function be called omap_spl_read_buf32() ?
 Or still better, should this be added as nand_read_buf32() in
 nand_base.c itself?

Oh. There I played around with the Access Size Adaptation of the GPMC - 
It is still a x16 interface - this is what the 16 refers to IMHO. But 
for sake of simplicity I will change this back to 16bit access - I don't 
think that there is a big performance impact although I didn't measure it.

I cloned them because the functions in nand_base.c are static.

My solution: deleted the cloned functions - use these from nand_base by 
removing the static modifier and add them to nand.h

This leaves nand_base.c inconsistent - some functions are static, some 
not - maybe we should un-static all read/write functions as they are 
normally used in SPL?

 +
 +/*
 + * omap_spl_read_buf - [DEFAULT] read chip data into buffer
 + * @mtd: MTD device structure
 + * @buf: buffer to store date
 + * @len: number of bytes to read
 + *
 + * Default read function for 8bit buswith
 + *
 + * This is the same function as this from nand_base.c nand_read_buf
 + */
 +static void omap_spl_read_buf(struct mtd_info *mtd, uint8_t *buf, int
 len)
 +{
 + int i;
 + struct nand_chip *chip = mtd-priv;
 +
 + for (i = 0; i len; i++)
 + buf[i] = readb(chip-IO_ADDR_R);
 +}
 +#endif

 What is the difference between this function and nand_read_buf() in
 nand_base.c ?
none - static is the problem. Did the same as with the x16 version above.


 best regards,
 Aneesh

Regards  thx for the review!
Simon

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


Re: [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

2011-07-28 Thread Aneesh V
Hi Simon,

On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 Add NAND support for the new SPL structure.

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com
 ---
 This patch didn't exist before V2!

 V2 changes:
 ADD Some define-barriers for OMAP3 to only use NAND
 ADD nand_load_image() - inits the OMAP gpmc, loads the images - parses the
   header
 CHG cosmetic
 ADD do_reset() implementation for omap-common spl
 ADD nand_copy_image to nand.h
 ADD CPP barriers for mmc and nand support. The parts depending on library
   support are only compiled if the respective library is included.

 V3 changes:
 ADD Comment why setup_clocks_for_console() isn't called for OMAP3
 CHG cosmetic (deleted empty line)
 CHG rename of NAND_MODE_HW to NAND_MODE_HW_ECC
 DEL NAND_MODE_SW. Not used.

 V4 changes:
 CHG cosmetic - style problems

 V5 changes:
 CHG renamed nand_copy_image to nand_spl_load_image
 CHG offs paramter of nand_spl_load_image is of type loff_t now

 V6 changes:
 ADD call to nand_deselect after loading the images
 ADD nand_deselect to nand.h

 Transition from V1 to V2 also includes that this patch is now based on
   - the new SPL layout by Aneesh V and Daniel Schwierzeck
   - the OMAP4 SPL patches by Aneesh V
 ---
   arch/arm/cpu/armv7/omap-common/spl.c |   47 
 ++
   arch/arm/include/asm/omap_common.h   |1 +
   include/nand.h   |3 ++
   3 files changed, 51 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
 b/arch/arm/cpu/armv7/omap-common/spl.c
 index d177652..7ec5c7c 100644
 --- a/arch/arm/cpu/armv7/omap-common/spl.c
 +++ b/arch/arm/cpu/armv7/omap-common/spl.c
 @@ -26,6 +26,7 @@
   #includeasm/u-boot.h
   #includeasm/utils.h
   #includeasm/arch/sys_proto.h
 +#includenand.h
   #includemmc.h
   #includefat.h
   #includetimestamp_autogenerated.h
 @@ -107,6 +108,7 @@ static void parse_image_header(const struct image_header 
 *header)
   }
   }

 +#ifdef CONFIG_SPL_MMC_SUPPORT
   static void mmc_load_image_raw(struct mmc *mmc)
   {
   u32 image_size_sectors, err;
 @@ -140,7 +142,9 @@ end:
   hang();
   }
   }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */

 +#ifdef CONFIG_SPL_MMC_SUPPORT
   static void mmc_load_image_fat(struct mmc *mmc)
   {
   s32 err;
 @@ -173,7 +177,9 @@ end:
   hang();
   }
   }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */

 +#ifdef CONFIG_SPL_MMC_SUPPORT
   static void mmc_load_image(void)
   {
   struct mmc *mmc;
 @@ -206,6 +212,28 @@ static void mmc_load_image(void)
   hang();
   }
   }
 +#endif /* CONFIG_SPL_MMC_SUPPORT */
 +
 +#ifdef CONFIG_SPL_NAND_SUPPORT
 +static void nand_load_image(void)
 +{
 + gpmc_init();
 + nand_init();
 + nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
 + CONFIG_SYS_NAND_U_BOOT_SIZE,
 + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);

Guess CONFIG_SYS_NAND_U_BOOT_DST is same as CONFIG_SYS_TEXT_BASE. Why
define a new flag then?

 +#ifdef CONFIG_NAND_ENV_DST
 + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
 + (uchar *)CONFIG_NAND_ENV_DST);
 +#ifdef CONFIG_ENV_OFFSET_REDUND
 + nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
 + (uchar *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
 +#endif
 +#endif
 + nand_deselect();
 + parse_image_header((struct image_header *)CONFIG_SYS_NAND_U_BOOT_DST);

I think you are assuming the image type and size here. Why not do this 
as it is done for MMC. That is, read just 1 sector, parse the buffer,
find the size of the image and read only that much subsequently. You 
will have to then use u-boot.img instead of u-boot.bin as the payload.

Maybe you should clone arch/arm/cpu/armv7/omap4/config.mk in omap3
folder to get MLO and u-boot.img targets.

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


Re: [U-Boot] [PATCH] post: fix up I/O helper usage

2011-07-28 Thread Wolfgang Denk
Dear Mike Frysinger,

In message CAJaTeTpdbcSx5oWsQaP=yqfkynzcvgc-w4g18zymka5ggba...@mail.gmail.com 
you wrote:

  - return in_le32((volatile void *)(_POST_WORD_ADDR));
  + return inl((volatile void *)(_POST_WORD_ADDR));
   }
 
  Is this supposed to fix any real problem, or just a change according
  to your personal preferences?
 
 the in_le32 funcs (and all the other related le32 helpers) never
 made it into the common Linux API and many
 ports (such as the Blackfin arch) never defined them.  so it fixes

True.  But the same is also true for any other of the so-called
standard accessors.  The fact that some architectures are slow to
adapt to the standards does not convince me that we have to always
accept the lowest common denominator.  We can also push forward, at
least sometimes.

 building for all the ports which lack in_le32.  i dont have a source
 tree by me atm, but i'd imagine that this is most arches.

outl() feels wrong to me - the signature (second argument is an I/O
port) and the definition in Linux (include/asm-generic/io.h: return
readl(addr + PCI_IOBASE);) this is for accessing I/O ports. The
documentation (memory-barriers.txt) says:

 (*) inX(), outX():

  These are intended to talk to I/O space rather than
  memory space ...


What we should be using (and standardizing for) is probably this (at
least some of the PTBs said so in the past):

 (*) ioreadX(), iowriteX()

  These will perform appropriately for the type of access
  they're actually doing, be it inX()/outX() or
  readX()/writeX().

However, even less architectres have these. [But funny enough, in
U-Boot it's BF which leads by example.]

Sorry, but I will not accept inl() 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
Operating-system software is the program that  orchestrates  all  the
basic functions of a computer.
- The Wall Street Journal, Tuesday, September 15, 1987, page 40
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

2011-07-28 Thread Aneesh V
On Thursday 28 July 2011 06:14 PM, Simon Schwarz wrote:
[snip ..]

 +#endif /* CONFIG_SPL_MMC_SUPPORT */

 and here..

 You start the same the #ifdef again immediately after the #endif. Why
 don't you club them together into just one #ifdef block.
 IMHO #ifdef each function makes it more readable but...

Ok. I don't have any strong views on that.



 Actually, since we have garbage collection of un-used functions, I
 think doing the calls under #ifdef should be enough, which you have
 taken care in board_init_r(). That may help to avoid some #ifdef
 clutter.
 ...I take this way :)

 I had to define some MMC specific stuff in the board config (copied it

Does your board have MMC support? Then it definitely makes sense to
keep MMC support enabled.

 from OMAP4 - not tested) and added __attribute__((unused)) to
 mmc_load_image to prevent the warning if the Library is not used.

Did GCC give warning without this change? I think it doesn't due to
-ffunction-sections?

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


Re: [U-Boot] [PATCH] ubifs: Fix bad free() sequence in ubifs_finddir()

2011-07-28 Thread Rod Boyce


On 28/07/11 14:27, Wolfgang Denk wrote:
 As Rod appears to have disappeared I took the frredom to jump in and
 fix this. - wd


All,

Sorry about this I missed the e-mail asking me to reformat the patch.  
Thanks for sorting this out Wolfgang.

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


Re: [U-Boot] [PATCH V3+] I2C: mxc_i2c rework

2011-07-28 Thread Wolfgang Denk
Dear Marek,

In message 4e1eb127.3040...@denx.de Heiko wrote:
 Hello Marek,
 
 Marek Vasut wrote:
  Rewrite the mxc_i2c driver.
   * This version is much closer to Linux implementation.
   * Fixes IPG_PERCLK being incorrectly used as clock source
   * Fixes behaviour of the driver on iMX51
   * Clean up coding style a bit ;-)
  
  Based on commit: e39428d53d080ad2615b772d7f99d2a70c2aaab2
  Date:   Mon Jun 21 09:27:05 2010 +0200
  i2c-imx: do not allow interruptions when waiting for I2C to complete
  
  Signed-off-by: Marek Vasut marek.va...@gmail.com
  ---
   drivers/i2c/mxc_i2c.c |  424 
  +
   1 files changed, 290 insertions(+), 134 deletions(-)
  
  V2: Convert register access to struct mxc_i2c_regs.
  
  V3: Update licensing info
  
  V3+: Add commit ID into commit message
 
 checkpatch says:
 
 ERROR: trailing statements should be on next line
 #143: FILE: drivers/i2c/mxc_i2c.c:130:
 +   for (i = 0; i2c_clk_div[i][0]  div; i++);
 
 total: 1 errors, 0 warnings, 526 lines checked
 
 Can you fix this?

Are you going to send a fixed version any time soon?


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 A 100% MATTER  PRODUCT:  In  the  Unlikely  Event  That  This
Merchandise  Should  Contact  Antimatter  in Any Form, a Catastrophic
Explosion Will Result.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] Let source cross-reference targets follow symbolic links

2011-07-28 Thread Wolfgang Denk
Dear hkron...@frequentis.com,

In message 1310988078-30444-1-git-send-email-hkron...@frequentis.com you 
wrote:
 From: Horst Kronstorfer hkron...@frequentis.com
 
 Tell 'find' to follow symbolic links, so that files under include/asm
 and arch/$(ARCH)/include/asm/arch are added to the indexing file list.
 
 Signed-off-by: Horst Kronstorfer hkron...@frequentis.com
 ---
 Changes for v2:
 - Apply this change to all source cross-reference targets
 Changes for v3:
 - Introduce FINDFLAGS
 
  Makefile |   10 +++---
  1 files changed, 7 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Swap read error.  You lose your mind.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4] altera: fix printf typo

2011-07-28 Thread Wolfgang Denk
Dear Michael Jones,

In message 1310717371-1677-3-git-send-email-michael.jo...@matrix-vision.de 
you wrote:
 
 Signed-off-by: Michael Jones michael.jo...@matrix-vision.de
 ---
  drivers/fpga/altera.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
What about WRITING it first and rationalizing it afterwords?  :-)
   - Larry Wall in 8...@jpl-devvax.jpl.nasa.gov
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

2011-07-28 Thread Simon Schwarz
Hi Aneesh,

On 07/28/2011 04:24 PM, Aneesh V wrote:
 On Thursday 28 July 2011 06:14 PM, Simon Schwarz wrote:
 [snip ..]

 +#endif /* CONFIG_SPL_MMC_SUPPORT */

 and here..

 You start the same the #ifdef again immediately after the #endif. Why
 don't you club them together into just one #ifdef block.
 IMHO #ifdef each function makes it more readable but...

 Ok. I don't have any strong views on that.



 Actually, since we have garbage collection of un-used functions, I
 think doing the calls under #ifdef should be enough, which you have
 taken care in board_init_r(). That may help to avoid some #ifdef
 clutter.
 ...I take this way :)

 I had to define some MMC specific stuff in the board config (copied it

 Does your board have MMC support? Then it definitely makes sense to
 keep MMC support enabled.

Yes it has MMC. If NAND works and is stable enough I will go for MMC.

 from OMAP4 - not tested) and added __attribute__((unused)) to
 mmc_load_image to prevent the warning if the Library is not used.

 Did GCC give warning without this change? I think it doesn't due to
 -ffunction-sections?

It does issue warnings:
spl.c:178:13: warning: 'mmc_load_image' defined but not used


 best regards,
 Aneesh

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


Re: [U-Boot] [PATCH 3/4] cmd_mac: cleanup help

2011-07-28 Thread Wolfgang Denk
Dear Michael Jones,

In message 1310717371-1677-4-git-send-email-michael.jo...@matrix-vision.de 
you wrote:
 
 Signed-off-by: Michael Jones michael.jo...@matrix-vision.de
 ---
  common/cmd_mac.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The night sky over the planet Krikkit is the least interesting  sight
in the entire Universe.
 - Douglas Adams _Life, the Universe, and Everything_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] cmd_mac: fix help for 'mac read'

2011-07-28 Thread Wolfgang Denk
Dear Michael Jones,

In message 1310717371-1677-5-git-send-email-michael.jo...@matrix-vision.de 
you wrote:
 In the only implementation of 'mac read', it doesn't display the
 contents of the eeprom as the help indicated unless compiled with
 DEBUG. It only re-reads the contents of the EEPROM into memory.
 Displaying the contents of the EEPROM is done by passing no
 arguments to 'mac'.
 
 Signed-off-by: Michael Jones michael.jo...@matrix-vision.de
 ---
  common/cmd_mac.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Der Irrtum wiederholt sich immerfort in der Tat.  Deshalb muß man das
Wahre unermüdlich in Worten wiederholen. - Goethe
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/7] fpga: add #define for Altera Cyclone EP3C5

2011-07-28 Thread Wolfgang Denk
Dear Michael Jones,

In message 1310720986-5474-2-git-send-email-michael.jo...@matrix-vision.de 
you wrote:
 
 Signed-off-by: Michael Jones michael.jo...@matrix-vision.de
 ---
  include/ACEX1K.h |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Gravitation cannot be held responsible for people falling in  love.
- Albert Einstein
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/7] fpga: support FPP Cyclone configuration

2011-07-28 Thread Wolfgang Denk
Dear Michael Jones,

In message 1310720986-5474-3-git-send-email-michael.jo...@matrix-vision.de 
you wrote:
 Support FPGAs which use Fast Passive Parallel configuration
 
 Signed-off-by: Michael Jones michael.jo...@matrix-vision.de
 ---
  drivers/fpga/cyclon2.c |   10 ++
  1 files changed, 10 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It is easier to write an incorrect program than understand a  correct
one.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V0] omap-common: move early UART clock setup to s_init

2011-07-28 Thread Simon Schwarz
Dear Wolfgang Denk,

On 07/28/2011 03:04 PM, Wolfgang Denk wrote:
 Dear Simon Schwarz,

 In message1311844938-17278-2-git-send-email-simonschwarz...@gmail.com  you 
 wrote:
 Moves the early UART clock setup setup_clocks_for_console() from
 preloader_console_init() to s_init() of OMAP4.

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com
 ---
   arch/arm/cpu/armv7/omap-common/spl.c |1 -
   arch/arm/cpu/armv7/omap4/board.c |1 +
   2 files changed, 1 insertions(+), 1 deletions(-)

 I'm unhappy about the subject.  not to mention again that you posted
 another (empty) patch with basicly the same subject line, but you say
 omap-common: in the subject, while the code looks to be OMAP4
 specific?  This is kind of misleading.

Reason: omap-common because it is a omap-common change - the omap4 part 
is just to fix it up for the SOC which is using it already.

So maybe deleting setup_clocks_for_console() would have been a better 
subject, sorry.

 Best regards,

 Wolfgang Denk

Regards
Simon Schwarz

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


Re: [U-Boot] [PATCH] MAINTAINERS: integrator+versatile boards

2011-07-28 Thread Wolfgang Denk
Dear Linus Walleij,

In message 1310732141-9297-1-git-send-email-linus.wall...@linaro.org you 
wrote:
 - Take maintainership of the unlisted integratorap board
 - Orphan the boards maintained by Peter Pearse, as he has retired
   from ARM
 
 Cc: Philippe Robin philippe.ro...@arm.com
 Signed-off-by: Linus Walleij linus.wall...@linaro.org
 ---
  MAINTAINERS |   11 ++-
  1 files changed, 6 insertions(+), 5 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The universe does not have laws - it has habits, and  habits  can  be
broken.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V0] omap-common: move early UART clock setup to board.c

2011-07-28 Thread Simon Schwarz
Dear Wolfgang Denk,

On 07/28/2011 03:02 PM, Wolfgang Denk wrote:
 Dear Simon Schwarz,

 In message1311844938-17278-1-git-send-email-simonschwarz...@gmail.com  you 
 wrote:
 This patch moves the setup_clocks_for_console()-call from
 preloader_console_init() to s_init().
 This is done to use the same implementation for OMAP3 and OMAP4

 For discussion see: 
 http://article.gmane.org/gmane.comp.boot-loaders.u-boot/104120

 This is based on the following patches:
 - New SPL framework
- OMAP4 SPL
  Both are already in u-boot-ti repo.

 Simon Schwarz (1):
omap-common: move early UART clock setup to s_init

   arch/arm/cpu/armv7/omap-common/spl.c |1 -
   arch/arm/cpu/armv7/omap4/board.c |1 +
   2 files changed, 1 insertions(+), 1 deletions(-)

 There is no patch in this file anywhere.
No cover-letter for patch series - bad idea - noted.

 Also, please omit the V0 part in the subject, it makes no sense.
ok.

 Finally, please don't use the same subject for several changes.

 Best regards,

 Wolfgang Denk

Regards
Simon Schwarz

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


Re: [U-Boot] [PATCH 2/4] net: Adds Fast Ethernet Controller driver for Armada100

2011-07-28 Thread Wolfgang Denk
Dear Ajay Bhargav,

In message 1310982108-26029-2-git-send-email-ajay.bhar...@einfochips.com you 
wrote:
 This patch adds support for Fast Ethernet Controller driver for
 Armada100 series.
...
 + printf(\noffset: phy_adr, value: 0x%x\n, ARMDFEC_RD(regs-phyadr));
 + printf(offset: smi, value: 0x%x\n, ARMDFEC_RD(regs-smi));

Please get rid of the ARMDFEC_RD() and ARMDFEC_WR() macros and use the
standard I/O accessors directly.

 +static u8 get_random_byte(u8 seed)
 +{
 + udelay(seed);
 + return (u8)(get_timer(0) % 100) + seed;
 +}

You probably want to use udelay(1000 * seed) here - udelay() is in
microseconds, but get_timer() is in milliseconds.

 + /* check parameters */
 + if (phy_addr  PHY_MASK) {
 + printf(Err..(%s) Invalid phy address\n, __func__);
 + return -EINVAL;

In such error messages the incorrect data (here: the content of
phy_addr) is the most interesting thing - please include this.
Please fix globally.

...
 + if (phy_addr == PHY_ADR_REQ  phy_reg == PHY_ADR_REQ) {
 + reg_data = ARMDFEC_RD(regs-phyadr);
 + reg_data = ~(0x1f);
 + reg_data |= (value  0x1f);
 + ARMDFEC_WR(reg_data, regs-phyadr);
 + return 0;
 + }

Sequences like thesde should be rewritten using the standard I/O
accessor macros, here clrsetbits_le32().  Please fix globally.


 +static u32 hash_function(u32 macH, u32 macL)
 +{
 + u32 hashResult;
 + u32 addrH;
 + u32 addrL;
 + u32 addr0;
 + u32 addr1;
 + u32 addr2;
 + u32 addr3;
 + u32 addrHSwapped;
 + u32 addrLSwapped;

We don't allow for CamelCaps identifiers.  Please fix globally.


 +/* Address Table Initialization */
 +static void init_hashtable(struct eth_device *dev)
 +{
 + struct armdfec_device *darmdfec = to_darmdfec(dev);
 + struct armdfec_reg *regs = darmdfec-regs;
 + memset(darmdfec-htpr, 0, HASH_ADDR_TABLE_SIZE);
 + ARMDFEC_WR((u32) darmdfec-htpr, regs-htpr);

Please always separate declarations and code by a blank line.  Please
fix globally.

...
 + for (addr = 0; addr  32; addr++) {
 + if (miiphy_read(dev-name, addr, MII_BMSR, mii_status)
 + != 0)
 + /* try next phy */
 + continue;
 +
 + /* invalid MII status. More validation required here... */
 + if (mii_status == 0 || mii_status == 0x)
 + /* try next phy */
 + continue;
 +
 + if (miiphy_read(dev-name, addr, MII_PHYSID1, tmp) != 0)
 + /* try next phy */
 + continue;
 +
 + val = tmp  16;
 + if (miiphy_read(dev-name, addr, MII_PHYSID2, tmp) != 0)
 + /* try next phy */
 + continue;

Even if it's only comments, these are multiline statements which need
braces. Please fix globally.

 + if (i == (RINGSZ - 1))
 + p_rx_desc-nxtdesc_p = darmdfec-p_rxdesc;
 + else {
 + p_rx_desc-nxtdesc_p = (struct rx_desc *)
 + ((u32) p_rx_desc + ARMDFEC_RXQ_DESC_ALIGNED_SIZE);
 + p_rx_desc = p_rx_desc-nxtdesc_p;
 + }

Coding style: Use braces in both branches. Please fix globally.

 + /* let the upper layer handle the packet, subtract offset
 +  * as two dummy bytes are added in received buffer see
 +  * PORT_CONFIG_EXT register bit TWO_Byte_Stuff_Mode bit.
 +  */

Incorrect multiline comment style.

 + NetReceive((p_rxdesc_curr-buf_ptr + RX_BUF_OFFSET),
 +(int) (p_rxdesc_curr-byte_cnt -
 +   RX_BUF_OFFSET));
 + }
 + /*
 +  * free these descriptors and point next in the ring
 +  */
 + p_rxdesc_curr-cmd_sts = BUF_OWNED_BY_DMA | RX_EN_INT;
 + p_rxdesc_curr-buf_size = PKTSIZE_ALIGN;
 + p_rxdesc_curr-byte_cnt = 0;
 +
 + writel((unsigned int) p_rxdesc_curr-nxtdesc_p,
 + (darmdfec-p_rxdesc_curr));
 +
 + return 0;
 +}
 +
 +int armada100_fec_initialize()
 +{
 + struct armdfec_device *darmdfec;
 + struct eth_device *dev;
 + int phy_adr;
 + char *s = ethaddr;
 +
 + darmdfec = malloc(sizeof(struct armdfec_device));
 + if (!darmdfec)
 + goto error1;
 +
 + memset(darmdfec, 0, sizeof(struct armdfec_device));
 +
 + darmdfec-htpr = memalign(8, HASH_ADDR_TABLE_SIZE);
 + if (!darmdfec-htpr)
 + goto error2;
 +
 + darmdfec-p_rxdesc =
 + (struct rx_desc *) memalign(PKTALIGN,
 + ARMDFEC_RXQ_DESC_ALIGNED_SIZE
 + * RINGSZ + 1);
 + if (!darmdfec-p_rxdesc)
 + goto error3;
 +
 + darmdfec-p_rxbuf = (u8 *) memalign(PKTALIGN, RINGSZ
 + * PKTSIZE_ALIGN + 1);
 

Re: [U-Boot] [PATCH v4 10/12] Correct ih_os for u-boot.img

2011-07-28 Thread Wolfgang Denk
Dear Aneesh V,

In message 1311004011-9073-11-git-send-email-ane...@ti.com you wrote:
 Provide appropriate '-O u-boot' while doing mkimage
 for u-boot.img
 
 Signed-off-by: Aneesh V ane...@ti.com
 ---
  Makefile |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
What about WRITING it first and rationalizing it afterwords?  :-)
   - Larry Wall in 8...@jpl-devvax.jpl.nasa.gov
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 12/12] mkimage: Add OMAP boot image support

2011-07-28 Thread Wolfgang Denk
Dear Sandeep,

please pull this directly with the rest of the OMAP SPL patches.

In message 1311004011-9073-13-git-send-email-ane...@ti.com you wrote:
 From: John Rigby john.ri...@linaro.org
 
 - Add mkimage support for OMAP boot image
 - Add support for OMAP boot image(MLO) generation in the new
   SPL framework
 
 Signed-off-by: John Rigby john.ri...@linaro.org
 Signed-off-by: Aneesh V ane...@ti.com
 ---
 V3:
  * Fixed minor issue with casting away 'const'ness of
pointers
  * Ensure lists are sorted alphabetically
  * Added an error message
  * Removed 'packed' attribute from structs
  * Fixed some other minor comments on V2
  * Adapted for the new SPL framework
 V4:
  * Replaced CONFIG_SYS_SPL_TEXT_BASE with CONFIG_SPL_TEXT_BASE
 ---
  arch/arm/cpu/armv7/omap4/config.mk |   30 +
  common/image.c |9 +-
  include/image.h|1 +
  spl/Makefile   |6 +
  tools/Makefile |2 +
  tools/mkimage.c|2 +
  tools/mkimage.h|1 +
  tools/omapimage.c  |  224 
 
  tools/omapimage.h  |   50 
  9 files changed, 321 insertions(+), 4 deletions(-)
  create mode 100644 arch/arm/cpu/armv7/omap4/config.mk
  create mode 100644 tools/omapimage.c
  create mode 100644 tools/omapimage.h

Acked-by: Wolfgang Denk w...@denx.de

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
Never call a man a fool.  Borrow from him.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v6] unify version_string

2011-07-28 Thread Wolfgang Denk
Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=,

In message 1311013444-74984-1-git-send-email-andreas.de...@googlemail.com you 
wrote:
 This patch removes the architecture specific implementation of
 version_string where possible. Some architectures use a special place
 and therefore we provide U_BOOT_VERSION_STRING definition and a common
 weak symbol version_string.
 
 Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com
 CC: Mike Frysinger vap...@gentoo.org
 CC: Peter Pan pppeterpp...@gmail.com
 Acked-by: Mike Frysinger vap...@gentoo.org
 ---
 changes since v1:
  - remove (some) places of 'extern ... version_string' definition in favour of
include version.h
  - use format-patch  send-email since some complained about base64 formated
mail content
 
 changes since v2:
  - add linker script solution for mpc512x powerpc devices
(never compiled)
 
 changes since v3:
  - use a common variable to join the parameters and leave the arch dependent
parts as is
 
 changes since v4:
  - address comments from mike
* do not use const char * const
* use weak symbol version_string, remove from architecture files
* remove trailing semicolon
 
 changes since v5:
   - remove RFC annotation
   - add ACK-by Mike Freysinger
 
  arch/arm/lib/board.c  |8 
  arch/avr32/lib/board.c|4 
  arch/blackfin/lib/board.c |3 ---
  arch/m68k/cpu/mcf5227x/start.S|5 +
  arch/m68k/cpu/mcf523x/start.S |5 +
  arch/m68k/cpu/mcf52x2/start.S |5 +
  arch/m68k/cpu/mcf532x/start.S |5 +
  arch/m68k/cpu/mcf5445x/start.S|5 +
  arch/m68k/cpu/mcf547x_8x/start.S  |5 +
  arch/microblaze/lib/board.c   |3 ---
  arch/mips/lib/board.c |4 
  arch/nios2/cpu/start.S|9 +
  arch/powerpc/cpu/74xx_7xx/start.S |9 +
  arch/powerpc/cpu/mpc512x/start.S  |   12 
  arch/powerpc/cpu/mpc5xx/start.S   |9 +
  arch/powerpc/cpu/mpc5xxx/start.S  |9 +
  arch/powerpc/cpu/mpc8220/start.S  |9 +
  arch/powerpc/cpu/mpc824x/start.S  |9 +
  arch/powerpc/cpu/mpc8260/start.S  |9 +
  arch/powerpc/cpu/mpc83xx/start.S  |   12 
  arch/powerpc/cpu/mpc85xx/start.S  |9 +
  arch/powerpc/cpu/mpc86xx/start.S  |9 +
  arch/powerpc/cpu/mpc8xx/start.S   |9 +
  arch/powerpc/cpu/mpc8xx/video.c   |1 -
  arch/powerpc/cpu/ppc4xx/start.S   |9 +
  arch/sh/lib/board.c   |3 ---
  arch/sparc/cpu/leon2/start.S  |5 +
  arch/sparc/cpu/leon3/start.S  |5 +
  arch/x86/lib/board.c  |4 
  common/cmd_version.c  |3 ++-
  common/main.c |3 +--
  drivers/video/cfb_console.c   |2 +-
  include/version.h |   11 +++
  lib/display_options.c |3 +--
  34 files changed, 43 insertions(+), 172 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
EMACS belongs in sys/errno.h: Editor too big!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] EHCI timed out on TD on OpenRD Ultimate

2011-07-28 Thread Alexei Ozhigov
Hello!


I tried running latest U-Boot on OpenRD Ultimate, and USB support
appears to be broken:


Marvell usb reset

(Re)start USB...

USB:   Register 10011 NbrPorts 1

USB EHCI 1.00

scanning bus for devices... EHCI timed out on TD - token=0x80008c80

2 USB Device(s) found

   scanning bus for storage devices... 0 Storage Device(s) found


According to git bisect the patch which causes this behavior is
c2dd0d45540397704de9b13287417d21049d34c6 (armv7: integrate cache
maintenance support).
I tried increasing USB_TIMEOUT_MS as was suggested by Jason Cooper,
but that did not help.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v6] unify version_string

2011-07-28 Thread Wolfgang Denk
Dear Andreas,

In message 20110728152327.2b10a1579...@gemini.denx.de I wrote:

 
 In message 1311013444-74984-1-git-send-email-andreas.de...@googlemail.com=
  you wrote:
  This patch removes the architecture specific implementation of
  version_string where possible. Some architectures use a special place
  and therefore we provide U_BOOT_VERSION_STRING definition and a common
  weak symbol version_string.
  
  Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com
  CC: Mike Frysinger vap...@gentoo.org
  CC: Peter Pan pppeterpp...@gmail.com
  Acked-by: Mike Frysinger vap...@gentoo.org
...
 Applied, thanks.

Oops.  NAK...

The patched code does not compile:

- ./MAKEALL  qong
Configuring for qong board...
/home/wd/git/u-boot/work/include/version.h: Assembler messages:
/home/wd/git/u-boot/work/include/version.h:40: Error: bad instruction `extern 
const char version_string[]'
make[1]: *** [start.o] Error 1


Please fix.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It would be illogical to kill without reason
-- Spock, Journey to Babel, stardate 3842.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] powerpc/eeprom: cleanup mac command

2011-07-28 Thread York Sun
Wolfgang,

On Thu, 2011-07-28 at 15:35 +0200, Wolfgang Denk wrote:
 Dear York Sun,
 
 In message 1309457195-8475-1-git-send-email-york...@freescale.com you wrote:
  Move mac command to board/freescale/common/sys_eeprom.c.
  Change the help message to be more helpful. Print argument format.
  Fix MAX_NUM_PORTS to comply with v1 NXID format.
  
  Signed-off-by: York Sun york...@freescale.com
 
 Why are you turning a generic, board and architecture independent
 command into a FSL specific one?
 

I believe this generic command is only for FSL boards. Moving it to
right place.

 This makes no sense to me, NAK.
 
   board/freescale/common/sys_eeprom.c |   29 -
   common/Makefile |1 -
   common/cmd_mac.c|   49 
  ---
   3 files changed, 28 insertions(+), 51 deletions(-)
   delete mode 100644 common/cmd_mac.c
 
 In case you ever move / rename a file:  please supply the options so
 git will detect the move / copy / rename.

The meaningful code was moved into an existing file, so it wasn't
renaming a file.

York


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


[U-Boot] [PATCH v7] unify version_string

2011-07-28 Thread andreas . devel
From: Andreas Bießmann andreas.de...@googlemail.com

This patch removes the architecture specific implementation of
version_string where possible. Some architectures use a special place
and therefore we provide U_BOOT_VERSION_STRING definition and a common
weak symbol version_string.

Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com
CC: Mike Frysinger vap...@gentoo.org
CC: Peter Pan pppeterpp...@gmail.com
CC: Wolfgang Denk w...@denx.de
Acked-by: Mike Frysinger vap...@gentoo.org
---
changes since v1:
 - remove (some) places of 'extern ... version_string' definition in favour of
   include version.h
 - use format-patch  send-email since some complained about base64 formated
   mail content

changes since v2:
 - add linker script solution for mpc512x powerpc devices
   (never compiled)

changes since v3:
 - use a common variable to join the parameters and leave the arch dependent
   parts as is

changes since v4:
 - address comments from mike
   * do not use const char * const
   * use weak symbol version_string, remove from architecture files
   * remove trailing semicolon

changes since v5:
 - remove RFC annotation
 - add ACK-by Mike Frysinger

changes since v6:
 - add __ASSEMBLY__ guard around 'extern const char version_string[];' in
   version.h
 - proven to build with MAKEALL for at91rm9200ek and qong
 - proven to run on at91rm9200ek device

 arch/arm/lib/board.c  |8 
 arch/avr32/lib/board.c|4 
 arch/blackfin/lib/board.c |3 ---
 arch/m68k/cpu/mcf5227x/start.S|5 +
 arch/m68k/cpu/mcf523x/start.S |5 +
 arch/m68k/cpu/mcf52x2/start.S |5 +
 arch/m68k/cpu/mcf532x/start.S |5 +
 arch/m68k/cpu/mcf5445x/start.S|5 +
 arch/m68k/cpu/mcf547x_8x/start.S  |5 +
 arch/microblaze/lib/board.c   |3 ---
 arch/mips/lib/board.c |4 
 arch/nios2/cpu/start.S|9 +
 arch/powerpc/cpu/74xx_7xx/start.S |9 +
 arch/powerpc/cpu/mpc512x/start.S  |   12 
 arch/powerpc/cpu/mpc5xx/start.S   |9 +
 arch/powerpc/cpu/mpc5xxx/start.S  |9 +
 arch/powerpc/cpu/mpc8220/start.S  |9 +
 arch/powerpc/cpu/mpc824x/start.S  |9 +
 arch/powerpc/cpu/mpc8260/start.S  |9 +
 arch/powerpc/cpu/mpc83xx/start.S  |   12 
 arch/powerpc/cpu/mpc85xx/start.S  |9 +
 arch/powerpc/cpu/mpc86xx/start.S  |9 +
 arch/powerpc/cpu/mpc8xx/start.S   |9 +
 arch/powerpc/cpu/mpc8xx/video.c   |1 -
 arch/powerpc/cpu/ppc4xx/start.S   |9 +
 arch/sh/lib/board.c   |3 ---
 arch/sparc/cpu/leon2/start.S  |5 +
 arch/sparc/cpu/leon3/start.S  |5 +
 arch/x86/lib/board.c  |4 
 common/cmd_version.c  |3 ++-
 common/main.c |3 +--
 drivers/video/cfb_console.c   |2 +-
 include/version.h |   12 
 lib/display_options.c |3 +--
 34 files changed, 44 insertions(+), 172 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index bcbf697..90709d0 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -42,7 +42,6 @@
 #include command.h
 #include malloc.h
 #include stdio_dev.h
-#include timestamp.h
 #include version.h
 #include net.h
 #include serial.h
@@ -70,13 +69,6 @@ extern int  AT91F_DataflashInit(void);
 extern void dataflash_print_info(void);
 #endif
 
-#ifndef CONFIG_IDENT_STRING
-#define CONFIG_IDENT_STRING 
-#endif
-
-const char version_string[] =
-   U_BOOT_VERSION ( U_BOOT_DATE  -  U_BOOT_TIME )CONFIG_IDENT_STRING;
-
 #ifdef CONFIG_DRIVER_RTL8019
 extern void rtl8019_get_enetaddr (uchar * addr);
 #endif
diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c
index 5edef8f..e69f8d1 100644
--- a/arch/avr32/lib/board.c
+++ b/arch/avr32/lib/board.c
@@ -23,7 +23,6 @@
 #include command.h
 #include malloc.h
 #include stdio_dev.h
-#include timestamp.h
 #include version.h
 #include net.h
 
@@ -41,9 +40,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-const char version_string[] =
-   U_BOOT_VERSION  (U_BOOT_DATE - U_BOOT_TIME)  CONFIG_IDENT_STRING;
-
 unsigned long monitor_flash_len;
 
 /* Weak aliases for optional board functions */
diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index 362b8c4..7c33893 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -16,7 +16,6 @@
 #include malloc.h
 #include mmc.h
 #include net.h
-#include timestamp.h
 #include status_led.h
 #include version.h
 
@@ -39,8 +38,6 @@ int post_flag;
 
 DECLARE_GLOBAL_DATA_PTR;
 
-const char version_string[] = U_BOOT_VERSION  (U_BOOT_DATE - 
U_BOOT_TIME);
-
 __attribute__((always_inline))
 static inline void serial_early_puts(const char *s)
 {
diff --git a/arch/m68k/cpu/mcf5227x/start.S b/arch/m68k/cpu/mcf5227x/start.S
index d09d492..c5096a8 100644
--- a/arch/m68k/cpu/mcf5227x/start.S
+++ 

Re: [U-Boot] [PATCH V6 3/5] nand spl: add NAND Library to new SPL

2011-07-28 Thread Aneesh V


On Thursday 28 July 2011 07:34 PM, Simon Schwarz wrote:
 Hi Aneesh,

 On 07/28/2011 01:54 PM, Aneesh V wrote:
 On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
 Insert some NAND driver sources into NAND SPL library.

 Signed-off-by: Simon Schwarzsimonschwarz...@gmail.com

 [snip ..]

 +
 +int nand_curr_device = -1;

 Is nand_curr_device used anywhere?

 Was used in nand.c - this isn't included anymore - deleted


 +static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
 +static nand_info_t info;
 +nand_info_t nand_info[CONFIG_SYS_MAX_NAND_DEVICE];

 Is nand_info used anywhere?

 Same as above - deleted.


 +static struct nand_chip nand_chip;

 Is nand_chip used anywhere? I see that this definition is shadowed in
 function nand_init().

 Deleted the double definition.

 nand_chip is used in:
 - nand_command
 - nand_is_bad_block
 - nand_read_page
 - nand_init
 - nand_deselect


 +
 +#if (CONFIG_SYS_NAND_PAGE_SIZE= 512)

 [snip ..]

 +/*
 + * omap_spl_read_buf16 - [DEFAULT] read chip data into buffer
 + * @mtd: MTD device structure
 + * @buf: buffer to store date

 typo: date instead of data.


 see below for solution (btw. this typo comes from nand_base.c)

 + * @len: number of bytes to read
 + *
 + * Default read function for 16bit buswith
 + *
 + * This function is based on nand_read_buf16 from nand_base.c. This
 version
 + * reads 32bit not 16bit although the bus only has 16bit.
 + */
 +static void omap_spl_read_buf16(struct mtd_info *mtd, uint8_t *buf,
 int len)
 +{
 + int i;
 + struct nand_chip *chip = mtd-priv;
 + u32 *p = (u32 *) buf;

 Why this variable p?
 It is used to cast the 8-bit buffer variable into a 32bit one. Actually
 the same is done for the 16bit implementation. (There it is the adaption
 to the bus width - why 32bit here see below)

 + len= 2;
 +
 + for (i = 0; i len; i++)
 + p[i] = readl(chip-IO_ADDR_R);
 +}

 Should this function be called omap_spl_read_buf32() ?
 Or still better, should this be added as nand_read_buf32() in
 nand_base.c itself?

 Oh. There I played around with the Access Size Adaptation of the GPMC -
 It is still a x16 interface - this is what the 16 refers to IMHO. But

Ok. I have to admit that I am not a NAND expert and I do not understand
this code well.

 for sake of simplicity I will change this back to 16bit access - I don't
 think that there is a big performance impact although I didn't measure it.

No. If it's an OMAP specific optimization, I don't see a reason to
remove it. Looks like that may actually improve performance. However,
you may have to take into account of the alignment of buffer, the size
requested etc. Please have a look at the implementation in drivers/mtd
/nand/davinci_nand.c(although the implementation here seems to be for
8-bit devices, something similar may be possible for 16-bit)


 I cloned them because the functions in nand_base.c are static.

 My solution: deleted the cloned functions - use these from nand_base by
 removing the static modifier and add them to nand.h

I hope there won't be any name-space conflict due to this.

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


[U-Boot] [PATCH] da850: fix the channel number for EMAC teardown init

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

TX and RX channel numbers programmed as '1' during EMAC teardown initialization
is wrong. This patch fixes the same by setting channel number to '0' which is
used by U-boot.

Signed-off-by: Sugumar Natarajan sugu...@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 drivers/net/davinci_emac.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 66c0d13..c0b8929 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -457,7 +457,7 @@ static void davinci_eth_ch_teardown(int ch)
 
if (ch == EMAC_CH_TX) {
/* Init TX channel teardown */
-   writel(1, adap_emac-TXTEARDOWN);
+   writel(0, adap_emac-TXTEARDOWN);
do {
/*
 * Wait here for Tx teardown completion interrupt to
@@ -476,7 +476,7 @@ static void davinci_eth_ch_teardown(int ch)
writel(0, adap_emac-TX0HDP);
} else {
/* Init RX channel teardown */
-   writel(1, adap_emac-RXTEARDOWN);
+   writel(0, adap_emac-RXTEARDOWN);
do {
/*
 * Wait here for Rx teardown completion interrupt to
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: add NOR boot mode support

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

Add an option to use NOR boot mode in configuration file and
correspanding pin-mux support in board file.

Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 board/davinci/da8xxevm/da850evm.c |   50 +
 include/configs/da850evm.h|   21 ++-
 2 files changed, 70 insertions(+), 1 deletions(-)

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index 73eaa48..a77e438 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -105,6 +105,54 @@ const struct pinmux_config nand_pins[] = {
{ pinmux(12), 1, 5 },
{ pinmux(12), 1, 6 }
 };
+#elif defined(CONFIG_SYS_USE_NOR)
+const struct pinmux_config nor_pins[] = {
+   { pinmux(5), 1, 6 },
+   { pinmux(6), 1, 6 },
+   { pinmux(7), 1, 0 },
+   { pinmux(7), 1, 4 },
+   { pinmux(7), 1, 5 },
+   { pinmux(8), 1, 0 },
+   { pinmux(8), 1, 1 },
+   { pinmux(8), 1, 2 },
+   { pinmux(8), 1, 3 },
+   { pinmux(8), 1, 4 },
+   { pinmux(8), 1, 5 },
+   { pinmux(8), 1, 6 },
+   { pinmux(8), 1, 7 },
+   { pinmux(9), 1, 0 },
+   { pinmux(9), 1, 1 },
+   { pinmux(9), 1, 2 },
+   { pinmux(9), 1, 3 },
+   { pinmux(9), 1, 4 },
+   { pinmux(9), 1, 5 },
+   { pinmux(9), 1, 6 },
+   { pinmux(9), 1, 7 },
+   { pinmux(10), 1, 0 },
+   { pinmux(10), 1, 1 },
+   { pinmux(10), 1, 2 },
+   { pinmux(10), 1, 3 },
+   { pinmux(10), 1, 4 },
+   { pinmux(10), 1, 5 },
+   { pinmux(10), 1, 6 },
+   { pinmux(10), 1, 7 },
+   { pinmux(11), 1, 0 },
+   { pinmux(11), 1, 1 },
+   { pinmux(11), 1, 2 },
+   { pinmux(11), 1, 3 },
+   { pinmux(11), 1, 4 },
+   { pinmux(11), 1, 5 },
+   { pinmux(11), 1, 6 },
+   { pinmux(11), 1, 7 },
+   { pinmux(12), 1, 0 },
+   { pinmux(12), 1, 1 },
+   { pinmux(12), 1, 2 },
+   { pinmux(12), 1, 3 },
+   { pinmux(12), 1, 4 },
+   { pinmux(12), 1, 5 },
+   { pinmux(12), 1, 6 },
+   { pinmux(12), 1, 7 }
+};
 #endif
 
 #ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
@@ -122,6 +170,8 @@ static const struct pinmux_resource pinmuxes[] = {
PINMUX_ITEM(i2c_pins),
 #ifdef CONFIG_NAND_DAVINCI
PINMUX_ITEM(nand_pins),
+#elif defined(CONFIG_USE_NOR)
+   PINMUX_ITEM(nor_pins),
 #endif
 };
 
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index fdcc6e3..f0015e4 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -28,6 +28,8 @@
  */
 #define CONFIG_DRIVER_TI_EMAC
 #define CONFIG_USE_SPIFLASH
+#undef CONFIG_USE_NAND
+#undef CONFIG_SYS_USE_NOR
 
 /*
  * SoC Configuration
@@ -129,6 +131,23 @@
 #define CONFIG_NET_MULTI
 #endif
 
+#ifdef CONFIG_SYS_USE_NOR
+#define CONFIG_ENV_IS_IN_FLASH
+#undef CONFIG_SYS_NO_FLASH
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_PROTECTION
+#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of flash banks */
+#define CONFIG_SYS_FLASH_SECT_SZ   (128  10) /* 128KB */
+#define CONFIG_ENV_OFFSET  (CONFIG_SYS_FLASH_SECT_SZ * 3)
+#define CONFIG_ENV_SIZE(128  10)
+#define CONFIG_SYS_FLASH_BASE  DAVINCI_ASYNC_EMIF_DATA_CE2_BASE
+#define PHYS_FLASH_SIZE(8  20) /* Flash size 8MB */
+#define CONFIG_SYS_MAX_FLASH_SECT ((PHYS_FLASH_SIZE/CONFIG_SYS_FLASH_SECT_SZ)\
+  + 3)
+#define CONFIG_ENV_SECT_SIZE   CONFIG_SYS_FLASH_SECT_SZ
+#endif
+
 #ifdef CONFIG_USE_SPIFLASH
 #undef CONFIG_ENV_IS_IN_FLASH
 #undef CONFIG_ENV_IS_IN_NAND
@@ -212,7 +231,7 @@
 #endif
 
 #if !defined(CONFIG_USE_NAND)  \
-   !defined(CONFIG_USE_NOR)  \
+   !defined(CONFIG_SYS_USE_NOR)  \
!defined(CONFIG_USE_SPIFLASH)
 #define CONFIG_ENV_IS_NOWHERE
 #define CONFIG_SYS_NO_FLASH
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: add support for Spectrum Digital AM18xx EVM

2011-07-28 Thread nagabhushana.netagunte
From: Manjunathappa, Prakash prakash...@ti.com

The AM18xx EVM contains winbond SPI flash instead of ST SPI flash in
comparison with logic PD da850/omap-l138 EVM. So enable configuration
to look for winbond flash.

Signed-off-by: Manjunathappa, Prakash prakash...@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 include/configs/da850evm.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 92bab82..2a61e06 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -80,6 +80,7 @@
 #define CONFIG_SPI
 #define CONFIG_SPI_FLASH
 #define CONFIG_SPI_FLASH_STMICRO
+#define CONFIG_SPI_FLASH_WINBOND
 #define CONFIG_DAVINCI_SPI
 #define CONFIG_SYS_SPI_BASEDAVINCI_SPI1_BASE
 #define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: add support to wake up DSP during board init

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

Add support for DSP wake-up by default on DA850/OMAP-L138
during board initialization. To prevent DSP from being woken up,
set the environment variable dspwake to 'no'.

Signed-off-by: Sekhar Nori nsek...@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 arch/arm/include/asm/arch-davinci/hardware.h |5 +++
 board/davinci/da8xxevm/da850evm.c|   51 ++
 2 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/arch-davinci/hardware.h 
b/arch/arm/include/asm/arch-davinci/hardware.h
index d2b2989..c41d756 100644
--- a/arch/arm/include/asm/arch-davinci/hardware.h
+++ b/arch/arm/include/asm/arch-davinci/hardware.h
@@ -151,7 +151,12 @@ typedef volatile unsigned int *dv_reg_p;
 #define DAVINCI_DDR_EMIF_DATA_BASE 0xc000
 #define DAVINCI_INTC_BASE  0xfffee000
 #define DAVINCI_BOOTCFG_BASE   0x01c14000
+#define DAVINCI_L3CBARAM_BASE  0x8000
 #define JTAG_ID_REG(DAVINCI_BOOTCFG_BASE + 0x18)
+#define CHIP_REV_ID_REG(DAVINCI_BOOTCFG_BASE + 
0x24)
+#define HOST1CFG   (DAVINCI_BOOTCFG_BASE + 0x44)
+#define PSC0_MDCTL (DAVINCI_PSC0_BASE + 0xa00)
+
 
 #define GPIO_BANK2_REG_DIR_ADDR(DAVINCI_GPIO_BASE + 
0x38)
 #define GPIO_BANK2_REG_OPDATA_ADDR (DAVINCI_GPIO_BASE + 0x3c)
diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index 8d09bb9..f7754fe 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -424,6 +424,55 @@ err_probe:
return ret;
 }
 
+void dsp_lpsc_on(unsigned domain, unsigned int id)
+{
+   dv_reg_p mdstat, mdctl, ptstat, ptcmd;
+   struct davinci_psc_regs *psc_regs;
+
+   psc_regs = davinci_psc0_regs;
+   mdstat = psc_regs-psc0.mdstat[id];
+   mdctl = psc_regs-psc0.mdctl[id];
+   ptstat = psc_regs-ptstat;
+   ptcmd = psc_regs-ptcmd;
+
+   while (*ptstat  (0x1  domain))
+   ;
+
+   if ((*mdstat  0x1f) == 0x03)
+   return; /* Already on and enabled */
+
+   *mdctl |= 0x03;
+
+   *ptcmd = 0x1  domain;
+
+   while (*ptstat  (0x1  domain))
+   ;
+   while ((*mdstat  0x1f) != 0x03)
+   ;   /* Probably an overkill... */
+}
+
+static void dspwake(void)
+{
+   unsigned *resetvect = (unsigned *)DAVINCI_L3CBARAM_BASE;
+
+   /* if the device is ARM only, return */
+   if ((REG(CHIP_REV_ID_REG)  0x3f) == 0x10)
+   return;
+
+   if (!strcmp(getenv(dspwake), no))
+   return;
+
+   *resetvect++ = 0x1E000; /* DSP Idle */
+   /* clear out the next 10 words as NOP */
+   memset(resetvect, 0, sizeof(unsigned) * 10);
+
+   /* setup the DSP reset vector */
+   REG(HOST1CFG) = DAVINCI_L3CBARAM_BASE;
+
+   dsp_lpsc_on(1, DAVINCI_LPSC_GEM);
+   REG(PSC0_MDCTL + (15 * 4)) |= 0x100;
+}
+
 int misc_init_r(void)
 {
uint8_t tmp[20], addr[10];
@@ -447,5 +496,7 @@ int misc_init_r(void)
setenv(ethaddr, (char *)tmp);
}
 
+   dspwake();
+
return 0;
 }
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: print DDR frequency from u-boot

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

Print DDR frequency when u-boot is coming up. Function
is added in hardware.h to find which PLL clock used.

Signed-off-by: Rajashekhara, Sudhakar sudhakar@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 arch/arm/include/asm/arch-davinci/hardware.h |   12 
 board/davinci/da8xxevm/da850evm.c|1 +
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/arch-davinci/hardware.h 
b/arch/arm/include/asm/arch-davinci/hardware.h
index 3d6cb88..514b359 100644
--- a/arch/arm/include/asm/arch-davinci/hardware.h
+++ b/arch/arm/include/asm/arch-davinci/hardware.h
@@ -380,8 +380,14 @@ struct davinci_pllc_regs {
 #define DAVINCI_PLLC_DIV_MASK  0x1f
 
 #define ASYNC3  get_async3_src()
+#define EMIFB  get_emifb_src()
+
+#define PLL1_PLLM  ((1  16) | DAVINCI_PLLM_CLKID)
+#define PLL1_SYSCLK1   ((1  16) | 0x1)
 #define PLL1_SYSCLK2   ((1  16) | 0x2)
 #define DAVINCI_SPI1_CLKID  (cpu_is_da830() ? 2 : ASYNC3)
+#define DAVINCI_DDR_CLKID  EMIFB
+
 /* Clock IDs */
 enum davinci_clk_ids {
DAVINCI_SPI0_CLKID = 2,
@@ -485,6 +491,12 @@ static inline int get_async3_src(void)
PLL1_SYSCLK2 : 2;
 }
 
+static inline int get_emifb_src(void)
+{
+   return (REG(davinci_syscfg_regs-cfgchip3)  0x80) ?
+   PLL1_PLLM : PLL1_SYSCLK1;
+}
+
 #endif /* CONFIG_SOC_DA8XX */
 
 #endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index a077368..55c5a22 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -502,6 +502,7 @@ int misc_init_r(void)
int ret;
 
printf(ARM Clock : %d Hz\n, clk_get(DAVINCI_ARM_CLKID));
+   printf(DDR Clock : %d Hz\n, clk_get(DAVINCI_DDR_CLKID)/2);
 
if (getenv(ethaddr) == NULL) {
/* Read Ethernet MAC address from EEPROM */
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: add support to read mac address from spi flash

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

add misc_int_r function to read the mac address from SPI flash
if env variable ethaddr is not set.

Signed-off-by: Prakash PM prakash...@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 board/davinci/da8xxevm/da850evm.c |   65 +
 include/configs/da850evm.h|1 +
 2 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index a77e438..8d09bb9 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -25,10 +25,13 @@
 #include i2c.h
 #include net.h
 #include netdev.h
+#include spi.h
+#include spi_flash.h
 #include asm/arch/hardware.h
 #include asm/arch/emif_defs.h
 #include asm/arch/emac_defs.h
 #include asm/io.h
+#include asm/errno.h
 #include asm/arch/davinci_misc.h
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -383,4 +386,66 @@ int board_eth_init(bd_t *bis)
 
return 0;
 }
+
 #endif /* CONFIG_DRIVER_TI_EMAC */
+
+#define CFG_MAC_ADDR_SPI_BUS   0
+#define CFG_MAC_ADDR_SPI_CS0
+#define CFG_MAC_ADDR_SPI_MAX_HZCONFIG_SF_DEFAULT_SPEED
+#define CFG_MAC_ADDR_SPI_MODE  SPI_MODE_3
+
+#define CFG_MAC_ADDR_OFFSET(flash-size - SZ_64K)
+
+static int get_mac_addr(u8 *addr)
+{
+   int ret;
+   struct spi_flash *flash;
+
+   flash = spi_flash_probe(CFG_MAC_ADDR_SPI_BUS, CFG_MAC_ADDR_SPI_CS,
+   CFG_MAC_ADDR_SPI_MAX_HZ, CFG_MAC_ADDR_SPI_MODE);
+   if (!flash) {
+   printf( Error - unable to probe SPI flash.\n);
+   ret = -1;
+   goto err_probe;
+   }
+
+   ret = spi_flash_read(flash, CFG_MAC_ADDR_OFFSET, 6, addr);
+   if (ret) {
+   printf(Error - unable to read MAC address from SPI flash.\n);
+   goto err_read;
+   }
+
+err_read:
+   /* cannot call free currently since the free function calls free() for
+* spi_flash structure though it is not directly allocated through
+* malloc()
+*/
+err_probe:
+   return ret;
+}
+
+int misc_init_r(void)
+{
+   uint8_t tmp[20], addr[10];
+   int ret;
+
+   printf(ARM Clock : %d Hz\n, clk_get(DAVINCI_ARM_CLKID));
+
+   if (getenv(ethaddr) == NULL) {
+   /* Set Ethernet MAC address from EEPROM */
+   ret = get_mac_addr(addr);
+   if (ret != 0)
+   return -EINVAL;
+
+   if (is_multicast_ether_addr(addr) || is_zero_ether_addr(addr)) {
+   printf(Invalid MAC address read.\n);
+   return -EINVAL;
+   }
+   sprintf((char *)tmp, %02x:%02x:%02x:%02x:%02x:%02x, addr[0],
+   addr[1], addr[2], addr[3], addr[4], addr[5]);
+
+   setenv(ethaddr, (char *)tmp);
+   }
+
+   return 0;
+}
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 21d8fe3..f7bf6be 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -161,6 +161,7 @@
 /*
  * U-Boot general configuration
  */
+#define CONFIG_MISC_INIT_R
 #define CONFIG_BOOTFILEuImage /* Boot file name */
 #define CONFIG_SYS_PROMPT  U-Boot   /* Command Prompt */
 #define CONFIG_SYS_CBSIZE  1024 /* Console I/O Buffer Size */
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: add cache management support in config file

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

add support for cache management in config file. This is
needed as per new cache management framework. da850 doesnt
support I-CACHE, D-CACHE or L2-CACHE usage which is indicated
by following definitions,

1. CONFIG_SYS_ICACHE_OFF
2. CONFIG_SYS_DCACHE_OFF
3. CONFIG_SYS_L2CACHE_OFF

Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 include/configs/da850evm.h |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index bbb5a9b..fdcc6e3 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -42,6 +42,9 @@
 #define CONFIG_SYS_HZ  1000
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_SYS_TEXT_BASE   0xc108
+#define CONFIG_SYS_ICACHE_OFF
+#define CONFIG_SYS_DCACHE_OFF
+#define CONFIG_SYS_L2CACHE_OFF
 
 /*
  * Memory Info
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: modify default bootargs and bootcmd

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

Starting from kernel 2.6.24 'rootwait' can be used to wait for
the rootdevice to become ready, this is preferred over choosing
a random delay.

In the case of da8xx/omap-l1xx the delay is dependant on the MMC
card present and can take more than 10 seconds in some cases.

Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 include/configs/da850evm.h |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 70d250e..21d8fe3 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -185,7 +185,9 @@
 #define CONFIG_REVISION_TAG
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_BOOTARGS\
-   mem=32M console=ttyS2,115200n8 root=/dev/mtdblock2 rw noinitrd ip=dhcp
+   mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw rootwait ip=off
+#define CONFIG_BOOTCMD \
+   sf probe 0;sf read 0xc070 0x8 0x22;bootm 0xc070
 #define CONFIG_BOOTDELAY   3
 
 /*
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: modifications for Logic PD Rev.3 AM18xx EVM

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

AHCLKR/UART1_RTS/GP0[11] pin needs to be configured for
NOR to work on Rev.3 EVM. When GP0[11] is low,
the SD0 interface will not work, but NOR flash will.

Signed-off-by: Rajashekhara, Sudhakar sudhakar@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 arch/arm/include/asm/arch-davinci/hardware.h |5 -
 board/davinci/da8xxevm/da850evm.c|   15 +++
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/arch/arm/include/asm/arch-davinci/hardware.h 
b/arch/arm/include/asm/arch-davinci/hardware.h
index c41d756..3d6cb88 100644
--- a/arch/arm/include/asm/arch-davinci/hardware.h
+++ b/arch/arm/include/asm/arch-davinci/hardware.h
@@ -157,7 +157,10 @@ typedef volatile unsigned int *dv_reg_p;
 #define HOST1CFG   (DAVINCI_BOOTCFG_BASE + 0x44)
 #define PSC0_MDCTL (DAVINCI_PSC0_BASE + 0xa00)
 
-
+#define GPIO_BANK0_REG_DIR_ADDR(DAVINCI_GPIO_BASE + 
0x10)
+#define GPIO_BANK0_REG_OPDATA_ADDR (DAVINCI_GPIO_BASE + 0x14)
+#define GPIO_BANK0_REG_SET_ADDR(DAVINCI_GPIO_BASE + 
0x18)
+#define GPIO_BANK0_REG_CLR_ADDR(DAVINCI_GPIO_BASE + 
0x1c)
 #define GPIO_BANK2_REG_DIR_ADDR(DAVINCI_GPIO_BASE + 
0x38)
 #define GPIO_BANK2_REG_OPDATA_ADDR (DAVINCI_GPIO_BASE + 0x3c)
 #define GPIO_BANK2_REG_SET_ADDR(DAVINCI_GPIO_BASE + 
0x40)
diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index fd05703..a077368 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -110,6 +110,8 @@ const struct pinmux_config nand_pins[] = {
 };
 #elif defined(CONFIG_SYS_USE_NOR)
 const struct pinmux_config nor_pins[] = {
+   /* GP0[11] is required for SD to work on Rev 3 EVMs */
+   { pinmux(0), 8, 4 },/* GP0[11] */
{ pinmux(5), 1, 6 },
{ pinmux(6), 1, 6 },
{ pinmux(7), 1, 0 },
@@ -229,6 +231,7 @@ u32 get_board_rev(void)
 
 int board_init(void)
 {
+   unsigned int val;
 #ifndef CONFIG_USE_IRQ
irq_init();
 #endif
@@ -276,6 +279,18 @@ int board_init(void)
if (davinci_configure_pin_mux_items(pinmuxes, ARRAY_SIZE(pinmuxes)))
return 1;
 
+#ifdef CONFIG_SYS_USE_NOR
+   /* Set the GPIO direction as output */
+   val = REG(GPIO_BANK0_REG_DIR_ADDR);
+   val = ~(0x01  11);
+   REG(GPIO_BANK0_REG_DIR_ADDR) = val;
+
+   /* Set the output as low */
+   val = REG(GPIO_BANK0_REG_SET_ADDR);
+   val |= (0x01  11);
+   REG(GPIO_BANK0_REG_CLR_ADDR) = val;
+#endif
+
 #ifdef CONFIG_DRIVER_TI_EMAC
if (davinci_configure_pin_mux(emac_pins, ARRAY_SIZE(emac_pins)) != 0)
return 1;
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: add provision to use RMII for EMAC

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

Add provision to enable RMII support in configuration file.

Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 include/configs/da850evm.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index f7bf6be..92bab82 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -123,6 +123,7 @@
 #ifdef CONFIG_DRIVER_TI_EMAC
 #define CONFIG_EMAC_MDIO_PHY_NUM   0
 #define CONFIG_MII
+#undef CONFIG_DRIVER_TI_EMAC_USE_RMII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
 #define CONFIG_BOOTP_DNS2
-- 
1.6.2.4

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


[U-Boot] [PATCH] da8xx: add support for multiple PLL controllers

2011-07-28 Thread nagabhushana.netagunte
From: Sudhakar Rajashekhara sudhakar@ti.com

Add support for multiple PLL controllers  and in the process,
modify the clk_get() to work for multiple PLL controllers.

Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 arch/arm/cpu/arm926ejs/davinci/cpu.c |   27 +++--
 arch/arm/include/asm/arch-davinci/hardware.h |1 +
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/davinci/cpu.c 
b/arch/arm/cpu/arm926ejs/davinci/cpu.c
index 8b57205..3ab56c7 100644
--- a/arch/arm/cpu/arm926ejs/davinci/cpu.c
+++ b/arch/arm/cpu/arm926ejs/davinci/cpu.c
@@ -37,6 +37,7 @@
 #define PLLC_PLLDIV4   0x160
 #define PLLC_PLLDIV5   0x164
 #define PLLC_PLLDIV6   0x168
+#define PLLC_PLLDIV7   0x16c
 #define PLLC_PLLDIV8   0x170
 #define PLLC_PLLDIV9   0x174
 
@@ -61,11 +62,9 @@
 #endif
 
 #ifdef CONFIG_SOC_DA8XX
-const dv_reg * const sysdiv[7] = {
-   davinci_pllc_regs-plldiv1, davinci_pllc_regs-plldiv2,
-   davinci_pllc_regs-plldiv3, davinci_pllc_regs-plldiv4,
-   davinci_pllc_regs-plldiv5, davinci_pllc_regs-plldiv6,
-   davinci_pllc_regs-plldiv7
+unsigned int sysdiv[9] = {
+   PLLC_PLLDIV1, PLLC_PLLDIV2, PLLC_PLLDIV3, PLLC_PLLDIV4, PLLC_PLLDIV5,
+   PLLC_PLLDIV6, PLLC_PLLDIV7, PLLC_PLLDIV8, PLLC_PLLDIV9
 };
 
 int clk_get(enum davinci_clk_ids id)
@@ -74,19 +73,26 @@ int clk_get(enum davinci_clk_ids id)
int pllm;
int post_div;
int pll_out;
+   volatile unsigned int pll_base;
 
pll_out = CONFIG_SYS_OSCIN_FREQ;
 
if (id == DAVINCI_AUXCLK_CLKID)
goto out;
 
+   if ((id  16) == 1)
+   pll_base = DAVINCI_PLL_CNTRL1_BASE;
+   else
+   pll_base = DAVINCI_PLL_CNTRL0_BASE;
+
+   id = 0x;
+
/*
 * Lets keep this simple. Combining operations can result in
 * unexpected approximations
 */
-   pre_div = (readl(davinci_pllc_regs-prediv) 
-  DAVINCI_PLLC_DIV_MASK) + 1;
-   pllm = readl(davinci_pllc_regs-pllm) + 1;
+   pre_div = (REG(pll_base + PLLC_PREDIV)  0xff) + 1;
+   pllm = REG(pll_base + PLLC_PLLM) + 1;
 
pll_out /= pre_div;
pll_out *= pllm;
@@ -94,15 +100,14 @@ int clk_get(enum davinci_clk_ids id)
if (id == DAVINCI_PLLM_CLKID)
goto out;
 
-   post_div = (readl(davinci_pllc_regs-postdiv) 
-   DAVINCI_PLLC_DIV_MASK) + 1;
+   post_div = (REG(pll_base + PLLC_POSTDIV)  0xff) + 1;
 
pll_out /= post_div;
 
if (id == DAVINCI_PLLC_CLKID)
goto out;
 
-   pll_out /= (readl(sysdiv[id - 1])  DAVINCI_PLLC_DIV_MASK) + 1;
+   pll_out /= (REG(pll_base + sysdiv[id - 1])  0xff) + 1;
 
 out:
return pll_out;
diff --git a/arch/arm/include/asm/arch-davinci/hardware.h 
b/arch/arm/include/asm/arch-davinci/hardware.h
index df3f549..d2b2989 100644
--- a/arch/arm/include/asm/arch-davinci/hardware.h
+++ b/arch/arm/include/asm/arch-davinci/hardware.h
@@ -129,6 +129,7 @@ typedef volatile unsigned int * dv_reg_p;
 #define DAVINCI_TIMER1_BASE0x01c21000
 #define DAVINCI_WDOG_BASE  0x01c21000
 #define DAVINCI_PLL_CNTRL0_BASE0x01c11000
+#define DAVINCI_PLL_CNTRL1_BASE0x01e1a000
 #define DAVINCI_PSC0_BASE  0x01c1
 #define DAVINCI_PSC1_BASE  0x01e27000
 #define DAVINCI_SPI0_BASE  0x01c41000
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: modify the U-Boot prompt string

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

Modify U-Boot prompt string from DA850-evm  to U-Boot .

Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 include/configs/da850evm.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index f0015e4..70d250e 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -162,7 +162,7 @@
  * U-Boot general configuration
  */
 #define CONFIG_BOOTFILEuImage /* Boot file name */
-#define CONFIG_SYS_PROMPT  DA850-evm   /* Command Prompt */
+#define CONFIG_SYS_PROMPT  U-Boot   /* Command Prompt */
 #define CONFIG_SYS_CBSIZE  1024 /* Console I/O Buffer Size */
 #define CONFIG_SYS_PBSIZE  (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: read MAC address from I2C EEPROM on AM18xx EVM

2011-07-28 Thread nagabhushana.netagunte
From: Nagabhushana Netagunte nagabhushana.netagu...@ti.com

The AM18xx EVM contains MAC address in I2C EEPROM compared
da850/omap-l138 Logic PD EVM which maintains in SPI flash. So this
patch tries to read MAC address from I2C EEPROM, in failure case reads
from SPI flash assuming board to be da850/omap-l138 Logic PDS EVM.

Signed-off-by: Manjunathappa, Prakash prakash...@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 board/davinci/da8xxevm/da850evm.c |   14 ++
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index d99f1a0..fd05703 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -489,10 +489,16 @@ int misc_init_r(void)
printf(ARM Clock : %d Hz\n, clk_get(DAVINCI_ARM_CLKID));
 
if (getenv(ethaddr) == NULL) {
-   /* Set Ethernet MAC address from EEPROM */
-   ret = get_mac_addr(addr);
-   if (ret != 0)
-   return -EINVAL;
+   /* Read Ethernet MAC address from EEPROM */
+   if (dvevm_read_mac_address(addr)) {
+   /* Set Ethernet MAC address from EEPROM */
+   davinci_sync_env_enetaddr(addr);
+   } else {
+   /* Set Ethernet MAC address from SPI flash */
+   ret = get_mac_addr(addr);
+   if (ret != 0)
+   return -EINVAL;
+   }
 
if (is_multicast_ether_addr(addr) || is_zero_ether_addr(addr)) {
printf(Invalid MAC address read.\n);
-- 
1.6.2.4

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


[U-Boot] [PATCH] da850: pass board revision info to kernel

2011-07-28 Thread nagabhushana.netagunte
From: Manjunathappa, Prakash prakash...@ti.com

The Spectrum Digital AM18xx EVM contains I2C EEPROM compared
da850/omap-l138 Logic PD EVMs. This information is used to differentiate
the EVMs and is passed to kernel via second byte of ATAG_REVISION.

Signed-off-by: Manjunathappa, Prakash prakash...@ti.com
Signed-off-by: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 board/davinci/da8xxevm/da850evm.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index f7754fe..d99f1a0 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -216,6 +216,14 @@ u32 get_board_rev(void)
else if (maxcpuclk = 37200)
rev = 1;
 
+   /* Spectrum Digital AM18xx EVM contains I2C EEPROM compared
+  da850/omap-l138 Logic PD EVMs. This information is used to
+  differentiate the EVMs and is passed to kernel via second
+  byte of ATAG_REVISION. */
+
+   if (i2c_probe(0x50) == 0)
+   rev |= 0x100;
+
return rev;
 }
 
-- 
1.6.2.4

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


Re: [U-Boot] [PATCH RFC] drivers/rtc: add Marvell Integrated RTC.

2011-07-28 Thread Clint Adams
On Tue, Jul 26, 2011 at 02:51:26PM -0400, Jason wrote:
 btw - I have everything else tested and working.  RTC, spi flash, cpu
 speed, etc.  This issue is the last holdout before I resubmit v5.

Hi Jason,

We same to be having some issues with USB support with your v4 set,
particularly that it's unhappy with the internal microsd card.
Any ideas?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Please pull u-boot-ppc4xx/master

2011-07-28 Thread Stefan Roese
Hi Wolfgang,

please pull the following patch:

The following changes since commit 3857f8f5a5a029a2ff403f83e7b9987cfdb09569:

  Correct ih_os for u-boot.img (2011-07-28 17:17:36 +0200)

are available in the git repository at:
  git://www.denx.de/git/u-boot-ppc4xx.git master

Stefan Roese (1):
  net/4xx: Install interrupt handler after driver registration

 drivers/net/4xx_enet.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] net/4xx: Install interrupt handler after driver registration

2011-07-28 Thread Stefan Roese
On Tuesday 12 July 2011 13:26:47 Stefan Roese wrote:
 Only install der 4xx-EMAC interrupt handlers *after* the core
 network driver is registered.
 
 This problem was noticed on the APM Taishan 440GX board, where
 the board hung upon bootup after displaying Net:.

Applied to u-boot-ppc4xx.

Thanks,
Stefan

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


[U-Boot] [PATCH] MX31: removed warnings due to clock.h

2011-07-28 Thread Stefano Babic
Signed-off-by: Stefano Babic sba...@denx.de
---
 arch/arm/include/asm/arch-mx31/clock.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx31/clock.h 
b/arch/arm/include/asm/arch-mx31/clock.h
index fb035c4..b132676 100644
--- a/arch/arm/include/asm/arch-mx31/clock.h
+++ b/arch/arm/include/asm/arch-mx31/clock.h
@@ -32,7 +32,7 @@ enum mxc_clock {
 };
 
 unsigned int mxc_get_clock(enum mxc_clock clk);
-extern u32 imx_get_uartclk();
+extern u32 imx_get_uartclk(void);
 extern void mx31_gpio_mux(unsigned long mode);
 extern void mx31_set_pad(enum iomux_pins pin, u32 config);
 
-- 
1.7.1

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


Re: [U-Boot] [PATCH] MPC8xxx: drop redundant boot messages

2011-07-28 Thread York Sun
On Mon, 2011-07-25 at 10:13 +0200, Wolfgang Denk wrote:
 Current code would print RAM size information like this:
 
   DRAM:  DDR: 256 MiB (DDR1, 64-bit, CL=2, ECC off)
 
 Turn a number of printf()s into debug() to get rid of the redundant
 DDR:  string like this:
 
   DRAM:  256 MiB (DDR1, 64-bit, CL=2, ECC off)
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Kumar Gala ga...@kernel.crashing.org
 ---
  arch/powerpc/cpu/mpc85xx/cpu.c|2 +-
  board/freescale/corenet_ds/ddr.c  |2 +-
  board/freescale/mpc8610hpcd/mpc8610hpcd.c |2 +-
  board/freescale/mpc8641hpcn/mpc8641hpcn.c |2 +-
  board/freescale/p2041rdb/ddr.c|2 +-
  board/sbc8641d/sbc8641d.c |2 +-
  6 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
 index 53f0887..8ee3b4f 100644
 --- a/arch/powerpc/cpu/mpc85xx/cpu.c
 +++ b/arch/powerpc/cpu/mpc85xx/cpu.c
 @@ -358,7 +358,7 @@ phys_size_t initdram(int board_type)
   lbc_sdram_init();
  #endif
  
 - puts(DDR: );
 + debug(DDR: );
   return dram_size;
  }
  #endif /* CONFIG_SYS_RAMBOOT */
 diff --git a/board/freescale/corenet_ds/ddr.c 
 b/board/freescale/corenet_ds/ddr.c
 index a184592..b937015 100644
 --- a/board/freescale/corenet_ds/ddr.c
 +++ b/board/freescale/corenet_ds/ddr.c
 @@ -256,6 +256,6 @@ phys_size_t initdram(int board_type)
   dram_size = setup_ddr_tlbs(dram_size / 0x10);
   dram_size *= 0x10;
  
 - puts(DDR: );
 + debug(DDR: );
   return dram_size;
  }
 diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c 
 b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
 index 4e4b7c0..8aceddb 100644
 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
 +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
 @@ -145,7 +145,7 @@ initdram(int board_type)
  
   setup_ddr_bat(dram_size);
  
 - puts( DDR: );
 + debug( DDR: );
   return dram_size;
  }
  
 diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c 
 b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
 index e3916fc..455569e 100644
 --- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
 +++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
 @@ -69,7 +69,7 @@ initdram(int board_type)
  
   setup_ddr_bat(dram_size);
  
 - puts(DDR: );
 + debug(DDR: );
   return dram_size;
  }
  
 diff --git a/board/freescale/p2041rdb/ddr.c b/board/freescale/p2041rdb/ddr.c
 index 46de910..e9c699c 100644
 --- a/board/freescale/p2041rdb/ddr.c
 +++ b/board/freescale/p2041rdb/ddr.c
 @@ -110,6 +110,6 @@ phys_size_t initdram(int board_type)
   dram_size = setup_ddr_tlbs(dram_size / 0x10);
   dram_size *= 0x10;
  
 - puts(DDR: );
 + debug(DDR: );
   return dram_size;
  }
 diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c
 index dd58541..bed8f53 100644
 --- a/board/sbc8641d/sbc8641d.c
 +++ b/board/sbc8641d/sbc8641d.c
 @@ -63,7 +63,7 @@ phys_size_t initdram (int board_type)
   dram_size = fixed_sdram ();
  #endif
  
 - puts (DDR: );
 + debug (DDR: );
   return dram_size;
  }
  

Acked-by: York Sun york...@freescale.com



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


Re: [U-Boot] [PATCH] mpc8xxx: lc_common_dimm_params: make less verbose

2011-07-28 Thread York Sun
On Mon, 2011-07-25 at 10:14 +0200, Wolfgang Denk wrote:
 lc_common_dimm_params.c was too verbose and corrupted the boot
 message display like this:
 
   ...
   DRAM:  Detected UDIMM M2U25664DS88C3G-6K
   DDR: 256 MiB (DDR1, 64-bit, CL=2, ECC off)
   ...
 
 Turn printf() into debug() so we het the expected output again:
 
   ...
   DRAM:  256 MiB (DDR1, 64-bit, CL=2, ECC off)
   ...
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Kumar Gala ga...@kernel.crashing.org
 
 ---
  .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c 
 b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
 index 8132e68..e66cc05 100644
 --- a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
 +++ b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
 @@ -209,11 +209,11 @@ compute_lowest_common_dimm_parameters(const 
 dimm_params_t *dimm_params,
   if (dimm_params[i].n_ranks) {
   if (dimm_params[i].registered_dimm) {
   temp1 = 1;
 - printf(Detected RDIMM %s\n,
 + debug(Detected RDIMM %s\n,
   dimm_params[i].mpart);
   } else {
   temp2 = 1;
 - printf(Detected UDIMM %s\n,
 + debug(Detected UDIMM %s\n,
   dimm_params[i].mpart);
   }
   }

NAK.

We need to log module part number for testing and verification,
especially when comparing with different parts. It is also helpful for
support, without asking customers to recompile to enable debugging.

York



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


Re: [U-Boot] [PATCH RFC] drivers/rtc: add Marvell Integrated RTC.

2011-07-28 Thread Jason
On Thu, Jul 28, 2011 at 05:14:33PM +, Clint Adams wrote:
 On Tue, Jul 26, 2011 at 02:51:26PM -0400, Jason wrote:
  btw - I have everything else tested and working.  RTC, spi flash, cpu
  speed, etc.  This issue is the last holdout before I resubmit v5.
 
 We same to be having some issues with USB support with your v4 set,
 particularly that it's unhappy with the internal microsd card.
 Any ideas?

try v5. patch #3 increases the timeout waiting for slow usb chipsets,
which works for me.

In the meantime, I'm going to take a more careful look at the usb
changes in the tarball you sent me.  I checked a few lines of it and it
looked like a backported patch that was already in mainline, but I
didn't check the whole thing.  I'll do so when I address all of
Prafulla's comments.

hth,

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


  1   2   >