Re: [U-Boot] [PATCH 5/5] mtd/nand: workaround for Freescale FCM to support 4k pagesize Nand chip

2011-12-09 Thread Marek Vasut
 于 2011年12月09日 00:37, Marek Vasut 写道:
  Freescale FCM controller has a 2K size limitation of buffer RAM. In
  order to support the Nand flash chip whose page size is larger than 2K
  bytes, we read/write 2k data repeatedly by issuing FIR_OP_RB/FIR_OP_WB
  and save them to a large buffer.
  
  Signed-off-by: Shengzhou Liushengzhou@freescale.com
  Signed-off-by: Liu Shuob35...@freescale.com
  ---
  
drivers/mtd/nand/fsl_elbc_nand.c |  279
  
  + 1 files changed, 248
  insertions(+), 31 deletions(-)
  
  diff --git a/drivers/mtd/nand/fsl_elbc_nand.c
  b/drivers/mtd/nand/fsl_elbc_nand.c index 52362b1..3983c8c 100644
  --- a/drivers/mtd/nand/fsl_elbc_nand.c
  +++ b/drivers/mtd/nand/fsl_elbc_nand.c
  @@ -64,7 +64,6 @@ struct fsl_elbc_mtd {
  
 struct device *dev;
 int bank;   /* Chip select bank number   */
 u8 __iomem *vbase;  /* Chip select base virtual address  */
  
  -  int page_size;  /* NAND page size (0=512, 1=2048)*/
  
 unsigned int fmr;   /* FCM Flash Mode Register value */

};
  
  @@ -85,6 +84,8 @@ struct fsl_elbc_ctrl {
  
 unsigned int mdr;/* UPM/FCM Data Register value   */
 unsigned int use_mdr;/* Non zero if the MDR is to be set  */
 unsigned int oob;/* Non zero if operating on OOB data */
  
  +  char *buffer;/* just used when pagesize is greater*/
  
  Start sentence with capital letter
  
  +   /* than FCM RAM 2K limitation*/
  
};

/* These map to the positions used by the FCM hardware ECC generator
*/
  
  @@ -159,6 +160,44 @@ static struct nand_bbt_descr bbt_mirror_descr = {
  
 .pattern = mirror_pattern,

};
  
  +static void io_to_buffer(struct mtd_info *mtd, int subpage, int oob)
  +{
  +  struct nand_chip *chip = mtd-priv;
  +  struct fsl_elbc_mtd *priv = chip-priv;
  +  struct fsl_elbc_ctrl *ctrl = priv-ctrl;
  +  void *src, *dst;
  +  int len = (oob ? 64 : 2048);
  
  No parenthesis ...
  
  +
  +  /* for emulating 4096+ bytes NAND using 2048-byte FCM RAM */
  +  if (oob)
  +  dst = ctrl-buffer + mtd-writesize + subpage * 64;
  +  else
  +  dst = ctrl-buffer + subpage * 2048;
  
  subpage * len ?
 
 dst = ctrl-buffer + (oob ? mtd-writesize : 0) + subpage * len ?
 Is this important ? I think it is ok.

dst = ctrl-buffer + subpage * len;

if (oob)
dst += mtd-writesize;

it's important, this code looks like mess. You introduce len and don't use it 
anywhere then ?

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


Re: [U-Boot] p2020 and Micron MT47H64M16HR memory and u-boot

2011-12-09 Thread wzab
On Dec 8, 11:12 pm, wzab wza...@gmail.com wrote:
 We are debugging a system equipped with p2020 processor and micron
 MT47H64M16HR DDR2 memories.
 Unfortunately we can't get u-boot loading correctly to the DDR.
 We've managed to get u-boot loaded to the L2 cache and to put our own
 DDR debugging code into the board initialization code (namely into
 board specific ddr.c file).
 It seems, that the DDR is not initialized properly by standard u-boot
 DDR2 parameters for P1_P2_RDB board.

 We've analyzed thoroughly the 
 datasheet:http://www.micron.com/parts/dram/ddr2-sdram/~/media/Documents/Product...
 and we've found that the required initialization procedure (see pp.
 86-88 in the datasheet) is quite complicated.
 The p2020 contains a versatile DDR controller, but it seems to be
 unable to perform e.g. multiple loading of the MR register (first with
 DLL reset command as required in step 8, and then without that command
 as required in step 11).

 So my question is:
 1. Has anybody managed to force the internal P2020 DDR controller to
 succesfully initialize this memory?
 2. Has anybody prepared the DDR initialization data for boot_format,
 so that P2020 on-chip loader is able to initialize this memory
 executing the configuration data form the SD card? (In fact this seems
 to be necessary, as before the DDR is initialized we are not able to
 load the u-boot! We were not able to build correctly working L2 cache
 loaded u-boot for P2020 :-( ).
 3. Has anybody implemented the initialization procedure for that
 memory for u-boot?

Well, it seems that the integrated DDR controller is able to perform
the full initialization procedure with DLL reset.
Anyway we are not able to read data written into the DDR.

Could someone share the correct P2020 DDR controller settings for
MT47H64M16HR-25E working with 667MT/s rate?
--
TIA  Regards,
Wojtek
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/4] mmc: Change board_mmc_getcd() signature.

2011-12-09 Thread Marek Vasut
By signature you mean signedness ?

 The new API no longer uses the extra cd parameter that was used to store
 the card presence state. Instead, this information is returned via the
 function's return value. board_mmc_getcd() returns -1 to indicate that
 no card-detection mechanism is implemented; 0 indicates that no card is
 present and 1 is returned if it was detected that a card is present.
 
 The rationale for this change can be found in the following email
 thread:
 
   http://lists.denx.de/pipermail/u-boot/2011-November/110180.html
 
 In summary, the old API was not consistent with the rest of the MMC API
 which always passes a struct mmc as the first parameter. Furthermore the
 cd parameter was used to mean card absence in some implementations and
 card presence in others.
 
 Signed-off-by: Thierry Reding thierry.red...@avionic-design.de
 ---
  board/efikamx/efikamx.c |8 +++-
  board/emk/top9000/top9000.c |   12 ++--
  board/freescale/mx51evk/mx51evk.c   |8 +++-
  board/freescale/mx53ard/mx53ard.c   |8 +++-
  board/freescale/mx53evk/mx53evk.c   |8 +++-
  board/freescale/mx53loco/mx53loco.c |8 +++-
  board/freescale/mx53smd/mx53smd.c   |6 ++
  doc/README.atmel_mci|   12 ++--
  drivers/mmc/fsl_esdhc.c |8 +---
  drivers/mmc/mmc.c   |4 ++--
  include/mmc.h   |2 +-
  11 files changed, 29 insertions(+), 55 deletions(-)
 
 diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c
 index b78bf6c..451d709 100644
 --- a/board/efikamx/efikamx.c
 +++ b/board/efikamx/efikamx.c
 @@ -309,17 +309,15 @@ static inline uint32_t efika_mmc_cd(void)
   return MX51_PIN_EIM_CS2;
  }
 
 -int board_mmc_getcd(u8 *absent, struct mmc *mmc)
 +int board_mmc_getcd(struct mmc *mmc)
  {
   struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
   uint32_t cd = efika_mmc_cd();
 
   if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR)
 - *absent = gpio_get_value(IOMUX_TO_GPIO(cd));
 - else
 - *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));
 + return !gpio_get_value(IOMUX_TO_GPIO(cd));
 
 - return 0;
 + return !gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));

int ret;

if (cfg-...)
  ret = ...
else
  ret = ...

return ret;


  }
 
  int board_mmc_init(bd_t *bis)
 diff --git a/board/emk/top9000/top9000.c b/board/emk/top9000/top9000.c
 index 61dee62..d156e32 100644
 --- a/board/emk/top9000/top9000.c
 +++ b/board/emk/top9000/top9000.c
 @@ -108,17 +108,9 @@ int board_mmc_init(bd_t *bd)
  }
 
  /* this is a weak define that we are overriding */
 -int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 +int board_mmc_getcd(struct mmc *mmc)
  {
 - /*
 -  * the only currently existing use of this function
 -  * (fsl_esdhc.c) suggests this function must return
 -  * *cs = TRUE if a card is NOT detected - in most
 -  * cases the value of the pin when the detect switch
 -  * closes to GND
 -  */
 - *cd = at91_get_gpio_value(CONFIG_SYS_MMC_CD_PIN) ? 1 : 0;
 - return 0;
 + return !at91_get_gpio_value(CONFIG_SYS_MMC_CD_PIN);
  }
 
  #endif
 diff --git a/board/freescale/mx51evk/mx51evk.c
 b/board/freescale/mx51evk/mx51evk.c index 37e6e4d..bc03496 100644
 --- a/board/freescale/mx51evk/mx51evk.c
 +++ b/board/freescale/mx51evk/mx51evk.c
 @@ -261,16 +261,14 @@ static void power_init(void)
  }
 
  #ifdef CONFIG_FSL_ESDHC
 -int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 +int board_mmc_getcd(struct mmc *mmc)
  {
   struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
 
   if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR)
 - *cd = gpio_get_value(0);
 - else
 - *cd = gpio_get_value(6);
 + return !gpio_get_value(0);
 
 - return 0;
 + return !gpio_get_value(6);

DTTO

  }
 
  int board_mmc_init(bd_t *bis)
 diff --git a/board/freescale/mx53ard/mx53ard.c
 b/board/freescale/mx53ard/mx53ard.c index be32aee..786770a 100644
 --- a/board/freescale/mx53ard/mx53ard.c
 +++ b/board/freescale/mx53ard/mx53ard.c
 @@ -83,16 +83,14 @@ struct fsl_esdhc_cfg esdhc_cfg[2] = {
   {MMC_SDHC2_BASE_ADDR, 1 },
  };
 
 -int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 +int board_mmc_getcd(struct mmc *mmc)
  {
   struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
 
   if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR)
 - *cd = gpio_get_value(1); /*GPIO1_1*/
 - else
 - *cd = gpio_get_value(4); /*GPIO1_4*/
 + return !gpio_get_value(1); /*GPIO1_1*/
 
 - return 0;
 + return !gpio_get_value(4); /*GPIO1_4*/

DTTO here please, also add spaces into the comment ... /* GPIO1_4 */

  }
 
  int board_mmc_init(bd_t *bis)
 diff --git a/board/freescale/mx53evk/mx53evk.c
 b/board/freescale/mx53evk/mx53evk.c index 335661f..a4cd983 100644
 --- a/board/freescale/mx53evk/mx53evk.c
 +++ 

Re: [U-Boot] [PATCH v2 1/4] mmc: Change board_mmc_getcd() signature.

2011-12-09 Thread Thierry Reding
* Marek Vasut wrote:
 By signature you mean signedness ?

No, I mean signature as synonymous to function prototype.

[...]
  -int board_mmc_getcd(u8 *absent, struct mmc *mmc)
  +int board_mmc_getcd(struct mmc *mmc)
   {
  struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
  uint32_t cd = efika_mmc_cd();
  
  if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR)
  -   *absent = gpio_get_value(IOMUX_TO_GPIO(cd));
  -   else
  -   *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));
  +   return !gpio_get_value(IOMUX_TO_GPIO(cd));
  
  -   return 0;
  +   return !gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));
 
 int ret;
 
 if (cfg-...)
   ret = ...
 else
   ret = ...
 
 return ret;

That'll require an extra variable and will actually be longer. I don't see
any advantage in converting it.

 DTTO here please, also add spaces into the comment ... /* GPIO1_4 */

I was going to keep that as it was, but I guess since I'm already changing
the line I can as well clean it up.

Thierry


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


Re: [U-Boot] [PATCH 5/5] mtd/nand: workaround for Freescale FCM to support 4k pagesize Nand chip

2011-12-09 Thread LiuShuo

于 2011年12月09日 16:27, Marek Vasut 写道:

于 2011年12月09日 00:37, Marek Vasut 写道:

Freescale FCM controller has a 2K size limitation of buffer RAM. In
order to support the Nand flash chip whose page size is larger than 2K
bytes, we read/write 2k data repeatedly by issuing FIR_OP_RB/FIR_OP_WB
and save them to a large buffer.

Signed-off-by: Shengzhou Liushengzhou@freescale.com
Signed-off-by: Liu Shuob35...@freescale.com
---

   drivers/mtd/nand/fsl_elbc_nand.c |  279

+ 1 files changed, 248
insertions(+), 31 deletions(-)

diff --git a/drivers/mtd/nand/fsl_elbc_nand.c
b/drivers/mtd/nand/fsl_elbc_nand.c index 52362b1..3983c8c 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -64,7 +64,6 @@ struct fsl_elbc_mtd {

struct device *dev;
int bank;   /* Chip select bank number   */
u8 __iomem *vbase;  /* Chip select base virtual address  */

-   int page_size;  /* NAND page size (0=512, 1=2048)*/

unsigned int fmr;   /* FCM Flash Mode Register value */

   };

@@ -85,6 +84,8 @@ struct fsl_elbc_ctrl {

unsigned int mdr;/* UPM/FCM Data Register value   */
unsigned int use_mdr;/* Non zero if the MDR is to be set  */
unsigned int oob;/* Non zero if operating on OOB data */

+   char *buffer;/* just used when pagesize is greater*/

Start sentence with capital letter


+/* than FCM RAM 2K limitation*/

   };

   /* These map to the positions used by the FCM hardware ECC generator
   */

@@ -159,6 +160,44 @@ static struct nand_bbt_descr bbt_mirror_descr = {

.pattern = mirror_pattern,

   };

