Re: [U-Boot] [PATCH V2] imx: mmc: access mxcmmc from mx31 boards

2011-11-07 Thread Helmut Raiger
On 11/02/2011 08:02 AM, Helmut Raiger wrote:
 On 10/27/2011 02:19 PM, Helmut Raiger wrote:
 This patch modifies mxcmmc.c to be used
 not only by i.MX27 but also by i.MX31 boards.
 Both use the same SD controller, but have different
 clock set-ups.
 The i.MX27 imx_get_XXXclock functions are made static to
 generic.c and a public mxc_get_clock() function
 is provided.  Pins, base address and prototypes for
 an i.MX31 specific board_init_mmc() are provided.
 Some of the i.MX27 clock getters are unused and marked
 as such to avoid warnings (./MAKEALL -s mx27), but
 the code was left in for future use.

 Signed-off-by: Helmut Raigerhelmut.rai...@hale.at

 I just re-titled the patch to make it visible for the imx community,
 it concerns i.MX27 and i.MX31, so mmc: is probably the wrong
 category anyway.

 Helmut
Anything amiss?
Helmut


--
Scanned by MailScanner.

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


[U-Boot] [PATCH] mvblx: punt unused clean/distclean targets

2011-11-07 Thread Michael Jones

Signed-off-by: Michael Jones michael.jo...@matrix-vision.de
---

This would have been cleaned up by commit 464c7920 (punt unused
clean/distclean targets), but these files were in the pipeline
to go upstream when that patch was submitted.

 board/matrix_vision/mvblx/Makefile |6 --
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/board/matrix_vision/mvblx/Makefile 
b/board/matrix_vision/mvblx/Makefile
index 01cb517..f519a5d 100644
--- a/board/matrix_vision/mvblx/Makefile
+++ b/board/matrix_vision/mvblx/Makefile
@@ -37,12 +37,6 @@ CFLAGS += -Werror
 $(LIB):$(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
 
-clean:
-   rm -f $(OBJS)
-
-distclean: clean
-   rm -f $(LIB) core *.bak $(obj).depend
-
 #
 
 # defines $(obj).depend target
-- 
1.7.4.1


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] imx: mmc: access mxcmmc from mx31 boards

2011-11-07 Thread Stefano Babic
On 11/07/2011 08:59 AM, Helmut Raiger wrote:
 On 11/02/2011 08:02 AM, Helmut Raiger wrote:
 On 10/27/2011 02:19 PM, Helmut Raiger wrote:
 This patch modifies mxcmmc.c to be used
 not only by i.MX27 but also by i.MX31 boards.
 Both use the same SD controller, but have different
 clock set-ups.
 The i.MX27 imx_get_XXXclock functions are made static to
 generic.c and a public mxc_get_clock() function
 is provided.  Pins, base address and prototypes for
 an i.MX31 specific board_init_mmc() are provided.
 Some of the i.MX27 clock getters are unused and marked
 as such to avoid warnings (./MAKEALL -s mx27), but
 the code was left in for future use.

 Signed-off-by: Helmut Raigerhelmut.rai...@hale.at

 I just re-titled the patch to make it visible for the imx community,
 it concerns i.MX27 and i.MX31, so mmc: is probably the wrong
 category anyway.

 Helmut

Hi Helmut,

 Anything amiss?
 Helmut

I have seen your message regarding your patch tt01: add MMC and video
support asking to ignore it, and I have ignored this patch, too

I will review it soo - however, there is no use case for MMC on the
i.MX31 until you submit a patch for your board supporting MMC.

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] (no subject)

2011-11-07 Thread COCA-COLA COMPANY


Your Email Has Won 2,12,000.00 INR.Send Your Name:,Mobile No:, Address:___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] No power on USB host of IMX25 PDK

2011-11-07 Thread Hugo Holgersson
On 11/04/2011 05:24 PM, Fabio Estevam wrote:
 On Fri, Nov 4, 2011 at 2:06 PM, Hugo Holgersson
 hu...@student.chalmers.se  wrote:
 Thanks for the input!

 Putting the mux code to generic.c, as it was done for the UART's pins, did 
 not change anything...

 I write MXC_EHCI_MODE_SERIAL toehci-portsc. Exactly the same behavior. 
 Same log.

 But the question (1) remains; which is the register (the address) of where 
 mxc_set_usbcontrol()
 is supposed to write to? I understand Linux use 
 http://lxr.linux.no/#linux+v3.1/arch/arm/mach-imx/ehci-imx25.c
 uses the IMX_USB_BASE + 0x600 address... But, to me this is outside the 
 usb_ehci-struct, so I
 cannot figure out what register that is located at that address.

 Guessing, what about the following possible candidates inside the 
 usb_echi-struct?
 usb_ehci-usbgenctrl
 usb_ehci-hwgeneral
 usb_ehci-control
 usb_ehci-isiphyctrl

 I need to find some docs on the controller's registers to understand that.

 You need to check MX25RM (Reference Manual) available at
 http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX257nodeId=018rH3ZrDR6B45fpsp=1tab=Documentation_Tab

 Regards,

 Fabio Estevam


#define USBCTRL_OTGBASE_OFFSET  0x600
should maybe be called just USB_CTRL_OFFSET.

According to the reference manual, it is a USBOH-register. Concerning 
both of the two, independent cores (OTG and Host) of the chip.
(Page 1747)

So, it is indeed outside the usb_ehci struct! Sorry!

Best regards,

Hugo Holgersson


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


Re: [U-Boot] [PATCH 2/2] env: add regex support for environment variables

2011-11-07 Thread Detlev Zundel
Hi Wolfgang,

this really is an interesting addition!

 Syntax:  env regex [-g] [-s subst] regex name [...]

 The code is based on SLRE (http://slre.sourceforge.net/)
 which provides a tiny subset of Perl regular expressions.

 Without options, this will implement regex pattern matching on
 environment variables.  Variables with matching values will be printd
 as with env print, so this basicly performs a grep on the given
 list of variables.

Ok, this usage looks fine.

 With -s subst, the matching pattern gets replaced with the string
 given in subst.  Back references '\0' ... '\9' are allowed, where
 '\0' stands for the whole matched string, and '\1', '\2', ... are
 replaced with the first, second, ... sub-pattern.

 -g allows for global replacement.

But IMHO this usage doesn't really belong into the env command.  It
much rather is a further operation of the setexpr command:

  set environment variable as the result of eval expression,
  name value1 op value2\n
  - set environment variable 'name' to the result of the evaluated\n
express specified by op.  op can be , |, ^, +, -, *, /, %


We could add the operations for regsubst and regsubstg.  For actual
names for the operations, I'm somewhat unsure.  Maybe function like,
i.e. regsubst(string, pattern, replacement) and regsubstg(string,
pattern, replacement)?

 Examples:
   = setenv foo abcdefghijklmnop
   = env reg 'A' '[bdgmo]' foo
   = env reg -s 'A' '[bdgmo]' foo
   foo=aAcdefghijklmnop
   = env reg -g -s 'B' '[bdgmo]' foo
   foo=aAcBefBhijklBnBp
   = env reg -g -s '\\2--\\1' '(Be).*(kl)' foo
   foo=aAckl--BeBnBp

So I'd vote for

= setenv result regsubst($foo, '[bdgmo]', 'A')

What do you think?

Cheers
  Detlev

-- 
To you I'm an atheist; to God, I'm the Loyal Opposition.
-- Woody Allen
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 01/17] env: clean environment.h checkpatch and code style

2011-11-07 Thread Igor Grinberg
Though one warning left:
 WARNING: do not add new typedefs
 #149: FILE: u-boot/include/environment.h:149:
 +typedef struct environment_s {

 total: 0 errors, 1 warnings, 181 lines checked

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 include/environment.h |   44 +++-
 1 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/include/environment.h b/include/environment.h
index 6394a96..2c8c4f1 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -38,21 +38,22 @@
  */
 
 #if defined(CONFIG_ENV_IS_IN_FLASH)
-# ifndef  CONFIG_ENV_ADDR
-#  define CONFIG_ENV_ADDR  (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
+# ifndef   CONFIG_ENV_ADDR
+#  define  CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
 # endif
-# ifndef  CONFIG_ENV_OFFSET
-#  define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
+# ifndef   CONFIG_ENV_OFFSET
+#  define  CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
 # endif
 # if !defined(CONFIG_ENV_ADDR_REDUND)  defined(CONFIG_ENV_OFFSET_REDUND)
-#  define CONFIG_ENV_ADDR_REDUND   (CONFIG_SYS_FLASH_BASE + 
CONFIG_ENV_OFFSET_REDUND)
+#  define  CONFIG_ENV_ADDR_REDUND  \
+   (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET_REDUND)
 # endif
 # if defined(CONFIG_ENV_SECT_SIZE) || defined(CONFIG_ENV_SIZE)
-#  ifndef  CONFIG_ENV_SECT_SIZE
-#   define CONFIG_ENV_SECT_SIZECONFIG_ENV_SIZE
+#  ifndef  CONFIG_ENV_SECT_SIZE
+#   define CONFIG_ENV_SECT_SIZECONFIG_ENV_SIZE
 #  endif
-#  ifndef  CONFIG_ENV_SIZE
-#   define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
+#  ifndef  CONFIG_ENV_SIZE
+#   define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
 #  endif
 # else
 #  error Both CONFIG_ENV_SECT_SIZE and CONFIG_ENV_SIZE undefined
@@ -60,8 +61,9 @@
 # if defined(CONFIG_ENV_ADDR_REDUND)  !defined(CONFIG_ENV_SIZE_REDUND)
 #  define CONFIG_ENV_SIZE_REDUND   CONFIG_ENV_SIZE
 # endif
-# if (CONFIG_ENV_ADDR = CONFIG_SYS_MONITOR_BASE)  \
- (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) = (CONFIG_SYS_MONITOR_BASE + 
CONFIG_SYS_MONITOR_LEN)
+# if   (CONFIG_ENV_ADDR = CONFIG_SYS_MONITOR_BASE)  \
+   (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) =  \
+   (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
 #  define ENV_IS_EMBEDDED  1
 # endif
 # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
@@ -105,10 +107,10 @@ extern unsigned long nand_env_oob_offset;
 
 /* Embedded env is only supported for some flash types */
 #ifdef CONFIG_ENV_IS_EMBEDDED
-# if !defined(CONFIG_ENV_IS_IN_FLASH)  \
- !defined(CONFIG_ENV_IS_IN_NAND)  \
- !defined(CONFIG_ENV_IS_IN_ONENAND)  \
- !defined(CONFIG_ENV_IS_IN_SPI_FLASH)
+# if   !defined(CONFIG_ENV_IS_IN_FLASH) \
+   !defined(CONFIG_ENV_IS_IN_NAND)  \
+   !defined(CONFIG_ENV_IS_IN_ONENAND)   \
+   !defined(CONFIG_ENV_IS_IN_SPI_FLASH)
 #  error CONFIG_ENV_IS_EMBEDDED not supported for your flash type
 # endif
 #endif
@@ -144,7 +146,7 @@ extern unsigned long nand_env_oob_offset;
 
 #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)
 
-typedefstruct environment_s {
+typedef struct environment_s {
uint32_tcrc;/* CRC32 over data bytes*/
 #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
unsigned char   flags;  /* active/obsolete flags*/
@@ -159,14 +161,14 @@ typedef   struct environment_s {
 extern struct hsearch_data env_htab;
 
 /* Function that returns a character from the environment */
-unsigned char env_get_char (int);
+unsigned char env_get_char(int);
 
 /* Function that returns a pointer to a value from the environment */
 const unsigned char *env_get_addr(int);
-unsigned char env_get_char_memory (int index);
+unsigned char env_get_char_memory(int index);
 
 /* Function that updates CRC of the enironment */
-void env_crc_update (void);
+void env_crc_update(void);
 
 /* [re]set to the default environment */
 void set_default_env(const char *s);
@@ -174,6 +176,6 @@ void set_default_env(const char *s);
 /* Import from binary representation into hash table */
 int env_import(const char *buf, int check);
 
-#endif
+#endif /* DO_DEPS_ONLY */
 
-#endif /* _ENVIRONMENT_H_ */
+#endif /* _ENVIRONMENT_H_ */
-- 
1.7.3.4

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


[U-Boot] [PATCH 03/17] env: move extern default_environment[] to environment.h

2011-11-07 Thread Igor Grinberg
Extract all extern declarations for default_environment[] out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
Cc: Stefan Roese s...@denx.de
---
 board/zeus/zeus.c  |1 -
 common/env_dataflash.c |2 --
 common/env_flash.c |2 --
 common/env_mgdisk.c|3 ---
 common/env_mmc.c   |3 ---
 common/env_nand.c  |3 ---
 common/env_nowhere.c   |2 --
 common/env_nvram.c |2 --
 common/env_onenand.c   |3 ---
 common/env_sf.c|3 ---
 include/environment.h  |2 ++
 11 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/board/zeus/zeus.c b/board/zeus/zeus.c
index 18cb85f..272e59b 100644
--- a/board/zeus/zeus.c
+++ b/board/zeus/zeus.c
@@ -40,7 +40,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH 
chips*/
 extern env_t *env_ptr;
-extern uchar default_environment[];
 
 ulong flash_get_size(ulong base, int banknum);
 void env_crc_update(void);
diff --git a/common/env_dataflash.c b/common/env_dataflash.c
index 1d57079..7970ffa 100644
--- a/common/env_dataflash.c
+++ b/common/env_dataflash.c
@@ -37,8 +37,6 @@ extern int write_dataflash(unsigned long addr_dest,
unsigned long addr_src, unsigned long size);
 extern int AT91F_DataflashInit(void);
 
-extern uchar default_environment[];
-
 uchar env_get_char_spec(int index)
 {
uchar c;
diff --git a/common/env_flash.c b/common/env_flash.c
index 50ca4ffa..1383f3c 100644
--- a/common/env_flash.c
+++ b/common/env_flash.c
@@ -74,8 +74,6 @@ static env_t *flash_addr_new = (env_t 
*)CONFIG_ENV_ADDR_REDUND;
 static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1;
 #endif /* CONFIG_ENV_ADDR_REDUND */
 
-extern const uchar default_environment[];
-
 
 uchar env_get_char_spec(int index)
 {
diff --git a/common/env_mgdisk.c b/common/env_mgdisk.c
index a69923b..b95d85e 100644
--- a/common/env_mgdisk.c
+++ b/common/env_mgdisk.c
@@ -27,9 +27,6 @@
 #include linux/stddef.h
 #include mg_disk.h
 
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
 char *env_name_spec = MG_DISK;
 
 env_t *env_ptr = 0;
diff --git a/common/env_mmc.c b/common/env_mmc.c
index 83f40f4..a0c0ece 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -32,9 +32,6 @@
 #include search.h
 #include errno.h
 
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
 char *env_name_spec = MMC;
 
 #ifdef ENV_IS_EMBEDDED
diff --git a/common/env_nand.c b/common/env_nand.c
index 14446a6..94d4417 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -55,9 +55,6 @@
 #define CONFIG_ENV_RANGE   CONFIG_ENV_SIZE
 #endif
 
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
 char *env_name_spec = NAND;
 
 
diff --git a/common/env_nowhere.c b/common/env_nowhere.c
index 75ef78d..a6890db 100644
--- a/common/env_nowhere.c
+++ b/common/env_nowhere.c
@@ -33,8 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 env_t *env_ptr = NULL;
 
-extern uchar default_environment[];
-
 void env_relocate_spec(void)
 {
 }
diff --git a/common/env_nvram.c b/common/env_nvram.c
index 544ce47..5357e1a 100644
--- a/common/env_nvram.c
+++ b/common/env_nvram.c
@@ -59,8 +59,6 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
 
 char * env_name_spec = NVRAM;
 
-extern uchar default_environment[];
-
 uchar env_get_char_spec(int index)
 {
 #ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
diff --git a/common/env_onenand.c b/common/env_onenand.c
index 5e04a06..b1f266b 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -39,9 +39,6 @@
 extern struct mtd_info onenand_mtd;
 extern struct onenand_chip onenand_chip;
 
-/* References to names in env_common.c */
-extern uchar default_environment[];
-
 char *env_name_spec = OneNAND;
 
 #define ONENAND_MAX_ENV_SIZE   4096
diff --git a/common/env_sf.c b/common/env_sf.c
index d3b36d0..2ff10dd 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -55,9 +55,6 @@ static ulong env_new_offset = CONFIG_ENV_OFFSET_REDUND;
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
 char * env_name_spec = SPI Flash;
 
 static struct spi_flash *env_flash;
diff --git a/include/environment.h b/include/environment.h
index 2c8c4f1..20775da 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -154,6 +154,8 @@ typedef struct environment_s {
unsigned char   data[ENV_SIZE]; /* Environment data */
 } env_t;
 
+extern const unsigned char default_environment[];
+
 #ifndef DO_DEPS_ONLY
 
 #include search.h
-- 
1.7.3.4

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


[U-Boot] [PATCH 00/17] Cleanup environment related files

2011-11-07 Thread Igor Grinberg
This patch series cleans up environment related files
in terms of checkpatch and other coding style issues.
It is based on Mon, 7 Nov 2011 Wolfgang's master.

There are several warnings/errors left, mostly because
I don't think we need those solved or I can't choose the
right solution.

Probably, there will be several conflict with the recent patches
on the list, so once all issues are fixed,
I can rebase this patch set on top of the most recent master.

Thanks to all reviewers :-)

Igor Grinberg (17):
  env: clean environment.h checkpatch and code style
  common: move extern char console_buffer[] to common.h
  env: move extern default_environment[] to environment.h
  env: move extern environment[] to environment.h
  env: clean cmd_nvedit.c checkpatch and code style
  env: clean env_nowhere.c checkpatch and code style
  env: clean env_mgdisk.c checkpatch and code style
  env: clean env_dataflash.c checkpatch and code style
  env: clean env_onenand.c checkpatch and code style
  env: clean env_nvram.c checkpatch and code style
  env: clean env_mmc.c checkpatch and code style
  env: clean env_embedded.c checkpatch and code style
  env: clean env_eeprom.c checkpatch and code style
  env: clean env_sf.c checkpatch and code style
  env: clean env_flash.c checkpatch and code style
  env: clean env_nand.c checkpatch and code style
  env: clean env_common.c checkpatch and code style

 board/amcc/yucca/cmd_yucca.c |1 -
 board/eltec/bab7xx/misc.c|1 -
 board/eltec/elppc/misc.c |1 -
 board/eltec/mhpc/mhpc.c  |3 -
 board/hymod/input.c  |3 -
 board/zeus/zeus.c|1 -
 common/cmd_bedbug.c  |1 -
 common/cmd_dcr.c |1 -
 common/cmd_i2c.c |1 -
 common/cmd_mem.c |1 -
 common/cmd_nvedit.c  |  100 +++
 common/cmd_pci.c |1 -
 common/env_common.c  |   52 
 common/env_dataflash.c   |   34 +++-
 common/env_eeprom.c  |  104 +++-
 common/env_embedded.c|   47 ++--
 common/env_flash.c   |  181 --
 common/env_mgdisk.c  |7 +-
 common/env_mmc.c |   78 ++-
 common/env_nand.c|  105 +++-
 common/env_nowhere.c |   12 +--
 common/env_nvram.c   |   26 +++---
 common/env_onenand.c |   21 ++
 common/env_sf.c  |   51 +---
 common/hush.c|1 -
 common/modem.c   |1 -
 include/command.h|3 +
 include/common.h |1 +
 include/dataflash.h  |2 +
 include/environment.h|   61 +-
 tools/envcrc.c   |4 +-
 31 files changed, 395 insertions(+), 511 deletions(-)

-- 
1.7.3.4

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


[U-Boot] [PATCH 04/17] env: move extern environment[] to environment.h

2011-11-07 Thread Igor Grinberg
Extract all extern declarations for environment out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_flash.c|4 +---
 common/env_mmc.c  |3 +--
 common/env_nand.c |3 +--
 common/env_onenand.c  |6 +-
 include/environment.h |4 
 tools/envcrc.c|4 ++--
 6 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/common/env_flash.c b/common/env_flash.c
index 1383f3c..a32bfcf 100644
--- a/common/env_flash.c
+++ b/common/env_flash.c
@@ -49,9 +49,7 @@ DECLARE_GLOBAL_DATA_PTR;
 char * env_name_spec = Flash;
 
 #ifdef ENV_IS_EMBEDDED
-
-extern uchar environment[];
-env_t *env_ptr = (env_t *)(environment[0]);
+env_t *env_ptr = environment;
 
 static env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR;
 
diff --git a/common/env_mmc.c b/common/env_mmc.c
index a0c0ece..cb75887 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -35,8 +35,7 @@
 char *env_name_spec = MMC;
 
 #ifdef ENV_IS_EMBEDDED
-extern uchar environment[];
-env_t *env_ptr = (env_t *)(environment[0]);
+env_t *env_ptr = environment;
 #else /* ! ENV_IS_EMBEDDED */
 env_t *env_ptr = NULL;
 #endif /* ENV_IS_EMBEDDED */
diff --git a/common/env_nand.c b/common/env_nand.c
index 94d4417..d975322 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -59,8 +59,7 @@ char *env_name_spec = NAND;
 
 
 #if defined(ENV_IS_EMBEDDED)
-extern uchar environment[];
-env_t *env_ptr = (env_t *)(environment[0]);
+env_t *env_ptr = environment;
 #elif defined(CONFIG_NAND_ENV_DST)
 env_t *env_ptr = (env_t *)CONFIG_NAND_ENV_DST;
 #else /* ! ENV_IS_EMBEDDED */
diff --git a/common/env_onenand.c b/common/env_onenand.c
index b1f266b..c09fdf3 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -44,10 +44,6 @@ char *env_name_spec = OneNAND;
 #define ONENAND_MAX_ENV_SIZE   4096
 #define ONENAND_ENV_SIZE(mtd)  (ONENAND_MAX_ENV_SIZE - ENV_HEADER_SIZE)
 
-#ifdef ENV_IS_EMBEDDED
-extern uchar environment[];
-#endif /* ENV_IS_EMBEDDED */
-
 DECLARE_GLOBAL_DATA_PTR;
 
 uchar env_get_char_spec(int index)
@@ -64,7 +60,7 @@ void env_relocate_spec(void)
int rc;
size_t retlen;
 #ifdef ENV_IS_EMBEDDED
-   char *buf = (char *)environment[0];
+   char *buf = (char *)environment;
 #else
loff_t env_addr = CONFIG_ENV_ADDR;
char onenand_env[ONENAND_MAX_ENV_SIZE];
diff --git a/include/environment.h b/include/environment.h
index 20775da..951803f 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -154,6 +154,10 @@ typedef struct environment_s {
unsigned char   data[ENV_SIZE]; /* Environment data */
 } env_t;
 
+#ifdef ENV_IS_EMBEDDED
+extern env_t environment;
+#endif /* ENV_IS_EMBEDDED */
+
 extern const unsigned char default_environment[];
 
 #ifndef DO_DEPS_ONLY
diff --git a/tools/envcrc.c b/tools/envcrc.c
index feebbab..12913c2 100644
--- a/tools/envcrc.c
+++ b/tools/envcrc.c
@@ -77,7 +77,7 @@ extern uint32_t crc32 (uint32_t, const unsigned char *, 
unsigned int);
 
 #ifdef CONFIG_BUILD_ENVCRC
 extern unsigned int env_size;
-extern unsigned char environment;
+extern env_t environment;
 #endif /* CONFIG_BUILD_ENVCRC */
 
 int main (int argc, char **argv)
@@ -85,7 +85,7 @@ int main (int argc, char **argv)
 #ifdef CONFIG_BUILD_ENVCRC
unsigned char pad = 0x00;
uint32_t crc;
-   unsigned char *envptr = environment,
+   unsigned char *envptr = (unsigned char *)environment,
*dataptr = envptr + ENV_HEADER_SIZE;
unsigned int datasize = ENV_SIZE;
unsigned int eoe;
-- 
1.7.3.4

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


[U-Boot] [PATCH 05/17] env: clean cmd_nvedit.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style.
There are 10 wanrings left about the simple_strtoul() function:
 WARNING: simple_strtoul is obsolete, use kstrtoul instead
 #359: FILE: cmd_nvedit.c:359:
 +  load_addr = simple_strtoul(argv[2], NULL, 16);

 ...

 total: 0 errors, 10 warnings, 1043 lines checked

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/cmd_nvedit.c   |   99 +++-
 include/command.h |3 +
 include/environment.h |3 +
 3 files changed, 53 insertions(+), 52 deletions(-)

diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 85b1750..aab03af 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -165,7 +165,8 @@ int do_env_print (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
 }
 
 #ifdef CONFIG_CMD_GREPENV
-static int do_env_grep (cmd_tbl_t *cmdtp, int flag, int argc, char * const 
argv[])
+static int do_env_grep(cmd_tbl_t *cmdtp, int flag,
+  int argc, char * const argv[])
 {
ENTRY *match;
unsigned char matched[env_htab.size / 8];
@@ -178,7 +179,7 @@ static int do_env_grep (cmd_tbl_t *cmdtp, int flag, int 
argc, char * const argv[
 
while (arg = argc) {
idx = 0;
-   while ((idx = hstrstr_r(argv[arg], idx, match, env_htab))) {
+   while (idx = hstrstr_r(argv[arg], idx, match, env_htab)) {
if (!(matched[idx / 8]  (1  (idx  7 {
puts(match-key);
puts(=);
@@ -199,8 +200,7 @@ static int do_env_grep (cmd_tbl_t *cmdtp, int flag, int 
argc, char * const argv[
  * Set a new environment variable,
  * or replace or delete an existing one.
  */
-
-int _do_env_set (int flag, int argc, char * const argv[])
+int _do_env_set(int flag, int argc, char * const argv[])
 {
bd_t  *bd = gd-bd;
int   i, len;
@@ -211,7 +211,8 @@ int _do_env_set (int flag, int argc, char * const argv[])
name = argv[1];
 
if (strchr(name, '=')) {
-   printf(## Error: illegal character '=' in variable name 
\%s\\n, name);
+   printf(## Error: illegal character '=' in variable name
+  \%s\\n, name);
return 1;
}
 
@@ -259,12 +260,12 @@ int _do_env_set (int flag, int argc, char * const argv[])
 */
if (ep) {   /* variable exists */
 #ifndef CONFIG_ENV_OVERWRITE
-   if ((strcmp(name, serial#) == 0) ||
-   ((strcmp(name, ethaddr) == 0)
+   if (strcmp(name, serial#) == 0 ||
+   (strcmp(name, ethaddr) == 0
 #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE)  defined(CONFIG_ETHADDR)
- (strcmp(ep-data, MK_STR(CONFIG_ETHADDR)) != 0)
+ strcmp(ep-data, MK_STR(CONFIG_ETHADDR)) != 0
 #endif /* CONFIG_OVERWRITE_ETHADDR_ONCE  CONFIG_ETHADDR */
-   ) ) {
+   )) {
printf(Can't overwrite \%s\\n, name);
return 1;
}
@@ -284,8 +285,8 @@ int _do_env_set (int flag, int argc, char * const argv[])
baudrate);
return 1;
}
-   printf (## Switch baudrate to %d bps and press ENTER 
...\n,
-   baudrate);
+   printf(## Switch baudrate to %d bps and
+  press ENTER ...\n, baudrate);
udelay(5);
gd-baudrate = baudrate;
 #if defined(CONFIG_PPC) || defined(CONFIG_MCF52x2)
@@ -294,15 +295,13 @@ int _do_env_set (int flag, int argc, char * const argv[])
 
serial_setbrg();
udelay(5);
-   for (;;) {
-   if (getc() == '\r')
-   break;
-   }
+   while (getc() != '\r')
+   ;
}
}
 
/* Delete only ? */
-   if ((argc  3) || argv[2] == NULL) {
+   if (argc  3 || argv[2] == NULL) {
int rc = hdelete_r(name, env_htab);
return !rc;
}
@@ -323,13 +322,13 @@ int _do_env_set (int flag, int argc, char * const argv[])
 
while ((*s++ = *v++) != '\0')
;
-   *(s-1) = ' ';
+   *(s - 1) = ' ';
}
if (s != value)
*--s = '\0';
 
-   e.key  = name;
-   e.data = value;
+   e.key   = name;
+   e.data  = value;
hsearch_r(e, ENTER, ep, env_htab);
free(value);
if (!ep) {
@@ -342,7 +341,6 @@ int _do_env_set (int flag, int argc, char * const argv[])
 * Some variables should be updated when the corresponding
 * entry in the 

[U-Boot] [PATCH 06/17] env: clean env_nowhere.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_nowhere.c checkpatch warnings, errors and coding style.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_nowhere.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/common/env_nowhere.c b/common/env_nowhere.c
index a6890db..8a3ca19 100644
--- a/common/env_nowhere.c
+++ b/common/env_nowhere.c
@@ -31,7 +31,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-env_t *env_ptr = NULL;
+env_t *env_ptr;
 
 void env_relocate_spec(void)
 {
@@ -39,7 +39,7 @@ void env_relocate_spec(void)
 
 uchar env_get_char_spec(int index)
 {
-   return ( *((uchar *)(gd-env_addr + index)) );
+   return *((uchar *)(gd-env_addr + index));
 }
 
 /*
@@ -49,8 +49,8 @@ uchar env_get_char_spec(int index)
  */
 int env_init(void)
 {
-   gd-env_addr  = (ulong)default_environment[0];
-   gd-env_valid = 0;
+   gd-env_addr= (ulong)default_environment[0];
+   gd-env_valid   = 0;
 
-   return (0);
+   return 0;
 }
-- 
1.7.3.4

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


[U-Boot] [PATCH 07/17] env: clean env_mgdisk.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_mgdisk.c checkpatch warnings, errors
and coding style.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_mgdisk.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/env_mgdisk.c b/common/env_mgdisk.c
index b95d85e..5dd92e7 100644
--- a/common/env_mgdisk.c
+++ b/common/env_mgdisk.c
@@ -29,13 +29,13 @@
 
 char *env_name_spec = MG_DISK;
 
-env_t *env_ptr = 0;
+env_t *env_ptr;
 
 DECLARE_GLOBAL_DATA_PTR;
 
 uchar env_get_char_spec(int index)
 {
-   return (*((uchar *)(gd-env_addr + index)));
+   return *((uchar *)(gd-env_addr + index));
 }
 
 void env_relocate_spec(void)
-- 
1.7.3.4

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


[U-Boot] [PATCH 08/17] env: clean env_dataflash.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_dataflash.c checkpatch warnings, errors
and coding style.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_dataflash.c |   32 
 include/dataflash.h|2 ++
 2 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/common/env_dataflash.c b/common/env_dataflash.c
index 7970ffa..f9674d2 100644
--- a/common/env_dataflash.c
+++ b/common/env_dataflash.c
@@ -27,23 +27,17 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-env_t *env_ptr = NULL;
+env_t *env_ptr;
 
-char * env_name_spec = dataflash;
-
-extern int read_dataflash(unsigned long addr, unsigned long size,
-   char *result);
-extern int write_dataflash(unsigned long addr_dest,
-   unsigned long addr_src, unsigned long size);
-extern int AT91F_DataflashInit(void);
+char *env_name_spec = dataflash;
 
 uchar env_get_char_spec(int index)
 {
uchar c;
 
-   read_dataflash(CONFIG_ENV_ADDR + index + offsetof(env_t,data),
+   read_dataflash(CONFIG_ENV_ADDR + index + offsetof(env_t, data),
1, (char *)c);
-   return (c);
+   return c;
 }
 
 void env_relocate_spec(void)
@@ -71,7 +65,7 @@ int saveenv(void)
error(Cannot export environment: errno = %d\n, errno);
return 1;
}
-   env_new.crc   = crc32(0, env_new.data, ENV_SIZE);
+   env_new.crc = crc32(0, env_new.data, ENV_SIZE);
 
return write_dataflash(CONFIG_ENV_ADDR,
(unsigned long)env_new,
@@ -86,7 +80,7 @@ int saveenv(void)
  */
 int env_init(void)
 {
-   ulong crc, len, new;
+   ulong crc, len = ENV_SIZE, new = 0;
unsigned off;
uchar buf[64];
 
@@ -99,25 +93,23 @@ int env_init(void)
read_dataflash(CONFIG_ENV_ADDR + offsetof(env_t, crc),
sizeof(ulong), (char *)crc);
 
-   new = 0;
-   len = ENV_SIZE;
-   off = offsetof(env_t,data);
+   off = offsetof(env_t, data);
while (len  0) {
int n = (len  sizeof(buf)) ? sizeof(buf) : len;
 
read_dataflash(CONFIG_ENV_ADDR + off, n, (char *)buf);
 
-   new = crc32 (new, buf, n);
+   new = crc32(new, buf, n);
len -= n;
off += n;
}
 
if (crc == new) {
-   gd-env_addr  = offsetof(env_t,data);
-   gd-env_valid = 1;
+   gd-env_addr= offsetof(env_t, data);
+   gd-env_valid   = 1;
} else {
-   gd-env_addr  = (ulong)default_environment[0];
-   gd-env_valid = 0;
+   gd-env_addr= (ulong)default_environment[0];
+   gd-env_valid   = 0;
}
 
return 0;
diff --git a/include/dataflash.h b/include/dataflash.h
index 96ac097..056e18b 100644
--- a/include/dataflash.h
+++ b/include/dataflash.h
@@ -208,6 +208,8 @@ extern int dataflash_real_protect (int flag, unsigned long 
start_addr, unsigned
 extern int addr_dataflash (unsigned long addr);
 extern int read_dataflash (unsigned long addr, unsigned long size, char 
*result);
 extern int write_dataflash (unsigned long addr, unsigned long dest, unsigned 
long size);
+extern int AT91F_DataflashInit(void);
+
 extern void dataflash_print_info (void);
 extern void dataflash_perror (int err);
 extern void AT91F_DataflashSetEnv (void);
-- 
1.7.3.4

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


[U-Boot] [PATCH 09/17] env: clean env_onenand.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_onenand.c checkpatch warnings, errors and coding style.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_onenand.c |   12 +---
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/common/env_onenand.c b/common/env_onenand.c
index c09fdf3..f356056 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -31,14 +31,12 @@
 #include malloc.h
 #include search.h
 #include errno.h
+#include onenand_uboot.h
 
 #include linux/mtd/compat.h
 #include linux/mtd/mtd.h
 #include linux/mtd/onenand.h
 
-extern struct mtd_info onenand_mtd;
-extern struct onenand_chip onenand_chip;
-
 char *env_name_spec = OneNAND;
 
 #define ONENAND_MAX_ENV_SIZE   4096
@@ -48,7 +46,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 uchar env_get_char_spec(int index)
 {
-   return (*((uchar *)(gd-env_addr + index)));
+   return *((uchar *)(gd-env_addr + index));
 }
 
 void env_relocate_spec(void)
@@ -76,7 +74,7 @@ void env_relocate_spec(void)
if (mtd-writesize)
/* Ignore read fail */
mtd-read(mtd, env_addr, ONENAND_MAX_ENV_SIZE,
-retlen, (u_char *)buf);
+   retlen, (u_char *)buf);
else
mtd-writesize = MAX_ONENAND_PAGESIZE;
 #endif /* !ENV_IS_EMBEDDED */
@@ -126,7 +124,7 @@ int saveenv(void)
}
 
if (mtd-write(mtd, env_addr, ONENAND_MAX_ENV_SIZE, retlen,
-(u_char *)env_new)) {
+   (u_char *)env_new)) {
printf(OneNAND: write failed at 0x%llx\n, instr.addr);
return 2;
}
@@ -137,7 +135,7 @@ int saveenv(void)
 int env_init(void)
 {
/* use default */
-   gd-env_addr = (ulong)  default_environment[0];
+   gd-env_addr = (ulong)default_environment[0];
gd-env_valid = 1;
 
return 0;
-- 
1.7.3.4

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


[U-Boot] [PATCH 10/17] env: clean env_nvram.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_nvram.c checkpatch warnings, errors and coding style.
There are 2 wanring left about the extern used in c file:
 WARNING: externs should be avoided in .c files
 #53: FILE: env_nvram.c:53:
 +extern void *nvram_read(void *dest, const long src, size_t count);

 WARNING: externs should be avoided in .c files
 #54: FILE: env_nvram.c:54:
 +extern void nvram_write(long dest, const void *src, size_t count);

 total: 0 errors, 2 warnings, 138 lines checked

There is no common nvram header file to use instead of the externs.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_nvram.c |   24 
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/common/env_nvram.c b/common/env_nvram.c
index 5357e1a..f7c2f51 100644
--- a/common/env_nvram.c
+++ b/common/env_nvram.c
@@ -52,19 +52,19 @@ DECLARE_GLOBAL_DATA_PTR;
 #ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
 extern void *nvram_read(void *dest, const long src, size_t count);
 extern void nvram_write(long dest, const void *src, size_t count);
-env_t *env_ptr = NULL;
+env_t *env_ptr;
 #else
 env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
 #endif
 
-char * env_name_spec = NVRAM;
+char *env_name_spec = NVRAM;
 
 uchar env_get_char_spec(int index)
 {
 #ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
uchar c;
 
-   nvram_read(c, CONFIG_ENV_ADDR+index, 1);
+   nvram_read(c, CONFIG_ENV_ADDR + index, 1);
 
return c;
 #else
@@ -79,7 +79,7 @@ void env_relocate_spec(void)
 #if defined(CONFIG_SYS_NVRAM_ACCESS_ROUTINE)
nvram_read(buf, CONFIG_ENV_ADDR, CONFIG_ENV_SIZE);
 #else
-   memcpy(buf, (void*)CONFIG_ENV_ADDR, CONFIG_ENV_SIZE);
+   memcpy(buf, (void *)CONFIG_ENV_ADDR, CONFIG_ENV_SIZE);
 #endif
env_import(buf, 1);
 }
@@ -108,7 +108,6 @@ int saveenv(void)
return rcode;
 }
 
-
 /*
  * Initialize Environment use
  *
@@ -121,18 +120,19 @@ int env_init(void)
uchar data[ENV_SIZE];
 
nvram_read(crc, CONFIG_ENV_ADDR, sizeof(ulong));
-   nvram_read(data, CONFIG_ENV_ADDR+sizeof(ulong), ENV_SIZE);
+   nvram_read(data, CONFIG_ENV_ADDR + sizeof(ulong), ENV_SIZE);
 
if (crc32(0, data, ENV_SIZE) == crc) {
-   gd-env_addr  = (ulong)CONFIG_ENV_ADDR + sizeof(long);
+   gd-env_addr= (ulong)CONFIG_ENV_ADDR + sizeof(long);
 #else
if (crc32(0, env_ptr-data, ENV_SIZE) == env_ptr-crc) {
-   gd-env_addr  = (ulong)(env_ptr-data);
+   gd-env_addr= (ulong)env_ptr-data;
 #endif
-   gd-env_valid = 1;
+   gd-env_valid   = 1;
} else {
-   gd-env_addr  = (ulong)default_environment[0];
-   gd-env_valid = 0;
+   gd-env_addr= (ulong)default_environment[0];
+   gd-env_valid   = 0;
}
-   return (0);
+
+   return 0;
 }
-- 
1.7.3.4

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


[U-Boot] [PATCH 12/17] env: clean env_embedded.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_embedded.c checkpatch warnings, errors and coding style.
There is one error left though:
 ERROR: Macros with multiple statements should be enclosed in a do - while loop
 #79: FILE: u-boot/common/env_embedded.c:79:
 +#define GEN_ABS(name, value)   \
 +   asm(.globl  GEN_SYMNAME(name));   \
 +   GEN_SET_VALUE(name, value)

 total: 1 errors, 0 warnings, 213 lines checked

We cannot enclose that statement in a do - while loop,
because these are a global assembly declarations.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_embedded.c |   47 +++
 1 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/common/env_embedded.c b/common/env_embedded.c
index 6ce1307..80fb29d 100644
--- a/common/env_embedded.c
+++ b/common/env_embedded.c
@@ -22,17 +22,14 @@
  */
 
 #ifndef __ASSEMBLY__
-#define__ASSEMBLY__/* Dirty trick to get only 
#defines */
+#define__ASSEMBLY__/* Dirty trick to get only 
#defines */
 #endif
-#define__ASM_STUB_PROCESSOR_H__/* don't include asm/processor. 
*/
+#define__ASM_STUB_PROCESSOR_H__/* don't include asm/processor. 
*/
 #include config.h
 #undef __ASSEMBLY__
 #include environment.h
 
-/*
- * Handle HOSTS that have prepended
- * crap on symbol names, not TARGETS.
- */
+/* Handle HOSTS that have prepended crap on symbol names, not TARGETS. */
 #if defined(__APPLE__)
 /* Leading underscore on symbols */
 #  define SYM_CHAR _
@@ -52,34 +49,36 @@
  * U-Boot itself.
  */
 #if (defined(CONFIG_SYS_USE_PPCENV) || defined(CONFIG_NAND_U_BOOT))  \
- defined(ENV_CRC) /* Environment embedded in U-Boot .ppcenv section */
+   defined(ENV_CRC) /* Environment embedded in U-Boot .ppcenv section */
 /* XXX - This only works with GNU C */
-#  define __PPCENV__ __attribute__ ((section(.ppcenv)))
-#  define __PPCTEXT__ __attribute__ ((section(.text)))
+#  define __PPCENV__   __attribute__ ((section(.ppcenv)))
+#  define __PPCTEXT__  __attribute__ ((section(.text)))
 
 #elif defined(USE_HOSTCC) /* Native for 'tools/envcrc' */
-#  define __PPCENV__ /*XXX DO_NOT_DEL_THIS_COMMENT*/
-#  define __PPCTEXT__ /*XXX DO_NOT_DEL_THIS_COMMENT*/
+#  define __PPCENV__   /*XXX DO_NOT_DEL_THIS_COMMENT*/
+#  define __PPCTEXT__  /*XXX DO_NOT_DEL_THIS_COMMENT*/
 
 #else /* Environment is embedded in U-Boot's .text section */
 /* XXX - This only works with GNU C */
-#  define __PPCENV__ __attribute__ ((section(.text)))
-#  define __PPCTEXT__ __attribute__ ((section(.text)))
+#  define __PPCENV__   __attribute__ ((section(.text)))
+#  define __PPCTEXT__  __attribute__ ((section(.text)))
 #endif
 
 /*
  * Macros to generate global absolutes.
  */
 #if defined(__bfin__)
-# define GEN_SET_VALUE(name, value) asm (.set  GEN_SYMNAME(name) ,  
GEN_VALUE(value))
+# define GEN_SET_VALUE(name, value)\
+   asm(.set  GEN_SYMNAME(name) ,  GEN_VALUE(value))
 #else
-# define GEN_SET_VALUE(name, value) asm (GEN_SYMNAME(name)  =  
GEN_VALUE(value))
-#endif
-#define GEN_SYMNAME(str) SYM_CHAR #str
-#define GEN_VALUE(str) #str
-#define GEN_ABS(name, value) \
-   asm (.globl  GEN_SYMNAME(name)); \
-   GEN_SET_VALUE(name, value)
+# define GEN_SET_VALUE(name, value)\
+   asm(GEN_SYMNAME(name)  =  GEN_VALUE(value))
+#endif
+#define GEN_SYMNAME(str)   SYM_CHAR #str
+#define GEN_VALUE(str) #str
+#define GEN_ABS(name, value)   \
+   asm(.globl  GEN_SYMNAME(name));   \
+   GEN_SET_VALUE(name, value)
 
 /*
  * Macros to transform values
@@ -93,7 +92,7 @@
  * computed CRC.  Otherwise define it as ~0.
  */
 #if !defined(ENV_CRC)
-#  define ENV_CRC  ~0
+#  define ENV_CRC  (~0)
 #endif
 
 env_t environment __PPCENV__ = {
@@ -151,7 +150,7 @@ env_t environment __PPCENV__ = {
serverip= MK_STR(CONFIG_SERVERIP) \0
 #endif
 #ifdef CONFIG_SYS_AUTOLOAD
-   autoload= CONFIG_SYS_AUTOLOAD \0
+   autoload= CONFIG_SYS_AUTOLOAD \0
 #endif
 #ifdef CONFIG_ROOTPATH
rootpath= CONFIG_ROOTPATH \0
@@ -180,7 +179,7 @@ env_t environment __PPCENV__ = {
 #if defined(CONFIG_PCI_BOOTDELAY)  (CONFIG_PCI_BOOTDELAY  0)
pcidelay= MK_STR(CONFIG_PCI_BOOTDELAY)\0
 #endif
-#ifdef  CONFIG_EXTRA_ENV_SETTINGS
+#ifdef CONFIG_EXTRA_ENV_SETTINGS
CONFIG_EXTRA_ENV_SETTINGS
 #endif
\0/* Term. env_t.data with 2 NULs */
-- 
1.7.3.4

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


[U-Boot] [PATCH 02/17] common: move extern char console_buffer[] to common.h

2011-11-07 Thread Igor Grinberg
Extract all extern declarations for console_buffer[] out of c files into
the common.h header.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
Cc: Frank Gottschling fgottschl...@eltec.de
Cc: Murray Jensen murray.jen...@csiro.au
---
 board/amcc/yucca/cmd_yucca.c |1 -
 board/eltec/bab7xx/misc.c|1 -
 board/eltec/elppc/misc.c |1 -
 board/eltec/mhpc/mhpc.c  |3 ---
 board/hymod/input.c  |3 ---
 common/cmd_bedbug.c  |1 -
 common/cmd_dcr.c |1 -
 common/cmd_i2c.c |1 -
 common/cmd_mem.c |1 -
 common/cmd_nvedit.c  |1 -
 common/cmd_pci.c |1 -
 common/hush.c|1 -
 common/modem.c   |1 -
 include/common.h |1 +
 14 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/board/amcc/yucca/cmd_yucca.c b/board/amcc/yucca/cmd_yucca.c
index e9cd333..f45325e 100644
--- a/board/amcc/yucca/cmd_yucca.c
+++ b/board/amcc/yucca/cmd_yucca.c
@@ -51,7 +51,6 @@ static int setBootStrapClock(cmd_tbl_t *cmdtp, int incrflag, 
int flag,
uchar   chip;
ulong   data;
int nbytes;
-   extern char console_buffer[];
 
char sysClock[4];
char cpuClock[4];
diff --git a/board/eltec/bab7xx/misc.c b/board/eltec/bab7xx/misc.c
index bc6eb40..d05e226 100644
--- a/board/eltec/bab7xx/misc.c
+++ b/board/eltec/bab7xx/misc.c
@@ -31,7 +31,6 @@
 #include srom.h
 
 /* imports  */
-extern char console_buffer[CONFIG_SYS_CBSIZE];
 extern int l2_cache_enable (int l2control);
 extern void *nvram_read (void *dest, const short src, size_t count);
 extern void nvram_write (short dest, const void *src, size_t count);
diff --git a/board/eltec/elppc/misc.c b/board/eltec/elppc/misc.c
index cbaf10b..d476cd5 100644
--- a/board/eltec/elppc/misc.c
+++ b/board/eltec/elppc/misc.c
@@ -29,7 +29,6 @@
 #include srom.h
 
 /* imports  */
-extern char console_buffer[CONFIG_SYS_CBSIZE];
 extern int l2_cache_enable (int l2control);
 extern int eepro100_write_eeprom (struct eth_device *dev, int location,
  int addr_len, unsigned short data);
diff --git a/board/eltec/mhpc/mhpc.c b/board/eltec/mhpc/mhpc.c
index 7cca6b2..e806b3e 100644
--- a/board/eltec/mhpc/mhpc.c
+++ b/board/eltec/mhpc/mhpc.c
@@ -35,9 +35,6 @@
 #include mpc8xx.h
 #include video_fb.h
 
-/* imports from common/main.c */
-extern char console_buffer[CONFIG_SYS_CBSIZE];
-
 extern void eeprom_init (void);
 extern int eeprom_read (unsigned dev_addr, unsigned offset,
unsigned char *buffer, unsigned cnt);
diff --git a/board/hymod/input.c b/board/hymod/input.c
index 998132d..075076d 100644
--- a/board/hymod/input.c
+++ b/board/hymod/input.c
@@ -23,9 +23,6 @@
 
 #include common.h
 
-/* imports from common/main.c */
-extern char console_buffer[CONFIG_SYS_CBSIZE];
-
 int
 hymod_get_serno (const char *prompt)
 {
diff --git a/common/cmd_bedbug.c b/common/cmd_bedbug.c
index 2bd62e2..87b108f 100644
--- a/common/cmd_bedbug.c
+++ b/common/cmd_bedbug.c
@@ -15,7 +15,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern void show_regs __P ((struct pt_regs *));
 extern int run_command __P ((const char *, int));
-extern char console_buffer[];
 
 ulong dis_last_addr = 0;   /* Last address disassembled   */
 ulong dis_last_len = 20;   /* Default disassembler length */
diff --git a/common/cmd_dcr.c b/common/cmd_dcr.c
index 45fe66a..568e226 100644
--- a/common/cmd_dcr.c
+++ b/common/cmd_dcr.c
@@ -68,7 +68,6 @@ int do_setdcr (cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
 
/* DCR's value */
int nbytes;
-   extern char console_buffer[];
 
/* Validate arguments */
if (argc  2)
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 3ea75f7..bb69f63 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -449,7 +449,6 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int 
argc, char * const arg
ulong   data;
int size = 1;
int nbytes;
-   extern char console_buffer[];
 
if (argc != 3)
return cmd_usage(cmdtp);
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 461ee19..9ad932c 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -982,7 +982,6 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, 
char * const argv[])
 {
ulong   addr, i;
int nbytes, size;
-   extern char console_buffer[];
 
if (argc != 2)
return cmd_usage(cmdtp);
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 396a171..85b1750 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -423,7 +423,6 @@ int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
 #if defined(CONFIG_CMD_ASKENV)
 int do_env_ask(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
-   extern char console_buffer[CONFIG_SYS_CBSIZE];
char message[CONFIG_SYS_CBSIZE];
int size = CONFIG_SYS_CBSIZE - 1;
  

[U-Boot] [PATCH 11/17] env: clean env_mmc.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_mmc.c checkpatch warnings, errors and coding style.
Simplify env_relocate_spec() function implementation.
Also mark internal functions as static.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_mmc.c |   72 +
 1 files changed, 23 insertions(+), 49 deletions(-)

diff --git a/common/env_mmc.c b/common/env_mmc.c
index cb75887..e6f626b 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -37,14 +37,9 @@ char *env_name_spec = MMC;
 #ifdef ENV_IS_EMBEDDED
 env_t *env_ptr = environment;
 #else /* ! ENV_IS_EMBEDDED */
-env_t *env_ptr = NULL;
+env_t *env_ptr;
 #endif /* ENV_IS_EMBEDDED */
 
-/* local functions */
-#if !defined(ENV_IS_EMBEDDED)
-static void use_default(void);
-#endif
-
 DECLARE_GLOBAL_DATA_PTR;
 
 #if !defined(CONFIG_ENV_OFFSET)
@@ -56,9 +51,8 @@ static int __mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
*env_addr = CONFIG_ENV_OFFSET;
return 0;
 }
-__attribute__((weak, alias(__mmc_get_env_addr)))
-int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr);
-
+int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
+   __attribute__((weak, alias(__mmc_get_env_addr)));
 
 uchar env_get_char_spec(int index)
 {
@@ -68,13 +62,13 @@ uchar env_get_char_spec(int index)
 int env_init(void)
 {
/* use default */
-   gd-env_addr = (ulong)default_environment[0];
-   gd-env_valid = 1;
+   gd-env_addr= (ulong)default_environment[0];
+   gd-env_valid   = 1;
 
return 0;
 }
 
-int init_mmc_for_env(struct mmc *mmc)
+static int init_mmc_for_env(struct mmc *mmc)
 {
if (!mmc) {
puts(No MMC card found\n);
@@ -83,21 +77,20 @@ int init_mmc_for_env(struct mmc *mmc)
 
if (mmc_init(mmc)) {
puts(MMC init failed\n);
-   return  -1;
+   return -1;
}
 
return 0;
 }
 
 #ifdef CONFIG_CMD_SAVEENV
-
-inline int write_env(struct mmc *mmc, unsigned long size,
-   unsigned long offset, const void *buffer)
+static inline int write_env(struct mmc *mmc, unsigned long size,
+   unsigned long offset, const void *buffer)
 {
uint blk_start, blk_cnt, n;
 
-   blk_start = ALIGN(offset, mmc-write_bl_len) / mmc-write_bl_len;
-   blk_cnt   = ALIGN(size, mmc-write_bl_len) / mmc-write_bl_len;
+   blk_start   = ALIGN(offset, mmc-write_bl_len) / mmc-write_bl_len;
+   blk_cnt = ALIGN(size, mmc-write_bl_len) / mmc-write_bl_len;
 
n = mmc-block_dev.block_write(CONFIG_SYS_MMC_ENV_DEV, blk_start,
blk_cnt, (u_char *)buffer);
@@ -111,12 +104,9 @@ int saveenv(void)
ssize_t len;
char*res;
struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
-   u32 offset;
+   u32 offset;
 
-   if (init_mmc_for_env(mmc))
-   return 1;
-
-   if(mmc_get_env_addr(mmc, offset))
+   if (init_mmc_for_env(mmc) || mmc_get_env_addr(mmc, offset))
return 1;
 
res = (char *)env_new.data;
@@ -125,7 +115,8 @@ int saveenv(void)
error(Cannot export environment: errno = %d\n, errno);
return 1;
}
-   env_new.crc   = crc32(0, env_new.data, ENV_SIZE);
+
+   env_new.crc = crc32(0, env_new.data, ENV_SIZE);
printf(Writing to MMC(%d)... , CONFIG_SYS_MMC_ENV_DEV);
if (write_env(mmc, CONFIG_ENV_SIZE, offset, (u_char *)env_new)) {
puts(failed\n);
@@ -137,13 +128,13 @@ int saveenv(void)
 }
 #endif /* CONFIG_CMD_SAVEENV */
 
-inline int read_env(struct mmc *mmc, unsigned long size,
-   unsigned long offset, const void *buffer)
+static inline int read_env(struct mmc *mmc, unsigned long size,
+  unsigned long offset, const void *buffer)
 {
uint blk_start, blk_cnt, n;
 
-   blk_start = ALIGN(offset, mmc-read_bl_len) / mmc-read_bl_len;
-   blk_cnt   = ALIGN(size, mmc-read_bl_len) / mmc-read_bl_len;
+   blk_start   = ALIGN(offset, mmc-read_bl_len) / mmc-read_bl_len;
+   blk_cnt = ALIGN(size, mmc-read_bl_len) / mmc-read_bl_len;
 
n = mmc-block_dev.block_read(CONFIG_SYS_MMC_ENV_DEV, blk_start,
blk_cnt, (uchar *)buffer);
@@ -155,32 +146,15 @@ void env_relocate_spec(void)
 {
 #if !defined(ENV_IS_EMBEDDED)
char buf[CONFIG_ENV_SIZE];
-
struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
u32 offset;
 
-   if (init_mmc_for_env(mmc)) {
-   use_default();
-   return;
-   }
+   if (init_mmc_for_env(mmc) || mmc_get_env_addr(mmc, offset))
+   return set_default_env(NULL);
 
-   if(mmc_get_env_addr(mmc, offset)) {
-   use_default();
-   return ;
-   }
-
-   if (read_env(mmc, CONFIG_ENV_SIZE, offset, buf)) {
-   use_default();
-   return;
-  

[U-Boot] [PATCH 14/17] env: clean env_sf.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_sf.c checkpatch warnings, errors and coding style.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_sf.c |   48 
 1 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/common/env_sf.c b/common/env_sf.c
index 2ff10dd..a798fbe 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -36,7 +36,7 @@
 # define CONFIG_ENV_SPI_BUS0
 #endif
 #ifndef CONFIG_ENV_SPI_CS
-# define CONFIG_ENV_SPI_CS 0
+# define CONFIG_ENV_SPI_CS 0
 #endif
 #ifndef CONFIG_ENV_SPI_MAX_HZ
 # define CONFIG_ENV_SPI_MAX_HZ 100
@@ -46,16 +46,16 @@
 #endif
 
 #ifdef CONFIG_ENV_OFFSET_REDUND
-static ulong env_offset = CONFIG_ENV_OFFSET;
-static ulong env_new_offset = CONFIG_ENV_OFFSET_REDUND;
+static ulong env_offset= CONFIG_ENV_OFFSET;
+static ulong env_new_offset= CONFIG_ENV_OFFSET_REDUND;
 
-#define ACTIVE_FLAG   1
-#define OBSOLETE_FLAG 0
+#define ACTIVE_FLAG1
+#define OBSOLETE_FLAG  0
 #endif /* CONFIG_ENV_OFFSET_REDUND */
 
 DECLARE_GLOBAL_DATA_PTR;
 
-char * env_name_spec = SPI Flash;
+char *env_name_spec = SPI Flash;
 
 static struct spi_flash *env_flash;
 
@@ -65,17 +65,13 @@ uchar env_get_char_spec(int index)
 }
 
 #if defined(CONFIG_ENV_OFFSET_REDUND)
-
 int saveenv(void)
 {
env_t   env_new;
ssize_t len;
-   char*res;
-   u32 saved_size, saved_offset;
-   char*saved_buffer = NULL;
-   u32 sector = 1;
+   char*res, *saved_buffer = NULL, flag = OBSOLETE_FLAG;
+   u32 saved_size, saved_offset, sector = 1;
int ret;
-   charflag = OBSOLETE_FLAG;
 
if (!env_flash) {
env_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS,
@@ -93,8 +89,8 @@ int saveenv(void)
error(Cannot export environment: errno = %d\n, errno);
return 1;
}
-   env_new.crc   = crc32(0, env_new.data, ENV_SIZE);
-   env_new.flags = ACTIVE_FLAG;
+   env_new.crc = crc32(0, env_new.data, ENV_SIZE);
+   env_new.flags   = ACTIVE_FLAG;
 
if (gd-env_valid == 1) {
env_new_offset = CONFIG_ENV_OFFSET_REDUND;
@@ -145,21 +141,21 @@ int saveenv(void)
goto done;
}
 
-   ret = spi_flash_write(env_flash,
-   env_offset + offsetof(env_t, flags),
-   sizeof(env_new.flags), flag);
+   ret = spi_flash_write(env_flash, env_offset + offsetof(env_t, flags),
+   sizeof(env_new.flags), flag);
if (ret)
goto done;
 
puts(done\n);
 
-   gd-env_valid = (gd-env_valid == 2 ? 1 : 2);
+   gd-env_valid = gd-env_valid == 2 ? 1 : 2;
 
printf(Valid environment: %d\n, (int)gd-env_valid);
 
  done:
if (saved_buffer)
free(saved_buffer);
+
return ret;
 }
 
@@ -245,18 +241,14 @@ err_read:
 out:
free(tmp_env1);
free(tmp_env2);
-
-   return;
 }
 #else
 int saveenv(void)
 {
-   u32 saved_size, saved_offset;
-   char *saved_buffer = NULL;
-   u32 sector = 1;
-   int ret = 1;
+   u32 saved_size, saved_offset, sector = 1;
+   char*res, *saved_buffer = NULL;
+   int ret = 1;
env_t   env_new;
-   char*res;
ssize_t len;
 
if (!env_flash) {
@@ -274,9 +266,9 @@ int saveenv(void)
saved_size = CONFIG_ENV_SECT_SIZE - CONFIG_ENV_SIZE;
saved_offset = CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE;
saved_buffer = malloc(saved_size);
-   if (!saved_buffer) {
+   if (!saved_buffer)
goto done;
-   }
+
ret = spi_flash_read(env_flash, saved_offset,
saved_size, saved_buffer);
if (ret)
@@ -322,6 +314,7 @@ int saveenv(void)
  done:
if (saved_buffer)
free(saved_buffer);
+
return ret;
 }
 
@@ -345,7 +338,6 @@ void env_relocate_spec(void)
}
 
ret = env_import(buf, 1);
-
if (ret)
gd-env_valid = 1;
 out:
-- 
1.7.3.4

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


[U-Boot] [PATCH 15/17] env: clean env_flash.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_flash.c checkpatch warnings, errors and coding style.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_flash.c |  175 +---
 1 files changed, 84 insertions(+), 91 deletions(-)

diff --git a/common/env_flash.c b/common/env_flash.c
index a32bfcf..0671473 100644
--- a/common/env_flash.c
+++ b/common/env_flash.c
@@ -39,14 +39,15 @@ DECLARE_GLOBAL_DATA_PTR;
 #if defined(CONFIG_CMD_SAVEENV)  defined(CONFIG_CMD_FLASH)
 #define CMD_SAVEENV
 #elif defined(CONFIG_ENV_ADDR_REDUND)
-#error Cannot use CONFIG_ENV_ADDR_REDUND without CONFIG_CMD_SAVEENV  
CONFIG_CMD_FLASH
+#error CONFIG_ENV_ADDR_REDUND must have CONFIG_CMD_SAVEENV  CONFIG_CMD_FLASH
 #endif
 
-#if defined(CONFIG_ENV_SIZE_REDUND)  (CONFIG_ENV_SIZE_REDUND  
CONFIG_ENV_SIZE)
+#if defined(CONFIG_ENV_SIZE_REDUND)  \
+   (CONFIG_ENV_SIZE_REDUND  CONFIG_ENV_SIZE)
 #error CONFIG_ENV_SIZE_REDUND should not be less then CONFIG_ENV_SIZE
 #endif
 
-char * env_name_spec = Flash;
+char *env_name_spec = Flash;
 
 #ifdef ENV_IS_EMBEDDED
 env_t *env_ptr = environment;
@@ -57,7 +58,6 @@ static env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR;
 
 env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
 static env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR;
-
 #endif /* ENV_IS_EMBEDDED */
 
 #if defined(CMD_SAVEENV) || defined(CONFIG_ENV_ADDR_REDUND)
@@ -75,12 +75,11 @@ static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + 
CONFIG_ENV_SECT_SIZE - 1;
 
 uchar env_get_char_spec(int index)
 {
-   return (*((uchar *)(gd-env_addr + index)));
+   return *((uchar *)(gd-env_addr + index));
 }
 
 #ifdef CONFIG_ENV_ADDR_REDUND
-
-int  env_init(void)
+int env_init(void)
 {
int crc1_ok = 0, crc2_ok = 0;
 
@@ -91,33 +90,34 @@ int  env_init(void)
ulong addr1 = (ulong)(flash_addr-data);
ulong addr2 = (ulong)(flash_addr_new-data);
 
-   crc1_ok = (crc32(0, flash_addr-data, ENV_SIZE) == flash_addr-crc);
-   crc2_ok = (crc32(0, flash_addr_new-data, ENV_SIZE) == 
flash_addr_new-crc);
-
-   if (crc1_ok  ! crc2_ok) {
-   gd-env_addr  = addr1;
-   gd-env_valid = 1;
-   } else if (! crc1_ok  crc2_ok) {
-   gd-env_addr  = addr2;
-   gd-env_valid = 1;
-   } else if (! crc1_ok  ! crc2_ok) {
-   gd-env_addr  = addr_default;
-   gd-env_valid = 0;
+   crc1_ok = crc32(0, flash_addr-data, ENV_SIZE) == flash_addr-crc;
+   crc2_ok =
+   crc32(0, flash_addr_new-data, ENV_SIZE) == flash_addr_new-crc;
+
+   if (crc1_ok  !crc2_ok) {
+   gd-env_addr= addr1;
+   gd-env_valid   = 1;
+   } else if (!crc1_ok  crc2_ok) {
+   gd-env_addr= addr2;
+   gd-env_valid   = 1;
+   } else if (!crc1_ok  !crc2_ok) {
+   gd-env_addr= addr_default;
+   gd-env_valid   = 0;
} else if (flag1 == ACTIVE_FLAG  flag2 == OBSOLETE_FLAG) {
-   gd-env_addr  = addr1;
-   gd-env_valid = 1;
+   gd-env_addr= addr1;
+   gd-env_valid   = 1;
} else if (flag1 == OBSOLETE_FLAG  flag2 == ACTIVE_FLAG) {
-   gd-env_addr  = addr2;
-   gd-env_valid = 1;
+   gd-env_addr= addr2;
+   gd-env_valid   = 1;
} else if (flag1 == flag2) {
-   gd-env_addr  = addr1;
-   gd-env_valid = 2;
+   gd-env_addr= addr1;
+   gd-env_valid   = 2;
} else if (flag1 == 0xFF) {
-   gd-env_addr  = addr1;
-   gd-env_valid = 2;
+   gd-env_addr= addr1;
+   gd-env_valid   = 2;
} else if (flag2 == 0xFF) {
-   gd-env_addr  = addr2;
-   gd-env_valid = 2;
+   gd-env_addr= addr2;
+   gd-env_valid   = 2;
}
 
return 0;
@@ -128,27 +128,23 @@ int saveenv(void)
 {
env_t   env_new;
ssize_t len;
-   char*saved_data = NULL;
-   char*res;
-   int rc = 1;
+   char*res, *saved_data = NULL;
charflag = OBSOLETE_FLAG, new_flag = ACTIVE_FLAG;
+   int rc = 1;
 #if CONFIG_ENV_SECT_SIZE  CONFIG_ENV_SIZE
ulong   up_data = 0;
 #endif
 
-   debug(Protect off %08lX ... %08lX\n,
-   (ulong)flash_addr, end_addr);
+   debug(Protect off %08lX ... %08lX\n, (ulong)flash_addr, end_addr);
 
-   if (flash_sect_protect(0, (ulong)flash_addr, end_addr)) {
+   if (flash_sect_protect(0, (ulong)flash_addr, end_addr))
goto done;
-   }
 
debug(Protect off %08lX ... %08lX\n,
(ulong)flash_addr_new, end_addr_new);
 
-   if (flash_sect_protect(0, (ulong)flash_addr_new, end_addr_new)) {
+   if (flash_sect_protect(0, (ulong)flash_addr_new, end_addr_new))
goto done;
-   }
 
res = (char *)env_new.data;
len = hexport_r(env_htab, '\0', res, 

[U-Boot] [PATCH 13/17] env: clean env_eeprom.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_eeprom.c checkpatch warnings, errors and coding style.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_eeprom.c |  104 ++
 1 files changed, 46 insertions(+), 58 deletions(-)

diff --git a/common/env_eeprom.c b/common/env_eeprom.c
index 0a179ad..b5c0635 100644
--- a/common/env_eeprom.c
+++ b/common/env_eeprom.c
@@ -37,13 +37,13 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-env_t *env_ptr = NULL;
+env_t *env_ptr;
 
 char *env_name_spec = EEPROM;
 int env_eeprom_bus = -1;
 
 static int eeprom_bus_read(unsigned dev_addr, unsigned offset,
-   uchar *buffer, unsigned cnt)
+  uchar *buffer, unsigned cnt)
 {
int rcode;
 #if defined(CONFIG_I2C_ENV_EEPROM_BUS)
@@ -57,7 +57,7 @@ static int eeprom_bus_read(unsigned dev_addr, unsigned offset,
if (dev != NULL)
env_eeprom_bus = dev-busid;
else
-   printf (error adding env eeprom bus.\n);
+   printf(error adding env eeprom bus.\n);
}
if (old_bus != env_eeprom_bus) {
i2c_set_bus_num(env_eeprom_bus);
@@ -69,7 +69,7 @@ static int eeprom_bus_read(unsigned dev_addr, unsigned offset,
}
 #endif
 
-   rcode = eeprom_read (dev_addr, offset, buffer, cnt);
+   rcode = eeprom_read(dev_addr, offset, buffer, cnt);
 
 #if defined(CONFIG_I2C_ENV_EEPROM_BUS)
if (old_bus != env_eeprom_bus)
@@ -79,7 +79,7 @@ static int eeprom_bus_read(unsigned dev_addr, unsigned offset,
 }
 
 static int eeprom_bus_write(unsigned dev_addr, unsigned offset,
-   uchar *buffer, unsigned cnt)
+   uchar *buffer, unsigned cnt)
 {
int rcode;
 #if defined(CONFIG_I2C_ENV_EEPROM_BUS)
@@ -94,24 +94,22 @@ static int eeprom_bus_write(unsigned dev_addr, unsigned 
offset,
return rcode;
 }
 
-uchar env_get_char_spec (int index)
+uchar env_get_char_spec(int index)
 {
uchar c;
-   unsigned int off;
-   off = CONFIG_ENV_OFFSET;
+   unsigned int off = CONFIG_ENV_OFFSET;
 
 #ifdef CONFIG_ENV_OFFSET_REDUND
if (gd-env_valid == 2)
off = CONFIG_ENV_OFFSET_REDUND;
 #endif
eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR,
-off + index + offsetof(env_t,data),
-c, 1);
+   off + index + offsetof(env_t, data), c, 1);
 
-   return (c);
+   return c;
 }
 
-void env_relocate_spec (void)
+void env_relocate_spec(void)
 {
char buf[CONFIG_ENV_SIZE];
unsigned int off = CONFIG_ENV_OFFSET;
@@ -121,9 +119,7 @@ void env_relocate_spec (void)
off = CONFIG_ENV_OFFSET_REDUND;
 #endif
eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR,
-off,
-(uchar *)buf,
-CONFIG_ENV_SIZE);
+   off, (uchar *)buf, CONFIG_ENV_SIZE);
 
env_import(buf, 1);
 }
@@ -133,11 +129,11 @@ int saveenv(void)
env_t   env_new;
ssize_t len;
char*res;
-   int rc;
-   unsigned int off = CONFIG_ENV_OFFSET;
+   int rc;
+   unsigned int off= CONFIG_ENV_OFFSET;
 #ifdef CONFIG_ENV_OFFSET_REDUND
-   unsigned int off_red = CONFIG_ENV_OFFSET_REDUND;
-   char flag_obsolete = OBSOLETE_FLAG;
+   unsigned int off_red= CONFIG_ENV_OFFSET_REDUND;
+   char flag_obsolete  = OBSOLETE_FLAG;
 #endif
 
BUG_ON(env_ptr != NULL);
@@ -152,32 +148,28 @@ int saveenv(void)
 
 #ifdef CONFIG_ENV_OFFSET_REDUND
if (gd-env_valid == 1) {
-   off = CONFIG_ENV_OFFSET_REDUND;
-   off_red = CONFIG_ENV_OFFSET;
+   off = CONFIG_ENV_OFFSET_REDUND;
+   off_red = CONFIG_ENV_OFFSET;
}
 
env_new.flags = ACTIVE_FLAG;
 #endif
 
rc = eeprom_bus_write(CONFIG_SYS_DEF_EEPROM_ADDR,
-off,
-(uchar *)env_new,
-CONFIG_ENV_SIZE);
+ off, (uchar *)env_new, CONFIG_ENV_SIZE);
 
 #ifdef CONFIG_ENV_OFFSET_REDUND
if (rc == 0) {
eeprom_bus_write(CONFIG_SYS_DEF_EEPROM_ADDR,
- off_red + offsetof(env_t,flags),
- (uchar *)flag_obsolete,
- 1);
+off_red + offsetof(env_t, flags),
+(uchar *)flag_obsolete, 1);
+
if (gd-env_valid == 1)
gd-env_valid = 2;
else
gd-env_valid = 1;
-
}
 #endif
-
return rc;
 }
 
@@ -187,17 +179,13 @@ int saveenv(void)
  * We are still running from ROM, so data use is limited.
  * Use a (moderately small) buffer on the stack
  */
-
 #ifdef CONFIG_ENV_OFFSET_REDUND
 int env_init(void)
 {
-

[U-Boot] [PATCH 16/17] env: clean env_nand.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_nand.c checkpatch warnings, errors and coding style.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_nand.c |   99 
 1 files changed, 46 insertions(+), 53 deletions(-)

diff --git a/common/env_nand.c b/common/env_nand.c
index d975322..42d32eb 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -44,10 +44,11 @@
 #if defined(CONFIG_CMD_SAVEENV)  defined(CONFIG_CMD_NAND)
 #define CMD_SAVEENV
 #elif defined(CONFIG_ENV_OFFSET_REDUND)
-#error Cannot use CONFIG_ENV_OFFSET_REDUND without CONFIG_CMD_SAVEENV  
CONFIG_CMD_NAND
+#error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV  CONFIG_CMD_NAND
 #endif
 
-#if defined(CONFIG_ENV_SIZE_REDUND)  (CONFIG_ENV_SIZE_REDUND != 
CONFIG_ENV_SIZE)
+#if defined(CONFIG_ENV_SIZE_REDUND)  \
+   (CONFIG_ENV_SIZE_REDUND != CONFIG_ENV_SIZE)
 #error CONFIG_ENV_SIZE_REDUND should be the same as CONFIG_ENV_SIZE
 #endif
 
@@ -57,20 +58,19 @@
 
 char *env_name_spec = NAND;
 
-
 #if defined(ENV_IS_EMBEDDED)
 env_t *env_ptr = environment;
 #elif defined(CONFIG_NAND_ENV_DST)
 env_t *env_ptr = (env_t *)CONFIG_NAND_ENV_DST;
 #else /* ! ENV_IS_EMBEDDED */
-env_t *env_ptr = 0;
+env_t *env_ptr;
 #endif /* ENV_IS_EMBEDDED */
 
 DECLARE_GLOBAL_DATA_PTR;
 
-uchar env_get_char_spec (int index)
+uchar env_get_char_spec(int index)
 {
-   return ( *((uchar *)(gd-env_addr + index)) );
+   return *((uchar *)(gd-env_addr + index));
 }
 
 /*
@@ -95,16 +95,14 @@ int env_init(void)
env_t *tmp_env2;
 
tmp_env2 = (env_t *)((ulong)env_ptr + CONFIG_ENV_SIZE);
-   crc2_ok = (crc32(0, tmp_env2-data, ENV_SIZE) == tmp_env2-crc);
+   crc2_ok = crc32(0, tmp_env2-data, ENV_SIZE) == tmp_env2-crc;
 #endif
-
tmp_env1 = env_ptr;
-
-   crc1_ok = (crc32(0, tmp_env1-data, ENV_SIZE) == tmp_env1-crc);
+   crc1_ok = crc32(0, tmp_env1-data, ENV_SIZE) == tmp_env1-crc;
 
if (!crc1_ok  !crc2_ok) {
-   gd-env_addr  = 0;
-   gd-env_valid = 0;
+   gd-env_addr= 0;
+   gd-env_valid   = 0;
 
return 0;
} else if (crc1_ok  !crc2_ok) {
@@ -115,13 +113,13 @@ int env_init(void)
gd-env_valid = 2;
} else {
/* both ok - check serial */
-   if(tmp_env1-flags == 255  tmp_env2-flags == 0)
+   if (tmp_env1-flags == 255  tmp_env2-flags == 0)
gd-env_valid = 2;
-   else if(tmp_env2-flags == 255  tmp_env1-flags == 0)
+   else if (tmp_env2-flags == 255  tmp_env1-flags == 0)
gd-env_valid = 1;
-   else if(tmp_env1-flags  tmp_env2-flags)
+   else if (tmp_env1-flags  tmp_env2-flags)
gd-env_valid = 1;
-   else if(tmp_env2-flags  tmp_env1-flags)
+   else if (tmp_env2-flags  tmp_env1-flags)
gd-env_valid = 2;
else /* flags are equal - almost impossible */
gd-env_valid = 1;
@@ -137,11 +135,11 @@ int env_init(void)
gd-env_addr = (ulong)env_ptr-data;
 
 #else /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */
-   gd-env_addr  = (ulong)default_environment[0];
-   gd-env_valid = 1;
+   gd-env_addr= (ulong)default_environment[0];
+   gd-env_valid   = 1;
 #endif /* ENV_IS_EMBEDDED || CONFIG_NAND_ENV_DST */
 
-   return (0);
+   return 0;
 }
 
 #ifdef CMD_SAVEENV
@@ -154,7 +152,6 @@ int writeenv(size_t offset, u_char *buf)
size_t end = offset + CONFIG_ENV_RANGE;
size_t amount_saved = 0;
size_t blocksize, len;
-
u_char *char_ptr;
 
blocksize = nand_info[0].erasesize;
@@ -165,9 +162,9 @@ int writeenv(size_t offset, u_char *buf)
offset += blocksize;
} else {
char_ptr = buf[amount_saved];
-   if (nand_write(nand_info[0], offset, len,
-   char_ptr))
+   if (nand_write(nand_info[0], offset, len, char_ptr))
return 1;
+
offset += blocksize;
amount_saved += len;
}
@@ -201,18 +198,17 @@ int saveenv(void)
error(Cannot export environment: errno = %d\n, errno);
return 1;
}
-   env_new.crc   = crc32(0, env_new.data, ENV_SIZE);
-   env_new.flags = ++env_flags; /* increase the serial */
+   env_new.crc = crc32(0, env_new.data, ENV_SIZE);
+   env_new.flags   = ++env_flags; /* increase the serial */
 
-   if(gd-env_valid == 1) {
+   if (gd-env_valid == 1) {
puts(Erasing redundant NAND...\n);
nand_erase_options.offset = CONFIG_ENV_OFFSET_REDUND;
if (nand_erase_opts(nand_info[0], nand_erase_options))
return 1;
 
puts(Writing to 

[U-Boot] [PATCH 17/17] env: clean env_common.c checkpatch and code style

2011-11-07 Thread Igor Grinberg
Cleanup the env_common.c checkpatch warnings, errors and coding style.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 common/env_common.c   |   52 +
 include/environment.h |8 +++
 2 files changed, 26 insertions(+), 34 deletions(-)

diff --git a/common/env_common.c b/common/env_common.c
index c7e9bea..8a71096 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -34,13 +34,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-extern env_t *env_ptr;
-
-extern void env_relocate_spec (void);
-extern uchar env_get_char_spec(int);
-
-static uchar env_get_char_init (int index);
-
 /
  * Default settings to be used when no valid environment is found
  */
@@ -94,7 +87,7 @@ const uchar default_environment[] = {
serverip= MK_STR(CONFIG_SERVERIP) \0
 #endif
 #ifdef CONFIG_SYS_AUTOLOAD
-   autoload= CONFIG_SYS_AUTOLOAD \0
+   autoload= CONFIG_SYS_AUTOLOAD \0
 #endif
 #ifdef CONFIG_PREBOOT
preboot=  CONFIG_PREBOOT  \0
@@ -117,13 +110,13 @@ const uchar default_environment[] = {
 #ifdef CONFIG_LOADADDR
loadaddr= MK_STR(CONFIG_LOADADDR) \0
 #endif
-#ifdef  CONFIG_CLOCKS_IN_MHZ
+#ifdef CONFIG_CLOCKS_IN_MHZ
clocks_in_mhz=1\0
 #endif
 #if defined(CONFIG_PCI_BOOTDELAY)  (CONFIG_PCI_BOOTDELAY  0)
pcidelay= MK_STR(CONFIG_PCI_BOOTDELAY)\0
 #endif
-#ifdef  CONFIG_EXTRA_ENV_SETTINGS
+#ifdef CONFIG_EXTRA_ENV_SETTINGS
CONFIG_EXTRA_ENV_SETTINGS
 #endif
\0
@@ -131,38 +124,30 @@ const uchar default_environment[] = {
 
 struct hsearch_data env_htab;
 
-static uchar env_get_char_init (int index)
+static uchar env_get_char_init(int index)
 {
-   uchar c;
-
/* if crc was bad, use the default environment */
if (gd-env_valid)
-   c = env_get_char_spec(index);
+   return env_get_char_spec(index);
else
-   c = default_environment[index];
-
-   return (c);
+   return default_environment[index];
 }
 
-uchar env_get_char_memory (int index)
+uchar env_get_char_memory(int index)
 {
return *env_get_addr(index);
 }
 
-uchar env_get_char (int index)
+uchar env_get_char(int index)
 {
-   uchar c;
-
/* if relocated to RAM */
if (gd-flags  GD_FLG_RELOC)
-   c = env_get_char_memory(index);
+   return env_get_char_memory(index);
else
-   c = env_get_char_init(index);
-
-   return (c);
+   return env_get_char_init(index);
 }
 
-const uchar *env_get_addr (int index)
+const uchar *env_get_addr(int index)
 {
if (gd-env_valid)
return (uchar *)(gd-env_addr + index);
@@ -181,7 +166,7 @@ void set_default_env(const char *s)
if (*s == '!') {
printf(*** Warning - %s, 
using default environment\n\n,
-   s+1);
+   s + 1);
} else {
puts(s);
}
@@ -190,9 +175,9 @@ void set_default_env(const char *s)
}
 
if (himport_r(env_htab, (char *)default_environment,
-   sizeof(default_environment), '\0', 0) == 0) {
+   sizeof(default_environment), '\0', 0) == 0)
error(Environment import failed: errno = %d\n, errno);
-   }
+
gd-flags |= GD_FLG_ENV_READY;
 }
 
@@ -227,22 +212,20 @@ int env_import(const char *buf, int check)
return 0;
 }
 
-void env_relocate (void)
+void env_relocate(void)
 {
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
-   extern void env_reloc(void);
-
env_reloc();
 #endif
if (gd-env_valid == 0) {
 #if defined(CONFIG_ENV_IS_NOWHERE) /* Environment not changable */
set_default_env(NULL);
 #else
-   show_boot_progress (-60);
+   show_boot_progress(-60);
set_default_env(!bad CRC);
 #endif
} else {
-   env_relocate_spec ();
+   env_relocate_spec();
}
 }
 
@@ -272,6 +255,7 @@ int env_complete(char *var, int maxv, char *cmdv[], int 
bufsz, char *buf)
 
if (idx)
cmdv[found++] = ...;
+
cmdv[found] = NULL;
return found;
 }
diff --git a/include/environment.h b/include/environment.h
index 3c8c24b..3c145af 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -162,6 +162,14 @@ extern env_t environment;
 #endif /* ENV_IS_EMBEDDED */
 
 extern const unsigned char default_environment[];
+extern env_t *env_ptr;
+
+extern void env_relocate_spec(void);
+extern unsigned char env_get_char_spec(int);
+
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
+extern void env_reloc(void);
+#endif
 
 #ifndef DO_DEPS_ONLY
 
-- 
1.7.3.4

___
U-Boot mailing list

Re: [U-Boot] [PATCH 03/17] env: move extern default_environment[] to environment.h

2011-11-07 Thread Stefan Roese
On Monday 07 November 2011 12:13:57 Igor Grinberg wrote:
 Extract all extern declarations for default_environment[] out of c files
 into the environment.h header.
 
 Signed-off-by: Igor Grinberg grinb...@compulab.co.il
 Cc: Stefan Roese s...@denx.de

Acked-by: Stefan Roese s...@denx.de

Thanks.

Best regards,
Stefan

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


Re: [U-Boot] No power on USB host of IMX25 PDK

2011-11-07 Thread Fabio Estevam
On Mon, Nov 7, 2011 at 8:09 AM, Hugo Holgersson
hu...@student.chalmers.se wrote:
 #define USBCTRL_OTGBASE_OFFSET  0x600
 should maybe be called just USB_CTRL_OFFSET.

Also, please be aware of this documentation error about the USB base
register that is discussed here:
http://www.spinics.net/lists/arm-kernel/msg105440.html

Regards,

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


Re: [U-Boot] [PATCH] dfu: initial implementation

2011-11-07 Thread Andrzej Pietrasiewicz
Dear Wolfgang Denk,

Please see my comments inline.

 
  DFU is part of USB; an extension to be precise, but an extension
 bound
  so tightly to the design and philosophy of USB that it is rather
  inconceivable to separate the two.
 
 Could you please be so kind and explain which exact issues you see for
 such a separation?

First of all, I think that it is more proper to speak of communications
part and state machine part. They are bound together by the standard.
For example, in the dfuIDLE state, the receipt of DFU_DNLOAD request
with wLength == 0 triggers a device stalls the control pipe action.
This kind of stuff is very USB specific - I am not sure what would
the control pipe be for serial/Ethernet, nor what stall the
control pipe would mean for either of them.
Another example, in the dfuMANIFEST state, when the status poll
timeout occurs and bitManifestationTolerant == 1 then device can
still communicate via the USB.

The communications part is of course the very USB itself, so the only
thing which could be extracted is the state machine part. But, then,
in order not to be bound to USB but reusable, it should be abstract.
Being abstract, it would not be DFU anymore, but some
Generic Update Protocol that you have on your mind,
but we don't know of. Is there any standard for such a protocol?
 
 
  Seriously speaking, in view of ties between DFU and USB
  IMHO it is impossible, or, at least, highly impractical.
 
 Can you please support this statement with a few facts?

Please see my comment above.
 
   If my assumption is correct, then what would it take to split off
   protocol part and make it independent of the actual driver
 interface?
 
  I guess that in the situation given it would be of little use.
 
 What do you think would be of little use?
 

As far as I understand you correctly, you would like the state
machine code extracted from the initial DFU implementation posted
on this mailing list. And then you would like the DFU implemented
in terms of this abstract state machine. This means actually
more code, probably not a desired thing. The generic state machine
would also require some accompanying generic data structures,
and this would also mean code to translate back and forth between
USB/DFU (DFU _is_ USB) and state machine's data structures.
All in all, this means adding more complexity and code. This looks
like a premature optimization (which is widely known to be the root
of all evil), while at the moment, there are no use cases
to justify it. Should the use cases appear, the code can be reworked
based on the needs of both USB/DFU and new state machine users.

Regards,

Andrzej



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


Re: [U-Boot] [PATCH] ARM: Generic cache ops skeleton

2011-11-07 Thread Albert ARIBAUD
Le 06/11/2011 02:16, Marek Vasut a écrit :
 This patch should allow a CPU to register it's own cache ops. This shall allow
 multiple CPUs with different cache handlings to be supported.

I don't really like the idea of a system of dynamic cache ops right now, 
because as discussed by Mike, we're far from a one-size-fits-all 
multiple-SoC binary, and in the current context of a single-SoC binary, 
this patch is overkill for cache management IMO.

OTOH, I am not against rationalizing the cache code, along the lines 
already discussed, i.e. factorizing cache code as much as possible (just 
as we should factorize start.S code for instance).

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


Re: [U-Boot] [PATCH] ARM: Generic cache ops skeleton

2011-11-07 Thread Albert ARIBAUD
Le 06/11/2011 20:29, Simon Glass a écrit :

 It's actually a lot more than cache ops. SOCs have there own clock
 stuff, pinmux things, power mgmt, timers and the like. While it might
 be desirable to provide this feature it is a fair bit of work and we
 need to be careful not to make things more complex.

Agreed.

 I would settle for an initial step of getting some sort of unified but
 simple clock/pinmux support in across all ARM. Anyone interested in
 that? I mean an API that covers the lot, not an implementation. Also
 it would be nice to avoid the heavy-weight data structures and strings
 that Linux has. If we got that far then we could make the interface
 virtual as Marek has done for caches.

On a general note, if we set our goal is to have in U-Boot what Linux 
has, U-Boot will end up being... Linux, which I don't think is a good 
thing unless we consider that U-Boot is redundant.

Besides, I don't think 'virtual' interfaces are necessarily the way to 
go either, not for the sole sake of it anyway. We might well get there 
with a driver model, and then we might want to see how things are done 
in Linux, but certainly not import the Linux model without thinking of 
what makes sense rather than what would be nice. U-Boot's basic 
principles are fundamentally different from those of an OS like Linux.

We can start, within the single-SoC binary model for now, by simply 
adding relevant SoC-specific or board-specific mechanisms, and using 
those already in place.

 On this particular patch, I feel it should be more explicit about L1
 cache, which is what I think it deals with. We may want to support L2
 also through a similar API. And a CONFIG option is a good idea.

 Finally, even the CP15/cache/MMU code is duplicated in different
 arch/arm/cpu subdirs. Can we unify this a bit?

I think our recent discussion opens the way for this unification in that 
cp15 code should be able to go away from start.S and into the (fewer) 
cache lib(s).

 Regards,
 Simon

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


[U-Boot] [PATCH] pxe: make the first label the implicit default

2011-11-07 Thread Jason Hobbs
If no default label is specified, but a situation arises where the
default label should be used, treat the first label specified as the
default label.

Signed-off-by: Jason Hobbs jason.ho...@calxeda.com
Cc: Ricardo Salveti de Araujo ricardo.salv...@linaro.org
Cc: Wolfgang Denk w...@denx.de
---
 common/cmd_pxe.c |   17 ++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 3efd700..9426f5b 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -1273,10 +1273,21 @@ static void handle_pxe_menu(struct pxe_menu *cfg)
 
menu_destroy(m);
 
-   if (err  1)
-   return;
+   /*
+* err == 1 means we got a choice back from menu_get_choice.
+*
+* err == -ENOENT if the menu was setup to select the default but no
+* default was set. in that case, we should continue trying to boot
+* labels that haven't been attempted yet.
+*
+* otherwise, the user interrupted or there was some other error and
+* we give up.
+*/
 
-   label_boot(choice);
+   if (err == 1)
+   label_boot(choice);
+   else if (err != -ENOENT)
+   return;
 
boot_unattempted_labels(cfg);
 }
-- 
1.7.5.4

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


[U-Boot] uboot on devkit8000

2011-11-07 Thread Mariya Abdul Ghafoor

I configured Angstrom on DevKit8000 (clone 
of Beagleboard) now the touch screen shows shell prompt i.e. 
root@DevKit8000~# but there is no uboot  console output...I need to port 
Android on it and without the console output I have no idea how! I am 
new to embedded systems and is totally confused now!

I have very less time left and any help from you could be a life saver! Please. 
  ___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Code relocation in U-boot.

2011-11-07 Thread Sandeep Sharma
Hi,

I am analyzing U-Boot code for relocate_code function. In this function
after copying the text section and before clearing the bss section we are
doing fix .rel.dyn relocations. I want to know that what actually we are
doing in this section of code. What does this section actually contains and
what kind of fix we are doing in this. What are relative and absolute fix
that we are doing in this section.

Any kind of help will we highly appreciated.

-- 

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


[U-Boot] Pull request for u-boot-coldfire.git

2011-11-07 Thread Jin Zhengxiong-R64188
Hi, Wolfgang,

Please kindly pull

The following changes since commit fec79acc864bed049b6beae719ccbf2bbec5403a:

  sandbox: drop unused return (2011-11-03 22:35:25 +0100)

are available in the git repository at:
  git://git.denx.de/u-boot-coldfire.git master

Jason Jin (3):
  ColdFire:Moving the remaining coldfire boards to boards.cfg
  ColdFire: Fix the compile issue for M52277
  ColdFire: The EB+MCF-EV123 boards config update

 Makefile |  108 --
 board/BuS/EB+MCF-EV123/config.mk |1 -
 board/BuS/EB+MCF-EV123/textbase.mk   |1 -
 board/freescale/m52277evb/u-boot.lds |3 -
 boards.cfg   |   13 
 include/configs/M52277EVB.h  |6 +-
 6 files changed, 17 insertions(+), 115 deletions(-)
 delete mode 100644 board/BuS/EB+MCF-EV123/textbase.mk

Thanks.

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


Re: [U-Boot] [PATCH] add a git mailrc file for maintainers

2011-11-07 Thread Kumar Gala

On Nov 6, 2011, at 5:07 PM, Mike Frysinger wrote:

 This should make sending out e-mails to the right people easier.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
 doc/git-mailrc |  100 
 1 files changed, 100 insertions(+), 0 deletions(-)
 create mode 100644 doc/git-mailrc
 
 diff --git a/doc/git-mailrc b/doc/git-mailrc
 new file mode 100644
 index 000..2b4e590
 --- /dev/null
 +++ b/doc/git-mailrc
 @@ -0,0 +1,100 @@
 +# To use this file, run in your u-boot tree:
 +#git config sendemail.aliasesfile doc/git-mailrc
 +#git config sendemail.aliasfiletype mutt
 +#
 +# Then when sending patches, you can use:
 +#git send-email --to u-boot --cc i2c ...
 +
 +alias uboot  u-boot@lists.denx.de
 +alias u-boot uboot
 +
 +# Maintainer aliases.  Use the same alias here as patchwork to keep
 +# things simple and easy to look up/coordinate.
 +alias aaribaud   Albert Aribaud albert.u.b...@aribaud.net
 +alias afleming   Andy Fleming aflem...@freescale.com
 +alias ag Anatolij Gustschin ag...@denx.de
 +alias gruss  Graeme Russ graeme.r...@gmail.com
 +alias hs Heiko Schocher h...@denx.de
 +alias iwamatsu   Nobuhiro Iwamatsu iwama...@nigauri.org
 +alias jasonjin   Jason Jin jason@freescale.com
 +alias kimphill   Kim Phillips kim.phill...@freescale.com
 +alias kumar  Kumar Gala kumar.g...@freescale.com

Please change to 'galak'  ga...@kernel.crashing.org

 +alias macpaulMacpaul Lin macp...@andestech.com
 +alias marex  Marek Vasut marek.va...@gmail.com
 +alias monstr Michal Simek mon...@monstr.eu
 +alias prafulla   Prafulla Wadaskar prafu...@marvell.com
 +alias rbohmerRemy Bohmer li...@bohmer.net
 +alias reinhardm  Reinhard Meyer u-b...@emk-elektronik.de
 +alias sbabic Stefano Babic sba...@denx.de
 +alias scottwood  Scott Wood scottw...@freescale.com
 +alias smcnuttScott McNutt smcn...@psyent.com
 +alias stroeseStefan Roese s...@denx.de
 +alias vapier Mike Frysinger vap...@gentoo.org
 +alias wd Wolfgang Denk w...@denx.de
 +
 +# Architecture aliases
 +alias arch   arm, avr32, bfin, m68k, microblaze, mips, nds32, nios2, 
 powerpc, sandbox, superh, sparc, x86
 +alias arches arch
 +
 +alias armuboot, aaribaud
 +alias at91   uboot, reinhardm
 +alias davinciomap
 +alias imxuboot, sbabic
 +alias kirkwood   uboot, prafulla
 +alias omap   uboot, Sandeep Paulraj s-paul...@ti.com
 +alias pxauboot, marex
 +alias s3csamsung
 +alias s5pc   samsung
 +alias samsunguboot, 
 +alias tegra  uboot, Simon Glass s...@chromium.org, Tom Warren 
 twar...@nvidia.com, Stephen Warren swar...@nvidia.com
 +alias tegra2 tegra
 +
 +alias avr32  uboot, reinhardm
 +
 +alias bfin   uboot, vapier
 +alias blackfin   bfin
 +
 +alias m68k   uboot, jasonjin
 +alias coldfire   m68k
 +
 +alias microblaze uboot, monstr
 +alias mb microblaze
 +
 +alias mips   uboot, Shinya Kuribayashi skuri...@pobox.com
 +
 +alias nds32  uboot, macpaul
 +
 +alias nios   uboot, Thomas Chou tho...@wytron.com.tw, smcnutt
 +alias nios2  nios
 +
 +alias powerpcuboot, afleming, kimphill, kumar, stroese, wd
 +alias ppcpowerpc
 +alias mpc5xxxuboot, wd
 +alias mpc8xx uboot, wd
 +alias mpc82xxuboot, wd
 +alias mpc83xxuboot, kimphill
 +alias mpc85xxuboot, afleming, kumar
 +alias mpc86xxuboot, afleming, kumar
 +alias ppc4xx uboot, stroese
 +alias ppc7xx uboot, wd
 +alias ppc74xxuboot, wd
 +
 +alias sandboxSimon Glass s...@chromium.org
 +alias sb sandbox
 +
 +alias sparc  uboot, Daniel Hellstrom dan...@gaisler.com
 +
 +alias superh uboot, iwamatsu
 +alias sh superh
 +
 +alias x86uboot, gruss
 +
 +# Subsystem aliases
 +alias cfiuboot, stroese
 +alias fdtuboot, Jerry Van Baren vanba...@cideas.com
 +alias i2cuboot, hs
 +alias mmcuboot, afleming
 +alias nand   uboot, scottwood
 +alias netuboot, wd
 +alias usbuboot, rbohmer
 +alias video  uboot, ag
 -- 
 1.7.6.1
 
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

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


[U-Boot] [PATCH v3] config.mk: use memoization in cc-option macro to speed up compilation

2011-11-07 Thread Daniel Schwierzeck
Apply memoization to cc-option macro by caching the results of the
gcc calls. This macro is called very often so using cached results
leads to faster compilation times.

The old behaviour can be restored by defining the config option
CONFIG_CC_OPT_CACHE_DISABLE=y.

Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
---
Changes for v3:
 - reworked handling of non-working gcc options
 - add config option CONFIG_CC_OPT_CACHE_DISABLE

Changes for v2:
 - move cache file to $(obj)/include/generated
 - reworked completely
 - cache also non-working gcc options
 - remove CACHE_CC_OPTIONS config switch and enable this optimization
   by default

 config.mk |   20 ++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/config.mk b/config.mk
index 918cffe..ddaa477 100644
--- a/config.mk
+++ b/config.mk
@@ -107,8 +107,24 @@ HOSTCFLAGS += -pedantic
 # Option checker (courtesy linux kernel) to ensure
 # only supported compiler options are used
 #
-cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
-/dev/null 21; then echo $(1); else echo $(2); fi ;)
+CC_OPTIONS_CACHE_FILE := $(OBJTREE)/include/generated/cc_options.mk
+
+$(if $(wildcard $(CC_OPTIONS_CACHE_FILE)),,\
+   $(shell mkdir -p $(dir $(CC_OPTIONS_CACHE_FILE
+
+-include $(CC_OPTIONS_CACHE_FILE)
+
+cc-option-sys = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
+/dev/null 21; then \
+   echo 'CC_OPTIONS += $(strip $1)'  $(CC_OPTIONS_CACHE_FILE); \
+   echo $(1); fi)
+
+ifeq ($(CONFIG_CC_OPT_CACHE_DISABLE),y)
+cc-option = $(strip $(if $(call cc-option-sys,$1),$1,$2))
+else
+cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\
+   $(if $(call cc-option-sys,$1),$1,$2)))
+endif
 
 #
 # Include the make variables (CC, etc...)
-- 
1.7.7.1

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


Re: [U-Boot] [PATCH v8 2/4] gpio: Replace ARM gpio.h with the common API in include/asm-generic

2011-11-07 Thread Stephen Warren
Joe Hershberger wrote at Friday, November 04, 2011 8:25 PM:
 ARM boards should use the generic GPIO API
 Update the existing gpio implementations to conform the the generic API

The Tegra changes look mostly OK, but:

a) They are almost entirely unrelated to this patch description; most of
the diff is variable renaming and nothing to do with conforming to the API.

b) I've CC'd the main Tegra maintainers to give final comment.

c) Some comments below.

 diff --git a/drivers/gpio/tegra2_gpio.c b/drivers/gpio/tegra2_gpio.c
...
 -void gpio_free(int gp)
 +int gpio_free(unsigned gpio)
  {
 + return 0;
  }

If you're doing a cleanup pass on this driver, you may as well make
gpio_free() do something; it should probably clear gpio_names[gpio].name
and perhaps set the pin back to SFIO - in other words, undo gpio_reqeust().

 -void gpio_toggle_value(int gp)
 -{
 - gpio_set_value(gp, !gpio_get_output_value(gp));

You should probably at least mention this function being removed in the
commit description. I hope nothing is using it.

-- 
nvpublic

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


Re: [U-Boot] uboot on devkit8000

2011-11-07 Thread Thomas Weber
Am 07.11.2011 14:18, schrieb Mariya Abdul Ghafoor:
 
 I configured Angstrom on DevKit8000 (clone 
 of Beagleboard) now the touch screen shows shell prompt i.e. 
 root@DevKit8000~# but there is no uboot  console output...I need to port 
 Android on it and without the console output I have no idea how! I am 
 new to embedded systems and is totally confused now!
 
 I have very less time left and any help from you could be a life saver! 
 Please. 
 


Connect the Debug-UART to your PC. The Devkit8000 Quick start manual on
the CD will tell you how to connect and to configure it.


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


Re: [U-Boot] [PATCH v8 2/4] gpio: Replace ARM gpio.h with the common API in include/asm-generic

2011-11-07 Thread Mike Frysinger
On Monday 07 November 2011 11:35:33 Stephen Warren wrote:
 Joe Hershberger wrote at Friday, November 04, 2011 8:25 PM:
  -void gpio_free(int gp)
  +int gpio_free(unsigned gpio)
   {
  +   return 0;
   }
 
 If you're doing a cleanup pass on this driver, you may as well make
 gpio_free() do something; it should probably clear gpio_names[gpio].name
 and perhaps set the pin back to SFIO - in other words, undo gpio_reqeust().

i think the decision made in Linux was that freeing a GPIO should not cause it 
to change tristate or anything.  all it should do is mark it as available so 
something else can request it.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] add a git mailrc file for maintainers

2011-11-07 Thread Mike Frysinger
On Monday 07 November 2011 10:06:43 Kumar Gala wrote:
 On Nov 6, 2011, at 5:07 PM, Mike Frysinger wrote:
  +alias kumar  Kumar Gala kumar.g...@freescale.com
 
 Please change to 'galak'

ah, the crappy patchwork interface made it hard to figure out what username you 
were utilizing

 ga...@kernel.crashing.org

i took this from:
htp://www.denx.de/wiki/U-Boot/Custodians
you might want to update that ...
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address

2011-11-07 Thread Stephen Warren
[Resending in an attempt to avoid base64 encoding]

On 11/05/2011 04:20 PM, Wolfgang Denk wrote:
 Dear Stephen Warren,
 
 In message 1320164902-24190-3-git-send-email-swar...@nvidia.com you wrote:
 The legacy uImage format includes an absolute load and entry-
 point address. When presented with a uImage in memory that
 isn't loaded at the address in the image's load address,
 U-Boot will relocate the image to its address in the header.

 Some payloads can actually be loaded and used at any arbitrary
 address. An example is an ARM Linux kernel zImage file. This
 is useful when sharing a single zImage across multiple boards
 with different memory layouts, or U-Boot builds with different
 ${load_addr} since sharing a single absolute load address may
 not be possible.

 With this config option enabled, an image header may contain a
 load address of -1/0x. This indicates the image can
 operate at any load address, and U-Boot will avoid automtically
 copying it anywhere. In this case, the entry-point field is
 specified relative to the start of the image payload.
 
 Please don't invent a new solution.  This has been discussed before,
 and the agreement was to introduce a new image format where the load
 and entry point addresses are not absolute, but interpreted as offsets
 relative to the respectice start of system RAM address.
 
 Your own IH_TYPE_*_REL patches are queued and will be merged soon.

Oh. I kept pushing and pushing on these and kept meeting resistance. I
had absolutely no idea at all that there was agreement over those
patches; the reviews just stopped happening after you refused to look at
them unless I provided U-Boot size information with every possible
combination of ifdef locations present/removed.

Anyway, I have withdrawn my support for those patches; please don't
apply them. In my opinion, this new solution is far superior because:

a) There's no need to revise mkimage to support this new scheme. Hence,
it can be rolled out with just target-size changes, not host-side tool
changes (well, a host-side script change is needed, but that's probably
far easier than rolling out new mkimage binaries)

b) The implementation of this new scheme is far simpler, and less
invasive to the U-Boot code-base, and hence probably far more maintainable.

c) I've validated that the new scheme handles kernel, initrd, and FDT. I
never got around to testing a separate FDT image with the old patches

 I do not see the need for yet another implementation for the very same
 thing, so NAK.

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


Re: [U-Boot] [PATCH v8 2/4] gpio: Replace ARM gpio.h with the common API in include/asm-generic

2011-11-07 Thread Stephen Warren
Mike Frysinger wrote at Monday, November 07, 2011 10:40 AM:
 * PGP Signed by an unknown key
 
 On Monday 07 November 2011 11:35:33 Stephen Warren wrote:
  Joe Hershberger wrote at Friday, November 04, 2011 8:25 PM:
   -void gpio_free(int gp)
   +int gpio_free(unsigned gpio)
{
   + return 0;
}
 
  If you're doing a cleanup pass on this driver, you may as well make
  gpio_free() do something; it should probably clear gpio_names[gpio].name
  and perhaps set the pin back to SFIO - in other words, undo gpio_reqeust().
 
 i think the decision made in Linux was that freeing a GPIO should not cause it
 to change tristate or anything.  all it should do is mark it as available so
 something else can request it.
 -mike

OK, I'll buy that, but presumably gpio_names[gpio].name should still be cleared
to indicate the pin is free?

-- 
nvpublic

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


Re: [U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address

2011-11-07 Thread Stephen Warren
On 11/07/2011 09:56 AM, Stephen Warren wrote:
 [Resending in an attempt to avoid base64 encoding]
 
 On 11/05/2011 04:20 PM, Wolfgang Denk wrote:
 Dear Stephen Warren,

 In message 1320164902-24190-3-git-send-email-swar...@nvidia.com you wrote:
 The legacy uImage format includes an absolute load and entry-
 point address. When presented with a uImage in memory that
 isn't loaded at the address in the image's load address,
 U-Boot will relocate the image to its address in the header.

 Some payloads can actually be loaded and used at any arbitrary
 address. An example is an ARM Linux kernel zImage file. This
 is useful when sharing a single zImage across multiple boards
 with different memory layouts, or U-Boot builds with different
 ${load_addr} since sharing a single absolute load address may
 not be possible.

 With this config option enabled, an image header may contain a
 load address of -1/0x. This indicates the image can
 operate at any load address, and U-Boot will avoid automtically
 copying it anywhere. In this case, the entry-point field is
 specified relative to the start of the image payload.

 Please don't invent a new solution.  This has been discussed before,
 and the agreement was to introduce a new image format where the load
 and entry point addresses are not absolute, but interpreted as offsets
 relative to the respectice start of system RAM address.

 Your own IH_TYPE_*_REL patches are queued and will be merged soon.
 
 Oh. I kept pushing and pushing on these and kept meeting resistance. I
 had absolutely no idea at all that there was agreement over those
 patches; the reviews just stopped happening after you refused to look at
 them unless I provided U-Boot size information with every possible
 combination of ifdef locations present/removed.
 
 Anyway, I have withdrawn my support for those patches; please don't
 apply them. In my opinion, this new solution is far superior because:
 
 a) There's no need to revise mkimage to support this new scheme. Hence,
 it can be rolled out with just target-size changes, not host-side tool
 changes (well, a host-side script change is needed, but that's probably
 far easier than rolling out new mkimage binaries)
 
 b) The implementation of this new scheme is far simpler, and less
 invasive to the U-Boot code-base, and hence probably far more maintainable.
 
 c) I've validated that the new scheme handles kernel, initrd, and FDT. I
 never got around to testing a separate FDT image with the old patches

Sorry, and I forgot:

d) This new solution is much more flexible. With IH_TYPE_*_REL, you have
to pick some SDRAM-relative address for the uImage load address that's
valid across all SoCs the image will be used on. This is easy enough for
Tegra20 and Tegra30, but I have no idea what the memory layout is for
U-Boot on OMAP, MSM, Exynos, ... I foresee potential difficulty here.
With the new scheme, all you say is this image works /anywhere/; don't
copy it. Given the way Linux zImage works, I know
this works fine on all those SoCs, and even if it didn't, the U-Boot
scripts for those SoCs could arrange for the uImage to be loaded to a
SoC-specific address that the zImage /would/ work at.

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


Re: [U-Boot] [PATCH v8 2/4] gpio: Replace ARM gpio.h with the common API in include/asm-generic

2011-11-07 Thread Joe Hershberger
On Mon, Nov 7, 2011 at 11:02 AM, Stephen Warren swar...@nvidia.com wrote:
 Mike Frysinger wrote at Monday, November 07, 2011 10:40 AM:
 * PGP Signed by an unknown key

 On Monday 07 November 2011 11:35:33 Stephen Warren wrote:
  Joe Hershberger wrote at Friday, November 04, 2011 8:25 PM:
   -void gpio_free(int gp)
   +int gpio_free(unsigned gpio)
    {
   + return 0;
    }
 
  If you're doing a cleanup pass on this driver, you may as well make
  gpio_free() do something; it should probably clear gpio_names[gpio].name
  and perhaps set the pin back to SFIO - in other words, undo gpio_reqeust().

 i think the decision made in Linux was that freeing a GPIO should not cause 
 it
 to change tristate or anything.  all it should do is mark it as available 
 so
 something else can request it.
 -mike

 OK, I'll buy that, but presumably gpio_names[gpio].name should still be 
 cleared
 to indicate the pin is free?

Besides, that would directly undo this patch:
http://patchwork.ozlabs.org/patch/119277/

I'll clear the string.

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


Re: [U-Boot] [PATCH v8 2/4] gpio: Replace ARM gpio.h with the common API in include/asm-generic

2011-11-07 Thread Mike Frysinger
On Monday 07 November 2011 12:02:16 Stephen Warren wrote:
 Mike Frysinger wrote at Monday, November 07, 2011 10:40 AM:
  On Monday 07 November 2011 11:35:33 Stephen Warren wrote:
   Joe Hershberger wrote at Friday, November 04, 2011 8:25 PM:
-void gpio_free(int gp)
+int gpio_free(unsigned gpio)
 {
+   return 0;
 }
   
   If you're doing a cleanup pass on this driver, you may as well make
   gpio_free() do something; it should probably clear
   gpio_names[gpio].name and perhaps set the pin back to SFIO - in other
   words, undo gpio_reqeust().
  
  i think the decision made in Linux was that freeing a GPIO should not
  cause it to change tristate or anything.  all it should do is mark it as
  available so something else can request it.
 
 OK, I'll buy that, but presumably gpio_names[gpio].name should still be
 cleared to indicate the pin is free?

if the tegra code is using the gpio_names[] array to determine whether a pin 
is allocated, then gpio_free() should take care of clearing it
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address

2011-11-07 Thread Simon Glass
Hi Stephen,

On Mon, Nov 7, 2011 at 9:09 AM, Stephen Warren swar...@nvidia.com wrote:
 On 11/07/2011 09:56 AM, Stephen Warren wrote:
 [Resending in an attempt to avoid base64 encoding]

 On 11/05/2011 04:20 PM, Wolfgang Denk wrote:
 Dear Stephen Warren,

 In message 1320164902-24190-3-git-send-email-swar...@nvidia.com you wrote:
 The legacy uImage format includes an absolute load and entry-
 point address. When presented with a uImage in memory that
 isn't loaded at the address in the image's load address,
 U-Boot will relocate the image to its address in the header.

 Some payloads can actually be loaded and used at any arbitrary
 address. An example is an ARM Linux kernel zImage file. This
 is useful when sharing a single zImage across multiple boards
 with different memory layouts, or U-Boot builds with different
 ${load_addr} since sharing a single absolute load address may
 not be possible.

 With this config option enabled, an image header may contain a
 load address of -1/0x. This indicates the image can
 operate at any load address, and U-Boot will avoid automtically
 copying it anywhere. In this case, the entry-point field is
 specified relative to the start of the image payload.

 Please don't invent a new solution.  This has been discussed before,
 and the agreement was to introduce a new image format where the load
 and entry point addresses are not absolute, but interpreted as offsets
 relative to the respectice start of system RAM address.

 Your own IH_TYPE_*_REL patches are queued and will be merged soon.

 Oh. I kept pushing and pushing on these and kept meeting resistance. I
 had absolutely no idea at all that there was agreement over those
 patches; the reviews just stopped happening after you refused to look at
 them unless I provided U-Boot size information with every possible
 combination of ifdef locations present/removed.

 Anyway, I have withdrawn my support for those patches; please don't
 apply them. In my opinion, this new solution is far superior because:

 a) There's no need to revise mkimage to support this new scheme. Hence,
 it can be rolled out with just target-size changes, not host-side tool
 changes (well, a host-side script change is needed, but that's probably
 far easier than rolling out new mkimage binaries)

 b) The implementation of this new scheme is far simpler, and less
 invasive to the U-Boot code-base, and hence probably far more maintainable.

 c) I've validated that the new scheme handles kernel, initrd, and FDT. I
 never got around to testing a separate FDT image with the old patches

 Sorry, and I forgot:

 d) This new solution is much more flexible. With IH_TYPE_*_REL, you have
 to pick some SDRAM-relative address for the uImage load address that's
 valid across all SoCs the image will be used on. This is easy enough for
 Tegra20 and Tegra30, but I have no idea what the memory layout is for
 U-Boot on OMAP, MSM, Exynos, ... I foresee potential difficulty here.
 With the new scheme, all you say is this image works /anywhere/; don't
 copy it. Given the way Linux zImage works, I know
 this works fine on all those SoCs, and even if it didn't, the U-Boot
 scripts for those SoCs could arrange for the uImage to be loaded to a
 SoC-specific address that the zImage /would/ work at.

Fair enough so far as it goes.

But doesn't that mean that we are stuck with zImage and cannot have
U-Boot do the decompression?

Regards,
Simon


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

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


[U-Boot] [PATCH 0/12]: Add more framework to OMAP3 SPL, port more boards

2011-11-07 Thread Tom Rini
Hey all,

This is related to, but a bit different from the RFT thread I made with
beagleboard SPL patches.  I've incorporated the feedback about splitting
the changes up a lot more and after talking with Scott Wood on IRC after
the ML thread, I've created an omap3 specific file with the NAND related
stuff these boards need (since it would have gotten very big for what's
really needed here at this stage).  The series is checkpatch.pl clean.

What we have in patches 1-6 is bugfixing and cleanup of the SDRC code.
It's worth noting that without these changes we do some very 'funny'
(read: wrong) things on some platforms like omap3_evm where we find 384MB
memory when there's really only 256MB (and maybe 256 on the 128MB boards,
not sure).

Patch 7 adds another hook for SDRC boards to be able to say what timings
they have because on say beagle or omap3_evm, we have a few choices.  We
also convert devkit8000 here.

Patch 8 adds a new CONFIG (CONFIG_SPL_OMAP3_POP_PROBE) and file so that
OMAP3 boards which have a PoP chip for NAND/DDR can find out what they are
and decide on timings based on that.

Patches 9 and 10 convert Beagleboard and OMAP3 EVM to SPL.

Patches 11 and 12 convert the am3517 evm and am3517 crane boards (which
don't use SDRC but EMIF4) to SPL as well (given Ilya Yanok fixed a bug
in asm/arch-omap3/cpu.h for emif4 this is just a mechanical change).

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


[U-Boot] [PATCH 01/12] OMAP3: Update SDRC dram_init to always call make_cs1_contiguous()

2011-11-07 Thread Tom Rini
We update the comment in make_cs1_contiguous() to be a little bit
more clear (it's been copy/pasted from other silicons) and then
explain in dram_init() why we need to always try this.

Note that in the previous behavior we were always calling this on
boards that never had cs1 populated anyhow so making sure we do
this always is fine and will correct things like omap3evm detecting
an invalid amount of memory (384MB).

Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/cpu/armv7/omap3/sdrc.c |   23 +++
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c
index 0dd1955..66ce33f 100644
--- a/arch/arm/cpu/armv7/omap3/sdrc.c
+++ b/arch/arm/cpu/armv7/omap3/sdrc.c
@@ -58,10 +58,9 @@ u32 is_mem_sdr(void)
 
 /*
  * make_cs1_contiguous -
- *  - For es2 and above remap cs1 behind cs0 to allow command line
- *mem=xyz use all memory with out discontinuous support compiled in.
- *Could do it at the ATAG, but there really is two banks...
- *  - Called as part of 2nd phase DDR init.
+ * - When we have CS1 populated we want to have it mapped after cs0 to allow
+ *   command line mem=xyz use all memory with out discontinuous support
+ *   compiled in.  We could do it in the ATAG, but there really is two banks...
  */
 void make_cs1_contiguous(void)
 {
@@ -207,16 +206,16 @@ int dram_init(void)
 
size0 = get_sdr_cs_size(CS0);
/*
-* If a second bank of DDR is attached to CS1 this is
-* where it can be started.  Early init code will init
-* memory on CS0.
+* We always need to have cs_cfg point at where the second
+* bank would be, if present.  Failure to do so can lead to
+* strange situations where memory isn't detected and
+* configured correctly.  CS0 will already have been setup
+* at this point.
 */
-   if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
-   do_sdrc_init(CS1, NOT_EARLY);
-   make_cs1_contiguous();
+   make_cs1_contiguous();
+   do_sdrc_init(CS1, NOT_EARLY);
+   size1 = get_sdr_cs_size(CS1);
 
-   size1 = get_sdr_cs_size(CS1);
-   }
gd-ram_size = size0 + size1;
 
return 0;
-- 
1.7.0.4

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


[U-Boot] [PATCH 02/12] OMAP3: Add a helper function to set timings in SDRC

2011-11-07 Thread Tom Rini
Since we go through the sequence to setup the SDRC timings more than
once, break this logic out into its own function and have that function
call mem_ok() to make sure the memory is usable.

Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/cpu/armv7/omap3/sdrc.c |  116 --
 1 files changed, 61 insertions(+), 55 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c
index 66ce33f..2756024 100644
--- a/arch/arm/cpu/armv7/omap3/sdrc.c
+++ b/arch/arm/cpu/armv7/omap3/sdrc.c
@@ -108,14 +108,45 @@ u32 get_sdr_cs_offset(u32 cs)
 }
 
 /*
+ * write_sdrc_timings -
+ *  - Takes CS and associated timings and initalize SDRAM
+ *  - Test CS to make sure it's OK for use
+ */
+static void write_sdrc_timings(u32 cs, struct sdrc_actim *sdrc_actim_base,
+   u32 mcfg, u32 ctrla, u32 ctrlb, u32 rfr_ctrl, u32 mr)
+{
+   /* Setup timings we got from the board. */
+   writel(mcfg, sdrc_base-cs[cs].mcfg);
+   writel(ctrla, sdrc_actim_base-ctrla);
+   writel(ctrlb, sdrc_actim_base-ctrlb);
+   writel(rfr_ctrl, sdrc_base-cs[cs].rfr_ctrl);
+   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(mr, sdrc_base-cs[cs].mr);
+
+   /*
+* Test ram in this bank
+* Disable if bad or not present
+*/
+   if (!mem_ok(cs))
+   writel(0, sdrc_base-cs[cs].mcfg);
+}
+
+/*
  * do_sdrc_init -
- *  - Initialize the SDRAM for use.
- *  - code called once in C-Stack only context for CS0 and a possible 2nd
- *time depending on memory configuration from stack+global context
+ *  - Code called once in C-Stack only context for CS0 and with early being
+ *true and a possible 2nd time depending on memory configuration from
+ *stack+global context.
  */
 void do_sdrc_init(u32 cs, u32 early)
 {
struct sdrc_actim *sdrc_actim_base0, *sdrc_actim_base1;
+   u32 mcfg, ctrla, ctrlb, rfr_ctrl, mr;
+
+   sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE;
+   sdrc_actim_base1 = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE;
 
if (early) {
/* reset sdrc controller */
@@ -127,73 +158,48 @@ void do_sdrc_init(u32 cs, u32 early)
/* setup sdrc to ball mux */
writel(SDRC_SHARING, sdrc_base-sharing);
 
-   /* Disable Power Down of CKE cuz of 1 CKE on combo part */
+   /* Disable Power Down of CKE because of 1 CKE on combo part */
writel(WAKEUPPROC | SRFRONRESET | PAGEPOLICY_HIGH,
sdrc_base-power);
 
writel(ENADLL | DLLPHASE_90, sdrc_base-dlla_ctrl);
sdelay(0x2);
-   }
-
 /* As long as V_MCFG and V_RFR_CTRL is not defined for all OMAP3 boards we need
  * to prevent this to be build in non-SPL build */
 #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);
+   /*
+* If we use a SPL there is no x-loader nor config header so
+* we have to do the job ourselfs
+*/
+
+   mcfg = V_MCFG;
+   ctrla = V_ACTIMA_165;
+   ctrlb = V_ACTIMB_165;
+   rfr_ctrl = V_RFR_CTRL;
+   mr = V_MR;
+
+   write_sdrc_timings(CS0, sdrc_actim_base0, mcfg, ctrla, ctrlb,
+   rfr_ctrl, mr);
+#endif
 
-   writel(V_MR, sdrc_base-cs[cs].mr);
}
-#endif
 
/*
-* 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 we aren't using SPL we have been loaded by some
+* other means which may not have correctly initialized
+* both CS0 and CS1 (such as some older versions of x-loader)
+* so we may be asked now to setup CS1.
 */
if (cs == CS1) {
-   sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE;
- 

[U-Boot] [PATCH 03/12] OMAP3: Change mem_ok to clear again after reading back

2011-11-07 Thread Tom Rini
It's possible to need to call this function on the same banks multiple
times so we want to be sure that 'pos A' is cleared out again at the
end.

Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/cpu/armv7/omap3/mem.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/mem.c b/arch/arm/cpu/armv7/omap3/mem.c
index a01c303..cd5fe5c 100644
--- a/arch/arm/cpu/armv7/omap3/mem.c
+++ b/arch/arm/cpu/armv7/omap3/mem.c
@@ -86,6 +86,7 @@ u32 mem_ok(u32 cs)
writel(0x0, addr + 4);  /* remove pattern off the bus */
val1 = readl(addr + 0x400); /* get pos A value */
val2 = readl(addr); /* get val2 */
+   writel(0x0, addr + 0x400);  /* clear pos A */
 
if ((val1 != 0) || (val2 != pattern))   /* see if pos A val changed */
return 0;
-- 
1.7.0.4

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


[U-Boot] [PATCH 04/12] OMAP3: Remove get_mem_type prototype

2011-11-07 Thread Tom Rini
This function doesn't exist for omap3

Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/include/asm/arch-omap3/sys_proto.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h 
b/arch/arm/include/asm/arch-omap3/sys_proto.h
index 995e7cb..9e64410 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -49,7 +49,6 @@ void set_muxconf_regs(void);
 u32 get_cpu_family(void);
 u32 get_cpu_rev(void);
 u32 get_sku_id(void);
-u32 get_mem_type(void);
 u32 get_sysboot_value(void);
 u32 is_gpmc_muxed(void);
 u32 get_gpmc0_type(void);
-- 
1.7.0.4

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


[U-Boot] [PATCH 05/12] OMAP3: Add optimal SDRC autorefresh control values

2011-11-07 Thread Tom Rini
This adds the optimal SDRC autorefresh control register values for
100Mhz, 133MHz, 165MHz and 200MHz clocks.  We switch to using this
to provide the default 165MHz value.

Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/include/asm/arch-omap3/mem.h |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/arch-omap3/mem.h 
b/arch/arm/include/asm/arch-omap3/mem.h
index 8e28f77..61baccb 100644
--- a/arch/arm/include/asm/arch-omap3/mem.h
+++ b/arch/arm/include/asm/arch-omap3/mem.h
@@ -43,6 +43,12 @@ enum {
 #define SDRC_SHARING   0x0100
 #define SDRC_MR_0_SDR  0x0031
 
+/* optimized timings good for current shipping parts */
+#define SDP_3430_SDRC_RFR_CTRL_100MHz  0x0002da01
+#define SDP_3430_SDRC_RFR_CTRL_133MHz  0x0003de01 /* 7.8us/7.5ns - 50=0x3de */
+#define SDP_3430_SDRC_RFR_CTRL_165MHz  0x0004e201 /* 7.8us/6ns - 50=0x4e2 */
+#define SDP_3430_SDRC_RFR_CTRL_200MHz  0x0005e601 /* 7.8us/5ns - 50=0x5e6 */
+
 #define DLL_OFFSET 0
 #define DLL_WRITEDDRCLKX2DIS   1
 #define DLL_ENADLL 1
@@ -144,10 +150,6 @@ enum {
(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
@@ -203,7 +205,7 @@ enum {
 #define V_ACTIMA_165 MICRON_V_ACTIMA_165
 #define V_ACTIMB_165 MICRON_V_ACTIMB_165
 #define V_MCFG MICRON_V_MCFG
-#define V_RFR_CTRL MICRON_V_RFR_CTRL
+#define V_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz
 #define V_MR   MICRON_V_MR
 #endif
 
-- 
1.7.0.4

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


[U-Boot] [PATCH 06/12] OMAP3: Suffix all Micron memory timing parts with their speed

2011-11-07 Thread Tom Rini
Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/include/asm/arch-omap3/mem.h |   54 +
 1 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/arch/arm/include/asm/arch-omap3/mem.h 
b/arch/arm/include/asm/arch-omap3/mem.h
index 61baccb..a3c 100644
--- a/arch/arm/include/asm/arch-omap3/mem.h
+++ b/arch/arm/include/asm/arch-omap3/mem.h
@@ -134,28 +134,30 @@ 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_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))
+#define MICRON_RAMTYPE_165 0x1
+#define MICRON_DDRTYPE_165 0x0
+#define MICRON_DEEPPD_165  0x1
+#define MICRON_B32NOT16_1650x1
+#define MICRON_BANKALLOCATION_165  0x2
+#define MICRON_RAMSIZE_165 ((PHYS_SDRAM_1_SIZE/(1024*1024))/2)
+#define MICRON_ADDRMUXLEGACY_165   0x1
+#define MICRON_CASWIDTH_1650x5
+#define MICRON_RASWIDTH_1650x2
+#define MICRON_LOCKSTATUS_165  0x0
+#define MICRON_V_MCFG_165  ((MICRON_LOCKSTATUS_165  30) | \
+   (MICRON_RASWIDTH_165  24) | (MICRON_CASWIDTH_165  20) | \
+   (MICRON_ADDRMUXLEGACY_165  19) | (MICRON_RAMSIZE_165  8) | \
+   (MICRON_BANKALLOCATION_165  6) | \
+   (MICRON_B32NOT16_165  4) | (MICRON_DEEPPD_165  3) | \
+   (MICRON_DDRTYPE_165  2) | (MICRON_RAMTYPE_165))
+
+#define MICRON_BL_165  0x2
+#define MICRON_SIL_165 0x0
+#define MICRON_CASL_1650x3
+#define MICRON_WBST_1650x0
+#define MICRON_V_MR_165((MICRON_WBST_165  9) | \
+   (MICRON_CASL_165  4) | (MICRON_SIL_165  3) | \
+   (MICRON_BL_165))
 
 /*
  * NUMONYX part of IGEP v2 (165MHz optimized) 6.06ns
@@ -202,11 +204,11 @@ enum {
 #endif
 
 #ifdef CONFIG_OMAP3_MICRON_DDR
-#define V_ACTIMA_165 MICRON_V_ACTIMA_165
-#define V_ACTIMB_165 MICRON_V_ACTIMB_165
-#define V_MCFG MICRON_V_MCFG
+#define V_ACTIMA_165   MICRON_V_ACTIMA_165
+#define V_ACTIMB_165   MICRON_V_ACTIMB_165
+#define V_MCFG MICRON_V_MCFG_165
 #define V_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz
-#define V_MR   MICRON_V_MR
+#define V_MR   MICRON_V_MR_165
 #endif
 
 #ifdef CONFIG_OMAP3_NUMONYX_DDR
-- 
1.7.0.4

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


[U-Boot] [PATCH 08/12] OMAP3 SPL: Add identify_pop_memory function

2011-11-07 Thread Tom Rini
A number of boards are populated with a PoP chip for both DDR and NAND
memory.  So to determine DDR timings the NAND chip needs to be probed
and mfr/id returned to the board to make decisions with.  All of this
code is put into spl_pop_probe.c and controlled via
CONFIG_SPL_OMAP3_POP_PROBE.

Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/cpu/armv7/omap3/Makefile   |3 +
 arch/arm/cpu/armv7/omap3/spl_pop_probe.c|   84 +++
 arch/arm/include/asm/arch-omap3/sys_proto.h |1 +
 3 files changed, 88 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/omap3/spl_pop_probe.c

diff --git a/arch/arm/cpu/armv7/omap3/Makefile 
b/arch/arm/cpu/armv7/omap3/Makefile
index 8e85891..772f3d4 100644
--- a/arch/arm/cpu/armv7/omap3/Makefile
+++ b/arch/arm/cpu/armv7/omap3/Makefile
@@ -31,6 +31,9 @@ COBJS += board.o
 COBJS  += clock.o
 COBJS  += mem.o
 COBJS  += sys_info.o
+ifdef CONFIG_SPL_BUILD
+COBJS-$(CONFIG_SPL_OMAP3_POP_PROBE)+= spl_pop_probe.o
+endif
 
 COBJS-$(CONFIG_EMIF4)  += emif4.o
 COBJS-$(CONFIG_SDRC)   += sdrc.o
diff --git a/arch/arm/cpu/armv7/omap3/spl_pop_probe.c 
b/arch/arm/cpu/armv7/omap3/spl_pop_probe.c
new file mode 100644
index 000..ca66dd9
--- /dev/null
+++ b/arch/arm/cpu/armv7/omap3/spl_pop_probe.c
@@ -0,0 +1,84 @@
+/*
+ * (C) Copyright 2011
+ * Texas Instruments, www.ti.com
+ *
+ * Author :
+ * Tom Rini tr...@ti.com
+ *
+ * Initial Code from:
+ * Richard Woodruff r-woodru...@ti.com
+ * Jian Zhang jzh...@ti.com
+ *
+ * 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 linux/mtd/nand.h
+#include asm/io.h
+#include asm/arch/sys_proto.h
+#include asm/arch/mem.h
+
+#ifdef CONFIG_SPL_BUILD
+static struct gpmc *gpmc_config = (struct gpmc *)GPMC_BASE;
+
+/* nand_command: Send a flash command to the flash chip */
+static void nand_command(u8 command)
+{
+   writeb(command, gpmc_config-cs[0].nand_cmd);
+
+   if (command == NAND_CMD_RESET) {
+   unsigned char ret_val;
+   nand_command(NAND_CMD_STATUS);
+   do {
+   /* Wait until ready */
+   ret_val = readl(gpmc_config-cs[0].nand_dat);
+   } while ((ret_val  0x40) != 0x40);
+   }
+}
+
+/*
+ * Many boards ship with a PoP chip of both NAND and DDR, so we need
+ * probe the NAND side, very earily, to see what it says and pass this
+ * along to the board.  The board code will then use this information
+ * to decide what DDR timings to use.
+ */
+void identify_pop_memory(int *mfr, int *id)
+{
+   /* Make sure that we have setup GPMC for NAND correctly. */
+   writel(M_NAND_GPMC_CONFIG1, gpmc_config-cs[0].config1);
+   writel(M_NAND_GPMC_CONFIG2, gpmc_config-cs[0].config2);
+   writel(M_NAND_GPMC_CONFIG3, gpmc_config-cs[0].config3);
+   writel(M_NAND_GPMC_CONFIG4, gpmc_config-cs[0].config4);
+   writel(M_NAND_GPMC_CONFIG5, gpmc_config-cs[0].config5);
+   writel(M_NAND_GPMC_CONFIG6, gpmc_config-cs[0].config6);
+
+   /* Enable the GPMC Mapping */
+   writelGPMC_SIZE_128M  0xF)  8) | ((NAND_BASE  24)  0x3F) |
+   (1  6)), gpmc_config-cs[0].config7);
+
+   sdelay(2000);
+
+   /* Issue a RESET and then READID */
+   nand_command(NAND_CMD_RESET);
+   nand_command(NAND_CMD_READID);
+
+   writeb(0x0, gpmc_config-cs[0].nand_adr);
+
+   /* Read off the manufacturer and device id. */
+   *mfr = readb(gpmc_config-cs[0].nand_dat);
+   *id = readb(gpmc_config-cs[0].nand_dat);
+}
+#endif
diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h 
b/arch/arm/include/asm/arch-omap3/sys_proto.h
index a53d205..2a8b5c7 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -38,6 +38,7 @@ void per_clocks_enable(void);
 void memif_init(void);
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+void identify_pop_memory(int *, int *);
 void get_board_mem_timings(u32 *, u32 *, u32 *, u32 *, u32 *);
 void emif4_init(void);
 void gpmc_init(void);
-- 
1.7.0.4

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


[U-Boot] [PATCH 09/12] OMAP3: Add SPL support to Beagleboard

2011-11-07 Thread Tom Rini
This introduces 200MHz Micron parts timing information based on x-loader
to asm/arch-omap3/mem.h.  The memory init logic is also based on what
x-loader does in these cases.  Note that while previously u-boot would
be flashed in with SW ECC in this case it now must be flashed with HW
ECC.

Cc: Dirk Behme dirk.be...@gmail.com
Beagleboard rev C5, xM rev A:
Tested-by: Tom Rini tr...@ti.com
Beagleboard xM rev C:
Tested-by: Matt Ranostay mranos...@gmail.com
Beagleboard rev B7, C2, xM rev B:
Tested-by: Matt Porter mpor...@ti.com
Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/include/asm/arch-omap3/mem.h |   23 ++
 board/ti/beagle/beagle.c  |   72 -
 board/ti/beagle/config.mk |   33 ---
 include/configs/omap3_beagle.h|   55 +
 4 files changed, 148 insertions(+), 35 deletions(-)
 delete mode 100644 board/ti/beagle/config.mk

diff --git a/arch/arm/include/asm/arch-omap3/mem.h 
b/arch/arm/include/asm/arch-omap3/mem.h
index 8c6dc3f..f467ba9 100644
--- a/arch/arm/include/asm/arch-omap3/mem.h
+++ b/arch/arm/include/asm/arch-omap3/mem.h
@@ -159,6 +159,29 @@ enum {
(MICRON_CASL_165  4) | (MICRON_SIL_165  3) | \
(MICRON_BL_165))
 
+/* Micron part (200MHz optimized) 5 ns */
+#define MICRON_TDAL_2006
+#define MICRON_TDPL_2003
+#define MICRON_TRRD_2002
+#define MICRON_TRCD_2003
+#define MICRON_TRP_200 3
+#define MICRON_TRAS_2008
+#define MICRON_TRC_200 11
+#define MICRON_TRFC_20015
+#define MICRON_V_ACTIMA_200((MICRON_TRFC_200  27) | \
+   (MICRON_TRC_200  22) | (MICRON_TRAS_200  18) | \
+   (MICRON_TRP_200  15) | (MICRON_TRCD_200  12) | \
+   (MICRON_TRRD_200  9) | (MICRON_TDPL_200  6) | \
+   (MICRON_TDAL_200))
+
+#define MICRON_TWTR_2002
+#define MICRON_TCKE_2004
+#define MICRON_TXP_200 2
+#define MICRON_XSR_200 23
+#define MICRON_V_ACTIMB_200((MICRON_TCKE_200  12) | \
+   (MICRON_XSR_200  0) | (MICRON_TXP_200  8) | \
+   (MICRON_TWTR_200  16))
+
 /*
  * NUMONYX part of IGEP v2 (165MHz optimized) 6.06ns
  *   ACTIMA
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 9482c5e..4ab2d8e 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2004-2008
+ * (C) Copyright 2004-2011
  * Texas Instruments, www.ti.com
  *
  * Author :
@@ -34,9 +34,11 @@
 #include status_led.h
 #endif
 #include twl4030.h
+#include linux/mtd/nand.h
 #include asm/io.h
 #include asm/arch/mmc_host_def.h
 #include asm/arch/mux.h
+#include asm/arch/mem.h
 #include asm/arch/sys_proto.h
 #include asm/gpio.h
 #include asm/mach-types.h
@@ -135,6 +137,70 @@ int get_board_revision(void)
return revision;
 }
 
+#ifdef CONFIG_SPL_BUILD
+/*
+ * Routine: board_early_sdrc_init
+ * Description: If we use SPL then there is no x-loader nor config header
+ * so we have to setup the DDR timings outself on both banks.
+ */
+void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl,
+   u32 *mr)
+{
+   int pop_mfr, pop_id;
+
+   /*
+* We need to identify what PoP memory is on the board so that
+* we know what timings to use.  If we can't identify it then
+* we know it's an xM.
+*/
+   identify_pop_memory(pop_mfr, pop_id);
+
+   /*
+* We cannot use the MICRON_MCFG_165 as it relies on
+* PHYS_SDRAM_1_SIZE being defined to the correct value, and we
+* don't know that value until runtime.
+*/
+   *mr = MICRON_V_MR_165;
+   switch (get_board_revision()) {
+   case REVISION_C4:
+   if ((pop_mfr == NAND_MFR_STMICRO)  (pop_id == 0xba)) {
+   *mcfg = 0x04590099;
+   *ctrla = NUMONYX_V_ACTIMA_165;
+   *ctrlb = NUMONYX_V_ACTIMB_165;
+   *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
+   break;
+   } else if ((pop_mfr == NAND_MFR_MICRON)  (pop_id == 0xbc)) {
+   /* Beagleboard Rev C5 */
+   *mcfg = 0x03588099;
+   *ctrla = MICRON_V_ACTIMA_200;
+   *ctrlb = MICRON_V_ACTIMB_200;
+   *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
+   break;
+   }
+   case REVISION_XM_A:
+   case REVISION_XM_B:
+   case REVISION_XM_C:
+   if (pop_mfr == 0) {
+   *mcfg = 0x03588099;
+   *ctrla = MICRON_V_ACTIMA_200;
+   *ctrlb = MICRON_V_ACTIMB_200;
+   *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
+   } else {
+   *mcfg = 0x04590099;
+   

[U-Boot] [PATCH 07/12] OMAP3 SPL: Rework memory initalization and devkit8000 support

2011-11-07 Thread Tom Rini
This changes to making the board be responsible for providing the
memory initialization timings in SPL and converts the devkit8000
to this framework.  In SPL we try and initialize both CS0 and CS1.

Cc: Frederik Kriewitz frede...@kriewitz.eu
Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/cpu/armv7/omap3/sdrc.c |   28 ++
 arch/arm/include/asm/arch-omap3/mem.h   |   26 -
 arch/arm/include/asm/arch-omap3/sys_proto.h |1 +
 board/timll/devkit8000/devkit8000.c |   21 
 include/configs/devkit8000.h|4 ---
 5 files changed, 37 insertions(+), 43 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c
index 2756024..a27b4b1 100644
--- a/arch/arm/cpu/armv7/omap3/sdrc.c
+++ b/arch/arm/cpu/armv7/omap3/sdrc.c
@@ -148,6 +148,18 @@ void do_sdrc_init(u32 cs, u32 early)
sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE;
sdrc_actim_base1 = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE;
 
+   /*
+* When called in the early context this may be SPL and we will
+* need to set all of the timings.  This ends up being board
+* specific so we call a helper function to take care of this
+* for us.  Otherwise, to be safe, we need to copy the settings
+* from the first bank to the second.  We will setup CS0,
+* then set cs_cfg to the appropriate value then try and
+* setup CS1.
+*/
+#ifdef CONFIG_SPL_BUILD
+   get_board_mem_timings(mcfg, ctrla, ctrlb, rfr_ctrl, mr);
+#endif
if (early) {
/* reset sdrc controller */
writel(SOFTRESET, sdrc_base-sysconfig);
@@ -164,22 +176,12 @@ void do_sdrc_init(u32 cs, u32 early)
 
writel(ENADLL | DLLPHASE_90, sdrc_base-dlla_ctrl);
sdelay(0x2);
-/* As long as V_MCFG and V_RFR_CTRL is not defined for all OMAP3 boards we need
- * to prevent this to be build in non-SPL build */
 #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
-*/
-
-   mcfg = V_MCFG;
-   ctrla = V_ACTIMA_165;
-   ctrlb = V_ACTIMB_165;
-   rfr_ctrl = V_RFR_CTRL;
-   mr = V_MR;
-
write_sdrc_timings(CS0, sdrc_actim_base0, mcfg, ctrla, ctrlb,
rfr_ctrl, mr);
+   make_cs1_contiguous();
+   write_sdrc_timings(CS0, sdrc_actim_base1, mcfg, ctrla, ctrlb,
+   rfr_ctrl, mr);
 #endif
 
}
diff --git a/arch/arm/include/asm/arch-omap3/mem.h 
b/arch/arm/include/asm/arch-omap3/mem.h
index a3c..8c6dc3f 100644
--- a/arch/arm/include/asm/arch-omap3/mem.h
+++ b/arch/arm/include/asm/arch-omap3/mem.h
@@ -198,32 +198,6 @@ enum {
(NUMONYX_XSR_165  0) | (NUMONYX_TXP_165  8) | \
(NUMONYX_TWTR_165  16))
 
-#ifdef CONFIG_OMAP3_INFINEON_DDR
-#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   MICRON_V_ACTIMB_165
-#define V_MCFG MICRON_V_MCFG_165
-#define V_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz
-#define V_MR   MICRON_V_MR_165
-#endif
-
-#ifdef CONFIG_OMAP3_NUMONYX_DDR
-#define V_ACTIMA_165 NUMONYX_V_ACTIMA_165
-#define V_ACTIMB_165 NUMONYX_V_ACTIMB_165
-#endif
-
-#if !defined(V_ACTIMA_165) || !defined(V_ACTIMB_165)
-#error Please choose the right DDR type in config header
-#endif
-
-#if defined(CONFIG_SPL_BUILD)  (!defined(V_MCFG) || !defined(V_RFR_CTRL))
-#error Please choose the right DDR type in config header
-#endif
-
 /*
  * GPMC settings -
  * Definitions is as per the following format
diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h 
b/arch/arm/include/asm/arch-omap3/sys_proto.h
index 9e64410..a53d205 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -38,6 +38,7 @@ void per_clocks_enable(void);
 void memif_init(void);
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+void get_board_mem_timings(u32 *, u32 *, u32 *, u32 *, u32 *);
 void emif4_init(void);
 void gpmc_init(void);
 void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 
base,
diff --git a/board/timll/devkit8000/devkit8000.c 
b/board/timll/devkit8000/devkit8000.c
index fee0dff..a854b57 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -138,3 +138,24 @@ int board_eth_init(bd_t *bis)
return dm9000_initialize(bis);
 }
 #endif
+
+/*
+ * Routine: get_board_mem_timings
+ * Description: If we use SPL then there is no x-loader nor config header
+ * so we have to setup the DDR timings outself on the first bank.  

Re: [U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address

2011-11-07 Thread Wolfgang Denk
Dear Stephen Warren,

In message 74cdbe0f657a3d45afbb94109fb122ff173f9a5...@hqmail01.nvidia.com you 
wrote:

  Your own IH_TYPE_*_REL patches are queued and will be merged soon.
 
 Oh. I kept pushing and pushing on these and kept meeting resistance. I

There was no resistance ever.  There were just the normal review
comments.

 had absolutely no idea at all that there was agreement over those patches;
 the reviews just stopped happening after you refused to look at them

If there are no further complaints that usually menas the stuff is
sitting in the queue waiting to be processed.  Sorry, but my bandwidth
_is_ limited.

 Anyway, I have withdrawn my support for those patches; please don't apply
 them. In my opinion, this new solution is far superior because:

Argh... So we are back at square one.

The problem with this new approach is that Linux kernel images are NOT
freely relocatable.  They do have a fix entry point, even if this is
not an absolute address, but a relative one.  The natural way to
handle this is exactly that:  add support for images with relative
)offset based) load and entry point addresses.

Your new approahc is indeed simpler - actually it is too simplistic,
as you cannot record load address / entry point information any more.
It may work when using the kernel wrapper - but what if you don't want
to do that?

  I do not see the need for yet another implementation for the very same
  thing, so NAK.

The NAK remains.  The new code will not go 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
A star captain's most solemn oath is that he will give his life, even
his entire crew, rather than violate the Prime Directive.
-- Kirk, The Omega Glory, stardate unknown
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address

2011-11-07 Thread Wolfgang Denk
Dear Simon Glass,

In message CAPnjgZ1vb9DB=ukrs0tg47zryubc0svg5vk0whuvn3b7_5u...@mail.gmail.com 
you wrote:
 
  copy it. Given the way Linux zImage works, I know
  this works fine on all those SoCs, and even if it didn't, the U-Boot
  scripts for those SoCs could arrange for the uImage to be loaded to a
  SoC-specific address that the zImage /would/ work at.
 
 Fair enough so far as it goes.

But why should U-Boot need to be configured with image-specific
information, when we have well defined ways to store exactly that
needed information in the image itself?  That would be a full step
backward.

 But doesn't that mean that we are stuck with zImage and cannot have
 U-Boot do the decompression?

Indeed - this is just one of the disadvatages and reasons why I reject
that new code.

If I find some time I will eventually re-review the IH_TYPE_*_REL
patches, and most probably apply them.

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
Real programmers can write assembly code in any language.   :-)
  - 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] Code relocation in U-boot.

2011-11-07 Thread Albert ARIBAUD
Le 07/11/2011 14:41, Sandeep Sharma a écrit :
 Hi,

 I am analyzing U-Boot code for relocate_code function. In this function
 after copying the text section and before clearing the bss section we are
 doing fix .rel.dyn relocations. I want to know that what actually we are
 doing in this section of code. What does this section actually contains and
 what kind of fix we are doing in this. What are relative and absolute fix
 that we are doing in this section.

 Any kind of help will we highly appreciated.

Hi Sandeep,

I assume you are specifically talking about ARM code in start.S? This 
code is an implementation of the relocation mechanism defined in the ELF 
specifications. Look up 
http://en.wikipedia.org/wiki/Executable_and_Linkable_Format#References 
for details.

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


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

2011-11-07 Thread Albert ARIBAUD
Hi Wolfgang,

The following changes since commit fec79acc864bed049b6beae719ccbf2bbec5403a:

   sandbox: drop unused return (2011-11-03 22:35:25 +0100)

are available in the git repository at:
   git://git.denx.de/u-boot-arm.git master

Ajay Bhargav (1):
   gplugD: Fix for error:MACH_TYPE_SHEEVAD undeclared

Anatolij Gustschin (4):
   ARM: netspace_v2: fix warnings
   ARM: DockStar: fix compilation
   ARM: dreamplug: fix compilation
   imx: imx31_phycore.h: fix checkpatch warnings

Angus Ainslie (2):
   ORIGEN : enable device tree support
   ORIGEN : use absolute paths and fix tool naming

Bastian Ruppert (4):
   Davinci: ea20: set console on UART0
   Davinci: ea20: set GPIOs to hold MII-Phy in reset and set 
UART0-Switch for console
   Davinci: ea20: add gpio for keeping power on in board_late_init
   Davinci: ea20: add gpios for LCD backlight control

Chander Kashyap (4):
   SMDKV310: Initialize board id using CONFIG_MACH_TYPE
   SMDKV310: use get_ram_size() to validate dram size
   smdkv310: use spl framework for mmc spl
   smdkv310: use macro for mmc data read function address

Christian Riesch (1):
   arm, davinci: Add function lpsc_syncreset()

Daniel Gorsulowski (2):
   at91: defined mach-types for meesc board in board config file
   at91: defined mach-types for otc570 board in board config file

Fabio Estevam (22):
   qong: remove unneeded 1 from qong.h
   mx31pdk: Add MC13783 PMIC support
   mx31: Introduce mx31_set_gpr function
   qong: Use mx31_set_gpr to setup USBH2 pins
   qong: remove unneeded IOMUX settings
   rtc: Make mc13783-rtc driver generic
   mx51evk: Add RTC support
   mx51evk: Use GPIO API for configuring the IOMUX
   mx35pdk: Add RTC support
   mx51evk: Remove unneeded '1' from mx51evk.h
   mx51evk: Remove unused get_board_rev function
   vision2: Remove unused header file
   mx53evk: Remove unneeded '1' from mx53evk.h
   mx53loco: Remove unused get_board_rev function
   mx53evk: Add RTC support
   mx53evk: Remove unused get_board_rev function
   mx53ard: Remove unused get_board_rev function
   mx53smd: Remove unused get_board_rev function
   vision2: Remove unused get_board_rev function
   mx53: Turn off child clocks before reconfigure perclk_root
   README: Fix supported i.MX SoC list for CONFIG_MXC_SPI
   mx31pdk: Enable D and I caches

Heiko Schocher (13):
   arm, davinci: replace CONFIG_PRELOADER with CONFIG_SPL_BUILD
   arm, arm926: fix missing symbols in NAND_SPL mode
   usb, davinci: add enable_vbus() weak function
   arm, usb, davinci: make USBPHY_CTL register configurable
   net, davinci_emac: make clock divider in MDIO control register 
configurable
   spl: add option for adding post memory test to the SPL framework
   arm, davinci: add support for new spl framework
   spl, nand: add 4bit HW ecc oob first nand_read_page function
   arm, davinci: add header files for dm365
   arm, davinci: add lowlevel function for dm365 soc
   arm926ejs, davinci: add cpuinfo for dm365
   arm926ejs, davinci: add missing spi defines for dm365
   arm, davinci: add cam_enc_4xx support

Helmut Raiger (4):
   misc: pmic: fix regression in pmic_fsl.c (SPI)
   mx31: define pins and init for UART2 and CSPI3
   mx31: add ESD control registers
   mx31: Add board support for HALE TT-01

Holger Brunck (6):
   arm/km: add variable waitforne to mgcoge3un
   arm/km/mgcoge3un: enhance waitforne feature
   arm/km: add boardid and hwkey to kernel command line
   arm/km: trigger reconfiguration for the Xilinx FPGA
   arm/km: enable jffs2 cmds
   arm/km: adapt bootcounter evaluation

Ilya Yanok (2):
   davinci_emac: compilation fix, phy is array now
   omap/spl: actually enable the console

Jens Scharsig (1):
   Arm: re-introduce the MACH_TYPE_XX for EB_CPUX9K2 board

Lei Wen (2):
   pantheon: define CONFIG_SYS_CACHELINE_SIZE
   armada100: define CONFIG_SYS_CACHELINE_SIZE

Luca Ceresoli (1):
   ARM: dig297: Define MACH_TYPE_OMAP3_CPS and CONFIG_MACH_TYPE

Marek Vasut (1):
   I2C: Fix mxc_i2c.c problem on imx31_phycore

Matthias Weisser (1):
   arm: jadecpu: Readd MACH_TYPE_JADECPU

Michael Jones (1):
   OMAP3: mvblx: Initial support for mvBlueLYNX-X

Michael Walle (1):
   kirkwood: define CONFIG_SYS_CACHELINE_SIZE

Mike Frysinger (1):
   kirkwood: drop empty asm-offsets.s file

Sanjeev Premi (10):
   omap3evm: Set environment variable 'ethaddr'
   omap3evm: Reorder related config options
   omap3evm: Prepare to split configuration
   omap3evm: move common config options to new file
   omap3evm: Add (quick) configuration for MMC/SD only
   omap3evm: Add (quick) configuration for NAND only
   omap3evm: fix errors caused by multiple definitions
   omap3: mem: Define and use common 

Re: [U-Boot] [PATCH 1/7 v2] integrator: pass configs for core modules

2011-11-07 Thread Albert ARIBAUD
Hi Linus,

Le 03/11/2011 22:14, Linus Walleij a écrit :
 Albert, are the v2 patches OK?

 In patchworx it's these:
 http://patchwork.ozlabs.org/patch/121278/
 http://patchwork.ozlabs.org/patch/121279/
 http://patchwork.ozlabs.org/patch/121280/
 http://patchwork.ozlabs.org/patch/121281/
 http://patchwork.ozlabs.org/patch/121282/
 http://patchwork.ozlabs.org/patch/121283/
 http://patchwork.ozlabs.org/patch/121284/

 Thanks,
 Linus Walleij

Can you please rebase them on top of current u-boot-arm/master?

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


Re: [U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address

2011-11-07 Thread Marek Vasut
 Dear Stephen Warren,
 
 In message 74cdbe0f657a3d45afbb94109fb122ff173f9a5...@hqmail01.nvidia.com 
you wrote:
   Your own IH_TYPE_*_REL patches are queued and will be merged soon.
  
  Oh. I kept pushing and pushing on these and kept meeting resistance. I
 
 There was no resistance ever.  There were just the normal review
 comments.
 
  had absolutely no idea at all that there was agreement over those
  patches; the reviews just stopped happening after you refused to look at
  them
 
 If there are no further complaints that usually menas the stuff is
 sitting in the queue waiting to be processed.  Sorry, but my bandwidth
 _is_ limited.
 
  Anyway, I have withdrawn my support for those patches; please don't apply
 
  them. In my opinion, this new solution is far superior because:
 Argh... So we are back at square one.
 
 The problem with this new approach is that Linux kernel images are NOT
 freely relocatable.  They do have a fix entry point, even if this is
 not an absolute address, but a relative one.  The natural way to
 handle this is exactly that:  add support for images with relative
 )offset based) load and entry point addresses.

You have that runtime patching stuff in linux-arm-kernel now, there should be 
no 
problem with that anymore actually. So basically I understood there was an 
agreement to make special uImage/fitImage which ... oh doh, here is where I'm 
getting lost. Is it that the kernel will still be copied to address, but a 
relative one to where uImage is loaded -- and the entrypoint will be relative 
to 
that same address?

 
 Your new approahc is indeed simpler - actually it is too simplistic,
 as you cannot record load address / entry point information any more.
 It may work when using the kernel wrapper - but what if you don't want
 to do that?
 
   I do not see the need for yet another implementation for the very same
   thing, so NAK.
 
 The NAK remains.  The new code will not go in.
 
 Best regards,
 
 Wolfgang Denk

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


Re: [U-Boot] [PATCH v3] config.mk: use memoization in cc-option macro to speed up compilation

2011-11-07 Thread Wolfgang Denk
Dear Daniel Schwierzeck,

In message 
1320679603-24847-1-git-send-email-daniel.schwierz...@googlemail.com you wrote:
 Apply memoization to cc-option macro by caching the results of the
 gcc calls. This macro is called very often so using cached results
 leads to faster compilation times.
 
 The old behaviour can be restored by defining the config option
 CONFIG_CC_OPT_CACHE_DISABLE=y.
 
 Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
 ---
 Changes for v3:
  - reworked handling of non-working gcc options
  - add config option CONFIG_CC_OPT_CACHE_DISABLE
 
 Changes for v2:
  - move cache file to $(obj)/include/generated
  - reworked completely
  - cache also non-working gcc options
  - remove CACHE_CC_OPTIONS config switch and enable this optimization
by default
 
  config.mk |   20 ++--
  1 files changed, 18 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Human beings were created by water to transport it uphill.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/56] board/mpl/common/flash.c: fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-2-git-send-email...@denx.de you wrote:
 Fix:
 ../common/flash.c: In function 'flash_erase':
 ../common/flash.c:603:24: warning: variable 'l_sect' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Denis Peter d.pe...@mpl.ch
 ---
  board/mpl/common/flash.c |   15 +--
  1 files changed, 1 insertions(+), 14 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Madness takes its toll. Please have exact change.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 02/56] arch/powerpc/cpu/mpc5xxx/i2c.c: fix GC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-3-git-send-email...@denx.de you wrote:
 Fix:
 i2c.c: In function 'wait_for_bb':
 i2c.c:104:16: warning: variable 'temp' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Heiko Schocher h...@denx.de
 ---
  arch/powerpc/cpu/mpc5xxx/i2c.c |5 +
  1 files changed, 1 insertions(+), 4 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A consultant is a person who borrows your watch, tells you what  time
it is, pockets the watch, and sends you a bill for it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 03/56] arch/powerpc/lib/board.c: make (mostly) checkpatch-clean

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-4-git-send-email...@denx.de you wrote:
 CodingStyle cleanup.
 
 Accepted (in this cleanup) checkpatch messages:
 
 - externs should be avoided
   (to be cleaned up later)
 - no spaces at the start of a line
   (accepted in multi-line #if's)
 - Macros with complex values
   (false reports)
 - do not use assignment in if condition
   (accepted in one place, where avoiding it would have required an
   additional level of nesting, resulting in less readable code)
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  arch/powerpc/lib/board.c |  455 
 --
  1 files changed, 234 insertions(+), 221 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 moral of the story is: Don't stop to  tighten  your  shoe  laces
during the Olympics 100m finals.
 - Kevin Jones in dejo68@bri.hp.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 04/56] arch/powerpc/lib/board.c: fix build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-5-git-send-email...@denx.de you wrote:
 Fix:
 board.c: In function 'board_init_r':
 board.c:633:8: warning: unused variable 's' [-Wunused-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  arch/powerpc/lib/board.c |3 ---
  1 files changed, 0 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
God is real, unless declared integer.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 05/56] board/tqc/tqm5200/cmd_stk52xx.c: fix GC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-6-git-send-email...@denx.de you wrote:
 Fix:
 cmd_stk52xx.c: In function 'spi_transmit':
 cmd_stk52xx.c:85:6: warning: variable 'dummy' set but not used
 [-Wunused-but-set-variable]
 cmd_stk52xx.c: In function 'i2s_play_wave':
 cmd_stk52xx.c:199:3: warning: dereferencing type-punned pointer will
 break strict-aliasing rules [-Wstrict-aliasing]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/tqc/tqm5200/cmd_stk52xx.c |   23 ---
  1 files changed, 12 insertions(+), 11 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
One difference between a man and a machine is that a machine is quiet
when well oiled.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 06/56] arch/powerpc/cpu/mpc5xxx/usb_ohci.c: fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-7-git-send-email...@denx.de you wrote:
 Fix:
 usb_ohci.c: In function 'dl_transfer_length':
 usb_ohci.c:751:8: warning: variable 'tdINFO' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  arch/powerpc/cpu/mpc5xxx/usb_ohci.c |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I think there's a world market for about five computers.
 -- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 07/56] board/mcc200/auto_update.c: fixx GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-8-git-send-email...@denx.de you wrote:
 Fix:
 auto_update.c: In function 'do_auto_update':
 auto_update.c:344:48: warning: variable 'got_ctrlc' set but not used
 [-Wunused-but-set-variable]
 auto_update.c:344:18: warning: variable 'bitmap_first' set but not
 used [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/mcc200/auto_update.c |7 +--
  1 files changed, 1 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
A list is only as strong as its weakest link.-- Don Knuth
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 08/56] drivers/rtc/ds3231.c: fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-9-git-send-email...@denx.de you wrote:
 Fix:
 ds3231.c: In function 'rtc_get':
 ds3231.c:90:52: warning: variable 'control' set but not used
 [-Wunused-but-set-variable]
 
 Fix is done by switching to standard debug() instead of custom macro.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  drivers/rtc/ds3231.c |   16 +++-
  1 files changed, 3 insertions(+), 13 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
Don't put off for tomorrow what you can  do  today,  because  if  you
enjoy it today you can do it again tomorrow.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/56] drivers/rtc/rv3029.c: fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-10-git-send-email...@denx.de you wrote:
 Fix:
 rv3029.c: In function 'rtc_set':
 rv3029.c:98:6: warning: variable 'ret' set but not used
 [-Wunused-but-set-variable]
 rv3029.c: In function 'set_eere_bit':
 rv3029.c:131:6: warning: variable 'ret' set but not used
 [-Wunused-but-set-variable]
 rv3029.c: In function 'wait_eebusy':
 rv3029.c:149:9: warning: variable 'ret' set but not used
 [-Wunused-but-set-variable]
 rv3029.c: In function 'rtc_reset':
 rv3029.c:165:6: warning: variable 'ret' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  drivers/rtc/rv3029.c |   27 +++
  1 files changed, 11 insertions(+), 16 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
Microsoft Multimedia:
You have nice graphics, sound and animations when the system crashes.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 10/56] drivers/video/videomodes.c: fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-11-git-send-email...@denx.de you wrote:
 Fix:
 videomodes.c: In function 'video_get_params':
 videomodes.c:162:13: warning: variable 't' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  drivers/video/videomodes.c |   16 +++-
  1 files changed, 11 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
Heavier than air flying machines are impossible.
-- Lord Kelvin, President, Royal Society, c. 1895
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/56] fs/fat/fat.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-12-git-send-email...@denx.de you wrote:
 Fix:
 fat.c: In function 'fat_register_device':
 fat.c:74:19: warning: variable 'info' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  fs/fat/fat.c |   35 +++
  1 files changed, 19 insertions(+), 16 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A dirty mind is a joy forever.   - Randy Kunkee
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 12/56] PM520: add missing enable_interrupts()

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-13-git-send-email...@denx.de you wrote:
 The code disabled interrupts in several locations, without re-enabling
 them again.  Fix this.
 
 While we are at it, also fix a GCC 4.6 build warning:
 flash.c: In function 'flash_erase':
 flash.c:373:21: warning: variable 'last' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Josef Wagner wag...@microsys.de
 ---
  board/pm520/flash.c |   17 -
  1 files changed, 12 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
If you can't beat it or corrupt it, you pretend it was your  idea  in
the first place. - Terry Pratchett, _Guards! Guards!_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 14/56] board/esd/pf5200/pf5200.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-15-git-send-email...@denx.de you wrote:
 Fix:
 pf5200.c: In function 'do_phypower':
 pf5200.c:330:6: warning: variable 'status' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Reinhard Arlt reinhard.a...@esd-electronics.com
 ---
  board/esd/pf5200/pf5200.c |   10 --
  1 files changed, 4 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
You shouldn't make my toaster angry. - Household security explained
in Johnny Quest
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 13/56] board/esd/cpci5200/strataflash.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-14-git-send-email...@denx.de you wrote:
 Fix:
 strataflash.c: In function 'flash_write_cfiword':
 strataflash.c:681:11: warning: variable 'ctladdr' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Reinhard Arlt reinhard.a...@esd-electronics.com
 ---
  board/esd/cpci5200/strataflash.c |4 +---
  1 files changed, 1 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
The reasonable man adapts himself to the world; the unreasonable  one
persists  in  trying  to  adapt  the  world to himself. Therefore all
progress depends on the unreasonable man.  - George Bernard Shaw
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 15/56] board/tqc/tqm5200/cam5200_flash.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-16-git-send-email...@denx.de you wrote:
 Fix:
 cam5200_flash.c: In function 'flash_erase_32':
 cam5200_flash.c:282:24: warning: variable 'l_sect' set but not used
 [-Wunused-but-set-variable]
 cam5200_flash.c: In function 'flash_erase_16':
 cam5200_flash.c:612:24: warning: variable 'l_sect' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/tqc/tqm5200/cam5200_flash.c |   10 ++
  1 files changed, 2 insertions(+), 8 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
Don't worry about people stealing your ideas. If your ideas are  any
good, you'll have to ram them down people's throats.  - Howard Aiken
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 16/56] drivers/video/cfb_console.c:Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-17-git-send-email...@denx.de you wrote:
 Silence this warning:
 cfb_console.c: In function 'video_logo':
 cfb_console.c:1563:18: warning: variable 'y_off' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Anatolij Gustschin ag...@denx.de
 ---
  drivers/video/cfb_console.c |4 +++-
  1 files changed, 3 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
After Goliath's defeat, giants ceased to command respect.
- Freeman Dyson
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 17/56] mpc8xx/fec.c: Fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-18-git-send-email...@denx.de you wrote:
 Fix:
 fec.c: In function 'fec_pin_init':
 fec.c:381:18: warning: variable 'fecp' set but not used
 [-Wunused-but-set-variable]
 fec.c: In function 'fec8xx_miiphy_write':
 fec.c:1013:8: warning: variable 'rdreg' set but not used
 [-Wunused-but-set-variable]
 
 Note: The code was slightly rearranged, but no functional changes
 attempted, i. e. no conversion to use I/O accessors.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  arch/powerpc/cpu/mpc8xx/fec.c |   47 +---
  1 files changed, 25 insertions(+), 22 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

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


Re: [U-Boot] [PATCH 18/56] drivers/pcmcia/mpc8xx_pcmcia.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-19-git-send-email...@denx.de you wrote:
 Fix:
 mpc8xx_pcmcia.c: In function 'pcmcia_on':
 mpc8xx_pcmcia.c:76:8: warning: variable 'slotbit' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  drivers/pcmcia/mpc8xx_pcmcia.c |3 ++-
  1 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
C++ is the best example of second-system effect since OS/360.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 19/56] board/c2mon/pcmcia.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-20-git-send-email...@denx.de you wrote:
 Fix:
 pcmcia.c: In function 'pcmcia_voltage_set':
 pcmcia.c:202:21: warning: variable 'cp' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/c2mon/pcmcia.c |8 +++-
  1 files changed, 3 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
Do we define evil as the absence of goodness? It seems only  logical
that shit happens--we discover this by the process of elimination.
-- Larry Wall
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 20/56] board/icu862/pcmcia.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-21-git-send-email...@denx.de you wrote:
 Fix:
 pcmcia.c: In function 'cfg_port_B':
 pcmcia.c:21:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c: In function 'pcmcia_hardware_enable':
 pcmcia.c:50:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c: In function 'pcmcia_voltage_set':
 pcmcia.c:191:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/icu862/pcmcia.c |   14 --
  1 files changed, 4 insertions(+), 10 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
When properly administered, vacations do not  diminish  productivity:
for every week you're away and get nothing done, there's another when
your boss is away and you get twice as much done.  -- Daniel B. Luten
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 20/56] board/icu862/pcmcia.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-21-git-send-email...@denx.de you wrote:
 Fix:
 pcmcia.c: In function 'cfg_port_B':
 pcmcia.c:21:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c: In function 'pcmcia_hardware_enable':
 pcmcia.c:50:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c: In function 'pcmcia_voltage_set':
 pcmcia.c:191:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/icu862/pcmcia.c |   14 --
  1 files changed, 4 insertions(+), 10 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If there are self-made purgatories, then we all have to live in them.
-- Spock, This Side of Paradise, stardate 3417.7
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 21/56] board/kup/common/pcmcia.c: Fix GCC 4.6 compiler warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-22-git-send-email...@denx.de you wrote:
 Fix:
 ../common/pcmcia.c: In function 'pcmcia_hardware_enable':
 ../common/pcmcia.c:23:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 ../common/pcmcia.c: In function 'pcmcia_voltage_set':
 ../common/pcmcia.c:152:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Klaus Heydeck heyd...@kieback-peter.de
 ---
  board/kup/common/pcmcia.c |   42 +++---
  1 files changed, 19 insertions(+), 23 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'd rather be led to hell than managed to heaven.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 22/56] board/lwmon/pcmcia.c: Fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-23-git-send-email...@denx.de you wrote:
 Fix:
 pcmcia.c: In function 'pcmcia_hardware_enable':
 pcmcia.c:33:21: warning: variable 'cp' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c:32:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c: In function 'pcmcia_voltage_set':
 pcmcia.c:174:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/lwmon/pcmcia.c |6 --
  1 files changed, 0 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
He's dead, Jim
-- McCoy, The Devil in the Dark, stardate 3196.1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 23/56] board/manroland/uc100/pcmcia.c: Fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-24-git-send-email...@denx.de you wrote:
 Fix:
 pcmcia.c: In function 'pcmcia_voltage_set':
 pcmcia.c:158:25: warning: variable 'pcmp' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c:157:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/manroland/uc100/pcmcia.c |   50 +--
  1 files changed, 22 insertions(+), 28 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
Men of peace usually are [brave].
-- Spock, The Savage Curtain, stardate 5906.5
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 24/56] board/mbx8xx/pcmcia.c: Fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-25-git-send-email...@denx.de you wrote:
 Fix:
 pcmcia.c: In function 'pcmcia_hardware_enable':
 pcmcia.c:83:25: warning: variable 'sysp' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c:81:21: warning: variable 'cp' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c:80:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/mbx8xx/pcmcia.c |6 --
  1 files changed, 0 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
Often it is fatal to live too long.  - Racine
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 25/56] board/netta/codec.c: Fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-26-git-send-email...@denx.de you wrote:
 Fix:
 codec.c: In function 's_write_BR':
 codec.c:1389:15: warning: variable 'v' set but not used
 [-Wunused-but-set-variable]
 codec.c: In function 's_write_OR':
 codec.c:1400:15: warning: variable 'v' set but not used
 [-Wunused-but-set-variable]
 codec.c: In function 's_write_NR':
 codec.c:1411:15: warning: variable 'v' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/netta/codec.c |9 +++--
  1 files changed, 3 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 use of anthropomorphic terminology when  dealing  with  computing
systems is a symptom of professional immaturity.   -- Edsger Dijkstra
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 26/56] board/netta/pcmcia.c: Fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-27-git-send-email...@denx.de you wrote:
 Fix:
 pcmcia.c: In function 'cfg_ports':
 pcmcia.c:151:21: warning: variable 'cp' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c:150:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c: In function 'pcmcia_hardware_enable':
 pcmcia.c:179:25: warning: variable 'sysp' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c:177:21: warning: variable 'cp' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c:176:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c: In function 'pcmcia_hardware_disable':
 pcmcia.c:271:25: warning: variable 'pcmp' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c:270:20: warning: variable 'immap' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c: In function 'pcmcia_voltage_set':
 pcmcia.c:303:9: warning: variable 'sreg' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c:300:21: warning: variable 'cp' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/netta/pcmcia.c |   76 
 +-
  1 files changed, 26 insertions(+), 50 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The human mind treats a new idea the way the body  treats  a  strange
protein - it rejects it. - P. Medawar
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 27/56] board/r360mpi/pcmcia.c: Fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-28-git-send-email...@denx.de you wrote:
 Fix:
 pcmcia.c: In function 'pcmcia_hardware_enable':
 pcmcia.c:22:21: warning: variable 'cp' set but not used
 [-Wunused-but-set-variable]
 pcmcia.c: In function 'pcmcia_hardware_disable':
 pcmcia.c:130:25: warning: variable 'pcmp' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/r360mpi/pcmcia.c |4 
  1 files changed, 0 insertions(+), 4 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Success covers a multitude of blunders.   - George Bernard Shaw
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 28/56] mpc8xx/cpu.c: Fix GCC 4.6 build warnings

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-29-git-send-email...@denx.de you wrote:
 Fix:
 cpu.c: In function 'check_CPU':
 cpu.c:188:8: warning: variable 'mid' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  arch/powerpc/cpu/mpc8xx/cpu.c |3 ++-
  1 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
We all agree on the necessity of compromise. We just can't agree  on
when it's necessary to compromise.
- Larry Wall in  1991nov13.194420.28...@netlabs.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 29/56] ICU862: Fix incorrect flash handling

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-30-git-send-email...@denx.de you wrote:
 There is only one bank of NOR flash memory on ICU862 boards.
 Remove code that attempts to deal with a second bank.
 
 This also fixes build warnings:
 flash.c: In function 'flash_init':
 flash.c:120:12: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:121:12: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:124:12: warning: array subscript is above array bounds
 [-Warray-bounds]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/icu862/flash.c |   32 +++-
  1 files changed, 3 insertions(+), 29 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
Program maintenance is an entropy-increasing process,  and  even  its
most skilfull execution only delays the subsidence of the system into
unfixable obsolescence.   - Fred Brooks, The Mythical Man Month
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 30/56] board/kup/kup4k/kup4k.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-31-git-send-email...@denx.de you wrote:
 Fix:
 kup4k.c: In function 'initdram':
 kup4k.c:155:19: warning: variable 'mod' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Klaus Heydeck heyd...@kieback-peter.de
 ---
  board/kup/kup4k/kup4k.c |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Every time history repeats itself the price goes up.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 31/56] board/eltec/mhpc/flash.c: Fix GCC 4.6 build warning

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-32-git-send-email...@denx.de you wrote:
 Fix:
 flash.c: In function 'write_buff':
 flash.c:314:6: warning: variable 'count' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Frank Gottschling fgottschl...@eltec.de
 ---
  board/eltec/mhpc/flash.c |7 +++
  1 files changed, 3 insertions(+), 4 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
And they told us, what they wanted... Was a sound  that  could  kill
some-one, from a distance.   - Kate Bush
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 32/56] mpc8xx/i2c.c: CodungStyle cleanup

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-33-git-send-email...@denx.de you wrote:
 Make (mostly) checkpatch-clean
 
 We don't acctually change the code (like convert to use I/O
 accessors), so there will be some remaining Use of volatile
 warnings from checkpatch.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Heiko Schocher h...@denx.de
 ---
  arch/powerpc/cpu/mpc8xx/i2c.c |  303 
 +
  1 files changed, 154 insertions(+), 149 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 first thing we do is kill all the lawyers.
(Shakespeare. II Henry VI, Act IV, scene ii)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 33/56] mpc8xx/i2c.c: replace PRINTD() by debug()

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-34-git-send-email...@denx.de you wrote:
 This also fixes some GCC 4.6 build warnings like:
 warning: variable 'txbd' set but not used [-Wunused-but-set-variable]
 warning: variable 'rxbd' set but not used [-Wunused-but-set-variable]
 
 Signed-off-by: WOlfgang Denk w...@denx.de
 Cc: Heiko Schocher h...@denx.de
 ---
  arch/powerpc/cpu/mpc8xx/i2c.c |   94 
 -
  1 files changed, 46 insertions(+), 48 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 a good thing for an uneducated man to read books of quotations.
- Sir Winston Churchill _My Early Life_ ch. 9
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 34/56] board/etx094/flash.c: CodingStyle cleanup

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-35-git-send-email...@denx.de you wrote:
 Make (mostly) checkpatch clean (don't convert to use I/O accessors yet,
 so there will be Use of volatile is usually wrong warnings left.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/etx094/flash.c |  365 
 --
  1 files changed, 178 insertions(+), 187 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
Shakespeare's Law of Prototyping: (Hamlet III, iv, 156-160)
O, throw away the worser part of it,
And live the purer with the other half.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 35/56] board/etx094/flash.c: Fix flash initialization

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-36-git-send-email...@denx.de you wrote:
 The ETX094 has only one NOR flash bank.  Remove all code trying to
 deal with a second bank.  This also fixes a number of GCC 4.6 build
 warnings:
 flash.c: In function 'flash_init':
 flash.c:68:13: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:70:13: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:72:13: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:128:13: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:129:13: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:133:12: warning: array subscript is above array bounds
 [-Warray-bounds]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/etx094/flash.c |   54 ++---
  1 files changed, 3 insertions(+), 51 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
Quote from the Boss after overriding the decision of a task force  he
created  to  find  a  solution:  I'm  sorry  if  I ever gave you the
impression your input would have any effect on my  decision  for  the
outcome of this project!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 36/56] board/genietv/flash.c: CodingStyle cleanup

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-37-git-send-email...@denx.de you wrote:
 Make (mostly) checkpatch clean (don't convert to use I/O accessors yet,
 so there will be Use of volatile is usually wrong warnings left.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/genietv/flash.c |  356 
 +
  1 files changed, 179 insertions(+), 177 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A witty saying proves nothing, but saying  something  pointless  gets
people's attention.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 37/56] board/genietv/flash.c: Fix flash initialization

2011-11-07 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1320458160-23136-38-git-send-email...@denx.de you wrote:
 The GENIETV has only one NOR flash bank.  Remove all code trying to
 deal with a second bank.  This also fixes a number of GCC 4.6 build
 warnings:
 flash.c:65:12: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:66:12: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:69:12: warning: array subscript is above array bounds
 [-Warray-bounds]
 flash.c:183:2: warning: format '%x' expects argument of type 'unsigned
 int', but argument 2 has type '
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 ---
  board/genietv/flash.c |   14 --
  1 files changed, 4 insertions(+), 10 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
There is a biblical analogy I'd like to draw here.   Casts are to C++
Programmers what the apple was to Eve. - Scott Douglas Meyers
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


  1   2   3   >