+static void io_to_buffer(struct mtd_info *mtd, int subpage, int oob)
+{
+   struct nand_chip *chip = mtd-priv;
+   struct fsl_elbc_mtd *priv = chip-priv;
+   struct fsl_elbc_ctrl *ctrl = priv-ctrl;
+   void *src, *dst;
+   int len = (oob ? 64 : 2048);

No parenthesis ...


+
+   /* for emulating 4096+ bytes NAND using 2048-byte FCM RAM */
+   if (oob)
+   dst = ctrl-buffer + mtd-writesize + subpage * 64;
+   else
+   dst = ctrl-buffer + subpage * 2048;

subpage * len ?

dst = ctrl-buffer + (oob ? mtd-writesize : 0) + subpage * len ?
Is this important ? I think it is ok.

dst = ctrl-buffer + subpage * len;

if (oob)
dst += mtd-writesize;

it's important, this code looks like mess. You introduce len and don't use it
anywhere then ?

memcpy_fromio(dst, src, len);

-Liu Shuo

M




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


Re: [U-Boot] [PATCH V3] 5PC2XX: Rename S5pc2XX to exynos

2011-12-09 Thread Minkyu Kang
Dear Chander Kashyap,

On 7 December 2011 18:34, Chander Kashyap chander.kash...@linaro.org wrote:
 As per new naming convention for Samsung SoC's, all Cortex-A9 and Cortex-A15
 based SoC's will be classified under the name Exynos. Cortex-A9 and Cortex-A15
 based SoC's will be sub-classified as Exynos4 and Exynos5 respectively.

 In order to better adapt and reuse code across various upcoming Samsung Exynos
 based boards, all uses of s5pc210 prefix/suffix/directory-names are renamed in
 this patch. s5pc210 is renamed as exynos4210 and S5PC210/s5pc210 suffix/prefix
 are renamed as exynos4/EXYNOS4.

 Signed-off-by: Chander Kashyap chander.kash...@linaro.org
 ---
 Changes for v2:
        - Removed renaming of s5p-common to exynos4-common
        - Renamed s5pc210 prefixes to exynos4210
 Changes for v3:
        - Dropped number 4 in exenos4.

 Rebased on following commit.
 19cdfd3e84bff108febb127b598ac3f1634c768c
 Ethernut 5 board support

  MAINTAINERS                                        |    6 +-
  Makefile                                           |    2 +-
  arch/arm/cpu/armv7/{s5pc2xx = exynos}/Makefile    |    0
  arch/arm/cpu/armv7/{s5pc2xx = exynos}/clock.c     |   50 
  arch/arm/cpu/armv7/{s5pc2xx = exynos}/soc.c       |    0
  .../asm/{arch-s5pc2xx = arch-exynos}/adc.h        |    0
  .../asm/{arch-s5pc2xx = arch-exynos}/clk.h        |    0
  .../asm/{arch-s5pc2xx = arch-exynos}/clock.h      |    2 +-
  .../asm/{arch-s5pc2xx = arch-exynos}/cpu.h        |   64 
 ++--
  .../asm/{arch-s5pc2xx = arch-exynos}/gpio.h       |   28 
  .../asm/{arch-s5pc2xx = arch-exynos}/mmc.h        |    0
  .../asm/{arch-s5pc2xx = arch-exynos}/pwm.h        |    0
  .../asm/{arch-s5pc2xx = arch-exynos}/sromc.h      |    0
  .../asm/{arch-s5pc2xx = arch-exynos}/sys_proto.h  |    0
  .../asm/{arch-s5pc2xx = arch-exynos}/uart.h       |    0
  board/samsung/origen/lowlevel_init.S               |   26 
  board/samsung/origen/mem_setup.S                   |   12 ++--
  board/samsung/origen/origen.c                      |    8 +-
  board/samsung/origen/origen_setup.h                |    8 +-
  board/samsung/smdkv310/lowlevel_init.S             |   22 
  board/samsung/smdkv310/mem_setup.S                 |    8 +-
  board/samsung/smdkv310/smdkv310.c                  |    8 +-
  board/samsung/universal_c210/lowlevel_init.S       |   24 
  board/samsung/universal_c210/universal.c           |    8 +-
  boards.cfg                                         |    6 +-
  include/configs/origen.h                           |    6 +-
  include/configs/s5pc210_universal.h                |   10 ++--
  include/configs/smdkv310.h                         |    6 +-
  28 files changed, 152 insertions(+), 152 deletions(-)
  rename arch/arm/cpu/armv7/{s5pc2xx = exynos}/Makefile (100%)
  rename arch/arm/cpu/armv7/{s5pc2xx = exynos}/clock.c (81%)
  rename arch/arm/cpu/armv7/{s5pc2xx = exynos}/soc.c (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/adc.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/clk.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/clock.h (99%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/cpu.h (64%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/gpio.h (84%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/mmc.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/pwm.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/sromc.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/sys_proto.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/uart.h (100%)


applied to u-boot-samsung

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


Re: [U-Boot] [PATCH 5/5] mtd/nand: workaround for Freescale FCM to support 4k pagesize Nand chip

2011-12-09 Thread Marek Vasut
 于 2011年12月09日 16:27, Marek Vasut 写道:
  于 2011年12月09日 00:37, Marek Vasut 写道:
  Freescale FCM controller has a 2K size limitation of buffer RAM. In
  order to support the Nand flash chip whose page size is larger than 2K
  bytes, we read/write 2k data repeatedly by issuing FIR_OP_RB/FIR_OP_WB
  and save them to a large buffer.
  
  Signed-off-by: Shengzhou Liushengzhou@freescale.com
  Signed-off-by: Liu Shuob35...@freescale.com
  ---
  
 drivers/mtd/nand/fsl_elbc_nand.c |  279
  
  + 1 files changed, 248
  insertions(+), 31 deletions(-)
  
  diff --git a/drivers/mtd/nand/fsl_elbc_nand.c
  b/drivers/mtd/nand/fsl_elbc_nand.c index 52362b1..3983c8c 100644
  --- a/drivers/mtd/nand/fsl_elbc_nand.c
  +++ b/drivers/mtd/nand/fsl_elbc_nand.c
  @@ -64,7 +64,6 @@ struct fsl_elbc_mtd {
  
   struct device *dev;
   int bank;   /* Chip select bank number   */
   u8 __iomem *vbase;  /* Chip select base virtual address  */
  
  -int page_size;  /* NAND page size (0=512, 1=2048)*/
  
   unsigned int fmr;   /* FCM Flash Mode Register value */
 
 };
  
  @@ -85,6 +84,8 @@ struct fsl_elbc_ctrl {
  
   unsigned int mdr;/* UPM/FCM Data Register value 
   
   */ unsigned int use_mdr;/* Non zero if the MDR is to be set 
   
  */ unsigned int oob;/* Non zero if operating on OOB
   data */
  
  +char *buffer;/* just used when pagesize is greater  

*/
  
  Start sentence with capital letter
  
  + /* than FCM RAM 2K limitation  

*/
  
 };
 
 /* These map to the positions used by the FCM hardware ECC
 generator */
  
  @@ -159,6 +160,44 @@ static struct nand_bbt_descr bbt_mirror_descr = {
  
   .pattern = mirror_pattern,
 
 };
  
  +static void io_to_buffer(struct mtd_info *mtd, int subpage, int oob)
  +{
  +struct nand_chip *chip = mtd-priv;
  +struct fsl_elbc_mtd *priv = chip-priv;
  +struct fsl_elbc_ctrl *ctrl = priv-ctrl;
  +void *src, *dst;
  +int len = (oob ? 64 : 2048);
  
  No parenthesis ...
  
  +
  +/* for emulating 4096+ bytes NAND using 2048-byte FCM RAM */
  +if (oob)
  +dst = ctrl-buffer + mtd-writesize + subpage * 64;
  +else
  +dst = ctrl-buffer + subpage * 2048;
  
  subpage * len ?
  
  dst = ctrl-buffer + (oob ? mtd-writesize : 0) + subpage * len ?
  Is this important ? I think it is ok.
  
  dst = ctrl-buffer + subpage * len;
  
  if (oob)
  
  dst += mtd-writesize;
  
  it's important, this code looks like mess. You introduce len and don't
  use it anywhere then ?
 
 memcpy_fromio(dst, src, len);

Ok, why not use it consistently then.

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


Re: [U-Boot] [PATCH v2 1/4] mmc: Change board_mmc_getcd() signature.

2011-12-09 Thread Marek Vasut
 * Marek Vasut wrote:
  By signature you mean signedness ?
 
 No, I mean signature as synonymous to function prototype.

Please say so then, it was slightly confusing.
 
 [...]
 
   -int board_mmc_getcd(u8 *absent, struct mmc *mmc)
   +int board_mmc_getcd(struct mmc *mmc)
   
{

 struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
 uint32_t cd = efika_mmc_cd();
 
 if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR)
   
   - *absent = gpio_get_value(IOMUX_TO_GPIO(cd));
   - else
   - *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));
   + return !gpio_get_value(IOMUX_TO_GPIO(cd));
   
   - return 0;
   + return !gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));
  
  int ret;
  
  if (cfg-...)
  
ret = ...
  
  else
  
ret = ...
  
  return ret;
 
 That'll require an extra variable and will actually be longer. I don't see
 any advantage in converting it.

It's slightly more readable IMO, but that's a matter of personal taste so I'd 
like others to comment on this one.

 
  DTTO here please, also add spaces into the comment ... /* GPIO1_4 */
 
 I was going to keep that as it was, but I guess since I'm already changing
 the line I can as well clean it up.
 
 Thierry

Thanks!

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


Re: [U-Boot] [PATCH] M28: Cleanup memsize.o OOT build

2011-12-09 Thread Stefano Babic
On 08/12/2011 13:27, Marek Vasut wrote:
 Signed-off-by: Marek Vasut marek.va...@gmail.com
 Cc: Wolfgang Denk w...@denx.de
 Cc: Detlev Zundel d...@denx.de
 Cc: Stefano Babic sba...@denx.de
 ---

Hi Marek,

  arch/arm/cpu/arm926ejs/mx28/Makefile   |7 +--
  arch/arm/cpu/arm926ejs/mx28/spl_boot.c |   13 ++---
  arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds |   12 ++--
  include/configs/m28evk.h   |2 ++
  4 files changed, 11 insertions(+), 23 deletions(-)
 

It seems to me that your patch does much more as what you describe in
the commit message.

 diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c 
 b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c
 index 3cd4c24..dfb8309 100644
 --- a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c
 +++ b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c
 @@ -68,17 +68,8 @@ inline void board_init_r(gd_t *id, ulong dest_addr)
   ;
  }
  
 -inline int printf(const char *fmt, ...)
 -{
 - return 0;
 -}
 -
 -inline void __coloured_LED_init(void) {}
 -inline void __red_LED_on(void) {}
 -void coloured_LED_init(void)
 - __attribute__((weak, alias(__coloured_LED_init)));
 -void red_LED_on(void)
 - __attribute__((weak, alias(__red_LED_on)));
 +void serial_putc(const char c) {}
 +void serial_puts(const char *s) {}

Make a note in the commit message about these changes (not related to
the subject)

  void hang(void) __attribute__ ((noreturn));
  void hang(void)
  {
 diff --git a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds 
 b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds
 index 893320f..0fccd52 100644
 --- a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds
 +++ b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds
 @@ -67,16 +67,16 @@ SECTIONS
   *(.dynsym)
   }
  
 - _end = .;
 -
 - .bss __rel_dyn_start (OVERLAY) : {
 + .bss : {
 + . = ALIGN(4);
   __bss_start = .;
 - *(.bss)
 -  . = ALIGN(4);
 + *(.bss*)
 + . = ALIGN(4);
   __bss_end__ = .;
   }
  
 - /DISCARD/ : { *(.bss*) }
 + _end = .;
 +
   /DISCARD/ : { *(.dynstr*) }
   /DISCARD/ : { *(.dynsym*) }
   /DISCARD/ : { *(.dynamic*) }

However, these change fix another issue. You want to cleanup
u-boot-spl.lds, but then there are some other parts I cannot understand.
For example, why is __u_boot_cmd_start = needed ?

If your goal is to cleanup the linker file, please submit a separate
patch removing also the unused sections in SPL.

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] please pull u-boot-samsung/master

2011-12-09 Thread Minkyu Kang
Dear Albert,

The following changes since commit 15422043c4a213dc5d7d59a337be1ab34c9b2e7f:

  davinci: Remove unwanted memsize.c from hawkboard's nand spl build
(2011-12-06 23:59:41 +0100)

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

Chander Kashyap (1):
  S5PC2XX: Rename S5pc2XX to exynos

 MAINTAINERS|6 +-
 Makefile   |2 +-
 arch/arm/cpu/armv7/{s5pc2xx = exynos}/Makefile|0
 arch/arm/cpu/armv7/{s5pc2xx = exynos}/clock.c |   50 
 arch/arm/cpu/armv7/{s5pc2xx = exynos}/soc.c   |0
 .../asm/{arch-s5pc2xx = arch-exynos}/adc.h|0
 .../asm/{arch-s5pc2xx = arch-exynos}/clk.h|0
 .../asm/{arch-s5pc2xx = arch-exynos}/clock.h  |2 +-
 .../asm/{arch-s5pc2xx = arch-exynos}/cpu.h|   64 ++--
 .../asm/{arch-s5pc2xx = arch-exynos}/gpio.h   |   28 
 .../asm/{arch-s5pc2xx = arch-exynos}/mmc.h|0
 .../asm/{arch-s5pc2xx = arch-exynos}/pwm.h|0
 .../asm/{arch-s5pc2xx = arch-exynos}/sromc.h  |0
 .../asm/{arch-s5pc2xx = arch-exynos}/sys_proto.h  |0
 .../asm/{arch-s5pc2xx = arch-exynos}/uart.h   |0
 board/samsung/origen/lowlevel_init.S   |   26 
 board/samsung/origen/mem_setup.S   |   12 ++--
 board/samsung/origen/origen.c  |8 +-
 board/samsung/origen/origen_setup.h|8 +-
 board/samsung/smdkv310/lowlevel_init.S |   22 
 board/samsung/smdkv310/mem_setup.S |8 +-
 board/samsung/smdkv310/smdkv310.c  |8 +-
 board/samsung/universal_c210/lowlevel_init.S   |   24 
 board/samsung/universal_c210/universal.c   |8 +-
 boards.cfg |6 +-
 include/configs/origen.h   |6 +-
 include/configs/s5pc210_universal.h|   10 ++--
 include/configs/smdkv310.h |6 +-
 28 files changed, 152 insertions(+), 152 deletions(-)
 rename arch/arm/cpu/armv7/{s5pc2xx = exynos}/Makefile (100%)
 rename arch/arm/cpu/armv7/{s5pc2xx = exynos}/clock.c (81%)
 rename arch/arm/cpu/armv7/{s5pc2xx = exynos}/soc.c (100%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/adc.h (100%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/clk.h (100%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/clock.h (99%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/cpu.h (64%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/gpio.h (84%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/mmc.h (100%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/pwm.h (100%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/sromc.h (100%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/sys_proto.h (100%)
 rename arch/arm/include/asm/{arch-s5pc2xx = arch-exynos}/uart.h (100%)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/5] mtd/nand: workaround for Freescale FCM to support 4k pagesize Nand chip

2011-12-09 Thread LiuShuo

于 2011年12月09日 17:11, Marek Vasut 写道:

于 2011年12月09日 16:27, Marek Vasut 写道:

于 2011年12月09日 00:37, Marek Vasut 写道:

Freescale FCM controller has a 2K size limitation of buffer RAM. In
order to support the Nand flash chip whose page size is larger than 2K
bytes, we read/write 2k data repeatedly by issuing FIR_OP_RB/FIR_OP_WB
and save them to a large buffer.

Signed-off-by: Shengzhou Liushengzhou@freescale.com
Signed-off-by: Liu Shuob35...@freescale.com
---

drivers/mtd/nand/fsl_elbc_nand.c |  279

+ 1 files changed, 248
insertions(+), 31 deletions(-)

diff --git a/drivers/mtd/nand/fsl_elbc_nand.c
b/drivers/mtd/nand/fsl_elbc_nand.c index 52362b1..3983c8c 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -64,7 +64,6 @@ struct fsl_elbc_mtd {

struct device *dev;
int bank;   /* Chip select bank number   */
u8 __iomem *vbase;  /* Chip select base virtual address  */

-   int page_size;  /* NAND page size (0=512, 1=2048)*/

unsigned int fmr;   /* FCM Flash Mode Register value */

};

@@ -85,6 +84,8 @@ struct fsl_elbc_ctrl {

unsigned int mdr;/* UPM/FCM Data Register value
*/ unsigned int use_mdr;/* Non zero if the MDR is to be set
   */ unsigned int oob;/* Non zero if operating on OOB
data */

+   char *buffer;/* just used when pagesize is greater

*/

Start sentence with capital letter


+/* than FCM RAM 2K limitation  

*/

};

/* These map to the positions used by the FCM hardware ECC
generator */

@@ -159,6 +160,44 @@ static struct nand_bbt_descr bbt_mirror_descr = {

.pattern = mirror_pattern,

};

+static void io_to_buffer(struct mtd_info *mtd, int subpage, int oob)
+{
+   struct nand_chip *chip = mtd-priv;
+   struct fsl_elbc_mtd *priv = chip-priv;
+   struct fsl_elbc_ctrl *ctrl = priv-ctrl;
+   void *src, *dst;
+   int len = (oob ? 64 : 2048);

No parenthesis ...


+
+   /* for emulating 4096+ bytes NAND using 2048-byte FCM RAM */
+   if (oob)
+   dst = ctrl-buffer + mtd-writesize + subpage * 64;
+   else
+   dst = ctrl-buffer + subpage * 2048;

subpage * len ?

dst = ctrl-buffer + (oob ? mtd-writesize : 0) + subpage * len ?
Is this important ? I think it is ok.

dst = ctrl-buffer + subpage * len;

if (oob)

dst += mtd-writesize;

it's important, this code looks like mess. You introduce len and don't
use it anywhere then ?

memcpy_fromio(dst, src, len);

Ok, why not use it consistently then.

I think it is pellucid. I still don't think it is very important.

- LiuShuo


M



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


Re: [U-Boot] [PATCH 1/3] USB: Squash checkpatch warnings in usb_kbd.c

2011-12-09 Thread Wolfgang Denk
Dear Marek Vasut,

In message 1318260867-5606-2-git-send-email-marek.va...@gmail.com you wrote:
 Signed-off-by: Marek Vasut marek.va...@gmail.com
 Cc: Mike Frysinger vap...@gentoo.org
 Cc: Remy Bohmer li...@bohmer.net
 Cc: Wolfgang Denk w...@denx.de
 ---
  common/usb_kbd.c |  608 
 --
  1 files changed, 319 insertions(+), 289 deletions(-)

Applied (after rebasing to current code), thanks.

Remy, I hope this is OK with you. Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
[Braddock:] Mr. Churchill, you are drunk.
[Churchill:] And you madam, are ugly.  But I shall be sober tomorrow.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings

2011-12-09 Thread Wolfgang Denk
Dear Stefan Roese,

In message 1321380112-6210-1-git-send-email...@denx.de you wrote:
 Fix:
 usbdev.c: In function 'process_endpoints':
 usbdev.c:29:12: warning: variable 'temp1' set but not used 
 [-Wunused-but-set-variable]
 usbdev.c:29:6: warning: variable 'temp' set but not used 
 [-Wunused-but-set-variable]
 
 Signed-off-by: Stefan Roese s...@denx.de
...
 @@ -44,8 +43,6 @@ void process_endpoints(unsigned short usb2d0_intrin)
   /*copy packet */
   setup_packet_pt[0] = *(unsigned int *)USB2D0_FIFO_0;
   setup_packet_pt[1] = *(unsigned int *)USB2D0_FIFO_0;
 - temp = *(unsigned int *)USB2D0_FIFO_0;
 - temp1 = *(unsigned int *)USB2D0_FIFO_0;

It seems we agree that these reads from the FIFO registers may
actually be important for proper operation. Are you planning to
submit an updated, improved patch?

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
Is truth not truth for all?
-- Natira, For the World is Hollow and I have Touched
   the Sky, stardate 5476.4.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] Fix warnings in arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c

2011-12-09 Thread Wolfgang Denk
Dear Simon Glass,

In message 1321417027-5639-1-git-send-email-...@chromium.org you wrote:
 Sorry if this is already fixed somewhere - I could not find it.
 
 This fixes these warnings:
 
 usb_ohci.c: In function 'submit_control_msg':
 usb_ohci.c:1081: warning: dereferencing pointer 'data_buf.76' does break 
 strict-aliasing rules
 usb_ohci.c:1081: note: initialized from here
 usb_ohci.c:1084: warning: dereferencing pointer 'data_buf.76' does break 
 strict-aliasing rules
 usb_ohci.c:1084: note: initialized from here
 usb_ohci.c:1087: warning: dereferencing pointer 'data_buf.76' does break 
 strict-aliasing rules
 usb_ohci.c:1087: note: initialized from here
 
 Signed-off-by: Simon Glass s...@chromium.org
 ---
  arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c |   20 
  1 files changed, 12 insertions(+), 8 deletions(-)

Applied, thanks.

Albert, Remy - hope this is OK with you.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If God wanted me to touch my toes, he'd have put them on my knees.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] drivers/usb/host/ehci-mxc.c: Fix GCC 4.6 warning

2011-12-09 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message 1321733433-6050-1-git-send-email-ag...@denx.de you wrote:
 Fix:
 ehci-mxc.c: In function 'ehci_hcd_init':
 ehci-mxc.c:113:6: warning: variable 'tmp' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Anatolij Gustschin ag...@denx.de
 ---
  drivers/usb/host/ehci-mxc.c |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

Applied, thanks.

Remy, you wrote you had applied this to u-boot-usb, so this is
probably OK with you.  Sorry that I did not want to wait any longer
for your pull request, at least not for these simple fixes.

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

Das machine is nicht fur gefingerpoken und  mittengrabben.  Ist  easy
schnappen der springenwerk, blowenfusen und corkenpoppen mit spitzen-
sparken.  Ist  nicht fur gewerken by das dummkopfen. Das rubbernecken
sightseeren keepen hands  in  das  pockets.  Relaxen  und  vatch  das
blinkenlights!!!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/9] drivers/usb/musb/musb_udc.c: Fix GCC 4.6 warning

2011-12-09 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message 1322930775-4767-4-git-send-email-ag...@denx.de you wrote:
 Fix:
 musb_udc.c: In function 'musb_peri_softconnect':
 musb_udc.c:166:14: warning: variable 'intrtx' set but not used
 [-Wunused-but-set-variable]
 musb_udc.c:166:6: warning: variable 'intrrx' set but not used
 [-Wunused-but-set-variable]
 musb_udc.c:165:5: warning: variable 'intrusb' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Anatolij Gustschin ag...@denx.de
 Cc: Remy Bohmer li...@bohmer.net
 ---
  drivers/usb/musb/musb_udc.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
Everyone who comes in here wants three things:
1. They want it quick.
2. They want it good.
3. They want it cheap.
I tell 'em to pick two and call me back.
- sign on the back wall of a small printing company in Delaware
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/9] drivers/usb/gadget/core.c: Fix GCC 4.6 warning

2011-12-09 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message 1322930775-4767-5-git-send-email-ag...@denx.de you wrote:
 Fix:
 core.c: In function 'usbd_device_event_irq':
 core.c:596:21: warning: variable 'state' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Anatolij Gustschin ag...@denx.de
 Cc: Remy Bohmer li...@bohmer.net
 ---
  drivers/usb/gadget/core.c |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A girl with a future avoids the man with a past.
   -- Evan Esar, The Humor of Humor
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/9] drivers/usb/gadget/ep0.c: Fix GCC 4.6 warning

2011-12-09 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message 1322930775-4767-6-git-send-email-ag...@denx.de you wrote:
 Fix:
 ep0.c: In function 'ep0_get_descriptor':
 ep0.c:187:8: warning: variable 'cp' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Anatolij Gustschin ag...@denx.de
 Cc: Remy Bohmer li...@bohmer.net
 ---
  drivers/usb/gadget/ep0.c |2 --
  1 files changed, 0 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
In theory, there is no difference between  theory  and  practice.  In
practice, however, there is.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings

2011-12-09 Thread Stefan Roese
Hi Wolfgang,

On Friday 09 December 2011 10:31:01 Wolfgang Denk wrote:
 In message 1321380112-6210-1-git-send-email...@denx.de you wrote:
  Fix:
  usbdev.c: In function 'process_endpoints':
  usbdev.c:29:12: warning: variable 'temp1' set but not used
  [-Wunused-but-set-variable] usbdev.c:29:6: warning: variable 'temp' set
  but not used [-Wunused-but-set-variable]
  
  Signed-off-by: Stefan Roese s...@denx.de
 
 ...
 
  @@ -44,8 +43,6 @@ void process_endpoints(unsigned short usb2d0_intrin)
  
  /*copy packet */
  setup_packet_pt[0] = *(unsigned int *)USB2D0_FIFO_0;
  setup_packet_pt[1] = *(unsigned int *)USB2D0_FIFO_0;
  
  -   temp = *(unsigned int *)USB2D0_FIFO_0;
  -   temp1 = *(unsigned int *)USB2D0_FIFO_0;
 
 It seems we agree that these reads from the FIFO registers may
 actually be important for proper operation. Are you planning to
 submit an updated, improved patch?

This file has been removed with patch ce2acd371c4eee36e55d706a181361c25ebfe160 
already in mainline.

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] [PATCH 5/5] mtd/nand: workaround for Freescale FCM to support 4k pagesize Nand chip

2011-12-09 Thread Marek Vasut
 于 2011年12月09日 17:11, Marek Vasut 写道:
  于 2011年12月09日 16:27, Marek Vasut 写道:
  于 2011年12月09日 00:37, Marek Vasut 写道:
  Freescale FCM controller has a 2K size limitation of buffer RAM. In
  order to support the Nand flash chip whose page size is larger than
  2K bytes, we read/write 2k data repeatedly by issuing
  FIR_OP_RB/FIR_OP_WB and save them to a large buffer.
  
  Signed-off-by: Shengzhou Liushengzhou@freescale.com
  Signed-off-by: Liu Shuob35...@freescale.com
  ---
  
  drivers/mtd/nand/fsl_elbc_nand.c |  279
  
  + 1 files changed, 248
  insertions(+), 31 deletions(-)
  
  diff --git a/drivers/mtd/nand/fsl_elbc_nand.c
  b/drivers/mtd/nand/fsl_elbc_nand.c index 52362b1..3983c8c 100644
  --- a/drivers/mtd/nand/fsl_elbc_nand.c
  +++ b/drivers/mtd/nand/fsl_elbc_nand.c
  @@ -64,7 +64,6 @@ struct fsl_elbc_mtd {
  
 struct device *dev;
 int bank;   /* Chip select bank number   */
 u8 __iomem *vbase;  /* Chip select base virtual address  */
  
  -  int page_size;  /* NAND page size (0=512, 1=2048)*/
  
 unsigned int fmr;   /* FCM Flash Mode Register value */
  
  };
  
  @@ -85,6 +84,8 @@ struct fsl_elbc_ctrl {
  
 unsigned int mdr;/* UPM/FCM Data Register value
 */ unsigned int use_mdr;/* Non zero if the MDR is to be set
 
*/ unsigned int oob;/* Non zero if operating on OOB
 
 data */
  
  +  char *buffer;/* just used when pagesize is greater
  
  */
  
  Start sentence with capital letter
  
  +   /* than FCM RAM 2K limitation
  
  */
  
  };
  
  /* These map to the positions used by the FCM hardware ECC
  generator */
  
  @@ -159,6 +160,44 @@ static struct nand_bbt_descr bbt_mirror_descr =
  {
  
 .pattern = mirror_pattern,
  
  };
  
  +static void io_to_buffer(struct mtd_info *mtd, int subpage, int
  oob) +{
  +  struct nand_chip *chip = mtd-priv;
  +  struct fsl_elbc_mtd *priv = chip-priv;
  +  struct fsl_elbc_ctrl *ctrl = priv-ctrl;
  +  void *src, *dst;
  +  int len = (oob ? 64 : 2048);
  
  No parenthesis ...
  
  +
  +  /* for emulating 4096+ bytes NAND using 2048-byte FCM RAM */
  +  if (oob)
  +  dst = ctrl-buffer + mtd-writesize + subpage * 64;
  +  else
  +  dst = ctrl-buffer + subpage * 2048;
  
  subpage * len ?
  
  dst = ctrl-buffer + (oob ? mtd-writesize : 0) + subpage * len ?
  Is this important ? I think it is ok.
  
  dst = ctrl-buffer + subpage * len;
  
  if (oob)
  
dst += mtd-writesize;
  
  it's important, this code looks like mess. You introduce len and don't
  use it anywhere then ?
  
  memcpy_fromio(dst, src, len);
  
  Ok, why not use it consistently then.
 
 I think it is pellucid. I still don't think it is very important.

Ok, enough of this stuff, apparently I'm loosing time here. Let's see what 
others think.

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


Re: [U-Boot] [PATCH] M28: Cleanup memsize.o OOT build

2011-12-09 Thread Marek Vasut
 On 08/12/2011 13:27, Marek Vasut wrote:
  Signed-off-by: Marek Vasut marek.va...@gmail.com
  Cc: Wolfgang Denk w...@denx.de
  Cc: Detlev Zundel d...@denx.de
  Cc: Stefano Babic sba...@denx.de
  ---
 
 Hi Marek,
 
   arch/arm/cpu/arm926ejs/mx28/Makefile   |7 +--
   arch/arm/cpu/arm926ejs/mx28/spl_boot.c |   13 ++---
   arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds |   12 ++--
   include/configs/m28evk.h   |2 ++
   4 files changed, 11 insertions(+), 23 deletions(-)
 
 It seems to me that your patch does much more as what you describe in
 the commit message.

Please check V2
 
  diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c
  b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c index 3cd4c24..dfb8309 100644
  --- a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c
  +++ b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c
  @@ -68,17 +68,8 @@ inline void board_init_r(gd_t *id, ulong dest_addr)
  
  ;
   
   }
  
  -inline int printf(const char *fmt, ...)
  -{
  -   return 0;
  -}
  -
  -inline void __coloured_LED_init(void) {}
  -inline void __red_LED_on(void) {}
  -void coloured_LED_init(void)
  -   __attribute__((weak, alias(__coloured_LED_init)));
  -void red_LED_on(void)
  -   __attribute__((weak, alias(__red_LED_on)));
  +void serial_putc(const char c) {}
  +void serial_puts(const char *s) {}
 
 Make a note in the commit message about these changes (not related to
 the subject)

Actually I explained this in V2.
 
   void hang(void) __attribute__ ((noreturn));
   void hang(void)
   {
  
  diff --git a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds
  b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds index 893320f..0fccd52
  100644
  --- a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds
  +++ b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds
  @@ -67,16 +67,16 @@ SECTIONS
  
  *(.dynsym)
  
  }
  
  -   _end = .;
  -
  -   .bss __rel_dyn_start (OVERLAY) : {
  +   .bss : {
  +   . = ALIGN(4);
  
  __bss_start = .;
  
  -   *(.bss)
  -. = ALIGN(4);
  +   *(.bss*)
  +   . = ALIGN(4);
  
  __bss_end__ = .;
  
  }
  
  -   /DISCARD/ : { *(.bss*) }
  +   _end = .;
  +
  
  /DISCARD/ : { *(.dynstr*) }
  /DISCARD/ : { *(.dynsym*) }
  /DISCARD/ : { *(.dynamic*) }
 
 However, these change fix another issue.

Not really actually.

 You want to cleanup
 u-boot-spl.lds, but then there are some other parts I cannot understand.
 For example, why is __u_boot_cmd_start = needed ?

Well, u-boot-spl.lds will need a separate cleanup patch eventually maybe.
 
 If your goal is to cleanup the linker file, please submit a separate
 patch removing also the unused sections in SPL.

Not now, right now my goal is to fix the build issue. Linker file cleanup can 
wait after .12 release.

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


Re: [U-Boot] [PATCH 02/11] MIPS: board.c: fix warning if CONFIG_CMD_NET is not defined

2011-12-09 Thread Wolfgang Denk
Dear Daniel Schwierzeck,

In message 
1322143076-20349-3-git-send-email-daniel.schwierz...@googlemail.com you wrote:
 board.c: In function 'board_init_r':
 board.c:280:8: warning: unused variable 's'
...
   /* Initialize from environment */
   load_addr = getenv_ulong(loadaddr, 16, load_addr);
  #if defined(CONFIG_CMD_NET)
 - s = getenv(bootfile);
 + const char *s = getenv(bootfile);
   if (s)
   copy_filename(BootFile, s, sizeof(BootFile));

We don't allow declarations in the middle of the code.

[This issue has also been fixed since, so no further actiuvity needed.]

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 was playing poker the other night... with Tarot cards. I got a full
house and 4 people died.  - Steven Wright
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/11] MIPS: board.c: make checkpatch.pl clean

2011-12-09 Thread Wolfgang Denk
Dear Daniel Schwierzeck,

In message 
1322143076-20349-2-git-send-email-daniel.schwierz...@googlemail.com you wrote:
 WARNING: line over 80 characters
 WARNING: space prohibited between function name and open parenthesis '('
 WARNING: braces {} are not necessary for single statement blocks
 ERROR: return is not a function, parentheses are not required
 ERROR: do not use assignment in if condition
 ERROR: trailing statements should be on next line
 ERROR: foo * bar should be foo *bar
 ERROR: spaces required around that ':' (ctx:WxV)
 
 Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
 ---
  arch/mips/lib/board.c |  119 
 +
  1 files changed, 61 insertions(+), 58 deletions(-)

Argh.  I missed your patch, and redid this work.  Stupid me :-(

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
To the systems programmer,  users  and  applications  serve  only  to
provide a test load.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/11] MIPS: MAKEALL: fix lists for MIPSel and MIPS boards

2011-12-09 Thread Wolfgang Denk
Dear Daniel Schwierzeck,

In message 
1322143076-20349-12-git-send-email-daniel.schwierz...@googlemail.com you 
wrote:
 Build dbau1550_el only in LIST_au1xx0_el and LIST_mips_el.
 Also remove obsolete lists for mips5kc.
 
 Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
 Cc: Thomas Lange tho...@corelatus.se
 ---
  MAKEALL |   11 ++-
  1 files changed, 2 insertions(+), 9 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
More software projects have gone awry for lack of calendar time than
for all other causes combined.
 - Fred Brooks, Jr., _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] drivers/gpio/da8xx_gpio.c: Fix build warning

2011-12-09 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message 1323294468-13904-1-git-send-email-ag...@denx.de you wrote:
 Fix:
 da8xx_gpio.c: In function 'gpio_toggle_value':
 da8xx_gpio.c:208:23: warning: variable 'bank' set but not used
 [-Wunused-but-set-variable]
 
 Signed-off-by: Anatolij Gustschin ag...@denx.de
 ---
  drivers/gpio/da8xx_gpio.c |3 ---
  1 files changed, 0 insertions(+), 3 deletions(-)

Applied, thanks.

Albert, Sandeep, Tom: hope thisis OK with you.

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 shall reach greater and greater platitudes of achievement.
- Richard J. Daley
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Fix breakage after removing common.h from export.h

2011-12-09 Thread Stefano Babic
commit 0910d0bcb85acdf09b9dfd8ded452367b540a4ad
Mike Partington mpart...@lexmark.com
Date:   Wed Oct 27 10:31:09 2010 +

Standalone Apps: Standalone apps should need only exports.h.

Modify exports.h to remove its dependencies on other files, thus
enabling standalone apps to require only exports.h from the U-Boot
source tree.  This appears to be the intent based on the following
note: http://lists.denx.de/pipermail/u-boot/2010-January/067174.html

breaks all boards - the fact is that common.h is not included anymore
by exports.h, and this breaks the build of several file.

Signed-off-by: Stefano Babic sba...@denx.de
CC: Wolfgang Denk w...@denx.de
CC: Albert Aribaud albert.u.b...@aribaud.net
---
 include/_exports.h |6 --
 include/common.h   |   16 +---
 lib/qsort.c|2 ++
 3 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/include/_exports.h b/include/_exports.h
index 349a3c5..5efcad6 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -24,9 +24,3 @@ EXPORT_FUNC(simple_strtol)
 EXPORT_FUNC(strcmp)
 EXPORT_FUNC(i2c_write)
 EXPORT_FUNC(i2c_read)
-EXPORT_FUNC(spi_init)
-EXPORT_FUNC(spi_setup_slave)
-EXPORT_FUNC(spi_free_slave)
-EXPORT_FUNC(spi_claim_bus)
-EXPORT_FUNC(spi_release_bus)
-EXPORT_FUNC(spi_xfer)
diff --git a/include/common.h b/include/common.h
index 05a658c..e265bd4 100644
--- a/include/common.h
+++ b/include/common.h
@@ -35,6 +35,7 @@ typedef volatile unsigned short vu_short;
 typedef volatile unsigned char vu_char;
 
 #include config.h
+#include assert.h
 #include asm-offsets.h
 #include linux/bitops.h
 #include linux/types.h
@@ -136,21 +137,6 @@ typedef volatile unsigned char vu_char;
 #define debug(fmt, args...)\
debug_cond(_DEBUG, fmt, ##args)
 
-/*
- * An assertion is run-time check done in debug mode only. If DEBUG is not
- * defined then it is skipped. If DEBUG is defined and the assertion fails,
- * then it calls panic*( which may or may not reset/halt U-Boot (see
- * CONFIG_PANIC_HANG), It is hoped that all failing assertions are found
- * before release, and after release it is hoped that they don't matter. But
- * in any case these failing assertions cannot be fixed with a reset (which
- * may just do the same assertion again).
- */
-void __assert_fail(const char *assertion, const char *file, unsigned line,
-  const char *function);
-#define assert(x) \
-   ({ if (!(x)  _DEBUG) \
-   __assert_fail(#x, __FILE__, __LINE__, __func__); })
-
 #define error(fmt, args...) do {   \
printf(ERROR:  fmt \nat %s:%d/%s()\n,   \
##args, __FILE__, __LINE__, __func__);  \
diff --git a/lib/qsort.c b/lib/qsort.c
index 86c392c..5291c8d 100644
--- a/lib/qsort.c
+++ b/lib/qsort.c
@@ -16,6 +16,8 @@
  * bcc and gcc. */
 
 #include linux/types.h
+#include stdarg.h
+#include assert.h
 #include exports.h
 
 void qsort(void  *base,
-- 
1.7.5.4

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


Re: [U-Boot] [PATCH] Fix breakage after removing common.h from export.h

2011-12-09 Thread Stefano Babic
On 09/12/2011 11:23, Stefano Babic wrote:
 commit 0910d0bcb85acdf09b9dfd8ded452367b540a4ad
 Mike Partington mpart...@lexmark.com
 Date:   Wed Oct 27 10:31:09 2010 +
 
 Standalone Apps: Standalone apps should need only exports.h.
 
 Modify exports.h to remove its dependencies on other files, thus
 enabling standalone apps to require only exports.h from the U-Boot
 source tree.  This appears to be the intent based on the following
 note: http://lists.denx.de/pipermail/u-boot/2010-January/067174.html
 
 breaks all boards - the fact is that common.h is not included anymore
 by exports.h, and this breaks the build of several file.
 
 Signed-off-by: Stefano Babic sba...@denx.de
 CC: Wolfgang Denk w...@denx.de
 CC: Albert Aribaud albert.u.b...@aribaud.net
 ---

Sorry, patch is incomplete - please ignore it, I will send V2.

Stefano

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


[U-Boot] [PATCH V2] Fix breakage after removing common.h from export.h

2011-12-09 Thread Stefano Babic
commit 0910d0bcb85acdf09b9dfd8ded452367b540a4ad
Mike Partington mpart...@lexmark.com
Date:   Wed Oct 27 10:31:09 2010 +

Standalone Apps: Standalone apps should need only exports.h.

Modify exports.h to remove its dependencies on other files, thus
enabling standalone apps to require only exports.h from the U-Boot
source tree.  This appears to be the intent based on the following
note: http://lists.denx.de/pipermail/u-boot/2010-January/067174.html

breaks all boards - the fact is that common.h is not included anymore
by exports.h, and this breaks the build of several file.

Signed-off-by: Stefano Babic sba...@denx.de
CC: Wolfgang Denk w...@denx.de
CC: Albert Aribaud albert.u.b...@aribaud.net
---

Changes since V1: V1 broken, ignore it

 include/_exports.h |6 -
 include/assert.h   |   54 
 include/common.h   |   16 +--
 lib/qsort.c|2 +
 4 files changed, 57 insertions(+), 21 deletions(-)
 create mode 100644 include/assert.h

diff --git a/include/_exports.h b/include/_exports.h
index 349a3c5..5efcad6 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -24,9 +24,3 @@ EXPORT_FUNC(simple_strtol)
 EXPORT_FUNC(strcmp)
 EXPORT_FUNC(i2c_write)
 EXPORT_FUNC(i2c_read)
-EXPORT_FUNC(spi_init)
-EXPORT_FUNC(spi_setup_slave)
-EXPORT_FUNC(spi_free_slave)
-EXPORT_FUNC(spi_claim_bus)
-EXPORT_FUNC(spi_release_bus)
-EXPORT_FUNC(spi_xfer)
diff --git a/include/assert.h b/include/assert.h
new file mode 100644
index 000..3f1160b
--- /dev/null
+++ b/include/assert.h
@@ -0,0 +1,54 @@
+/*
+ * (C) Copyright 2011
+ * Stefano Babic, DENX Software Engineering, sba...@denx.de.
+ *
+ * (C) Copyright 2000-2009
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __ASSERT_H
+#define __ASERT_H
+
+#ifndef _DEBUG
+#ifdef DEBUG
+#define _DEBUG 1
+#else
+#define _DEBUG 0
+#endif
+#endif
+
+/*
+ * An assertion is run-time check done in debug mode only. If DEBUG is not
+ * defined then it is skipped. If DEBUG is defined and the assertion fails,
+ * then it calls panic*( which may or may not reset/halt U-Boot (see
+ * CONFIG_PANIC_HANG), It is hoped that all failing assertions are found
+ * before release, and after release it is hoped that they don't matter. But
+ * in any case these failing assertions cannot be fixed with a reset (which
+ * may just do the same assertion again).
+ */
+void __assert_fail(const char *assertion, const char *file, unsigned line,
+  const char *function);
+#define assert(x) \
+   ({ if (!(x)  _DEBUG) \
+   __assert_fail(#x, __FILE__, __LINE__, __func__); })
+
+
+#endif
diff --git a/include/common.h b/include/common.h
index 05a658c..e265bd4 100644
--- a/include/common.h
+++ b/include/common.h
@@ -35,6 +35,7 @@ typedef volatile unsigned short vu_short;
 typedef volatile unsigned char vu_char;
 
 #include config.h
+#include assert.h
 #include asm-offsets.h
 #include linux/bitops.h
 #include linux/types.h
@@ -136,21 +137,6 @@ typedef volatile unsigned char vu_char;
 #define debug(fmt, args...)\
debug_cond(_DEBUG, fmt, ##args)
 
-/*
- * An assertion is run-time check done in debug mode only. If DEBUG is not
- * defined then it is skipped. If DEBUG is defined and the assertion fails,
- * then it calls panic*( which may or may not reset/halt U-Boot (see
- * CONFIG_PANIC_HANG), It is hoped that all failing assertions are found
- * before release, and after release it is hoped that they don't matter. But
- * in any case these failing assertions cannot be fixed with a reset (which
- * may just do the same assertion again).
- */
-void __assert_fail(const char *assertion, const char *file, unsigned line,
-  const char *function);
-#define assert(x) \
-   ({ if (!(x)  _DEBUG) \
-   __assert_fail(#x, __FILE__, __LINE__, __func__); })
-
 #define error(fmt, args...) do {   \
printf(ERROR:  fmt \nat %s:%d/%s()\n,   \
##args, __FILE__, __LINE__, __func__);  \
diff --git a/lib/qsort.c b/lib/qsort.c
index 

[U-Boot] [PATCH v5 0/6] Add an SPL to boot the da850evm from SPI

2011-12-09 Thread Christian Riesch
Hi again,

On Wed, Dec 7, 2011 at 10:32 AM, Christian Riesch christian.rie...@omicron.at 
wrote:
 Hi Tom,

 On Tue, Dec 6, 2011 at 11:17 PM, Tom Rini tom.r...@gmail.com wrote:
 On Tue, Dec 6, 2011 at 10:34 AM, Tom Rini tom.r...@gmail.com wrote:
 [...]
 OK, thanks, I'll chalk it up to my toolchain then.

 After talking with Wolfgang and Albert, we (OK, Wolfgang) found that
 ELDK 4.2 toolchain also shows this issue, so please grab that and
 figure out what's going on here.  Thanks!

 With ELDK 4.2 I got the same error message:

 arm-linux-ld: error: no memory region specified for loadable section
 `.ARM.exidx'

 In my linker script for the SPL (board/davinci/da8xxevm/u-boot-spl.lds) no
 such section is defined. But somehow the linker in the Codesourcery
 toolchain that I used before manages to place the .ARM.exidx section
 between rodata and data automatically (The section is listed in the
 corresponding .map file). However, with the ELDK 4.2 toolchain this section
 (and the .got section) must be specified explicitly. With the patch below
 (applied on top of the patchset) the SPL builds and links nicely with
 both ELDK 4.2 and the Codesourcery toolchain.

That's probably not the right way to solve the problem.

A run of ./MAKEALL -c arm926ejs with a modified version of MAKEALL that
copied the resulting u-boot.map file of each build into the log directory and
subsequently doing
for i in `ls *.map`; do grep exidx $i  /dev/null  echo $i; done 
showed that all davinci boards have this .ARM.exidx section, so it must be
something in the davinci arch tree. After reading a lot of code and running
nm over the object files I found out that there is some connection between
the 64 bit division that are done in arch/arm/cpu/arm926ejs/davinci/timer.c
and these .exidx sections.

The relevant code in timer.c is

ulong get_timer(ulong base)
{
unsigned long long timer_diff;

timer_diff = get_ticks() - gd-timer_reset_value;

return (timer_diff / (gd-timer_rate_hz / CONFIG_SYS_HZ)) - base;
}

void __udelay(unsigned long usec)
{
unsigned long long endtime;

endtime = ((unsigned long long)usec * gd-timer_rate_hz) / 100UL;
endtime += get_ticks();

while (get_ticks()  endtime)
;
}

When I replace both divisions with the lldiv function from ldiv64.h (I have
seen that a lot of patches did such replacements in the u-boot code) the
exidx sections vanish (for all davinci based boards) and my patches compile
fine even with the ELDK 4.2 toolchain.

The patch below does the required changes in timer.c and also one replacement
in post/post.c.

Could you please comment on this solution?

@Heiko: The SPL of the cam_enc_4xx board suffered from the same linker 
problem (.ARM.exidx section) and also after applying the patch I could
not build this board with ELDK 4.2 (although it works fine with
gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41). Could you please
have a look at this? (arm-linux-ld: u-boot-spl: Not enough room for program
headers, try linking with -N)

Regards, Christian

---
 arch/arm/cpu/arm926ejs/davinci/timer.c |6 --
 post/post.c|3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/davinci/timer.c 
b/arch/arm/cpu/arm926ejs/davinci/timer.c
index c7bf7a5..31f8633 100644
--- a/arch/arm/cpu/arm926ejs/davinci/timer.c
+++ b/arch/arm/cpu/arm926ejs/davinci/timer.c
@@ -40,6 +40,7 @@
 #include common.h
 #include asm/io.h
 #include asm/arch/timer_defs.h
+#include div64.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -86,14 +87,15 @@ ulong get_timer(ulong base)
 
timer_diff = get_ticks() - gd-timer_reset_value;
 
-   return (timer_diff / (gd-timer_rate_hz / CONFIG_SYS_HZ)) - base;
+   return lldiv(timer_diff, (gd-timer_rate_hz / CONFIG_SYS_HZ)) - base;
 }
 
 void __udelay(unsigned long usec)
 {
unsigned long long endtime;
 
-   endtime = ((unsigned long long)usec * gd-timer_rate_hz) / 100UL;
+   endtime = lldiv((unsigned long long)usec * gd-timer_rate_hz, 
+   100UL);
endtime += get_ticks();
 
while (get_ticks()  endtime)
diff --git a/post/post.c b/post/post.c
index 0e67ad7..745767a 100644
--- a/post/post.c
+++ b/post/post.c
@@ -24,6 +24,7 @@
 #include common.h
 #include stdio_dev.h
 #include watchdog.h
+#include div64.h
 #include post.h
 
 #ifdef CONFIG_SYS_POST_HOTKEYS_GPIO
@@ -495,7 +496,7 @@ void post_reloc(void)
 unsigned long post_time_ms(unsigned long base)
 {
 #if defined(CONFIG_PPC) || defined(CONFIG_ARM)
-   return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ))
+  return (unsigned long) lldiv(get_ticks(), (get_tbclk() / CONFIG_SYS_HZ))
- base;
 #else
 #warning Not implemented yet
-- 
1.7.0.4

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


Re: [U-Boot] [PATCH] M28: Cleanup memsize.o OOT build

2011-12-09 Thread Stefano Babic
On 09/12/2011 10:48, Marek Vasut wrote:
 On 08/12/2011 13:27, Marek Vasut wrote:
 Signed-off-by: Marek Vasut marek.va...@gmail.com
 Cc: Wolfgang Denk w...@denx.de
 Cc: Detlev Zundel d...@denx.de
 Cc: Stefano Babic sba...@denx.de
 ---

 Hi Marek,

  arch/arm/cpu/arm926ejs/mx28/Makefile   |7 +--
  arch/arm/cpu/arm926ejs/mx28/spl_boot.c |   13 ++---
  arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds |   12 ++--
  include/configs/m28evk.h   |2 ++
  4 files changed, 11 insertions(+), 23 deletions(-)

 It seems to me that your patch does much more as what you describe in
 the commit message.
 
 Please check V2


Ah, ok, I see it.

 -inline int printf(const char *fmt, ...)
 -{
 -   return 0;
 -}
 -
 -inline void __coloured_LED_init(void) {}
 -inline void __red_LED_on(void) {}
 -void coloured_LED_init(void)
 -   __attribute__((weak, alias(__coloured_LED_init)));
 -void red_LED_on(void)
 -   __attribute__((weak, alias(__red_LED_on)));
 +void serial_putc(const char c) {}
 +void serial_puts(const char *s) {}

 Make a note in the commit message about these changes (not related to
 the subject)
 
 Actually I explained this in V2.

Ok, it is enough

 /DISCARD/ : { *(.dynstr*) }
 /DISCARD/ : { *(.dynsym*) }
 /DISCARD/ : { *(.dynamic*) }

 However, these change fix another issue.
 
 Not really actually.
 
 You want to cleanup
 u-boot-spl.lds, but then there are some other parts I cannot understand.
 For example, why is __u_boot_cmd_start = needed ?
 
 Well, u-boot-spl.lds will need a separate cleanup patch eventually maybe.

 If your goal is to cleanup the linker file, please submit a separate
 patch removing also the unused sections in SPL.
 
 Not now, right now my goal is to fix the build issue. Linker file cleanup can 
 wait after .12 release.

Ok, well - I will merge it into u-boot-imx.

Stefano

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


[U-Boot] [PATCH] common/usb_kbd.c: fix bug introduced in commit 00b7d6e

2011-12-09 Thread Wolfgang Denk
During the rebase of commit 00b7d6e USB: Squash checkpatch warnings
in usb_kbd.c I missed a brace, resulting in a number of build errors.
Fix these.

Signed-off-by: Wolfgang Denk w...@denx.de
---
 common/usb_kbd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index dbdfe0d..69939f0 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -133,7 +133,7 @@ static int usb_kbd_testc(void)
 static int usb_kbd_getc(void)
 {
char c;
-   while (usb_in_pointer == usb_out_pointer)
+   while (usb_in_pointer == usb_out_pointer) {
 #ifdef CONFIG_SYS_USB_EVENT_POLL
usb_event_poll();
 #endif
-- 
1.7.7.3

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


[U-Boot] [PATCH 02/13] drivers/net/at91_emac.c: Fix GCC 4.6 build warnings

2011-12-09 Thread Wolfgang Denk
Fix:
at91_emac.c: In function 'at91emac_phy_init':
at91_emac.c:244:20: warning: variable 'duplex' set but not used
[-Wunused-but-set-variable]
at91_emac.c:244:13: warning: variable 'speed' set but not used
[-Wunused-but-set-variable]

Use new debug_cond() to fix these warnings.  In the result, anumber of
inconsistent printf() formats are detected:

at91_emac.c: In function 'at91emac_read':
at91_emac.c:147:2: warning: format '%x' expects argument of type
'unsigned int', but argument 2 has type 'struct at91_emac_t *'
[-Wformat]
at91_emac.c: In function 'at91emac_write':
at91_emac.c:157:2: warning: format '%x' expects argument of type
'unsigned int', but argument 2 has type 'struct at91_emac_t *'
[-Wformat]
at91_emac.c:157:2: warning: format '%x' expects argument of type
'unsigned int', but argument 4 has type 'short unsigned int *'
[-Wformat]
at91_emac.c: In function 'at91emac_recv':
at91_emac.c:451:3: warning: format '%d' expects argument of type
'int', but argument 2 has type 'long unsigned int' [-Wformat]
at91_emac.c:451:3: warning: format '%x' expects argument of type
'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat]

Fix these, too.

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Jens Scharsig js_at...@scharsoft.de
Cc: Andreas Bießmann andreas.de...@gmail.com
Cc: Reinhard Meyer u-b...@emk-elektronik.de
---
 drivers/net/at91_emac.c |   42 +++---
 1 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 9bda1fc..483c831 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -69,21 +69,21 @@
 #endif
 
 #ifdef ET_DEBUG
-#define DEBUG_AT91EMAC(...)printf(__VA_ARGS__);
+#define DEBUG_AT91EMAC 1
 #else
-#define DEBUG_AT91EMAC(...)
+#define DEBUG_AT91EMAC 0
 #endif
 
 #ifdef MII_DEBUG
-#define DEBUG_AT91PHY(...) printf(__VA_ARGS__);
+#define DEBUG_AT91PHY  1
 #else
-#define DEBUG_AT91PHY(...)
+#define DEBUG_AT91PHY  0
 #endif
 
 #ifndef CONFIG_DRIVER_AT91EMAC_QUIET
-#define VERBOSEP(...)  printf(__VA_ARGS__);
+#define VERBOSEP   1
 #else
-#define VERBOSEP(...)
+#define VERBOSEP   0
 #endif
 
 #define RBF_ADDR  0xfffc
@@ -137,14 +137,15 @@ int  at91emac_read(at91_emac_t *at91mac, unsigned char 
addr,
 
do {
netstat = readl(at91mac-sr);
-   DEBUG_AT91PHY(poll SR %08lx\n, netstat);
+   debug_cond(DEBUG_AT91PHY, poll SR %08lx\n, netstat);
} while (!(netstat  AT91_EMAC_SR_IDLE));
 
*value = readl(at91mac-man)  AT91_EMAC_MAN_DATA_MASK;
 
at91emac_DisableMDIO(at91mac);
 
-   DEBUG_AT91PHY(AT91PHY read %x REG(%d)=%x\n, at91mac, reg, *value)
+   debug_cond(DEBUG_AT91PHY,
+   AT91PHY read %p REG(%d)=%x\n, at91mac, reg, *value);
 
return 0;
 }
@@ -153,7 +154,8 @@ int  at91emac_write(at91_emac_t *at91mac, unsigned char 
addr,
unsigned char reg, unsigned short value)
 {
unsigned long netstat;
-   DEBUG_AT91PHY(AT91PHY write %x REG(%d)=%x\n, at91mac, reg, value)
+   debug_cond(DEBUG_AT91PHY,
+   AT91PHY write %p REG(%d)=%p\n, at91mac, reg, value);
 
at91emac_EnableMDIO(at91mac);
 
@@ -164,7 +166,7 @@ int  at91emac_write(at91_emac_t *at91mac, unsigned char 
addr,
 
do {
netstat = readl(at91mac-sr);
-   DEBUG_AT91PHY(poll SR %08lx\n, netstat);
+   debug_cond(DEBUG_AT91PHY, poll SR %08lx\n, netstat);
} while (!(netstat  AT91_EMAC_SR_IDLE));
 
at91emac_DisableMDIO(at91mac);
@@ -216,7 +218,7 @@ static int at91emac_phy_reset(struct eth_device *netdev)
adv = ADVERTISE_CSMA | ADVERTISE_ALL;
at91emac_write(emac, CONFIG_DRIVER_AT91EMAC_PHYADDR,
MII_ADVERTISE, adv);
-   VERBOSEP(%s: Starting autonegotiation...\n, netdev-name);
+   debug_cond(VERBOSEP, %s: Starting autonegotiation...\n, netdev-name);
at91emac_write(emac, CONFIG_DRIVER_AT91EMAC_PHYADDR, MII_BMCR,
(BMCR_ANENABLE | BMCR_ANRESTART));
 
@@ -229,7 +231,8 @@ static int at91emac_phy_reset(struct eth_device *netdev)
}
 
if (status  BMSR_ANEGCOMPLETE) {
-   VERBOSEP(%s: Autonegotiation complete\n, netdev-name);
+   debug_cond(VERBOSEP,
+   %s: Autonegotiation complete\n, netdev-name);
} else {
printf(%s: Autonegotiation timed out (status=0x%04x)\n,
   netdev-name, status);
@@ -272,7 +275,7 @@ static int at91emac_phy_init(struct eth_device *netdev)
}
}
if (!(status  BMSR_LSTATUS)) {
-   VERBOSEP(%s: link down\n, netdev-name);
+   debug_cond(VERBOSEP, %s: link down\n, netdev-name);
return -3;
} else {
at91emac_read(emac, CONFIG_DRIVER_AT91EMAC_PHYADDR,
@@ -283,7 +286,7 @@ static int at91emac_phy_init(struct eth_device *netdev)
speed = 

[U-Boot] [PATCH 00/13] ARM: more cleanups

2011-12-09 Thread Wolfgang Denk
The following patches fix another set of build warnigns, mostly for
ARM boards.

Wolfgang Denk (13):
  drivers/net/ne2000_base.c: Fix GCC 4.6 build warnings
  drivers/net/at91_emac.c: Fix GCC 4.6 build warnings
  fs/yaffs2/yaffs_guts.c: Fix GCC 4.6 compile warning (and bug)
  common/cmd_pxe.c: Fix compile warning
  boards.cfg: sort list
  board/apollon/apollon.c: Fix GCc 4.6 build warnings.
  board/apollon/sys_info.c: Fix GCC 4.6 build warning
  ARM: convert apollon board to use boards.cfg
  board/LaCie/edminiv2/edminiv2.c: Fix build warning
  board/ti/omap1610inn/flash.c: Fix GCC 4.6 build warnings
  ARM: convert omap16xx boards to boards.cfg
  board/ti/omap730p2/flash.c: Fix GCC 4.6 build warnings
  ARM: convert omap730p2 boards to boards.cfg

 MAKEALL |4 -
 Makefile|   41 ---
 board/LaCie/edminiv2/edminiv2.c |1 +
 board/apollon/apollon.c |   18 ++--
 board/apollon/sys_info.c|9 +--
 board/ti/omap1610inn/flash.c|   21 ++--
 board/ti/omap730p2/flash.c  |   19 ++-
 boards.cfg  |  230 --
 common/cmd_pxe.c|1 +
 drivers/net/at91_emac.c |   42 ---
 drivers/net/ne2000_base.c   |9 +-
 fs/yaffs2/yaffs_guts.c  |2 +-
 include/configs/apollon.h   |2 +
 13 files changed, 189 insertions(+), 210 deletions(-)

-- 
1.7.6.4

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


[U-Boot] [PATCH 01/13] drivers/net/ne2000_base.c: Fix GCC 4.6 build warnings

2011-12-09 Thread Wolfgang Denk
Fix:
ne2000_base.c: In function 'dp83902a_send':
ne2000_base.c:282:7: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]
ne2000_base.c: In function 'dp83902a_RxEvent':
ne2000_base.c:376:5: warning: variable 'rsr' set but not used
[-Wunused-but-set-variable]
ne2000_base.c: In function 'dp83902a_TxEvent':
ne2000_base.c:513:5: warning: variable 'tsr' set but not used
[-Wunused-but-set-variable]
ne2000_base.c: In function 'dp83902a_ClearCounters':
ne2000_base.c:550:17: warning: variable 'cnt3' set but not used
[-Wunused-but-set-variable]
ne2000_base.c:550:11: warning: variable 'cnt2' set but not used
[-Wunused-but-set-variable]
ne2000_base.c:550:5: warning: variable 'cnt1' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk w...@denx.de
---
 drivers/net/ne2000_base.c |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index 88f2b37..8275091 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -76,6 +76,7 @@ Add SNMP
 #include command.h
 #include net.h
 #include malloc.h
+#include linux/compiler.h
 
 /* forward definition of function used for the uboot interface */
 void uboot_push_packet_len(int len);
@@ -279,7 +280,7 @@ dp83902a_send(u8 *data, int total_len, u32 key)
 * does (i.e., also read data).
 */
 
-   u16 tmp;
+   __maybe_unused u16 tmp;
int len = 1;
 
DP_OUT(base, DP_RSAL, 0x100 - len);
@@ -373,7 +374,7 @@ dp83902a_RxEvent(void)
 {
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) nic;
u8 *base = dp-base;
-   u8 rsr;
+   __maybe_unused u8 rsr;
u8 rcv_hdr[4];
int i, len, pkt, cur;
 
@@ -510,7 +511,7 @@ dp83902a_TxEvent(void)
 {
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) nic;
u8 *base = dp-base;
-   u8 tsr;
+   __maybe_unused u8 tsr;
u32 key;
 
DEBUG_FUNCTION();
@@ -547,7 +548,7 @@ dp83902a_ClearCounters(void)
 {
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) nic;
u8 *base = dp-base;
-   u8 cnt1, cnt2, cnt3;
+   __maybe_unused u8 cnt1, cnt2, cnt3;
 
DP_IN(base, DP_FER, cnt1);
DP_IN(base, DP_CER, cnt2);
-- 
1.7.6.4

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


[U-Boot] [PATCH 04/13] common/cmd_pxe.c: Fix compile warning

2011-12-09 Thread Wolfgang Denk
Fix:
cmd_pxe.c: In function 'parse_pxefile_top':
cmd_pxe.c:941:5: warning: 'err' may be used uninitialized in this
function [-Wuninitialized]
cmd_pxe.c:921:6: note: 'err' was declared here

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Jason Hobbs jason.ho...@calxeda.com
---
 common/cmd_pxe.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 9426f5b..eaf95bf 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -936,6 +936,7 @@ static int parse_menu(char **c, struct pxe_menu *cfg, char 
*b, int nest_level)
default:
printf(Ignoring malformed menu command: %.*s\n,
(int)(*c - s), s);
+   err = -1;
}
 
if (err  0)
-- 
1.7.6.4

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


[U-Boot] [PATCH 13/13] ARM: convert omap730p2 boards to boards.cfg

2011-12-09 Thread Wolfgang Denk
Signed-off-by: Wolfgang Denk w...@denx.de
Dave Peverley dpever...@mpc-data.co.uk
---
 MAKEALL|1 -
 Makefile   |   11 ---
 boards.cfg |3 +++
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index c2b52d0..f735af6 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -308,7 +308,6 @@ LIST_SA=$(boards_by_cpu sa1100)
 LIST_ARM9=$(boards_by_cpu arm920t)\
$(boards_by_cpu arm926ejs)  \
$(boards_by_cpu arm925t)\
-   omap730p2   \
 
 
 #
diff --git a/Makefile b/Makefile
index 8474ce7..c37dc03 100644
--- a/Makefile
+++ b/Makefile
@@ -646,17 +646,6 @@ ucname = $(shell echo $(1) | sed -e 
's/\(.*\)_config/\U\1/')
 # ARM
 #
 
-omap730p2_config \
-omap730p2_cs0boot_config \
-omap730p2_cs3boot_config : unconfig
-   @mkdir -p $(obj)include
-   @if [ $(findstring _cs0boot_, $@) ] ; then \
-   echo #define CONFIG_CS0_BOOT  $(obj)include/config.h ; \
-   else \
-   echo #define CONFIG_CS3_BOOT  $(obj)include/config.h ; \
-   fi;
-   @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap
-
 spear300_config \
 spear310_config \
 spear320_config :  unconfig
diff --git a/boards.cfg b/boards.cfg
index b9cc705..9f25649 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -171,6 +171,9 @@ omap1610inn_cs0boot  arm arm926ejs   
omap1610inn ti omapomap1610inn:
 omap1610inn_cs3boot arm arm926ejs   omap1610inn ti 
omapomap1610inn:CS3_BOOT
 omap1610inn_cs_autoboot arm arm926ejs   omap1610inn
 ti omapomap1610inn:CS_AUTOBOOT
 omap5912osk  arm arm926ejs   -   ti
 omap
+omap730p2   arm arm926ejs   omap730p2   ti 
omapomap730p2:CS3_BOOT
+omap730p2_cs0boot   arm arm926ejs   omap730p2   ti 
omapomap730p2:CS0_BOOT
+omap730p2_cs3boot   arm arm926ejs   omap730p2   ti 
omapomap730p2:CS3_BOOT
 edminiv2 arm arm926ejs   -   LaCie 
 orion5x
 dkb arm arm926ejs   -   
Marvellpantheon
 versatileab  arm arm926ejs   versatile   
armltd versatile   versatile:ARCH_VERSATILE_AB
-- 
1.7.6.4

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


[U-Boot] [PATCH 11/13] ARM: convert omap16xx boards to boards.cfg

2011-12-09 Thread Wolfgang Denk
Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Kshitij Gupta kshi...@ti.com
---
 MAKEALL|2 --
 Makefile   |   20 
 boards.cfg |8 
 3 files changed, 8 insertions(+), 22 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 0f7b820..c2b52d0 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -308,8 +308,6 @@ LIST_SA=$(boards_by_cpu sa1100)
 LIST_ARM9=$(boards_by_cpu arm920t)\
$(boards_by_cpu arm926ejs)  \
$(boards_by_cpu arm925t)\
-   omap1610h2  \
-   omap1610inn \
omap730p2   \
 
 
diff --git a/Makefile b/Makefile
index e603b9a..8474ce7 100644
--- a/Makefile
+++ b/Makefile
@@ -646,26 +646,6 @@ ucname = $(shell echo $(1) | sed -e 
's/\(.*\)_config/\U\1/')
 # ARM
 #
 
-xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst 
_cs_autoboot,,$(subst _config,,$1
-
-omap1610inn_config \
-omap1610inn_cs0boot_config \
-omap1610inn_cs3boot_config \
-omap1610inn_cs_autoboot_config \
-omap1610h2_config \
-omap1610h2_cs0boot_config \
-omap1610h2_cs3boot_config \
-omap1610h2_cs_autoboot_config: unconfig
-   @mkdir -p $(obj)include
-   @if [ $(findstring _cs0boot_, $@) ] ; then \
-   echo #define CONFIG_CS0_BOOT  .$(obj)include/config.h ; \
-   elif [ $(findstring _cs_autoboot_, $@) ] ; then \
-   echo #define CONFIG_CS_AUTOBOOT  $(obj)include/config.h ; \
-   else \
-   echo #define CONFIG_CS3_BOOT  $(obj)include/config.h ; \
-   fi;
-   @$(MKCONFIG) -n $@ -a $(call xtract_omap1610xxx,$@) arm arm926ejs 
omap1610inn ti omap
-
 omap730p2_config \
 omap730p2_cs0boot_config \
 omap730p2_cs3boot_config : unconfig
diff --git a/boards.cfg b/boards.cfg
index c1b0bad..b9cc705 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -162,6 +162,14 @@ magnesiumarm arm926ejs   
imx27lite   logicpd
 m28evk   arm arm926ejs   -   denx  
 mx28
 nhk8815  arm arm926ejs   nhk8815 st
 nomadik
 nhk8815_onenand  arm arm926ejs   nhk8815 st
 nomadik   nhk8815:BOOT_ONENAND
+omap1610h2  arm arm926ejs   omap1610inn ti 
omapomap1610inn:CS3_BOOT
+omap1610h2_cs0boot  arm arm926ejs   omap1610inn ti 
omapomap1610inn:CS0_BOOT
+omap1610h2_cs3boot  arm arm926ejs   omap1610inn ti 
omapomap1610inn:CS3_BOOT
+omap1610h2_cs_autoboot  arm arm926ejs   omap1610inn ti 
omapomap1610inn:CS_AUTOBOOT
+omap1610inn arm arm926ejs   omap1610inn ti 
omapomap1610inn:CS3_BOOT
+omap1610inn_cs0boot arm arm926ejs   omap1610inn ti 
omapomap1610inn:CS0_BOOT
+omap1610inn_cs3boot arm arm926ejs   omap1610inn ti 
omapomap1610inn:CS3_BOOT
+omap1610inn_cs_autoboot arm arm926ejs   omap1610inn
 ti omapomap1610inn:CS_AUTOBOOT
 omap5912osk  arm arm926ejs   -   ti
 omap
 edminiv2 arm arm926ejs   -   LaCie 
 orion5x
 dkb arm arm926ejs   -   
Marvellpantheon
-- 
1.7.6.4

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


[U-Boot] [PATCH 07/13] board/apollon/sys_info.c: Fix GCC 4.6 build warning

2011-12-09 Thread Wolfgang Denk
Fix:
sys_info.c: In function 'display_board_info':
sys_info.c:260:16: warning: variable 'db_s' set but not used
[-Wunused-but-set-variable]

Also fix resulting warnings:
sys_info.c:251:7: warning: unused variable 'db_ip' [-Wunused-variable]
sys_info.c:250:7: warning: unused variable 'db_men' [-Wunused-variable]

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Kyungmin Park kyungmin.p...@samsung.com
---
 board/apollon/sys_info.c |9 +
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/board/apollon/sys_info.c b/board/apollon/sys_info.c
index 26ac9a2..4f950ae 100644
--- a/board/apollon/sys_info.c
+++ b/board/apollon/sys_info.c
@@ -247,8 +247,6 @@ void display_board_info(u32 btype)
char cpu_2420[] = 2420;   /* cpu type */
char cpu_2422[] = 2422;
char cpu_2423[] = 2423;
-   char db_men[] = Menelaus; /* board type */
-   char db_ip[] = IP;
char mem_sdr[] = mSDR;/* memory type */
char mem_ddr[] = mDDR;
char t_tst[] = TST;   /* security level */
@@ -257,7 +255,7 @@ void display_board_info(u32 btype)
char t_gp[] = GP;
char unk[] = ?;
 
-   char *cpu_s, *db_s, *mem_s, *sec_s;
+   char *cpu_s, *mem_s, *sec_s;
u32 cpu, rev, sec;
 
rev = get_cpu_rev();
@@ -276,11 +274,6 @@ void display_board_info(u32 btype)
else
cpu_s = cpu_2420;
 
-   if (btype == BOARD_H4_MENELAUS)
-   db_s = db_men;
-   else
-   db_s = db_ip;
-
switch (sec) {
case TST_DEVICE:
sec_s = t_tst;
-- 
1.7.6.4

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


[U-Boot] [PATCH 06/13] board/apollon/apollon.c: Fix GCc 4.6 build warnings.

2011-12-09 Thread Wolfgang Denk
Fix:
apollon.c: In function 'dram_init':
apollon.c:188:29: warning: variable 'cpu' set but not used
[-Wunused-but-set-variable]
apollon.c:188:20: warning: variable 'rev' set but not used
[-Wunused-but-set-variable]
apollon.c:187:26: warning: variable 'size1' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Kyungmin Park kyungmin.p...@samsung.com
---
 board/apollon/apollon.c |   18 +-
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/board/apollon/apollon.c b/board/apollon/apollon.c
index 4768f58..76626f0 100644
--- a/board/apollon/apollon.c
+++ b/board/apollon/apollon.c
@@ -184,14 +184,12 @@ eth_reset_err_out:
  **/
 int dram_init(void)
 {
-   unsigned int size0 = 0, size1 = 0;
-   u32 mtype, btype, rev = 0, cpu = 0;
+   unsigned int size;
+   u32 mtype, btype;
 #define NOT_EARLY 0
 
btype = get_board_type();
mtype = get_mem_type();
-   rev = get_cpu_rev();
-   cpu = get_cpu_type();
 
display_board_info(btype);
 
@@ -200,14 +198,16 @@ int dram_init(void)
do_sdrc_init(SDRC_CS1_OSET, NOT_EARLY);
}
 
-   size0 = get_sdr_cs_size(SDRC_CS0_OSET);
-   size1 = get_sdr_cs_size(SDRC_CS1_OSET);
+   size = get_sdr_cs_size(SDRC_CS0_OSET);
 
gd-bd-bi_dram[0].start = PHYS_SDRAM_1;
-   gd-bd-bi_dram[0].size = size0;
+   gd-bd-bi_dram[0].size = size;
 #if CONFIG_NR_DRAM_BANKS  1
-   gd-bd-bi_dram[1].start = PHYS_SDRAM_1 + size0;
-   gd-bd-bi_dram[1].size = size1;
+   size = get_sdr_cs_size(SDRC_CS1_OSET);
+
+   gd-bd-bi_dram[1].start = gd-bd-bi_dram[0].start +
+  gd-bd-bi_dram[0].size;
+   gd-bd-bi_dram[1].size = size;
 #endif
 
return 0;
-- 
1.7.6.4

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


[U-Boot] [PATCH 08/13] ARM: convert apollon board to use boards.cfg

2011-12-09 Thread Wolfgang Denk
Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Kyungmin Park kyungmin.p...@samsung.com
Cc: Albert Aribaud albert.u.b...@aribaud.net
---
 MAKEALL   |1 -
 Makefile  |   10 --
 boards.cfg|1 +
 include/configs/apollon.h |2 ++
 4 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 21b573a..0f7b820 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -317,7 +317,6 @@ LIST_ARM9=$(boards_by_cpu arm920t) \
 ## ARM11 Systems
 #
 LIST_ARM11=$(boards_by_cpu arm1136)   \
-   apollon \
imx31_phycore   \
imx31_phycore_eet   \
mx31pdk \
diff --git a/Makefile b/Makefile
index de65a17..e603b9a 100644
--- a/Makefile
+++ b/Makefile
@@ -708,16 +708,6 @@ scpu_config:   unconfig
@$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive
 
 #
-## ARM1136 Systems
-#
-
-apollon_config : unconfig
-   @mkdir -p $(obj)include
-   @echo #define CONFIG_ONENAND_U_BOOT  $(obj)include/config.h
-   @echo CONFIG_ONENAND_U_BOOT = y  $(obj)include/config.mk
-   @$(MKCONFIG) $@ arm arm1136 apollon - omap24xx
-
-#
 ## ARM1176 Systems
 #
 smdk6400_noUSB_config  \
diff --git a/boards.cfg b/boards.cfg
index 4a4968d..c1b0bad 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -45,6 +45,7 @@ tt01 arm arm1136 -
   hale
 imx31_litekitarm arm1136 -   
logicpdmx31
 flea3arm arm1136 -   
CarMediaLabmx35
 mx35pdk  arm arm1136 -   
freescale  mx35
+apollon arm arm1136 apollon
 -  omap24xx
 omap2420h4   arm arm1136 -   ti
 omap24xx
 tnetv107x_evmarm arm1176 tnetv107xevmti
 tnetv107x
 integratorap_cm720t  arm arm720t integrator  
armltd -   integratorap:CM720T
diff --git a/include/configs/apollon.h b/include/configs/apollon.h
index 7fcf437..8f06cd7 100644
--- a/include/configs/apollon.h
+++ b/include/configs/apollon.h
@@ -37,6 +37,8 @@
 #define CONFIG_APOLLON 1
 #define CONFIG_APOLLON_PLUS1 /* If you have apollon plus 1.x */
 
+#define CONFIG_ONENAND_U_BOOT  y
+
 /* Clock config to target*/
 #define PRCM_CONFIG_I  1
 /* #define PRCM_CONFIG_II  1 */
-- 
1.7.6.4

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


[U-Boot] [PATCH 03/13] fs/yaffs2/yaffs_guts.c: Fix GCC 4.6 compile warning (and bug)

2011-12-09 Thread Wolfgang Denk
Fix:
yaffs_guts.c: In function 'yaffs_GarbageCollectBlock':
yaffs_guts.c:2761:6: warning: variable 'retVal' set but not used
[-Wunused-but-set-variable]

Here GCC actually detected a bug.  The code was always returning OK
instead of the previously set retrun code.  Fix that.

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: William Juul william.j...@tandberg.com
Cc: Scott Wood scottw...@freescale.com
---
 fs/yaffs2/yaffs_guts.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
index f0ef8db..7390b40 100644
--- a/fs/yaffs2/yaffs_guts.c
+++ b/fs/yaffs2/yaffs_guts.c
@@ -2976,7 +2976,7 @@ static int yaffs_GarbageCollectBlock(yaffs_Device * dev, 
int block)
 
dev-isDoingGC = 0;
 
-   return YAFFS_OK;
+   return retVal;
 }
 
 /* New garbage collector
-- 
1.7.6.4

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


[U-Boot] [PATCH 10/13] board/ti/omap1610inn/flash.c: Fix GCC 4.6 build warnings

2011-12-09 Thread Wolfgang Denk
Fix:
flash.c: In function 'flash_get_offsets':
flash.c:139:10: warning: variable 'pOrgDef' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'flash_erase':
flash.c:280:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'write_data':
flash.c:456:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk w...@denx.de
---
 board/ti/omap1610inn/flash.c |   21 +
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/board/ti/omap1610inn/flash.c b/board/ti/omap1610inn/flash.c
index 1b67d08..a99a91c 100644
--- a/board/ti/omap1610inn/flash.c
+++ b/board/ti/omap1610inn/flash.c
@@ -136,9 +136,7 @@ void flash_unlock(flash_info_t * info)
 static void flash_get_offsets (ulong base, flash_info_t * info)
 {
int i;
-   OrgDef *pOrgDef;
 
-   pOrgDef = OrgIntel_28F256L18T;
if (info-flash_id == FLASH_UNKNOWN) {
return;
}
@@ -352,6 +350,9 @@ int flash_erase (flash_info_t * info, int s_first, int 
s_last)
printf ( done\n);
}
}
+   if (flag)
+   enable_interrupts();
+
return rcode;
 }
 
@@ -453,13 +454,13 @@ static int write_data (flash_info_t * info, ulong dest, 
FPW data)
 {
FPWV *addr = (FPWV *) dest;
ulong status;
-   int flag;
+   int flag, rc = 0;
ulong start;
 
/* Check if Flash is (sufficiently) erased */
if ((*addr  data) != data) {
-   printf (not erased at %08lx (%x)\n, (ulong) addr, *addr);
-   return (2);
+   printf(not erased at %08lx (%x)\n, (ulong) addr, *addr);
+   return 2;
}
/* Disable interrupts which might cause a timeout here */
flag = disable_interrupts ();
@@ -472,12 +473,16 @@ static int write_data (flash_info_t * info, ulong dest, 
FPW data)
/* wait while polling the status register */
while (((status = *addr)  (FPW) 0x00800080) != (FPW) 0x00800080) {
if (get_timer(start)  CONFIG_SYS_FLASH_WRITE_TOUT) {
-   *addr = (FPW) 0x00FF00FF;   /* restore read mode */
-   return (1);
+   rc = 1;
+   goto done;
}
}
+done:
+   if (flag)
+   enable_interrupts();
+
*addr = (FPW) 0x00FF00FF;   /* restore read mode */
-   return (0);
+   return rc;
 }
 
 void inline spin_wheel (void)
-- 
1.7.6.4

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


[U-Boot] [PATCH 12/13] board/ti/omap730p2/flash.c: Fix GCC 4.6 build warnings

2011-12-09 Thread Wolfgang Denk
Fix:
flash.c: In function 'flash_get_offsets':
flash.c:122:10: warning: variable 'pOrgDef' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'flash_erase':
flash.c:263:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'write_data':
flash.c:439:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Dave Peverley dpever...@mpc-data.co.uk
---
 board/ti/omap730p2/flash.c |   19 ---
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/board/ti/omap730p2/flash.c b/board/ti/omap730p2/flash.c
index 185bc2d..a292627 100644
--- a/board/ti/omap730p2/flash.c
+++ b/board/ti/omap730p2/flash.c
@@ -119,9 +119,7 @@ unsigned long flash_init (void)
 static void flash_get_offsets (ulong base, flash_info_t * info)
 {
int i;
-   OrgDef *pOrgDef;
 
-   pOrgDef = OrgIntel_28F256L18T;
if (info-flash_id == FLASH_UNKNOWN) {
return;
}
@@ -335,6 +333,10 @@ int flash_erase (flash_info_t * info, int s_first, int 
s_last)
printf ( done\n);
}
}
+
+   if (flag)
+   enable_interrupts();
+
return rcode;
 }
 
@@ -436,7 +438,7 @@ static int write_data (flash_info_t * info, ulong dest, FPW 
data)
 {
FPWV *addr = (FPWV *) dest;
ulong status;
-   int flag;
+   int flag, rc = 0;
ulong start;
 
/* Check if Flash is (sufficiently) erased */
@@ -456,12 +458,15 @@ static int write_data (flash_info_t * info, ulong dest, 
FPW data)
/* wait while polling the status register */
while (((status = *addr)  (FPW) 0x00800080) != (FPW) 0x00800080) {
if (get_timer(start)  CONFIG_SYS_FLASH_WRITE_TOUT) {
-   *addr = (FPW) 0x00FF00FF;   /* restore read mode */
-   return (1);
+   rc = 1;
+   goto done;
}
}
-   *addr = (FPW) 0x00FF00FF;   /* restore read mode */
-   return (0);
+done:
+   *addr = (FPW)0x00FF00FF;/* restore read mode */
+   if (flag)
+   enable_interrupts();
+   return rc;
 }
 
 void inline spin_wheel (void)
-- 
1.7.6.4

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


[U-Boot] [PATCH 09/13] board/LaCie/edminiv2/edminiv2.c: Fix build warning

2011-12-09 Thread Wolfgang Denk
Fix:
edminiv2.c: In function 'reset_phy':
edminiv2.c:98:2: warning: implicit declaration of function
'mv_phy_88e1116_init' [-Wimplicit-function-declaration]

Signed-off-by: Wolfgang Denk w...@denx.de
Cc: Albert ARIBAUD albert.u.b...@aribaud.net
---
 board/LaCie/edminiv2/edminiv2.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c
index c1a01bc..1b33875 100644
--- a/board/LaCie/edminiv2/edminiv2.c
+++ b/board/LaCie/edminiv2/edminiv2.c
@@ -27,6 +27,7 @@
 #include common.h
 #include miiphy.h
 #include asm/arch/orion5x.h
+#include ../common/common.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
-- 
1.7.6.4

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


Re: [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings

2011-12-09 Thread Wolfgang Denk
Dear Stefan Roese,

In message 201112091044.03681...@denx.de you wrote:
 
 This file has been removed with patch 
 ce2acd371c4eee36e55d706a181361c25ebfe160 
 already in mainline.

Ah, right.  Even better :-)

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
Never underestimate the power of human stupidity  when  it  comes  to
using technology they don't understand.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Fix breakage after removing common.h from export.h

2011-12-09 Thread Wolfgang Denk
Dear Stefano Babic,

In message 1323426220-30366-1-git-send-email-sba...@denx.de you wrote:
 commit 0910d0bcb85acdf09b9dfd8ded452367b540a4ad
 Mike Partington mpart...@lexmark.com
 Date:   Wed Oct 27 10:31:09 2010 +
 
 Standalone Apps: Standalone apps should need only exports.h.
 
 Modify exports.h to remove its dependencies on other files, thus
 enabling standalone apps to require only exports.h from the U-Boot
 source tree.  This appears to be the intent based on the following
 note: http://lists.denx.de/pipermail/u-boot/2010-January/067174.html
 
 breaks all boards - the fact is that common.h is not included anymore
 by exports.h, and this breaks the build of several file.

Do we accept such a patch?


 --- a/include/common.h
 +++ b/include/common.h
 @@ -35,6 +35,7 @@ typedef volatile unsigned short vu_short;
  typedef volatile unsigned char   vu_char;
  
  #include config.h
 +#include assert.h
  #include asm-offsets.h
  #include linux/bitops.h
  #include linux/types.h

This appears to be an unrelated change, that should be submitted
separately.  Also, we should then remove the #include assert.h
from files that have this and also include common.h (that would be at
least common/hwconfig.c).

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 have a battle of wits with an unarmed opponent.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] Fix breakage after removing common.h from export.h

2011-12-09 Thread Wolfgang Denk
Dear Stefano Babic,

In message 1323426790-1477-1-git-send-email-sba...@denx.de you wrote:

 Mike Partington mpart...@lexmark.com
 Date:   Wed Oct 27 10:31:09 2010 +
 
 Standalone Apps: Standalone apps should need only exports.h.
 
 Modify exports.h to remove its dependencies on other files, thus
 enabling standalone apps to require only exports.h from the U-Boot
 source tree.  This appears to be the intent based on the following
 note: http://lists.denx.de/pipermail/u-boot/2010-January/067174.html
 
 breaks all boards - the fact is that common.h is not included anymore
 by exports.h, and this breaks the build of several file.

Can we fix this build breakage?  For example by removing the code that
depends oin the now unexported SPI interface?

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 essential to success is that you desire be an all-obsessing  one,
your thoughts and aims be co-ordinated, and your energy be concentra-
ted and applied without letup.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 03/13] fs/yaffs2/yaffs_guts.c: Fix GCC 4.6 compile warning (and bug)

2011-12-09 Thread William Juul (wiljuul)
Acked-by: William Juul wilj...@cisco.com

And please note my new e-mail address.

Best regards
William Juul

 -Original Message-
 From: Wolfgang Denk [mailto:w...@denx.de]
 Sent: Friday, December 09, 2011 12:14 PM
 To: u-boot@lists.denx.de
 Cc: Wolfgang Denk; William Juul; Scott Wood
 Subject: [PATCH 03/13] fs/yaffs2/yaffs_guts.c: Fix GCC 4.6 compile
 warning (and bug)
 
 Fix:
 yaffs_guts.c: In function 'yaffs_GarbageCollectBlock':
 yaffs_guts.c:2761:6: warning: variable 'retVal' set but not used
 [-Wunused-but-set-variable]
 
 Here GCC actually detected a bug.  The code was always returning OK
 instead of the previously set retrun code.  Fix that.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: William Juul william.j...@tandberg.com
 Cc: Scott Wood scottw...@freescale.com
 ---
  fs/yaffs2/yaffs_guts.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
 index f0ef8db..7390b40 100644
 --- a/fs/yaffs2/yaffs_guts.c
 +++ b/fs/yaffs2/yaffs_guts.c
 @@ -2976,7 +2976,7 @@ static int
yaffs_GarbageCollectBlock(yaffs_Device
 * dev, int block)
 
   dev-isDoingGC = 0;
 
 - return YAFFS_OK;
 + return retVal;
  }
 
  /* New garbage collector
 --
 1.7.6.4

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


Re: [U-Boot] [PATCH 02/11] MIPS: board.c: fix warning if CONFIG_CMD_NET is not defined

2011-12-09 Thread Daniel Schwierzeck
Hi Wolfgang,

On Fri, Dec 9, 2011 at 10:50 AM, Wolfgang Denk w...@denx.de wrote:
 Dear Daniel Schwierzeck,

 In message 
 1322143076-20349-3-git-send-email-daniel.schwierz...@googlemail.com you 
 wrote:
 board.c: In function 'board_init_r':
 board.c:280:8: warning: unused variable 's'
 ...
       /* Initialize from environment */
       load_addr = getenv_ulong(loadaddr, 16, load_addr);
  #if defined(CONFIG_CMD_NET)
 -     s = getenv(bootfile);
 +     const char *s = getenv(bootfile);
       if (s)
               copy_filename(BootFile, s, sizeof(BootFile));

 We don't allow declarations in the middle of the code.

 [This issue has also been fixed since, so no further actiuvity needed.]

ok, I marked my patch in patchwork as superseded.

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


Re: [U-Boot] [PATCH] Fix breakage after removing common.h from export.h

2011-12-09 Thread Stefano Babic
On 09/12/2011 12:29, Wolfgang Denk wrote:
 Dear Stefano Babic,
 
 In message 1323426220-30366-1-git-send-email-sba...@denx.de you wrote:
 commit 0910d0bcb85acdf09b9dfd8ded452367b540a4ad
 Mike Partington mpart...@lexmark.com
 Date:   Wed Oct 27 10:31:09 2010 +

 Standalone Apps: Standalone apps should need only exports.h.

 Modify exports.h to remove its dependencies on other files, thus
 enabling standalone apps to require only exports.h from the U-Boot
 source tree.  This appears to be the intent based on the following
 note: http://lists.denx.de/pipermail/u-boot/2010-January/067174.html

 breaks all boards - the fact is that common.h is not included anymore
 by exports.h, and this breaks the build of several file.
 
 Do we accept such a patch?

Yes - it is already in mainline


 
 
 --- a/include/common.h
 +++ b/include/common.h
 @@ -35,6 +35,7 @@ typedef volatile unsigned short vu_short;
  typedef volatile unsigned char  vu_char;
  
  #include config.h
 +#include assert.h
  #include asm-offsets.h
  #include linux/bitops.h
  #include linux/types.h
 
 This appears to be an unrelated change, that should be submitted
 separately.

This seems to be, it is not - or not strictly. The problem rises with
lib/qsort.c, that could be used (am I right ?) by standalone program and
can import only export.h

  Also, we should then remove the #include assert.h
 from files that have this and also include common.h (that would be at
 least common/hwconfig.c).

There is not yet an assert.h, I have introduced with this patch. This
avoid to include common.h in qsort.c, if qsort can be used in standalone
programs and importing common.h is not allowed. Of course, if I am
wrong, qsort can include directly common.h.

Best regards,
Stefano Babic

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


Re: [U-Boot] [PATCH] Fix breakage after removing common.h from export.h

2011-12-09 Thread Wolfgang Denk
Dear Stefano Babic,

In message 4ee2006c.8070...@denx.de you wrote:

  breaks all boards - the fact is that common.h is not included anymore
  by exports.h, and this breaks the build of several file.
  
  Do we accept such a patch?
 
 Yes - it is already in mainline

breaks all boards?  I did not observe this yet.

Which boards are broken?

 This seems to be, it is not - or not strictly. The problem rises with
 lib/qsort.c, that could be used (am I right ?) by standalone program and
 can import only export.h

No.  qsort() is not exported to standalone applications.

   Also, we should then remove the #include assert.h
  from files that have this and also include common.h (that would be at
  least common/hwconfig.c).
 
 There is not yet an assert.h, I have introduced with this patch. This

- find * -name '*.[ch]' | xargs egrep '#include.*assert.h'
common/hwconfig.c:#include assert.h
fs/yaffs2/ydirectenv.h:#include assert.h
tools/getline.c:#include assert.h
tools/mingw_support.c:#include assert.h


 avoid to include common.h in qsort.c, if qsort can be used in standalone
 programs and importing common.h is not allowed. Of course, if I am
 wrong, qsort can include directly common.h.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Die meisten Menschen pflegen im Kindesalter vom Zeigen auf Gegenstän-
de (Mausbewegung) und ga sagen  (Mausklick)  abzukommen,  zugunsten
eines  mächtigeren  und langwierig zu erlernenden Tools (Sprache).
 -- Achim Linder in de.comp.os.linux.misc
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Fix breakage after removing common.h from export.h

2011-12-09 Thread Stefano Babic
On 09/12/2011 13:41, Wolfgang Denk wrote:
 Dear Stefano Babic,
 
 In message 4ee2006c.8070...@denx.de you wrote:

 breaks all boards - the fact is that common.h is not included anymore
 by exports.h, and this breaks the build of several file.

 Do we accept such a patch?

 Yes - it is already in mainline
 
 breaks all boards?  I did not observe this yet.
 
 Which boards are broken?

Sorry - after bisecting my tree I get the patch as resposiblo for the
brakage, and I have seen the patch was already mainlined - but I was
bisecting a tree based on u-boot-arm, not u-boot. Mainline ist still
correct ;-)

Albert, do you have seen the same issue on your tree ? I get it the
problem after rebasing today on the current u-boot-arm/master.

Best regards,
Stefano Babic

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


Re: [U-Boot] [PATCH] Fix breakage after removing common.h from export.h

2011-12-09 Thread Stefano Babic
On 09/12/2011 13:59, Stefano Babic wrote:

Albert, I tested with Wolfgang and we see that u-boot mainline has
merged already the fixes for the issues I find after rebasing on u-boot-arm:

42c4a23a55fbcccaabe9e3e76b00138185209a74 Include common.h in qsort.c to
fix build warning
f915c9316cf1dd16a5ec4da02447656f200660f0 Revert mii: miiphy register
address width change

Can you rebase you tree on the current u-boot ? Afterwards I will rebase
my tree on u-boot-arm.

Thanks,
Stefano

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


[U-Boot] iMX53 LCD support.

2011-12-09 Thread Vellemans, Noel
Hi all,

Someone that has iMX53 lcd support working in uboot (splash-screen) ?

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


Re: [U-Boot] [PATCH 04/13] common/cmd_pxe.c: Fix compile warning

2011-12-09 Thread Jason Hobbs
Dear Wolfgang,

On Fri, Dec 09, 2011 at 06:14:23AM -0500, Wolfgang Denk wrote:
 Fix:
 cmd_pxe.c: In function 'parse_pxefile_top':
 cmd_pxe.c:941:5: warning: 'err' may be used uninitialized in this
 function [-Wuninitialized]
 cmd_pxe.c:921:6: note: 'err' was declared here
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Jason Hobbs jason.ho...@calxeda.com
 ---
  common/cmd_pxe.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
 index 9426f5b..eaf95bf 100644
 --- a/common/cmd_pxe.c
 +++ b/common/cmd_pxe.c
 @@ -936,6 +936,7 @@ static int parse_menu(char **c, struct pxe_menu *cfg, 
 char *b, int nest_level)
   default:
   printf(Ignoring malformed menu command: %.*s\n,
   (int)(*c - s), s);
 + err = -1;

err should either be set to 0 here, or initialized to 0 at the top of
the function. Setting it to -1 will cause the parser to give up rather
than just printing out the warning message. It doesn't have to give up,
and not giving up makes the parser more accommodating of pxelinux
commands that aren't supported in U-Boot.

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


[U-Boot] [GIT PULL] Pull request u-boot-staging

2011-12-09 Thread Stefano Babic
Hi Wolfgang,

please pull from u-boot-staging, sba...@denx.de. There is only one patch
in the list.

The following changes since commit c4eba6ec5c58083b38340724c006294c7a4fe2eb:

  common/usb_kbd.c: fix bug introduced in commit 00b7d6e (2011-12-09
12:09:35 +0100)

are available in the git repository at:
  git://www.denx.de/git/u-boot-staging sba...@denx.de

Simon Glass (1):
  Add board_pre_console_putc to deal with early console output

 README   |   17 +
 common/console.c |   10 +-
 include/common.h |7 +++
 3 files changed, 33 insertions(+), 1 deletions(-)

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] Cache function change breaks zmx25

2011-12-09 Thread Matthias Weißer

Hi

commit 2f3427ccb915c6f6774f0bcebb67c648dc25dcfd
Author: Ilya Yanok ya...@emcraft.com
Date:   Mon Nov 28 06:37:32 2011 +

arm926ejs: add noop implementation for dcache ops

breaks zmx25 booting with the following command:

tftpboot 0x8200 foo.img; dcache on; bootm 0x8200

It is stuck then in an endless loop after dcache is disabled before 
jumping to the OS.



WARNING: cache operations are not implemented!
WARNING: disabling D-Cache now, you can re-enable itlater with 'dcache 
on' command



Switching on dcache after the tftp worked without problems until this 
patch. I think this should be fixed before the release as it may have 
effects on other boards doing similar things.


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


[U-Boot] [GIT PULL] Pull request: u-boot-imx

2011-12-09 Thread Stefano Babic
Hi Albert,

please pull from u-boot-imx. It is rebased on u-boot mainline, because
Wolfgang has already merged your u-boot-arm/master + some fixes.

The following changes since commit d82a27bc5c404da907f71960a3ed2e148ac73fd0:

  drivers/net/inca-ip_sw.c: Fix GCC 4.6 build warning (2011-12-08
21:01:19 +0100)

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

Jason Liu (4):
  i.mx: introduce the armv7/imx-common folder
  i.mx: add the initial support for freescale i.MX6Q processor
  i.mx: mxc_gpio: add the i.mx6q support
  i.mx: i.mx6q: add the initial support for i.mx6q ARM2 board

Marek Vasut (4):
  M28: Document that units has to be set to sectors on SD bootcard
  M28: Fix typo
  i.MX28: Move SPL to arch/arm/cpu/arm926ejs/mx28
  M28: Cleanup memsize.o OOT build

 MAINTAINERS|1 +
 Makefile   |8 +
 arch/arm/cpu/arm926ejs/mx28/Makefile   |4 +
 .../arm/cpu/arm926ejs/mx28/mx28_init.h |0
 arch/arm/cpu/arm926ejs/mx28/spl_boot.c |   78 +
 .../arm/cpu/arm926ejs/mx28/spl_mem_init.c  |2 +-
 .../arm/cpu/arm926ejs/mx28/spl_power_init.c|2 +-
 .../m28evk = arch/arm/cpu/arm926ejs/mx28}/start.S |0
 .../arm/cpu/arm926ejs/mx28}/u-boot-spl.lds |   14 +-
 arch/arm/cpu/armv7/imx-common/Makefile |   47 +
 arch/arm/cpu/armv7/imx-common/cpu.c|  108 ++
 arch/arm/cpu/armv7/{mx5 = imx-common}/speed.c |0
 arch/arm/cpu/armv7/{mx5 = imx-common}/timer.c |   17 +-
 arch/arm/cpu/armv7/mx5/Makefile|2 +-
 arch/arm/cpu/armv7/mx5/soc.c   |   77 -
 arch/arm/cpu/armv7/mx6/lowlevel_init.S |   24 +
 arch/arm/cpu/armv7/mx6/soc.c   |   82 +
 arch/arm/include/asm/arch-mx28/sys_proto.h |6 +
 arch/arm/include/asm/arch-mx6/ccm_regs.h   |  892 +++
 arch/arm/include/asm/arch-mx6/clock.h  |   50 +
 arch/arm/include/asm/arch-mx6/gpio.h   |   35 +
 arch/arm/include/asm/arch-mx6/imx-regs.h   |  236 +++
 arch/arm/include/asm/arch-mx6/iomux-v3.h   |  103 ++
 arch/arm/include/asm/arch-mx6/mx6x_pins.h  | 1683

 arch/arm/include/asm/arch-mx6/sys_proto.h  |   38 +
 board/denx/m28evk/Makefile |   11 +-
 board/denx/m28evk/m28evk.c |2 +-
 board/denx/m28evk/{mmc_boot.c = spl_boot.c}   |   61 +-
 board/freescale/mx6qarm2/Makefile  |   42 +
 board/freescale/mx6qarm2/imximage.cfg  |  167 ++
 board/freescale/mx6qarm2/mx6qarm2.c|  155 ++
 boards.cfg |1 +
 doc/README.m28 |3 +-
 drivers/gpio/mxc_gpio.c|4 +-
 include/configs/m28evk.h   |6 +-
 include/configs/mx6qarm2.h |  162 ++
 39 files changed, 4441 insertions(+), 167 deletions(-)
 rename board/denx/m28evk/m28_init.h =
arch/arm/cpu/arm926ejs/mx28/mx28_init.h (100%)
 create mode 100644 arch/arm/cpu/arm926ejs/mx28/spl_boot.c
 rename board/denx/m28evk/mem_init.c =
arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c (99%)
 rename board/denx/m28evk/power_init.c =
arch/arm/cpu/arm926ejs/mx28/spl_power_init.c (99%)
 rename {board/denx/m28evk = arch/arm/cpu/arm926ejs/mx28}/start.S (100%)
 rename {board/denx/m28evk =
arch/arm/cpu/arm926ejs/mx28}/u-boot-spl.lds (93%)
 create mode 100644 arch/arm/cpu/armv7/imx-common/Makefile
 create mode 100644 arch/arm/cpu/armv7/imx-common/cpu.c
 rename arch/arm/cpu/armv7/{mx5 = imx-common}/speed.c (100%)
 rename arch/arm/cpu/armv7/{mx5 = imx-common}/timer.c (84%)
 mode change 100644 = 100755
 create mode 100644 arch/arm/cpu/armv7/mx6/Makefile
 create mode 100644 arch/arm/cpu/armv7/mx6/clock.c
 create mode 100644 arch/arm/cpu/armv7/mx6/iomux-v3.c
 create mode 100644 arch/arm/cpu/armv7/mx6/lowlevel_init.S
 create mode 100644 arch/arm/cpu/armv7/mx6/soc.c
 create mode 100644 arch/arm/include/asm/arch-mx6/ccm_regs.h
 create mode 100644 arch/arm/include/asm/arch-mx6/clock.h
 create mode 100644 arch/arm/include/asm/arch-mx6/gpio.h
 create mode 100644 arch/arm/include/asm/arch-mx6/imx-regs.h
 create mode 100644 arch/arm/include/asm/arch-mx6/iomux-v3.h
 create mode 100644 arch/arm/include/asm/arch-mx6/mx6x_pins.h
 create mode 100644 arch/arm/include/asm/arch-mx6/sys_proto.h
 rename board/denx/m28evk/{mmc_boot.c = spl_boot.c} (87%)
 create mode 100644 board/freescale/mx6qarm2/Makefile
 create mode 100644 board/freescale/mx6qarm2/imximage.cfg
 create mode 100644 board/freescale/mx6qarm2/mx6qarm2.c
 create mode 100644 include/configs/mx6qarm2.h

Best regards,
Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev 

Re: [U-Boot] powerpc: FOO uses hard float, BAR uses soft float

2011-12-09 Thread Kumar Gala

On Dec 8, 2011, at 4:09 PM, Wolfgang Denk wrote:

 Hi,
 
 I'm looking for help to get rid of linker warnigns like these:
 
 - ./MAKEALL sequoia
 Configuring for sequoia - Board: sequoia, Options: SEQUOIA
 powerpc-linux-ld: Warning: 20010226-1.o uses hard float, libpostpowerpcfpu.o 
 uses soft float
 powerpc-linux-ld: Warning: acc1.o uses hard float, libpostpowerpcfpu.o uses 
 soft float
 powerpc-linux-ld: Warning: 
 /opt/eldk-5.1/powerpc/sysroots/powerpc-linux/usr/lib/powerpc-linux/4.6.1/libgcc.a(darwin-ldouble.o)
  uses hard float, u-boot uses soft float
 
 These warnings are cause by the fact that we always build U-Boot with
 -msoft-float, but boards that have POST enabled may pull in the FPU
 test code, which naturally will have to be compiled with
 -mhard-float instead.
 
 
 Is there any way to silence these warnings (ideally only for these
 specific set of files, where we know they are to be expected) ?
 
 
 I tried playing tricks to get rid of them - the information about
 using the FPU is envoded in the .gnu.attributes section of the ELF
 file:
 
 - readelf -A /work/wd/tmp-ppc/post/lib_powerpc/fpu/acc1.o
 Attribute Section: gnu
 File Attributes
  Tag_GNU_Power_ABI_FP: Hard float
 
 - readelf -e /work/wd/tmp-ppc/post/lib_powerpc/fpu/acc1.o | grep 
 gnu.attributes
  [129] .gnu.attributes   LOOS+ff5 004e5c 10 00  0   0 
  1
 
 
 We can remove this information using brute force, like
 
   ${CROSS_COMPILE}objcopy -R .gnu.attributes
 
 which indeed gets rid of most of the warnings - but it will still
 result in the
 
 powerpc-linux-ld: Warning: 
 /opt/eldk-5.1/powerpc/sysroots/powerpc-linux/usr/lib/powerpc-linux/4.6.1/libgcc.a(darwin-ldouble.o)
  uses hard float, u-boot uses soft float
 
 warning.
 
 
 Anybody any ideas?
 

Look at commit, we dealt with this in the past

commit ce82ff05388b5ddafdf6082ef0776cce72c40b1c
Author: Yuri Tikhonov y...@emcraft.com
Date:   Sat Dec 20 14:54:21 2008 +0300

FPU POST: fix warnings when building with 2.18 binutils

Also:

commit e009cdeb63308f291c54b173484401aab4a3fe54
Author: Kumar Gala ga...@kernel.crashing.org
Date:   Tue Jan 25 03:00:08 2011 -0600

powerpc: Fix FPU post related link warnings

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


Re: [U-Boot] iMX53 LCD support.

2011-12-09 Thread Stefano Babic
On 09/12/2011 14:47, Vellemans, Noel wrote:
 Hi all,
 

Hi Noel,

 Someone that has iMX53 lcd support working in uboot (splash-screen) ?

the driver is supported (CONFIG_VIDEO_MX5), see also
drivers/video/mxc_ipuv3_fb.c.

You should add your glue-logic for your LCD.

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] [GIT PULL] please pull u-boot-mpc85xx

2011-12-09 Thread Kumar Gala
The following changes since commit c4eba6ec5c58083b38340724c006294c7a4fe2eb:

  common/usb_kbd.c: fix bug introduced in commit 00b7d6e (2011-12-09 12:09:35 
+0100)

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

Kyle Moffett (1):
  mpc85xx: Add board support for the eXMeritus HWW-1U-1A devices

 MAINTAINERS   |4 +
 board/exmeritus/hww1u1a/Makefile  |   48 
 board/exmeritus/hww1u1a/ddr.c |   34 +++
 board/exmeritus/hww1u1a/gpios.h   |   69 ++
 board/exmeritus/hww1u1a/hww1u1a.c |  277 +++
 board/exmeritus/hww1u1a/law.c |   34 +++
 board/exmeritus/hww1u1a/tlb.c |  106 +
 boards.cfg|1 +
 include/configs/HWW1U1A.h |  451 +
 9 files changed, 1024 insertions(+), 0 deletions(-)
 create mode 100644 board/exmeritus/hww1u1a/Makefile
 create mode 100644 board/exmeritus/hww1u1a/ddr.c
 create mode 100644 board/exmeritus/hww1u1a/gpios.h
 create mode 100644 board/exmeritus/hww1u1a/hww1u1a.c
 create mode 100644 board/exmeritus/hww1u1a/law.c
 create mode 100644 board/exmeritus/hww1u1a/tlb.c
 create mode 100644 include/configs/HWW1U1A.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 13/13] ARM: convert omap730p2 boards to boards.cfg

2011-12-09 Thread Tom Rini
On Fri, Dec 9, 2011 at 4:14 AM, Wolfgang Denk w...@denx.de wrote:
 Signed-off-by: Wolfgang Denk w...@denx.de
 Dave Peverley dpever...@mpc-data.co.uk

Acked-by: Tom Rini tr...@ti.com

 ---
  MAKEALL    |    1 -
  Makefile   |   11 ---
  boards.cfg |    3 +++
  3 files changed, 3 insertions(+), 12 deletions(-)

 diff --git a/MAKEALL b/MAKEALL
 index c2b52d0..f735af6 100755
 --- a/MAKEALL
 +++ b/MAKEALL
 @@ -308,7 +308,6 @@ LIST_SA=$(boards_by_cpu sa1100)
  LIST_ARM9=$(boards_by_cpu arm920t)    \
        $(boards_by_cpu arm926ejs)      \
        $(boards_by_cpu arm925t)        \
 -       omap730p2               \
  

  #
 diff --git a/Makefile b/Makefile
 index 8474ce7..c37dc03 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -646,17 +646,6 @@ ucname     = $(shell echo $(1) | sed -e 
 's/\(.*\)_config/\U\1/')
  # ARM
  #

 -omap730p2_config \
 -omap730p2_cs0boot_config \
 -omap730p2_cs3boot_config :     unconfig
 -       @mkdir -p $(obj)include
 -       @if [ $(findstring _cs0boot_, $@) ] ; then \
 -               echo #define CONFIG_CS0_BOOT  $(obj)include/config.h ; \
 -       else \
 -               echo #define CONFIG_CS3_BOOT  $(obj)include/config.h ; \
 -       fi;
 -       @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap
 -
  spear300_config \
  spear310_config \
  spear320_config :      unconfig
 diff --git a/boards.cfg b/boards.cfg
 index b9cc705..9f25649 100644
 --- a/boards.cfg
 +++ b/boards.cfg
 @@ -171,6 +171,9 @@ omap1610inn_cs0boot      arm         arm926ejs   
 omap1610inn         ti             omap        omap1610inn:
  omap1610inn_cs3boot         arm         arm926ejs   omap1610inn         ti   
           omap        omap1610inn:CS3_BOOT
  omap1610inn_cs_autoboot             arm         arm926ejs   omap1610inn      
    ti             omap        omap1610inn:CS_AUTOBOOT
  omap5912osk                  arm         arm926ejs   -                   ti  
            omap
 +omap730p2                   arm         arm926ejs   omap730p2           ti   
           omap        omap730p2:CS3_BOOT
 +omap730p2_cs0boot           arm         arm926ejs   omap730p2           ti   
           omap        omap730p2:CS0_BOOT
 +omap730p2_cs3boot           arm         arm926ejs   omap730p2           ti   
           omap        omap730p2:CS3_BOOT
  edminiv2                     arm         arm926ejs   -                   
 LaCie          orion5x
  dkb                         arm         arm926ejs   -                   
 Marvell        pantheon
  versatileab                  arm         arm926ejs   versatile           
 armltd         versatile   versatile:ARCH_VERSATILE_AB
 --
 1.7.6.4

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



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


Re: [U-Boot] [PATCH 11/13] ARM: convert omap16xx boards to boards.cfg

2011-12-09 Thread Tom Rini
On Fri, Dec 9, 2011 at 4:14 AM, Wolfgang Denk w...@denx.de wrote:
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Kshitij Gupta kshi...@ti.com

Acked-by: Tom Rini tr...@ti.com

 ---
  MAKEALL    |    2 --
  Makefile   |   20 
  boards.cfg |    8 
  3 files changed, 8 insertions(+), 22 deletions(-)

 diff --git a/MAKEALL b/MAKEALL
 index 0f7b820..c2b52d0 100755
 --- a/MAKEALL
 +++ b/MAKEALL
 @@ -308,8 +308,6 @@ LIST_SA=$(boards_by_cpu sa1100)
  LIST_ARM9=$(boards_by_cpu arm920t)    \
        $(boards_by_cpu arm926ejs)      \
        $(boards_by_cpu arm925t)        \
 -       omap1610h2              \
 -       omap1610inn             \
        omap730p2               \
  

 diff --git a/Makefile b/Makefile
 index e603b9a..8474ce7 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -646,26 +646,6 @@ ucname     = $(shell echo $(1) | sed -e 
 's/\(.*\)_config/\U\1/')
  # ARM
  #

 -xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst 
 _cs_autoboot,,$(subst _config,,$1
 -
 -omap1610inn_config \
 -omap1610inn_cs0boot_config \
 -omap1610inn_cs3boot_config \
 -omap1610inn_cs_autoboot_config \
 -omap1610h2_config \
 -omap1610h2_cs0boot_config \
 -omap1610h2_cs3boot_config \
 -omap1610h2_cs_autoboot_config: unconfig
 -       @mkdir -p $(obj)include
 -       @if [ $(findstring _cs0boot_, $@) ] ; then \
 -               echo #define CONFIG_CS0_BOOT  .$(obj)include/config.h ; \
 -       elif [ $(findstring _cs_autoboot_, $@) ] ; then \
 -               echo #define CONFIG_CS_AUTOBOOT  $(obj)include/config.h ; 
 \
 -       else \
 -               echo #define CONFIG_CS3_BOOT  $(obj)include/config.h ; \
 -       fi;
 -       @$(MKCONFIG) -n $@ -a $(call xtract_omap1610xxx,$@) arm arm926ejs 
 omap1610inn ti omap
 -
  omap730p2_config \
  omap730p2_cs0boot_config \
  omap730p2_cs3boot_config :     unconfig
 diff --git a/boards.cfg b/boards.cfg
 index c1b0bad..b9cc705 100644
 --- a/boards.cfg
 +++ b/boards.cfg
 @@ -162,6 +162,14 @@ magnesium                    arm         arm926ejs   
 imx27lite           logicpd
  m28evk                       arm         arm926ejs   -                   
 denx           mx28
  nhk8815                      arm         arm926ejs   nhk8815             st  
            nomadik
  nhk8815_onenand              arm         arm926ejs   nhk8815             st  
            nomadik       nhk8815:BOOT_ONENAND
 +omap1610h2                  arm         arm926ejs   omap1610inn         ti   
           omap        omap1610inn:CS3_BOOT
 +omap1610h2_cs0boot          arm         arm926ejs   omap1610inn         ti   
           omap        omap1610inn:CS0_BOOT
 +omap1610h2_cs3boot          arm         arm926ejs   omap1610inn         ti   
           omap        omap1610inn:CS3_BOOT
 +omap1610h2_cs_autoboot      arm         arm926ejs   omap1610inn         ti   
           omap        omap1610inn:CS_AUTOBOOT
 +omap1610inn                 arm         arm926ejs   omap1610inn         ti   
           omap        omap1610inn:CS3_BOOT
 +omap1610inn_cs0boot         arm         arm926ejs   omap1610inn         ti   
           omap        omap1610inn:CS0_BOOT
 +omap1610inn_cs3boot         arm         arm926ejs   omap1610inn         ti   
           omap        omap1610inn:CS3_BOOT
 +omap1610inn_cs_autoboot             arm         arm926ejs   omap1610inn      
    ti             omap        omap1610inn:CS_AUTOBOOT
  omap5912osk                  arm         arm926ejs   -                   ti  
            omap
  edminiv2                     arm         arm926ejs   -                   
 LaCie          orion5x
  dkb                         arm         arm926ejs   -                   
 Marvell        pantheon
 --
 1.7.6.4

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



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


Re: [U-Boot] [PATCH 10/13] board/ti/omap1610inn/flash.c: Fix GCC 4.6 build warnings

2011-12-09 Thread Tom Rini
On Fri, Dec 9, 2011 at 4:14 AM, Wolfgang Denk w...@denx.de wrote:
 Fix:
 flash.c: In function 'flash_get_offsets':
 flash.c:139:10: warning: variable 'pOrgDef' set but not used
 [-Wunused-but-set-variable]
 flash.c: In function 'flash_erase':
 flash.c:280:6: warning: variable 'flag' set but not used
 [-Wunused-but-set-variable]
 flash.c: In function 'write_data':
 flash.c:456:6: warning: variable 'flag' set but not used
 [-Wunused-but-set-variable]

 Signed-off-by: Wolfgang Denk w...@denx.de

Acked-by: Tom Rini tr...@ti.com

 ---
  board/ti/omap1610inn/flash.c |   21 +
  1 files changed, 13 insertions(+), 8 deletions(-)

 diff --git a/board/ti/omap1610inn/flash.c b/board/ti/omap1610inn/flash.c
 index 1b67d08..a99a91c 100644
 --- a/board/ti/omap1610inn/flash.c
 +++ b/board/ti/omap1610inn/flash.c
 @@ -136,9 +136,7 @@ void flash_unlock(flash_info_t * info)
  static void flash_get_offsets (ulong base, flash_info_t * info)
  {
        int i;
 -       OrgDef *pOrgDef;

 -       pOrgDef = OrgIntel_28F256L18T;
        if (info-flash_id == FLASH_UNKNOWN) {
                return;
        }
 @@ -352,6 +350,9 @@ int flash_erase (flash_info_t * info, int s_first, int 
 s_last)
                        printf ( done\n);
                }
        }
 +       if (flag)
 +               enable_interrupts();
 +
        return rcode;
  }

 @@ -453,13 +454,13 @@ static int write_data (flash_info_t * info, ulong dest, 
 FPW data)
  {
        FPWV *addr = (FPWV *) dest;
        ulong status;
 -       int flag;
 +       int flag, rc = 0;
        ulong start;

        /* Check if Flash is (sufficiently) erased */
        if ((*addr  data) != data) {
 -               printf (not erased at %08lx (%x)\n, (ulong) addr, *addr);
 -               return (2);
 +               printf(not erased at %08lx (%x)\n, (ulong) addr, *addr);
 +               return 2;
        }
        /* Disable interrupts which might cause a timeout here */
        flag = disable_interrupts ();
 @@ -472,12 +473,16 @@ static int write_data (flash_info_t * info, ulong dest, 
 FPW data)
        /* wait while polling the status register */
        while (((status = *addr)  (FPW) 0x00800080) != (FPW) 0x00800080) {
                if (get_timer(start)  CONFIG_SYS_FLASH_WRITE_TOUT) {
 -                       *addr = (FPW) 0x00FF00FF;       /* restore read mode 
 */
 -                       return (1);
 +                       rc = 1;
 +                       goto done;
                }
        }
 +done:
 +       if (flag)
 +               enable_interrupts();
 +
        *addr = (FPW) 0x00FF00FF;       /* restore read mode */
 -       return (0);
 +       return rc;
  }

  void inline spin_wheel (void)
 --
 1.7.6.4

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



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


Re: [U-Boot] [PATCH 12/13] board/ti/omap730p2/flash.c: Fix GCC 4.6 build warnings

2011-12-09 Thread Tom Rini
On Fri, Dec 9, 2011 at 4:14 AM, Wolfgang Denk w...@denx.de wrote:
 Fix:
 flash.c: In function 'flash_get_offsets':
 flash.c:122:10: warning: variable 'pOrgDef' set but not used
 [-Wunused-but-set-variable]
 flash.c: In function 'flash_erase':
 flash.c:263:6: warning: variable 'flag' set but not used
 [-Wunused-but-set-variable]
 flash.c: In function 'write_data':
 flash.c:439:6: warning: variable 'flag' set but not used
 [-Wunused-but-set-variable]

 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Dave Peverley dpever...@mpc-data.co.uk

Acked-by: Tom Rini tr...@ti.com

 ---
  board/ti/omap730p2/flash.c |   19 ---
  1 files changed, 12 insertions(+), 7 deletions(-)

 diff --git a/board/ti/omap730p2/flash.c b/board/ti/omap730p2/flash.c
 index 185bc2d..a292627 100644
 --- a/board/ti/omap730p2/flash.c
 +++ b/board/ti/omap730p2/flash.c
 @@ -119,9 +119,7 @@ unsigned long flash_init (void)
  static void flash_get_offsets (ulong base, flash_info_t * info)
  {
        int i;
 -       OrgDef *pOrgDef;

 -       pOrgDef = OrgIntel_28F256L18T;
        if (info-flash_id == FLASH_UNKNOWN) {
                return;
        }
 @@ -335,6 +333,10 @@ int flash_erase (flash_info_t * info, int s_first, int 
 s_last)
                        printf ( done\n);
                }
        }
 +
 +       if (flag)
 +               enable_interrupts();
 +
        return rcode;
  }

 @@ -436,7 +438,7 @@ static int write_data (flash_info_t * info, ulong dest, 
 FPW data)
  {
        FPWV *addr = (FPWV *) dest;
        ulong status;
 -       int flag;
 +       int flag, rc = 0;
        ulong start;

        /* Check if Flash is (sufficiently) erased */
 @@ -456,12 +458,15 @@ static int write_data (flash_info_t * info, ulong dest, 
 FPW data)
        /* wait while polling the status register */
        while (((status = *addr)  (FPW) 0x00800080) != (FPW) 0x00800080) {
                if (get_timer(start)  CONFIG_SYS_FLASH_WRITE_TOUT) {
 -                       *addr = (FPW) 0x00FF00FF;       /* restore read mode 
 */
 -                       return (1);
 +                       rc = 1;
 +                       goto done;
                }
        }
 -       *addr = (FPW) 0x00FF00FF;       /* restore read mode */
 -       return (0);
 +done:
 +       *addr = (FPW)0x00FF00FF;        /* restore read mode */
 +       if (flag)
 +               enable_interrupts();
 +       return rc;
  }

  void inline spin_wheel (void)
 --
 1.7.6.4

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



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


Re: [U-Boot] Cache function change breaks zmx25

2011-12-09 Thread Ilya Yanok
Hi Matthias,

On 09.12.2011 18:24, Matthias Weißer wrote:
 breaks zmx25 booting with the following command:
 
 tftpboot 0x8200 foo.img; dcache on; bootm 0x8200
 
 It is stuck then in an endless loop after dcache is disabled before
 jumping to the OS.
 
 
 WARNING: cache operations are not implemented!
 WARNING: disabling D-Cache now, you can re-enable itlater with 'dcache
 on' command
 

Argh.. That's really bad. May I ask you to debug this a little bit?

What is exact cache function being called? Where from?
How comes that dcache_status() returns true after dcache_disable()? Or
does somebody call dcache_enable() in between?

Regards, Ilya.

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


Re: [U-Boot] [PATCH 09/13] board/LaCie/edminiv2/edminiv2.c: Fix build warning

2011-12-09 Thread Simon Guinot
On Fri, Dec 09, 2011 at 12:14:28PM +0100, Wolfgang Denk wrote:
 Fix:
 edminiv2.c: In function 'reset_phy':
 edminiv2.c:98:2: warning: implicit declaration of function
 'mv_phy_88e1116_init' [-Wimplicit-function-declaration]
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Albert ARIBAUD albert.u.b...@aribaud.net
 ---
  board/LaCie/edminiv2/edminiv2.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c
 index c1a01bc..1b33875 100644
 --- a/board/LaCie/edminiv2/edminiv2.c
 +++ b/board/LaCie/edminiv2/edminiv2.c
 @@ -27,6 +27,7 @@
  #include common.h
  #include miiphy.h
  #include asm/arch/orion5x.h
 +#include ../common/common.h
  
  DECLARE_GLOBAL_DATA_PTR;
  

My bad.

Acked-by: Simon Guinot simon.gui...@sequanux.org

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


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


[U-Boot] [PATCH] MIPS: tb0229: fix GCC 4.6 compile errors and warnings

2011-12-09 Thread Daniel Schwierzeck
Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
---
This patch fixes the last broken board when running MAKEALL -a mips.
This board was added by Wolfgang in 2004 and never had a real
maintainer. If no one care about this board, I think it could be dropped.

 board/tb0229/flash.c  |3 --
 board/tb0229/tb0229.c |   10 ---
 board/tb0229/vr4131-pci.c |   65 +++-
 3 files changed, 40 insertions(+), 38 deletions(-)

diff --git a/board/tb0229/flash.c b/board/tb0229/flash.c
index 75d7769..ec64e5c 100644
--- a/board/tb0229/flash.c
+++ b/board/tb0229/flash.c
@@ -24,7 +24,6 @@
  */
 
 #include common.h
-#include asm/ppc4xx.h
 #include asm/processor.h
 
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips 
   */
@@ -59,8 +58,6 @@ unsigned long flash_init (void)
 {
unsigned long size_b0, size_b1;
int i;
-   uint pbcr;
-   unsigned long base_b0, base_b1;
 
/* Init: no FLASHes known */
for (i = 0; i  CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
diff --git a/board/tb0229/tb0229.c b/board/tb0229/tb0229.c
index d3f05b2..9c284f0 100644
--- a/board/tb0229/tb0229.c
+++ b/board/tb0229/tb0229.c
@@ -11,6 +11,7 @@
 
 #include common.h
 #include command.h
+#include netdev.h
 #include asm/addrspace.h
 #include asm/io.h
 #include asm/reboot.h
@@ -26,21 +27,22 @@ void _machine_restart(void)
 #if defined(CONFIG_PCI)
 static struct pci_controller hose;
 
-void pci_init_board (void)
+void pci_init_board(void)
 {
+   extern void init_vr4131_pci(struct pci_controller *hose);
init_vr4131_pci(hose);
 }
 #endif
 
 phys_size_t initdram(int board_type)
 {
-   return get_ram_size (CONFIG_SYS_SDRAM_BASE, 0x800);
+   return get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, 0x800);
 }
 
-int checkboard (void)
+int checkboard(void)
 {
printf(Board: TANBAC TB0229 );
-   printf((CPU Speed %d MHz)\n, (int)CPU_CLOCK_RATE/100);
+   printf((CPU Speed %d MHz)\n, (int) CPU_CLOCK_RATE / 100);
 
set_io_port_base(0);
 
diff --git a/board/tb0229/vr4131-pci.c b/board/tb0229/vr4131-pci.c
index 6ff4293..a011391 100644
--- a/board/tb0229/vr4131-pci.c
+++ b/board/tb0229/vr4131-pci.c
@@ -56,8 +56,8 @@ volatile unsigned int *pciconfigdata;
  * Access PCI Configuration Register for VR4131
  */
 
-static int vr4131_pci_config_access (u8 access_type, u32 dev, u32 reg,
-u32 * data)
+static int vr4131_pci_config_access(u8 access_type, pci_dev_t dev, int reg,
+   u32 *data)
 {
u32 bus;
u32 device;
@@ -73,20 +73,20 @@ static int vr4131_pci_config_access (u8 access_type, u32 
dev, u32 reg,
*VR4131_PCICONFAREG = (u32) (dev | ((reg / 4)  2) | 1);
}
 
-   if (access_type == PCI_ACCESS_WRITE) {
+   if (access_type == PCI_ACCESS_WRITE)
*VR4131_PCICONFDREG = *data;
-   } else {
+   else
*data = *VR4131_PCICONFDREG;
-   }
 
return (0);
 }
 
-static int vr4131_pci_read_config_byte (u32 hose, u32 dev, u32 reg, u8 * val)
+static int vr4131_pci_read_config_byte(struct pci_controller *hose,
+   pci_dev_t dev, int reg, u8 *val)
 {
u32 data;
 
-   if (vr4131_pci_config_access (PCI_ACCESS_READ, dev, reg, data))
+   if (vr4131_pci_config_access(PCI_ACCESS_READ, dev, reg, data))
return -1;
 
*val = (data  ((reg  3)  3))  0xff;
@@ -95,14 +95,15 @@ static int vr4131_pci_read_config_byte (u32 hose, u32 dev, 
u32 reg, u8 * val)
 }
 
 
-static int vr4131_pci_read_config_word (u32 hose, u32 dev, u32 reg, u16 * val)
+static int vr4131_pci_read_config_word(struct pci_controller *hose,
+   pci_dev_t dev, int reg, u16 *val)
 {
u32 data;
 
if (reg  1)
return -1;
 
-   if (vr4131_pci_config_access (PCI_ACCESS_READ, dev, reg, data))
+   if (vr4131_pci_config_access(PCI_ACCESS_READ, dev, reg, data))
return -1;
 
*val = (data  ((reg  3)  3))  0x;
@@ -111,15 +112,15 @@ static int vr4131_pci_read_config_word (u32 hose, u32 
dev, u32 reg, u16 * val)
 }
 
 
-static int vr4131_pci_read_config_dword (u32 hose, u32 dev, u32 reg,
-u32 * val)
+static int vr4131_pci_read_config_dword(struct pci_controller *hose,
+   pci_dev_t dev, int reg, u32 *val)
 {
u32 data = 0;
 
if (reg  3)
return -1;
 
-   if (vr4131_pci_config_access (PCI_ACCESS_READ, dev, reg, data))
+   if (vr4131_pci_config_access(PCI_ACCESS_READ, dev, reg, data))
return -1;
 
*val = data;
@@ -127,53 +128,55 @@ static int vr4131_pci_read_config_dword (u32 hose, u32 
dev, u32 reg,
return (0);
 }
 
-static int vr4131_pci_write_config_byte (u32 hose, u32 dev, u32 reg, u8 val)

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

2011-12-09 Thread Albert ARIBAUD

Hi Stephen,

Le 08/12/2011 17:45, Stephen Warren a écrit :

On 12/08/2011 12:22 AM, Albert ARIBAUD wrote:

Hi Tom,

Le 08/12/2011 00:35, Tom Warren a écrit :


Albert,

This is my first pull request for u-boot-tegra. Let me know if I’ve
screwed it up in any way!


Actually:


The following changes since commit 3865b6eba83707e1ad134bd42da426fd032948f5:

MX35: flea3: changes due to hardware revision B (2011-12-05 18:31:20 +0100)


... This is not the current u-boot-arm/master branch tip, and rebasing
on it fails. Please rebase your master branch on top of
u-boot-arm/master (davinci: Remove unwanted memsize.c from hawkboard's
nand spl build, commit id 15422043c4a213dc5d7d59a337be1ab34c9b2e7f)
then post a new pull request.


Albert,

Given that u-boot-arm/master is continually rebased, how would Tom avoid
the following, which I think is what happened:

1) pull u-boot-arm/master
2) apply patches to it
3) test
4) send pull request

... while between (1) and (4), you've rebased u-boot-arm/master?

I think in the Linux kernel world, this is avoided by having downstream
branches based on stable branches in Linus' tree rather than directly
on their upstream. This will still allow pull/merge to work fine, but
means that there's never a time window that can invalidate the baseline
the pull requests are based on.

Would something like this work for U-Boot too?

Or perhaps, u-boot-arm could publish a stable branch for downstream to
base on, yet allow the rest of master to be rebased as needed?


Note: the rules I follow for pulling requests to u-boot-arm/master are 
actually those applying to u-boot/master, so I guess the issue you are 
raising with u-boot-arm could occur with u-boot/master as well -- it 
moves just like u-boot-arm does, after all.


That being said, I do not reject pull requests solely because they are 
not based on current u-boot-arm/master, precisely because I know it is a 
moving target at times. So if the request is not based on top of 
u-boot-arm/master, I try a rebase myself and if it succeeds trivially 
and I feel confident that there will be no interaction with the commits 
I've added in between, then I just accept the (now rebased) pull request 
-- this I have just done again a few days ago. If the pull request does 
not rebase trivially, then I ask the submitter to rebase because he's 
the best person to understand and solve the rebase conflict.


I believe this matches the intent of what you are proposing, but anyway, 
Wolfgang has the last word -- as usual. :)


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


[U-Boot] [PATCH 0/2] Use lldiv from div64.h for 64-bit divisions

2011-12-09 Thread Christian Riesch
Hi,
During the review of my patchset

[PATCH v5 0/6] Add an SPL to boot the da850evm from SPI
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/119249/

a linker problem was discovered by Tom Rini and Wolfgang Denk that
occured only with certain toolchains:

 arm-linux-gnueabi-ld: error: no memory region specified for loadable
 section `.ARM.exidx'

This section .ARM.exidx is only present when the 64-bit division
from libgcc is used. 

The two patches in this patchset replace the 64-bit divisions in
arch/arm/cpu/arm926ejs/davinci/timer.c and post/post.c by the
lldiv function from div64.h and thus fix the linker problem.

Regards, Christian

Cc: Tom Rini tr...@ti.com
Cc: Heiko Schocher h...@denx.de
Cc: Wolfgang Denk w...@denx.de

Christian Riesch (2):
  arm, davinci: Use lldiv for the 64-bit divisions in timer.c
  post/post.c: Use lldiv for 64-bit divisions

 arch/arm/cpu/arm926ejs/davinci/timer.c |6 --
 post/post.c|3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

-- 
1.7.4.1

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


[U-Boot] [PATCH 1/2] arm, davinci: Use lldiv for the 64-bit divisions in timer.c

2011-12-09 Thread Christian Riesch
Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Tom Rini tr...@ti.com
Cc: Heiko Schocher h...@denx.de
Cc: Wolfgang Denk w...@denx.de
---
 arch/arm/cpu/arm926ejs/davinci/timer.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/davinci/timer.c 
b/arch/arm/cpu/arm926ejs/davinci/timer.c
index c7bf7a5..a06d449 100644
--- a/arch/arm/cpu/arm926ejs/davinci/timer.c
+++ b/arch/arm/cpu/arm926ejs/davinci/timer.c
@@ -40,6 +40,7 @@
 #include common.h
 #include asm/io.h
 #include asm/arch/timer_defs.h
+#include div64.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -86,14 +87,15 @@ ulong get_timer(ulong base)
 
timer_diff = get_ticks() - gd-timer_reset_value;
 
-   return (timer_diff / (gd-timer_rate_hz / CONFIG_SYS_HZ)) - base;
+   return lldiv(timer_diff, (gd-timer_rate_hz / CONFIG_SYS_HZ)) - base;
 }
 
 void __udelay(unsigned long usec)
 {
unsigned long long endtime;
 
-   endtime = ((unsigned long long)usec * gd-timer_rate_hz) / 100UL;
+   endtime = lldiv((unsigned long long)usec * gd-timer_rate_hz,
+   100UL);
endtime += get_ticks();
 
while (get_ticks()  endtime)
-- 
1.7.4.1

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


[U-Boot] [PATCH 2/2] post/post.c: Use lldiv for 64-bit divisions

2011-12-09 Thread Christian Riesch
Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Tom Rini tr...@ti.com
Cc: Heiko Schocher h...@denx.de
Cc: Wolfgang Denk w...@denx.de
---
 post/post.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/post/post.c b/post/post.c
index 0e67ad7..45e08f8 100644
--- a/post/post.c
+++ b/post/post.c
@@ -24,6 +24,7 @@
 #include common.h
 #include stdio_dev.h
 #include watchdog.h
+#include div64.h
 #include post.h
 
 #ifdef CONFIG_SYS_POST_HOTKEYS_GPIO
@@ -495,7 +496,7 @@ void post_reloc(void)
 unsigned long post_time_ms(unsigned long base)
 {
 #if defined(CONFIG_PPC) || defined(CONFIG_ARM)
-   return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ))
+   return (unsigned long)lldiv(get_ticks(), get_tbclk() / CONFIG_SYS_HZ)
- base;
 #else
 #warning Not implemented yet
-- 
1.7.4.1

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


[U-Boot] Pull request: u-boot-staging

2011-12-09 Thread Anatolij Gustschin
Hello Wolfgang,

The following changes since commit c4eba6ec5c58083b38340724c006294c7a4fe2eb:

  common/usb_kbd.c: fix bug introduced in commit 00b7d6e (2011-12-09 12:09:35 
+0100)

are available in the git repository at:
  git://git.denx.de/u-boot-staging.git ag...@denx.de

Ash Charles (1):
  omap: TWL4030 Bump VMMC1 interface voltage from 3V to 3.15V

Gabe Black (1):
  Update pci_ids.h from current Linux sources

Steve Sakoman (1):
  omap: overo: Use ubifs instead of jffs2 for nand

 drivers/power/twl4030.c   |4 +-
 include/configs/omap3_overo.h |4 +-
 include/pci_ids.h | 2068 -
 include/twl4030.h |1 +
 4 files changed, 1431 insertions(+), 646 deletions(-)

Please pull. Thanks!

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


Re: [U-Boot] Pull request: u-boot-tegra/master, take 2

2011-12-09 Thread Albert ARIBAUD

Hi Tom,

Le 08/12/2011 17:48, Tom Warren a écrit :

Albert,

Here's my rebased pull request. Thanks for your patience!

The following changes since commit 15422043c4a213dc5d7d59a337be1ab34c9b2e7f:

   davinci: Remove unwanted memsize.c from hawkboard's nand spl build 
(2011-12-06 23:59:41 +0100)

are available in the git repository at:
   git://git.denx.de/u-boot-tegra.git ..BRANCH.NOT.VERIFIED..

Simon Glass (9):
   tegra2: Add arch_cpu_init() to fire up Cortex-A9
   tegra2: Simplify tegra_start() boot path
   arm: Move CP15 init out of cpu_init_crit()
   tegra2: Enable instruction cache
   tegra2: Remove unneeded boot code
   tegra2: Remove unneeded config option
   tegra2: Remove unused low-level Tegra2 UART code
   tegra2: Remove unneeded 'dynamic ram size' message
   tegra2: Don't use board pointer before it is set up

Stephen Warren (4):
   tegra2: Move board_mmc_init into board files
   tegra2: Modify MMC driver to handle power and cd GPIOs
   tegra2: Add support for Ventana
   tegra2: Use new GPIO APIs in gpio_config_uart()

MAINTAINERS|5 +
arch/arm/cpu/armv7/start.S |   36 +++---
arch/arm/cpu/armv7/tegra2/Makefile |5 +
arch/arm/cpu/armv7/tegra2/ap20.c   |   54 +
arch/arm/cpu/armv7/tegra2/ap20.h   |   10 +-
arch/arm/cpu/armv7/tegra2/board.c  |   35 +++---
arch/arm/cpu/armv7/tegra2/config.mk|7 +-
arch/arm/cpu/armv7/tegra2/lowlevel_init.S  |  118 
arch/arm/include/asm/u-boot-arm.h  |3 +
board/nvidia/common/board.c|   58 +-
board/nvidia/common/board.h|4 +-
board/nvidia/harmony/harmony.c |   57 --
board/nvidia/seaboard/seaboard.c   |   81 --
board/nvidia/ventana/Makefile  |   49 
boards.cfg |1 +
drivers/gpio/tegra2_gpio.c |6 +-
drivers/mmc/tegra2_mmc.c   |   42 ++-
drivers/mmc/tegra2_mmc.h   |4 +-
drivers/serial/Makefile|1 -
drivers/serial/serial_tegra2.c |   77 -
include/configs/tegra2-common.h|3 +-
.../serial_tegra2.h =  include/configs/ventana.h   |   34 +-
22 files changed, 308 insertions(+), 382 deletions(-)
create mode 100644 board/nvidia/ventana/Makefile
delete mode 100644 drivers/serial/serial_tegra2.c
rename drivers/serial/serial_tegra2.h =  include/configs/ventana.h (51%)


Applied to u-boot-arm/master, thanks!

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


Re: [U-Boot] please pull u-boot-samsung/master

2011-12-09 Thread Albert ARIBAUD

Hi Minkyu,

Le 09/12/2011 10:15, Minkyu Kang a écrit :

Dear Albert,

The following changes since commit 15422043c4a213dc5d7d59a337be1ab34c9b2e7f:

   davinci: Remove unwanted memsize.c from hawkboard's nand spl build
(2011-12-06 23:59:41 +0100)

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

Chander Kashyap (1):
   S5PC2XX: Rename S5pc2XX to exynos

  MAINTAINERS|6 +-
  Makefile   |2 +-
  arch/arm/cpu/armv7/{s5pc2xx =  exynos}/Makefile|0
  arch/arm/cpu/armv7/{s5pc2xx =  exynos}/clock.c |   50 
  arch/arm/cpu/armv7/{s5pc2xx =  exynos}/soc.c   |0
  .../asm/{arch-s5pc2xx =  arch-exynos}/adc.h|0
  .../asm/{arch-s5pc2xx =  arch-exynos}/clk.h|0
  .../asm/{arch-s5pc2xx =  arch-exynos}/clock.h  |2 +-
  .../asm/{arch-s5pc2xx =  arch-exynos}/cpu.h|   64 
++--
  .../asm/{arch-s5pc2xx =  arch-exynos}/gpio.h   |   28 
  .../asm/{arch-s5pc2xx =  arch-exynos}/mmc.h|0
  .../asm/{arch-s5pc2xx =  arch-exynos}/pwm.h|0
  .../asm/{arch-s5pc2xx =  arch-exynos}/sromc.h  |0
  .../asm/{arch-s5pc2xx =  arch-exynos}/sys_proto.h  |0
  .../asm/{arch-s5pc2xx =  arch-exynos}/uart.h   |0
  board/samsung/origen/lowlevel_init.S   |   26 
  board/samsung/origen/mem_setup.S   |   12 ++--
  board/samsung/origen/origen.c  |8 +-
  board/samsung/origen/origen_setup.h|8 +-
  board/samsung/smdkv310/lowlevel_init.S |   22 
  board/samsung/smdkv310/mem_setup.S |8 +-
  board/samsung/smdkv310/smdkv310.c  |8 +-
  board/samsung/universal_c210/lowlevel_init.S   |   24 
  board/samsung/universal_c210/universal.c   |8 +-
  boards.cfg |6 +-
  include/configs/origen.h   |6 +-
  include/configs/s5pc210_universal.h|   10 ++--
  include/configs/smdkv310.h |6 +-
  28 files changed, 152 insertions(+), 152 deletions(-)
  rename arch/arm/cpu/armv7/{s5pc2xx =  exynos}/Makefile (100%)
  rename arch/arm/cpu/armv7/{s5pc2xx =  exynos}/clock.c (81%)
  rename arch/arm/cpu/armv7/{s5pc2xx =  exynos}/soc.c (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/adc.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/clk.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/clock.h (99%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/cpu.h (64%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/gpio.h (84%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/mmc.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/pwm.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/sromc.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/sys_proto.h (100%)
  rename arch/arm/include/asm/{arch-s5pc2xx =  arch-exynos}/uart.h (100%)


Applied to u-boot-arm/master, thanks.

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


Re: [U-Boot] [GIT PULL] Pull request: u-boot-imx

2011-12-09 Thread Albert ARIBAUD

Hi Stefano,

Le 09/12/2011 15:34, Stefano Babic a écrit :

Hi Albert,

please pull from u-boot-imx. It is rebased on u-boot mainline, because
Wolfgang has already merged your u-boot-arm/master + some fixes.

The following changes since commit d82a27bc5c404da907f71960a3ed2e148ac73fd0:

   drivers/net/inca-ip_sw.c: Fix GCC 4.6 build warning (2011-12-08
21:01:19 +0100)

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

Jason Liu (4):
   i.mx: introduce the armv7/imx-common folder
   i.mx: add the initial support for freescale i.MX6Q processor
   i.mx: mxc_gpio: add the i.mx6q support
   i.mx: i.mx6q: add the initial support for i.mx6q ARM2 board

Marek Vasut (4):
   M28: Document that units has to be set to sectors on SD bootcard
   M28: Fix typo
   i.MX28: Move SPL to arch/arm/cpu/arm926ejs/mx28
   M28: Cleanup memsize.o OOT build

  MAINTAINERS|1 +
  Makefile   |8 +
  arch/arm/cpu/arm926ejs/mx28/Makefile   |4 +
  .../arm/cpu/arm926ejs/mx28/mx28_init.h |0
  arch/arm/cpu/arm926ejs/mx28/spl_boot.c |   78 +
  .../arm/cpu/arm926ejs/mx28/spl_mem_init.c  |2 +-
  .../arm/cpu/arm926ejs/mx28/spl_power_init.c|2 +-
  .../m28evk =  arch/arm/cpu/arm926ejs/mx28}/start.S |0
  .../arm/cpu/arm926ejs/mx28}/u-boot-spl.lds |   14 +-
  arch/arm/cpu/armv7/imx-common/Makefile |   47 +
  arch/arm/cpu/armv7/imx-common/cpu.c|  108 ++
  arch/arm/cpu/armv7/{mx5 =  imx-common}/speed.c |0
  arch/arm/cpu/armv7/{mx5 =  imx-common}/timer.c |   17 +-
  arch/arm/cpu/armv7/mx5/Makefile|2 +-
  arch/arm/cpu/armv7/mx5/soc.c   |   77 -
  arch/arm/cpu/armv7/mx6/lowlevel_init.S |   24 +
  arch/arm/cpu/armv7/mx6/soc.c   |   82 +
  arch/arm/include/asm/arch-mx28/sys_proto.h |6 +
  arch/arm/include/asm/arch-mx6/ccm_regs.h   |  892 +++
  arch/arm/include/asm/arch-mx6/clock.h  |   50 +
  arch/arm/include/asm/arch-mx6/gpio.h   |   35 +
  arch/arm/include/asm/arch-mx6/imx-regs.h   |  236 +++
  arch/arm/include/asm/arch-mx6/iomux-v3.h   |  103 ++
  arch/arm/include/asm/arch-mx6/mx6x_pins.h  | 1683

  arch/arm/include/asm/arch-mx6/sys_proto.h  |   38 +
  board/denx/m28evk/Makefile |   11 +-
  board/denx/m28evk/m28evk.c |2 +-
  board/denx/m28evk/{mmc_boot.c =  spl_boot.c}   |   61 +-
  board/freescale/mx6qarm2/Makefile  |   42 +
  board/freescale/mx6qarm2/imximage.cfg  |  167 ++
  board/freescale/mx6qarm2/mx6qarm2.c|  155 ++
  boards.cfg |1 +
  doc/README.m28 |3 +-
  drivers/gpio/mxc_gpio.c|4 +-
  include/configs/m28evk.h   |6 +-
  include/configs/mx6qarm2.h |  162 ++
  39 files changed, 4441 insertions(+), 167 deletions(-)
  rename board/denx/m28evk/m28_init.h =
arch/arm/cpu/arm926ejs/mx28/mx28_init.h (100%)
  create mode 100644 arch/arm/cpu/arm926ejs/mx28/spl_boot.c
  rename board/denx/m28evk/mem_init.c =
arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c (99%)
  rename board/denx/m28evk/power_init.c =
arch/arm/cpu/arm926ejs/mx28/spl_power_init.c (99%)
  rename {board/denx/m28evk =  arch/arm/cpu/arm926ejs/mx28}/start.S (100%)
  rename {board/denx/m28evk =
arch/arm/cpu/arm926ejs/mx28}/u-boot-spl.lds (93%)
  create mode 100644 arch/arm/cpu/armv7/imx-common/Makefile
  create mode 100644 arch/arm/cpu/armv7/imx-common/cpu.c
  rename arch/arm/cpu/armv7/{mx5 =  imx-common}/speed.c (100%)
  rename arch/arm/cpu/armv7/{mx5 =  imx-common}/timer.c (84%)
  mode change 100644 =  100755
  create mode 100644 arch/arm/cpu/armv7/mx6/Makefile
  create mode 100644 arch/arm/cpu/armv7/mx6/clock.c
  create mode 100644 arch/arm/cpu/armv7/mx6/iomux-v3.c
  create mode 100644 arch/arm/cpu/armv7/mx6/lowlevel_init.S
  create mode 100644 arch/arm/cpu/armv7/mx6/soc.c
  create mode 100644 arch/arm/include/asm/arch-mx6/ccm_regs.h
  create mode 100644 arch/arm/include/asm/arch-mx6/clock.h
  create mode 100644 arch/arm/include/asm/arch-mx6/gpio.h
  create mode 100644 arch/arm/include/asm/arch-mx6/imx-regs.h
  create mode 100644 arch/arm/include/asm/arch-mx6/iomux-v3.h
  create mode 100644 arch/arm/include/asm/arch-mx6/mx6x_pins.h
  create mode 100644 arch/arm/include/asm/arch-mx6/sys_proto.h
  rename board/denx/m28evk/{mmc_boot.c =  spl_boot.c} (87%)
  create mode 100644 board/freescale/mx6qarm2/Makefile
  create mode 100644 board/freescale/mx6qarm2/imximage.cfg
  create mode 100644 board/freescale/mx6qarm2/mx6qarm2.c
  create mode 100644 include/configs/mx6qarm2.h

Best regards,

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

2011-12-09 Thread Albert ARIBAUD

Hi Wolfgang,

The following changes since commit c4eba6ec5c58083b38340724c006294c7a4fe2eb:

  common/usb_kbd.c: fix bug introduced in commit 00b7d6e (2011-12-09 
12:09:35 +0100)


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

Chander Kashyap (1):
  S5PC2XX: Rename S5pc2XX to exynos

Jason Liu (4):
  i.mx: introduce the armv7/imx-common folder
  i.mx: add the initial support for freescale i.MX6Q processor
  i.mx: mxc_gpio: add the i.mx6q support
  i.mx: i.mx6q: add the initial support for i.mx6q ARM2 board

Marek Vasut (4):
  M28: Document that units has to be set to sectors on SD bootcard
  M28: Fix typo
  i.MX28: Move SPL to arch/arm/cpu/arm926ejs/mx28
  M28: Cleanup memsize.o OOT build

Simon Glass (9):
  tegra2: Add arch_cpu_init() to fire up Cortex-A9
  tegra2: Simplify tegra_start() boot path
  arm: Move CP15 init out of cpu_init_crit()
  tegra2: Enable instruction cache
  tegra2: Remove unneeded boot code
  tegra2: Remove unneeded config option
  tegra2: Remove unused low-level Tegra2 UART code
  tegra2: Remove unneeded 'dynamic ram size' message
  tegra2: Don't use board pointer before it is set up

Stephen Warren (4):
  tegra2: Move board_mmc_init into board files
  tegra2: Modify MMC driver to handle power and cd GPIOs
  tegra2: Add support for Ventana
  tegra2: Use new GPIO APIs in gpio_config_uart()

 MAINTAINERS|   12 +-
 Makefile   |   10 +-
 arch/arm/cpu/arm926ejs/mx28/Makefile   |4 +
 .../arm/cpu/arm926ejs/mx28/mx28_init.h |0
 arch/arm/cpu/arm926ejs/mx28/spl_boot.c |   78 +
 .../arm/cpu/arm926ejs/mx28/spl_mem_init.c  |2 +-
 .../arm/cpu/arm926ejs/mx28/spl_power_init.c|2 +-
 .../m28evk = arch/arm/cpu/arm926ejs/mx28}/start.S |0
 .../arm/cpu/arm926ejs/mx28}/u-boot-spl.lds |   14 +-
 arch/arm/cpu/armv7/{s5pc2xx = exynos}/Makefile|0
 arch/arm/cpu/armv7/{s5pc2xx = exynos}/clock.c |   50 +-
 arch/arm/cpu/armv7/{s5pc2xx = exynos}/soc.c   |0
 arch/arm/cpu/armv7/imx-common/Makefile |   47 +
 arch/arm/cpu/armv7/imx-common/cpu.c|  108 ++
 arch/arm/cpu/armv7/{mx5 = imx-common}/speed.c |0
 arch/arm/cpu/armv7/{mx5 = imx-common}/timer.c |   17 +-
 arch/arm/cpu/armv7/mx5/Makefile|2 +-
 arch/arm/cpu/armv7/mx5/soc.c   |   77 -
 arch/arm/cpu/armv7/mx6/Makefile|   48 +
 arch/arm/cpu/armv7/mx6/clock.c |  366 +
 arch/arm/cpu/armv7/mx6/iomux-v3.c  |   71 +
 arch/arm/cpu/armv7/mx6/lowlevel_init.S |   24 +
 arch/arm/cpu/armv7/mx6/soc.c   |   82 +
 arch/arm/cpu/armv7/start.S |   36 +-
 arch/arm/cpu/armv7/tegra2/Makefile |5 +
 arch/arm/cpu/armv7/tegra2/ap20.c   |   54 +-
 arch/arm/cpu/armv7/tegra2/ap20.h   |   10 +-
 arch/arm/cpu/armv7/tegra2/board.c  |   35 +-
 arch/arm/cpu/armv7/tegra2/config.mk|7 +-
 arch/arm/cpu/armv7/tegra2/lowlevel_init.S  |  118 --
 .../asm/{arch-s5pc2xx = arch-exynos}/adc.h|0
 .../asm/{arch-s5pc2xx = arch-exynos}/clk.h|0
 .../asm/{arch-s5pc2xx = arch-exynos}/clock.h  |2 +-
 .../asm/{arch-s5pc2xx = arch-exynos}/cpu.h|   64 +-
 .../asm/{arch-s5pc2xx = arch-exynos}/gpio.h   |   28 +-
 .../asm/{arch-s5pc2xx = arch-exynos}/mmc.h|0
 .../asm/{arch-s5pc2xx = arch-exynos}/pwm.h|0
 .../asm/{arch-s5pc2xx = arch-exynos}/sromc.h  |0
 .../asm/{arch-s5pc2xx = arch-exynos}/sys_proto.h  |0
 .../asm/{arch-s5pc2xx = arch-exynos}/uart.h   |0
 arch/arm/include/asm/arch-mx28/sys_proto.h |6 +
 arch/arm/include/asm/arch-mx6/ccm_regs.h   |  892 +++
 arch/arm/include/asm/arch-mx6/clock.h  |   50 +
 .../arm/include/asm/arch-mx6/gpio.h|   18 +-
 arch/arm/include/asm/arch-mx6/imx-regs.h   |  236 +++
 arch/arm/include/asm/arch-mx6/iomux-v3.h   |  103 ++
 arch/arm/include/asm/arch-mx6/mx6x_pins.h  | 1683 


 arch/arm/include/asm/arch-mx6/sys_proto.h  |   38 +
 arch/arm/include/asm/u-boot-arm.h  |3 +
 board/denx/m28evk/Makefile |   11 +-
 board/denx/m28evk/m28evk.c |2 +-
 board/denx/m28evk/{mmc_boot.c = spl_boot.c}   |   61 +-
 board/freescale/mx6qarm2/Makefile  |   42 +
 board/freescale/mx6qarm2/imximage.cfg  |  167 ++
 board/freescale/mx6qarm2/mx6qarm2.c|  155 ++
 board/nvidia/common/board.c|   58 +-
 board/nvidia/common/board.h|4 +-
 board/nvidia/harmony/harmony.c 

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

2011-12-09 Thread Stephen Warren
On 12/09/2011 08:36 AM, Albert ARIBAUD wrote:
 Hi Stephen,
 
 Le 08/12/2011 17:45, Stephen Warren a écrit :
 On 12/08/2011 12:22 AM, Albert ARIBAUD wrote:
 Hi Tom,

 Le 08/12/2011 00:35, Tom Warren a écrit :

 Albert,

 This is my first pull request for u-boot-tegra. Let me know if I’ve
 screwed it up in any way!

 Actually:

 The following changes since commit 
 3865b6eba83707e1ad134bd42da426fd032948f5:

 MX35: flea3: changes due to hardware revision B (2011-12-05 18:31:20 +0100)

 ... This is not the current u-boot-arm/master branch tip, and rebasing
 on it fails. Please rebase your master branch on top of
 u-boot-arm/master (davinci: Remove unwanted memsize.c from hawkboard's
 nand spl build, commit id 15422043c4a213dc5d7d59a337be1ab34c9b2e7f)
 then post a new pull request.

 Albert,

 Given that u-boot-arm/master is continually rebased, how would Tom avoid
 the following, which I think is what happened:

 1) pull u-boot-arm/master
 2) apply patches to it
 3) test
 4) send pull request

 ... while between (1) and (4), you've rebased u-boot-arm/master?

 I think in the Linux kernel world, this is avoided by having downstream
 branches based on stable branches in Linus' tree rather than directly
 on their upstream. This will still allow pull/merge to work fine, but
 means that there's never a time window that can invalidate the baseline
 the pull requests are based on.

 Would something like this work for U-Boot too?

 Or perhaps, u-boot-arm could publish a stable branch for downstream to
 base on, yet allow the rest of master to be rebased as needed?
 
 Note: the rules I follow for pulling requests to u-boot-arm/master are 
 actually those applying to u-boot/master, so I guess the issue you are 
 raising with u-boot-arm could occur with u-boot/master as well -- it 
 moves just like u-boot-arm does, after all.

Doesn't u-boot/master only move forward by merges, whereas
u-boot-arm/master move forward by rebases?

When the base branch moves forward with merges, there's no issue, since
the point the child branch was branched from always exists in the
history of the parent branch, so git merge always knows what to use as
the base of the 3-way merge.

With rebases, the history the child branch is based upon no longer
exists in the parent.

 That being said, I do not reject pull requests solely because they are 
 not based on current u-boot-arm/master, precisely because I know it is a 
 moving target at times. So if the request is not based on top of 
 u-boot-arm/master, I try a rebase myself and if it succeeds trivially 
 and I feel confident that there will be no interaction with the commits 
 I've added in between, then I just accept the (now rebased) pull request 
 -- this I have just done again a few days ago. If the pull request does 
 not rebase trivially, then I ask the submitter to rebase because he's 
 the best person to understand and solve the rebase conflict.
 
 I believe this matches the intent of what you are proposing, but anyway, 
 Wolfgang has the last word -- as usual. :)

OK, there would most likely be the same merge conflicts with merging
rather than rebasing (although I think the 3-way merge process might be
easier to resolve than the rebase process), and so I suppose you'd end
up rejecting the merge request too. That's seems somewhat different to
the kernel process, hence my quest for understanding!

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


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

2011-12-09 Thread Albert ARIBAUD

Le 09/12/2011 18:10, Stephen Warren a écrit :

On 12/09/2011 08:36 AM, Albert ARIBAUD wrote:

Hi Stephen,

Le 08/12/2011 17:45, Stephen Warren a écrit :

On 12/08/2011 12:22 AM, Albert ARIBAUD wrote:

Hi Tom,

Le 08/12/2011 00:35, Tom Warren a écrit :


Albert,

This is my first pull request for u-boot-tegra. Let me know if I’ve
screwed it up in any way!


Actually:


The following changes since commit 3865b6eba83707e1ad134bd42da426fd032948f5:

MX35: flea3: changes due to hardware revision B (2011-12-05 18:31:20 +0100)


... This is not the current u-boot-arm/master branch tip, and rebasing
on it fails. Please rebase your master branch on top of
u-boot-arm/master (davinci: Remove unwanted memsize.c from hawkboard's
nand spl build, commit id 15422043c4a213dc5d7d59a337be1ab34c9b2e7f)
then post a new pull request.


Albert,

Given that u-boot-arm/master is continually rebased, how would Tom avoid
the following, which I think is what happened:

1) pull u-boot-arm/master
2) apply patches to it
3) test
4) send pull request

... while between (1) and (4), you've rebased u-boot-arm/master?

I think in the Linux kernel world, this is avoided by having downstream
branches based on stable branches in Linus' tree rather than directly
on their upstream. This will still allow pull/merge to work fine, but
means that there's never a time window that can invalidate the baseline
the pull requests are based on.

Would something like this work for U-Boot too?

Or perhaps, u-boot-arm could publish a stable branch for downstream to
base on, yet allow the rest of master to be rebased as needed?


Note: the rules I follow for pulling requests to u-boot-arm/master are
actually those applying to u-boot/master, so I guess the issue you are
raising with u-boot-arm could occur with u-boot/master as well -- it
moves just like u-boot-arm does, after all.


Doesn't u-boot/master only move forward by merges, whereas
u-boot-arm/master move forward by rebases?


Well, as per the wiki, u-boot/master should move by rebases, or more 
exactly, by fast-forwards, as pull requests to it should always be 
(re)based on it.



When the base branch moves forward with merges, there's no issue, since
the point the child branch was branched from always exists in the
history of the parent branch, so git merge always knows what to use as
the base of the 3-way merge.

With rebases, the history the child branch is based upon no longer
exists in the parent.


If you mean the history of which repo the commit entered initially and 
which one it went through with each merge, that's true. But do we need 
this history?


Note that if the process should change to merges rather than rebases, 
I'm ok with that but I believe it might make bisecting more difficult.



That being said, I do not reject pull requests solely because they are
not based on current u-boot-arm/master, precisely because I know it is a
moving target at times. So if the request is not based on top of
u-boot-arm/master, I try a rebase myself and if it succeeds trivially
and I feel confident that there will be no interaction with the commits
I've added in between, then I just accept the (now rebased) pull request
-- this I have just done again a few days ago. If the pull request does
not rebase trivially, then I ask the submitter to rebase because he's
the best person to understand and solve the rebase conflict.

I believe this matches the intent of what you are proposing, but anyway,
Wolfgang has the last word -- as usual. :)


OK, there would most likely be the same merge conflicts with merging
rather than rebasing (although I think the 3-way merge process might be
easier to resolve than the rebase process),  and so I suppose you'd end
up rejecting the merge request too. That's seems somewhat different to
the kernel process, hence my quest for understanding!


Er... Rebase *does* 3-way merges when necessary and possible. I just saw 
it done while pulling tegra, samsung and imx requests.


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


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

2011-12-09 Thread Stephen Warren
On 12/09/2011 10:22 AM, Albert ARIBAUD wrote:
 Le 09/12/2011 18:10, Stephen Warren a écrit :
...
 Doesn't u-boot/master only move forward by merges, whereas
 u-boot-arm/master move forward by rebases?
 
 Well, as per the wiki, u-boot/master should move by rebases, or more 
 exactly, by fast-forwards, as pull requests to it should always be 
 (re)based on it.

OK, then the process is just different from what I expected. In that
case, consider my comments irrelevant.

Although, I'm having a hard time reconciling that statement with
u-boot/master's history; there are a lot of non-fast-forward merges there.

(and fast-forward is a merge, just the simplest case)

...
 Er... Rebase *does* 3-way merges when necessary and possible. I just saw 
 it done while pulling tegra, samsung and imx requests.

I don't think that's possible; with rebase, there is no common ancestor,
so you can't do a 3-way merge. The rebase conflicts end up being marked
up in the conflicting files in a similar fashion to a 3-way merge
though, but I think it's somewhat fake and just showing the differences
between the base that was in the patch being applied and current code,
which isn't quite the same thing.

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


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

2011-12-09 Thread Albert ARIBAUD

Le 09/12/2011 18:37, Stephen Warren a écrit :


Er... Rebase *does* 3-way merges when necessary and possible. I just saw
it done while pulling tegra, samsung and imx requests.


I don't think that's possible; with rebase, there is no common ancestor,
so you can't do a 3-way merge. The rebase conflicts end up being marked
up in the conflicting files in a similar fashion to a 3-way merge
though, but I think it's somewhat fake and just showing the differences
between the base that was in the patch being applied and current code,
which isn't quite the same thing.


Actually there is a common ancestor in a rebase just as in a merge -- 
the common ancestor is an attribute of (or more exactly a computation 
based on) a set of commits, not of an operation. You'll find common 
ancestors in a rebase operation mentioned in 
http://learn.github.com/p/rebasing.html, for instance.


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


[U-Boot] [PATCH v6 0/6] Add an SPL to boot the da850evm from SPI

2011-12-09 Thread Christian Riesch

Hi,
this is v6 of the last part of my recent patchset

[PATCH v3 00/15] Add an SPL to boot the da850evm from SPI
http://lists.denx.de/pipermail/u-boot/2011-November/82.html

Most of the other parts are already merged, together with
this patchset they introduce an SPL for the da850evm to run
u-boot directly without the need of a UBL (see doc/README.davinci).

The first patches fix dependencies and introduce a function
to load the u-boot image from SPI flash. Patch #4 adds an
SPL to the da850evm configuration. Finally, a simple
AIS (Application Image Script) is required to start the SPL.
This AIS is generated by mkimage. Patch #5 fixes mkimage for building
AIS. Finally the last patch introduces a u-boot.ais target in the
Makefile.

Changes for v6:
- rebased to git://git.denx.de/u-boot.git master

Changes for v5:
- changed formatting (indentation) of the $(obj)u-boot.ais target in
  the Makefile
- removed useless '0 | ... ' from include/configs/da850evm.h
- added Acked-bys

Changes for v4:
- added documentation for the SPL to doc/README.davinci
- split patchset because it got too big
- use COBJS-$(CONFIG_SPL_SPI_LOAD) instead of ifdefs in
  drivers/mtd/spi/Makefile
- use __noreturn instead of __attribute__((noreturn))
- added Acked-by

Changes for v3:
- removed noise and hardcoded values from drivers/mtd/spi/spi_spl_load.c
- replaced $(PAD_TO) in Makefile by $(CONFIG_SPL_MAX_SIZE)

Major changes for v2:
- Added code that actually loads u-boot from SPI flash and starts it.

Prerequisites:
- This patchset builds fine on gcc version 4.5.2 (Sourcery G++ Lite 
  2011.03-41). However, for some toolchains, e.g., gcc 4.2.2 from
  ELDK 4.2, the build results in a linker error: arm-linux-gnueabi-ld:
  error: no memory region specified for loadable section `.ARM.exidx'.
  In this case, the following patch is required:
  arm, davinci: Use lldiv for the 64-bit divisions in timer.c
  http://patchwork.ozlabs.org/patch/130409/

To build run
  make da850evm_config
  make u-boot.ais
Then program u-boot.ais to the SPI flash on the da850evm.

Best regards,
Christian

Cc: Heiko Schocher h...@denx.de
Cc: Sandeep Paulraj s-paul...@ti.com
Cc: Tom Rini tr...@ti.com

Christian Riesch (6):
  spl: display_options.o is required for SPI flash support in SPL
  sf: Add spi_boot() to allow booting from SPI flash in an SPL
  arm, davinci: Add SPL support for DA850 SoCs
  arm, da850evm: Add an SPL for SPI boot
  mkimage: Fix variable length header support
  arm, davinci: Add support for generating AIS images to the Makefile

 .gitignore  |1 +
 Makefile|   13 
 arch/arm/cpu/arm926ejs/davinci/Makefile |3 +-
 arch/arm/cpu/arm926ejs/davinci/spl.c|   34 +++-
 board/davinci/da8xxevm/da850evm.c   |4 +-
 board/davinci/da8xxevm/u-boot-spl.lds   |   73 +++
 doc/README.SPL  |1 +
 doc/README.davinci  |9 +++
 drivers/mtd/spi/Makefile|4 +
 drivers/mtd/spi/spi_spl_load.c  |   58 ++
 include/configs/da850evm.h  |   87 +++
 include/spi_flash.h |3 +
 lib/Makefile|2 +
 tools/mkimage.c |   97 ---
 14 files changed, 338 insertions(+), 51 deletions(-)
 create mode 100644 board/davinci/da8xxevm/u-boot-spl.lds
 create mode 100644 drivers/mtd/spi/spi_spl_load.c

-- 
1.7.4.1

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


[U-Boot] [PATCH v6 1/6] spl: display_options.o is required for SPI flash support in SPL

2011-12-09 Thread Christian Riesch
Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Heiko Schocher h...@denx.de
Cc: Mike Frysinger vap...@gentoo.org
---
 lib/Makefile |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/Makefile b/lib/Makefile
index 54708c2..35ba7ff 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -50,6 +50,8 @@ COBJS-$(CONFIG_SHA1) += sha1.o
 COBJS-$(CONFIG_SHA256) += sha256.o
 COBJS-y+= strmhz.o
 COBJS-$(CONFIG_RBTREE) += rbtree.o
+else
+COBJS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += display_options.o
 endif
 
 COBJS-y += ctype.o
-- 
1.7.4.1

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


[U-Boot] [PATCH v6 2/6] sf: Add spi_boot() to allow booting from SPI flash in an SPL

2011-12-09 Thread Christian Riesch
Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Heiko Schocher h...@denx.de
Cc: Mike Frysinger vap...@gentoo.org
Cc: Scott Wood scottw...@freescale.com
Acked-by: Mike Frysinger vap...@gentoo.org
---
 doc/README.SPL |1 +
 drivers/mtd/spi/Makefile   |4 +++
 drivers/mtd/spi/spi_spl_load.c |   58 
 include/spi_flash.h|3 ++
 4 files changed, 66 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/spi/spi_spl_load.c

diff --git a/doc/README.SPL b/doc/README.SPL
index 89d24a7..f01a8bd 100644
--- a/doc/README.SPL
+++ b/doc/README.SPL
@@ -65,3 +65,4 @@ CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/libnand.o)
 CONFIG_SPL_DMA_SUPPORT (drivers/dma/libdma.o)
 CONFIG_SPL_POST_MEM_SUPPORT (post/drivers/memory.o)
 CONFIG_SPL_NAND_LOAD (drivers/mtd/nand/nand_spl_load.o)
+CONFIG_SPL_SPI_LOAD (drivers/mtd/spi/spi_spl_load.o)
diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index 57112af..90f8392 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -25,6 +25,10 @@ include $(TOPDIR)/config.mk
 
 LIB:= $(obj)libspi_flash.o
 
+ifdef CONFIG_SPL_BUILD
+COBJS-$(CONFIG_SPL_SPI_LOAD)   += spi_spl_load.o
+endif
+
 COBJS-$(CONFIG_SPI_FLASH)  += spi_flash.o
 COBJS-$(CONFIG_SPI_FLASH_ATMEL)+= atmel.o
 COBJS-$(CONFIG_SPI_FLASH_EON)  += eon.o
diff --git a/drivers/mtd/spi/spi_spl_load.c b/drivers/mtd/spi/spi_spl_load.c
new file mode 100644
index 000..1aa30ac
--- /dev/null
+++ b/drivers/mtd/spi/spi_spl_load.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 OMICRON electronics GmbH
+ *
+ * based on drivers/mtd/nand/nand_spl_load.c
+ *
+ * Copyright (C) 2011
+ * Heiko Schocher, DENX Software Engineering, h...@denx.de.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include spi_flash.h
+
+/*
+ * The main entry for SPI booting. It's necessary that SDRAM is already
+ * configured and available since this code loads the main U-Boot image
+ * from SPI into SDRAM and starts it from there.
+ */
+void spi_boot(void)
+{
+   struct spi_flash *flash;
+   void (*uboot)(void) __noreturn;
+
+   /*
+* Load U-Boot image from SPI flash into RAM
+*/
+
+   flash = spi_flash_probe(CONFIG_SPL_SPI_BUS, CONFIG_SPL_SPI_CS,
+   CONFIG_SF_DEFAULT_SPEED, SPI_MODE_3);
+   if (!flash) {
+   puts(failed.\n);
+   hang();
+   }
+
+   spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS,
+  CONFIG_SYS_SPI_U_BOOT_SIZE,
+  (void *) CONFIG_SYS_TEXT_BASE);
+
+   /*
+* Jump to U-Boot image
+*/
+   uboot = (void *) CONFIG_SYS_TEXT_BASE;
+   (*uboot)();
+}
diff --git a/include/spi_flash.h b/include/spi_flash.h
index 2671ab5..9da9062 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -25,6 +25,7 @@
 
 #include spi.h
 #include linux/types.h
+#include linux/compiler.h
 
 struct spi_flash {
struct spi_slave *spi;
@@ -68,4 +69,6 @@ static inline int spi_flash_erase(struct spi_flash *flash, 
u32 offset,
return flash-erase(flash, offset, len);
 }
 
+void spi_boot(void) __noreturn;
+
 #endif /* _SPI_FLASH_H_ */
-- 
1.7.4.1

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


[U-Boot] [PATCH v6 3/6] arm, davinci: Add SPL support for DA850 SoCs

2011-12-09 Thread Christian Riesch
This code adds an SPL for booting from SPI flash on DA850 SoCs.

Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Heiko Schocher h...@denx.de
Cc: Sandeep Paulraj s-paul...@ti.com
Cc: Tom Rini tr...@ti.com
Acked-by: Tom Rini tr...@ti.com
---
 arch/arm/cpu/arm926ejs/davinci/Makefile |3 +-
 arch/arm/cpu/arm926ejs/davinci/spl.c|   34 ++-
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile 
b/arch/arm/cpu/arm926ejs/davinci/Makefile
index 5ae89df..da7efac 100644
--- a/arch/arm/cpu/arm926ejs/davinci/Makefile
+++ b/arch/arm/cpu/arm926ejs/davinci/Makefile
@@ -38,7 +38,8 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC)+= lxt972.o dp83848.o 
et1011c.o ksz8873.o
 
 ifdef CONFIG_SPL_BUILD
 COBJS-y+= spl.o
-COBJS-y+= dm365_lowlevel.o
+COBJS-$(CONFIG_SOC_DM365)  += dm365_lowlevel.o
+COBJS-$(CONFIG_SOC_DA8XX)  += da850_lowlevel.o
 endif
 
 SOBJS  = reset.o
diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c 
b/arch/arm/cpu/arm926ejs/davinci/spl.c
index d9b9398..20f798e 100644
--- a/arch/arm/cpu/arm926ejs/davinci/spl.c
+++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
@@ -26,6 +26,16 @@
 #include nand.h
 #include asm/arch/dm365_lowlevel.h
 #include ns16550.h
+#include malloc.h
+#include spi_flash.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* Define global data structure pointer to it*/
+static gd_t gdata __attribute__ ((section(.data)));
+static bd_t bdata __attribute__ ((section(.data)));
+
+#ifndef CONFIG_SPL_LIBCOMMON_SUPPORT
 
 void puts(const char *str)
 {
@@ -41,6 +51,8 @@ void putc(char c)
NS16550_putc((NS16550_t)(CONFIG_SYS_NS16550_COM1), c);
 }
 
+#endif /* CONFIG_SPL_LIBCOMMON_SUPPORT */
+
 inline void hang(void)
 {
puts(### ERROR ### Please RESET the board ###\n);
@@ -50,14 +62,34 @@ inline void hang(void)
 
 void board_init_f(ulong dummy)
 {
+#ifdef CONFIG_SOC_DM365
dm36x_lowlevel_init(0);
+#endif
+#ifdef CONFIG_SOC_DA8XX
+   arch_cpu_init();
+#endif
relocate_code(CONFIG_SPL_STACK, NULL, CONFIG_SPL_TEXT_BASE);
 }
 
 void board_init_r(gd_t *id, ulong dummy)
 {
-
+#ifdef CONFIG_SOC_DM365
nand_init();
puts(Nand boot...\n);
nand_boot();
+#endif
+#ifdef CONFIG_SOC_DA8XX
+   mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN,
+   CONFIG_SYS_MALLOC_LEN);
+
+   gd = gdata;
+   gd-bd = bdata;
+   gd-flags |= GD_FLG_RELOC;
+   gd-baudrate = CONFIG_BAUDRATE;
+   serial_init();  /* serial communications setup */
+   gd-have_console = 1;
+
+   puts(SPI boot...\n);
+   spi_boot();
+#endif
 }
-- 
1.7.4.1

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


[U-Boot] [PATCH v6 4/6] arm, da850evm: Add an SPL for SPI boot

2011-12-09 Thread Christian Riesch
Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Heiko Schocher h...@denx.de
Cc: Sandeep Paulraj s-paul...@ti.com
Cc: Tom Rini tr...@ti.com
Cc: Sudhakar Rajashekhara sudhakar@ti.com
---
 board/davinci/da8xxevm/da850evm.c |4 +-
 board/davinci/da8xxevm/u-boot-spl.lds |   73 +++
 doc/README.davinci|9 +++
 include/configs/da850evm.h|   87 +
 4 files changed, 172 insertions(+), 1 deletions(-)
 create mode 100644 board/davinci/da8xxevm/u-boot-spl.lds

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index 9c0eade..9bd3e71 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -108,7 +108,7 @@ static const struct pinmux_config gpio_pins[] = {
 #endif
 };
 
-static const struct pinmux_resource pinmuxes[] = {
+const struct pinmux_resource pinmuxes[] = {
 #ifdef CONFIG_DRIVER_TI_EMAC
PINMUX_ITEM(emac_pins_mdio),
 #ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
@@ -135,6 +135,8 @@ static const struct pinmux_resource pinmuxes[] = {
PINMUX_ITEM(gpio_pins),
 };
 
+const int pinmuxes_size = ARRAY_SIZE(pinmuxes);
+
 static const struct lpsc_resource lpsc[] = {
{ DAVINCI_LPSC_AEMIF }, /* NAND, NOR */
{ DAVINCI_LPSC_SPI1 },  /* Serial Flash */
diff --git a/board/davinci/da8xxevm/u-boot-spl.lds 
b/board/davinci/da8xxevm/u-boot-spl.lds
new file mode 100644
index 000..6f6e065
--- /dev/null
+++ b/board/davinci/da8xxevm/u-boot-spl.lds
@@ -0,0 +1,73 @@
+/*
+ * (C) Copyright 2002
+ * Gary Jennejohn, DENX Software Engineering, ga...@denx.de
+ *
+ * (C) Copyright 2008
+ * Guennadi Liakhovetki, DENX Software Engineering, l...@denx.de
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
+   LENGTH = CONFIG_SPL_MAX_SIZE }
+
+OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm)
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+   . = 0x;
+
+   . = ALIGN(4);
+   .text  :
+   {
+   __start = .;
+ arch/arm/cpu/arm926ejs/start.o(.text)
+ *(.text*)
+   } .sram
+
+   . = ALIGN(4);
+   .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } .sram
+
+   . = ALIGN(4);
+   .data : { *(SORT_BY_ALIGNMENT(.data*)) } .sram
+   . = ALIGN(4);
+   .rel.dyn : {
+   __rel_dyn_start = .;
+   *(.rel*)
+   __rel_dyn_end = .;
+   } .sram
+
+   .dynsym : {
+   __dynsym_start = .;
+   *(.dynsym)
+   } .sram
+
+   .bss :
+   {
+   . = ALIGN(4);
+   __bss_start = .;
+   *(.bss*)
+   . = ALIGN(4);
+   __bss_end__ = .;
+   } .sram
+
+   __image_copy_end = .;
+   _end = .;
+}
diff --git a/doc/README.davinci b/doc/README.davinci
index 5f1bdc8..aa7c850 100644
--- a/doc/README.davinci
+++ b/doc/README.davinci
@@ -95,6 +95,15 @@ into the RAM.
 The programmers and UBL are always released as part of any standard TI
 software release associated with an SOC.
 
+Alternative boot method (DA850 EVM only):
+For the DA850 EVM an SPL (secondary program loader, see doc/README.SPL)
+is provided to load U-Boot directly from SPI flash. In this case, the
+SPL does the low level initialization that is otherwise done by the SPL.
+To build U-Boot with this SPL, do
+make da850evm_config
+make u-boot.ais
+and program the resulting u-boot.ais file to the SPI flash of the DA850 EVM.
+
 Environment Variables
 =
 
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 2e2aa19..b30696a 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -65,6 +65,75 @@
 #define CONFIG_NR_DRAM_BANKS   1 /* we have 1 bank of DRAM */
 #define CONFIG_STACKSIZE   (256*1024) /* regular stack */
 
+#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC (  \
+   DAVINCI_SYSCFG_SUSPSRC_TIMER0 | \
+   DAVINCI_SYSCFG_SUSPSRC_SPI1 |   \
+   DAVINCI_SYSCFG_SUSPSRC_UART2 |  \
+   DAVINCI_SYSCFG_SUSPSRC_EMAC |   \
+   DAVINCI_SYSCFG_SUSPSRC_I2C)
+
+/*
+ * PLL 

[U-Boot] [PATCH v6 6/6] arm, davinci: Add support for generating AIS images to the Makefile

2011-12-09 Thread Christian Riesch
Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Stefano Babic sba...@denx.de
Cc: Heiko Schocher h...@denx.de
Cc: Mike Frysinger vap...@gentoo.org
---
 .gitignore |1 +
 Makefile   |   13 +
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index ff4bae0..e4e95e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@
 /u-boot.dis
 /u-boot.lds
 /u-boot.ubl
+/u-boot.ais
 /u-boot.dtb
 /u-boot.sb
 
diff --git a/Makefile b/Makefile
index de65a17..4038a87 100644
--- a/Makefile
+++ b/Makefile
@@ -420,6 +420,18 @@ $(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin 
$(obj)u-boot.bin
rm $(obj)u-boot-ubl.bin
rm $(obj)spl/u-boot-spl-pad.bin
 
+$(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
+   $(obj)tools/mkimage -s -n /dev/null -T aisimage \
+   -e $(CONFIG_SPL_TEXT_BASE) \
+   -d $(obj)spl/u-boot-spl.bin \
+   $(obj)spl/u-boot-spl.ais
+   $(OBJCOPY) ${OBJCFLAGS} -I binary \
+   --pad-to=$(CONFIG_SPL_MAX_SIZE) -O binary \
+   $(obj)spl/u-boot-spl.ais $(obj)spl/u-boot-spl-pad.ais
+   cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin  \
+   $(obj)u-boot.ais
+   rm $(obj)spl/u-boot-spl{,-pad}.ais
+
 $(obj)u-boot.sb:   $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
-o $(obj)u-boot.sb
@@ -794,6 +806,7 @@ clobber:tidy
@rm -f $(obj)u-boot.kwb
@rm -f $(obj)u-boot.imx
@rm -f $(obj)u-boot.ubl
+   @rm -f $(obj)u-boot.ais
@rm -f $(obj)u-boot.dtb
@rm -f $(obj)u-boot.sb
@rm -f $(obj)tools/inca-swap-bytes
-- 
1.7.4.1

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


[U-Boot] [PATCH v6 5/6] mkimage: Fix variable length header support

2011-12-09 Thread Christian Riesch
Support for variable length images like AIS image was introduced
in commit f0662105b674a3874227316abf8536bebc9b5995. A parameter
-s was also introduced to prohibit copying of the image file
automatically in the main program. However, this parameter
was implemented incorrectly and the image file was copied
nevertheless.

Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Stefano Babic sba...@denx.de
Cc: Heiko Schocher h...@denx.de
Acked-by: Stefano Babic sba...@denx.de
---
 tools/mkimage.c |   97 ---
 1 files changed, 49 insertions(+), 48 deletions(-)

diff --git a/tools/mkimage.c b/tools/mkimage.c
index 36e28ec..eeb1b10 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -383,65 +383,66 @@ NXTARG:   ;
exit (EXIT_FAILURE);
}
 
-   if (!params.skipcpy 
-   (params.type == IH_TYPE_MULTI ||
-   params.type == IH_TYPE_SCRIPT)) {
-   char *file = params.datafile;
-   uint32_t size;
-
-   for (;;) {
-   char *sep = NULL;
-
-   if (file) {
-   if ((sep = strchr(file, ':')) != NULL) {
-   *sep = '\0';
+   if (!params.skipcpy) {
+   if (params.type == IH_TYPE_MULTI ||
+   params.type == IH_TYPE_SCRIPT) {
+   char *file = params.datafile;
+   uint32_t size;
+
+   for (;;) {
+   char *sep = NULL;
+
+   if (file) {
+   if ((sep = strchr(file, ':')) != NULL) {
+   *sep = '\0';
+   }
+
+   if (stat (file, sbuf)  0) {
+   fprintf (stderr, %s: Can't 
stat %s: %s\n,
+params.cmdname, file, 
strerror(errno));
+   exit (EXIT_FAILURE);
+   }
+   size = cpu_to_uimage (sbuf.st_size);
+   } else {
+   size = 0;
}
 
-   if (stat (file, sbuf)  0) {
-   fprintf (stderr, %s: Can't stat %s: 
%s\n,
-   params.cmdname, file, 
strerror(errno));
+   if (write(ifd, (char *)size, sizeof(size)) != 
sizeof(size)) {
+   fprintf (stderr, %s: Write error on 
%s: %s\n,
+params.cmdname, 
params.imagefile,
+strerror(errno));
exit (EXIT_FAILURE);
}
-   size = cpu_to_uimage (sbuf.st_size);
-   } else {
-   size = 0;
-   }
 
-   if (write(ifd, (char *)size, sizeof(size)) != 
sizeof(size)) {
-   fprintf (stderr, %s: Write error on %s: %s\n,
-   params.cmdname, params.imagefile,
-   strerror(errno));
-   exit (EXIT_FAILURE);
-   }
+   if (!file) {
+   break;
+   }
 
-   if (!file) {
-   break;
+   if (sep) {
+   *sep = ':';
+   file = sep + 1;
+   } else {
+   file = NULL;
+   }
}
 
-   if (sep) {
-   *sep = ':';
-   file = sep + 1;
-   } else {
-   file = NULL;
-   }
-   }
+   file = params.datafile;
 
-   file = params.datafile;
-
-   for (;;) {
-   char *sep = strchr(file, ':');
-   if (sep) {
-   *sep = '\0';
-   copy_file (ifd, file, 1);
-   *sep++ = ':';
-   file = sep;
-   } else {
-   copy_file (ifd, file, 0);
-   break;
+   for (;;) {
+   char *sep = strchr(file, 

Re: [U-Boot] [PATCH 04/13] common/cmd_pxe.c: Fix compile warning

2011-12-09 Thread Wolfgang Denk
Dear Jason,

In message 20111209134819.GA26840@jhobbs-laptop you wrote:
 
  default:
  printf(Ignoring malformed menu command: %.*s\n,
  (int)(*c - s), s);
  +   err = -1;
 
 err should either be set to 0 here, or initialized to 0 at the top of
 the function. Setting it to -1 will cause the parser to give up rather
 than just printing out the warning message. It doesn't have to give up,
 and not giving up makes the parser more accommodating of pxelinux
 commands that aren't supported in U-Boot.

You have way more experience with PXE than me, but if we runinto this
case, doesn't that mean that the whole menu setup is severely broken,
and continuing is more or less invoking random behaviour?

If you really want to see a 0 here, then please feel free to submit an
updated / fixed patch.

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 really hate this damned machine It never does quite what I want
I wish that they would sell it.  But only what I tell it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: tb0229: fix GCC 4.6 compile errors and warnings

2011-12-09 Thread Wolfgang Denk
Dear Daniel Schwierzeck,

In message 
1323442731-12017-1-git-send-email-daniel.schwierz...@googlemail.com you wrote:
 Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com
 ---
 This patch fixes the last broken board when running MAKEALL -a mips.
 This board was added by Wolfgang in 2004 and never had a real
 maintainer. If no one care about this board, I think it could be dropped.

Can you please split thisi nto two patches, one performing just the
coding style cleanup, and the second one adding all the rest?

...
 -int checkboard (void)
 +int checkboard(void)
  {
   printf(Board: TANBAC TB0229 );
 - printf((CPU Speed %d MHz)\n, (int)CPU_CLOCK_RATE/100);
 + printf((CPU Speed %d MHz)\n, (int) CPU_CLOCK_RATE / 100);

When we touch this, would it then not make sense to switch to using
print_mhz() instead?

 + if (access_type == PCI_ACCESS_WRITE)
   *VR4131_PCICONFDREG = *data;
 - } else {
 + else
   *data = *VR4131_PCICONFDREG;

You are sure that we don;t need any I/O accessors / memory barriers
here (and elsewhere) ?


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
e-credibility: the non-guaranteeable likelihood that  the  electronic
data you're seeing is genuine rather than somebody's made-up crap.
- Karl Lehenbauer
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] pm9263: init serial console before relocation

2011-12-09 Thread Asen Chavdarov Dimov
The early messages can be seen on the debug console.

Signed-off-by: Asen Chavdarov Dimov di...@ronetix.at
---
Change since v1
- rebased over master

 board/ronetix/pm9263/pm9263.c |   22 ++
 include/configs/pm9263.h  |1 +
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c
index 59cca87..1266114 100644
--- a/board/ronetix/pm9263/pm9263.c
+++ b/board/ronetix/pm9263/pm9263.c
@@ -336,22 +336,28 @@ void lcd_show_board_info(void)
 
 #endif /* CONFIG_LCD */
 
-int board_init(void)
+int board_early_init_f(void)
 {
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 
-   /* Enable Ctrlc */
-   console_init_f();
-
-   writel((1  ATMEL_ID_PIOA) |
-   (1  ATMEL_ID_PIOCDE) |
-   (1  ATMEL_ID_PIOB),
+   /* Enable clocks for all PIOs */
+   writel((1  ATMEL_ID_PIOA) | (1  ATMEL_ID_PIOB) |
+   (1  ATMEL_ID_PIOCDE),
pmc-pcer);
 
+   at91_seriald_hw_init();
+
+   return 0;
+}
+
+int board_init(void)
+{
+   /* arch number of AT91SAM9263EK-Board */
+   gd-bd-bi_arch_number = MACH_TYPE_PM9263;
+
/* adress of boot parameters */
gd-bd-bi_boot_params = PHYS_SDRAM + 0x100;
 
-   at91_seriald_hw_init();
 #ifdef CONFIG_CMD_NAND
pm9263_nand_hw_init();
 #endif
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index 374be27..32c5962 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -172,6 +172,7 @@
 
 #undef CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_USER_LOWLEVEL_INIT  1
+#define CONFIG_BOARD_EARLY_INIT_F
 
 /*
  * Hardware drivers
-- 
1.7.4.4

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


[U-Boot] [PATCH v2] pm9g45: init serial console before relocation

2011-12-09 Thread Asen Chavdarov Dimov
The early messages can be seen on the debug console.

Signed-off-by: Asen Chavdarov Dimov di...@ronetix.at
---
Change since v1
- rebased over master

 board/ronetix/pm9g45/pm9g45.c |   16 +++-
 include/configs/pm9g45.h  |1 +
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c
index d29d076..b5a11f2 100644
--- a/board/ronetix/pm9g45/pm9g45.c
+++ b/board/ronetix/pm9g45/pm9g45.c
@@ -127,22 +127,28 @@ static void pm9g45_macb_hw_init(void)
 }
 #endif
 
-int board_init(void)
+int board_early_init_f(void)
 {
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 
-   /* Enable Ctrlc */
-   console_init_f();
-
+   /* Enable clocks for all PIOs */
writel((1  ATMEL_ID_PIOA) |
(1  ATMEL_ID_PIOB) |
(1  ATMEL_ID_PIOC) |
(1  ATMEL_ID_PIODE), pmc-pcer);
 
+   at91_seriald_hw_init();
+
+   return 0;
+}
+
+int board_init(void)
+{
+   /* arch number of AT91SAM9M10G45EK-Board */
+   gd-bd-bi_arch_number = MACH_TYPE_PM9G45;
/* adress of boot parameters */
gd-bd-bi_boot_params = PHYS_SDRAM + 0x100;
 
-   at91_seriald_hw_init();
 #ifdef CONFIG_CMD_NAND
pm9g45_nand_hw_init();
 #endif
diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h
index 5b08d91..eec9153 100644
--- a/include/configs/pm9g45.h
+++ b/include/configs/pm9g45.h
@@ -57,6 +57,7 @@
 #define CONFIG_INITRD_TAG  1
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_BOARD_EARLY_INIT_F
 
 /*
  * Hardware drivers
-- 
1.7.4.4

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


[U-Boot] [PATCH v2] pm9261: init serial console before relocation

2011-12-09 Thread Asen Chavdarov Dimov
The early messages can be seen on the debug console.

Signed-off-by: Asen Chavdarov Dimov di...@ronetix.at
---
Change since v1
- rebased over master

 board/ronetix/pm9261/pm9261.c |   17 -
 include/configs/pm9261.h  |1 +
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c
index c6b582d..79a3216 100644
--- a/board/ronetix/pm9261/pm9261.c
+++ b/board/ronetix/pm9261/pm9261.c
@@ -237,21 +237,28 @@ void lcd_show_board_info(void)
 
 #endif /* CONFIG_LCD */
 
-int board_init(void)
+int board_early_init_f(void)
 {
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 
-   /* Enable Ctrlc */
-   console_init_f();
-
+   /* Enable clocks for some PIOs */
writel(1  ATMEL_ID_PIOA |
1  ATMEL_ID_PIOC,
pmc-pcer);
 
+   at91_seriald_hw_init();
+
+   return 0;
+}
+
+int board_init(void)
+{
+   /* arch number of PM9261-Board */
+   gd-bd-bi_arch_number = MACH_TYPE_PM9261;
+
/* adress of boot parameters */
gd-bd-bi_boot_params = PHYS_SDRAM + 0x100;
 
-   at91_seriald_hw_init();
 #ifdef CONFIG_CMD_NAND
pm9261_nand_hw_init();
 #endif
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index 9fbf9af..1e80316 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -161,6 +161,7 @@
 #define CONFIG_INITRD_TAG  1
 
 #undef CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_BOARD_EARLY_INIT_F
 
 /*
  * Hardware drivers
-- 
1.7.4.4

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


Re: [U-Boot] powerpc: FOO uses hard float, BAR uses soft float

2011-12-09 Thread Wolfgang Denk
Dear Kumar,

In message 4421ad7b-d8aa-455e-b67d-328c3e742...@kernel.crashing.org you wrote:
 
 Look at commit, we dealt with this in the past
 
 commit ce82ff05388b5ddafdf6082ef0776cce72c40b1c
 Author: Yuri Tikhonov y...@emcraft.com
 Date:   Sat Dec 20 14:54:21 2008 +0300
 
 FPU POST: fix warnings when building with 2.18 binutils
 
 Also:
 
 commit e009cdeb63308f291c54b173484401aab4a3fe54
 Author: Kumar Gala ga...@kernel.crashing.org
 Date:   Tue Jan 25 03:00:08 2011 -0600
 
 powerpc: Fix FPU post related link warnings

Thanks for pointing out.  I have to admit that I had completely
forgotten about these.

Hm, unfortunately this appears to have stopped working.

The two objects that are flagged as Tag_GNU_Power_ABI_FP: Hard float
are
post/lib_powerpc/fpu/acc1.o
and
post/lib_powerpc/fpu/20010226-1.o

Both corresponding source files have the GNU_FPOST_ATTR macro...

It appears with GCC 4.6.1 the explicit -mhard-float command line
option takes precedence over the ``asm(.gnu_attribute 4, 2);'' in
the source file :-(


Is there any way to manually edit the attribute in the object file,
using ld or elfedit or ... ?

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 made machine language; all the rest is the work of man.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Fix some bugs in the EFI support

2011-12-09 Thread Anton Staaf
On Tue, Dec 6, 2011 at 11:35 AM, Wolfgang Denk w...@denx.de wrote:
 Dear Anton Staaf,

 In message 
 caf6fioweof1rwckrfwusobcybwu4g4xp84proirb5hcbfjk...@mail.gmail.com you 
 wrote:

 Whimper whimper.  This is silly, what happened was that two different
 patches collided when committed.  Mine had the correct change to this
 file.  Doug Andersons also touched this file but reverted the change.
 So when both changes went in the result was that these lines didn't
 change.  Since then there have been no fewer than four attempts to get
 this simple fix committed.  I have acked and pinged at least two of
 them.  One finally made it into the ARM tree.  Someone should just put
 this into the main tree because that is where my changes to add the
 MACRO went in initially.  Oh, and we really don't want to have a
 default for CONFIG_SYS_CACHELINE_SIZE, especially not in this file.

 What exactly is wrong - in your opinion - in the current master?

I don't believe that there is anything wrong right now.  My whimpering
was more about the sheer number of messages have been generated by
this patch collision.  Not a big deal since as far as I can tell
master is OK.

Thanks,
Anton

 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
 SW engineering is a race between programmers trying  to  make  better
 idiot-proof programs and the universe producing greater idiots.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Fix compilation warnings when building eNET

2011-12-09 Thread Vadim Bendebury
There have been a couple of unused variable cases, causing compilation
warnings when building the eNET target.

While the board/eNET/eNET.c:last_stage_init() case seems a leftover
from a quick edit, the arch/x86/cpu/sc520/sc520_timer.c:sc520_udelay()
seems to actually require accessing the registers discarding the
values.

The source code is being modified accordingly.

TEST:
 - the eNET target now builds cleanly
 - examining disassembled sc520_timer.o shows that the registers are
   still being accessed in the beginning of the function.

Signed-off-by: Vadim Bendebury vben...@chromium.org
---
 arch/x86/cpu/sc520/sc520_timer.c |1 +
 board/eNET/eNET.c|5 -
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/x86/cpu/sc520/sc520_timer.c b/arch/x86/cpu/sc520/sc520_timer.c
index 495a694..a7bbe92 100644
--- a/arch/x86/cpu/sc520/sc520_timer.c
+++ b/arch/x86/cpu/sc520/sc520_timer.c
@@ -87,4 +87,5 @@ void sc520_udelay(unsigned long usec)
m += readw(sc520_mmcr-swtmrmilli);
u = readw(sc520_mmcr-swtmrmicro) + (m * 1000);
} while (u  usec);
+   (void) temp;
 }
diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c
index 429fe1b..2f26470 100644
--- a/board/eNET/eNET.c
+++ b/board/eNET/eNET.c
@@ -178,11 +178,6 @@ void show_boot_progress(int val)
 
 int last_stage_init(void)
 {
-   int minor;
-   int major;
-
-   major = minor = 0;
-
outb(0x00, LED_LATCH_ADDRESS);
 
register_timer_isr(enet_timer_isr);
-- 
1.7.3.1

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


[U-Boot] [PATCH] Fix compilation warnings when building eNET

2011-12-09 Thread Vadim Bendebury
There have been a couple of unused variable cases, causing compilation
warnings when building the eNET target.

While the board/eNET/eNET.c:last_stage_init() case seems a leftover
from a quick edit, the arch/x86/cpu/sc520/sc520_timer.c:sc520_udelay()
seems to actually require accessing the registers discarding the
values.

The source code is being modified accordingly.

TEST:
 - the eNET target now builds cleanly
 - examining disassembled sc520_timer.o shows that the registers are
  still being accessed in the beginning of the function.

Signed-off-by: Vadim Bendebury vben...@chromium.org
---

[Resend with the proper  cc: header]

 arch/x86/cpu/sc520/sc520_timer.c |    1 +
 board/eNET/eNET.c                |    5 -
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/x86/cpu/sc520/sc520_timer.c b/arch/x86/cpu/sc520/sc520_timer.c
index 495a694..a7bbe92 100644
--- a/arch/x86/cpu/sc520/sc520_timer.c
+++ b/arch/x86/cpu/sc520/sc520_timer.c
@@ -87,4 +87,5 @@ void sc520_udelay(unsigned long usec)
               m += readw(sc520_mmcr-swtmrmilli);
               u = readw(sc520_mmcr-swtmrmicro) + (m * 1000);
       } while (u  usec);
+       (void) temp;
 }
diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c
index 429fe1b..2f26470 100644
--- a/board/eNET/eNET.c
+++ b/board/eNET/eNET.c
@@ -178,11 +178,6 @@ void show_boot_progress(int val)

 int last_stage_init(void)
 {
-       int minor;
-       int major;
-
-       major = minor = 0;
-
       outb(0x00, LED_LATCH_ADDRESS);

       register_timer_isr(enet_timer_isr);
--
1.7.3.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


Re: [U-Boot] [PATCH] Fix compilation warnings when building eNET

2011-12-09 Thread Graeme Russ
Hi Vadim,

On Dec 10, 2011 10:31 AM, Vadim Bendebury vben...@chromium.org wrote:

 There have been a couple of unused variable cases, causing compilation
 warnings when building the eNET target.

 While the board/eNET/eNET.c:last_stage_init() case seems a leftover
 from a quick edit, the arch/x86/cpu/sc520/sc520_timer.c:sc520_udelay()
 seems to actually require accessing the registers discarding the
 values.

Thanks for picking this up, I've been a bit preoccupie lately.

I'll need to look a bit more closely, but there should be no need for such
trickery...

Regards,

Graeme

 The source code is being modified accordingly.

 TEST:
  - the eNET target now builds cleanly
  - examining disassembled sc520_timer.o shows that the registers are
   still being accessed in the beginning of the function.

 Signed-off-by: Vadim Bendebury vben...@chromium.org
 ---

 [Resend with the proper  cc: header]

  arch/x86/cpu/sc520/sc520_timer.c |1 +
  board/eNET/eNET.c|5 -
  2 files changed, 1 insertions(+), 5 deletions(-)

 diff --git a/arch/x86/cpu/sc520/sc520_timer.c
b/arch/x86/cpu/sc520/sc520_timer.c
 index 495a694..a7bbe92 100644
 --- a/arch/x86/cpu/sc520/sc520_timer.c
 +++ b/arch/x86/cpu/sc520/sc520_timer.c
 @@ -87,4 +87,5 @@ void sc520_udelay(unsigned long usec)
m += readw(sc520_mmcr-swtmrmilli);
u = readw(sc520_mmcr-swtmrmicro) + (m * 1000);
} while (u  usec);
 +   (void) temp;
  }
 diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c
 index 429fe1b..2f26470 100644
 --- a/board/eNET/eNET.c
 +++ b/board/eNET/eNET.c
 @@ -178,11 +178,6 @@ void show_boot_progress(int val)

  int last_stage_init(void)
  {
 -   int minor;
 -   int major;
 -
 -   major = minor = 0;
 -
outb(0x00, LED_LATCH_ADDRESS);

register_timer_isr(enet_timer_isr);
 --
 1.7.3.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


Re: [U-Boot] [PATCH] Fix compilation warnings when building eNET

2011-12-09 Thread Vadim Bendebury
On Fri, Dec 9, 2011 at 3:57 PM, Graeme Russ graeme.r...@gmail.com wrote:

 Hi Vadim,

 On Dec 10, 2011 10:31 AM, Vadim Bendebury vben...@chromium.org wrote:
 
  There have been a couple of unused variable cases, causing compilation
  warnings when building the eNET target.
 
  While the board/eNET/eNET.c:last_stage_init() case seems a leftover
  from a quick edit, the arch/x86/cpu/sc520/sc520_timer.c:sc520_udelay()
  seems to actually require accessing the registers discarding the
  values.

 Thanks for picking this up, I've been a bit preoccupie lately.

 I'll need to look a bit more closely, but there should be no need for such 
 trickery...

 Regards,

 Graeme



Hi Graeme, thank you for a quick response.

Do you mean that there is no need to read the registers before the
actual udelay functionality or do you have another way of pacifying
the compiler in mind?

cheers,
/v


 
  The source code is being modified accordingly.
 
  TEST:
   - the eNET target now builds cleanly
   - examining disassembled sc520_timer.o shows that the registers are
    still being accessed in the beginning of the function.
 
  Signed-off-by: Vadim Bendebury vben...@chromium.org
  ---
 
  [Resend with the proper  cc: header]

 
   arch/x86/cpu/sc520/sc520_timer.c |    1 +
   board/eNET/eNET.c                |    5 -
   2 files changed, 1 insertions(+), 5 deletions(-)
 
  diff --git a/arch/x86/cpu/sc520/sc520_timer.c 
  b/arch/x86/cpu/sc520/sc520_timer.c
  index 495a694..a7bbe92 100644
  --- a/arch/x86/cpu/sc520/sc520_timer.c
  +++ b/arch/x86/cpu/sc520/sc520_timer.c
  @@ -87,4 +87,5 @@ void sc520_udelay(unsigned long usec)
                 m += readw(sc520_mmcr-swtmrmilli);
                 u = readw(sc520_mmcr-swtmrmicro) + (m * 1000);
         } while (u  usec);
  +       (void) temp;
   }
  diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c
  index 429fe1b..2f26470 100644
  --- a/board/eNET/eNET.c
  +++ b/board/eNET/eNET.c
  @@ -178,11 +178,6 @@ void show_boot_progress(int val)
 
   int last_stage_init(void)
   {
  -       int minor;
  -       int major;
  -
  -       major = minor = 0;
  -
         outb(0x00, LED_LATCH_ADDRESS);
 
         register_timer_isr(enet_timer_isr);
  --
  1.7.3.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