[U-Boot] [u-boot][PATCH] uboot/flexcan: fixup flexcan clock-frequency

2011-11-15 Thread Jia Hongtao
Make the fixup matchable with dts and kernel.
Update the compatible from fsl,flexcan-v1.0 to fsl,p1010-flexcan and
Change the clock-freq property to clock-frequency.
We also change flexcan frequency from CCB-clock to CCB-clock/2 according
to P1010 spec.

We now keep the old interfaces to make previous kernel work. They should
be removed in the future.

Signed-off-by: Jia Hongtao b38...@freescale.com
Signed-off-by: Li Yang le...@freescale.com
---
 arch/powerpc/cpu/mpc85xx/fdt.c |   13 -
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index 9d31568..a53a31d 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -660,8 +660,19 @@ void ft_cpu_setup(void *blob, bd_t *bd)
do_fixup_by_compat_u32(blob, fsl,gianfar-ptp-timer,
timer-frequency, gd-bus_clk/2, 1);
 
+   /*
+* clock-freq should change to clock-frequency and
+* flexcan-v1.0 should change to p1010-flexcan respectively
+* in the future.
+*/
do_fixup_by_compat_u32(blob, fsl,flexcan-v1.0,
-   clock_freq, gd-bus_clk, 1);
+   clock_freq, gd-bus_clk/2, 1);
+
+   do_fixup_by_compat_u32(blob, fsl,flexcan-v1.0,
+   clock-frequency, gd-bus_clk/2, 1);
+
+   do_fixup_by_compat_u32(blob, fsl,p1010-flexcan,
+   clock-frequency, gd-bus_clk/2, 1);
 
fdt_fixup_usb(blob);
 }
-- 
1.7.5.1


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


Re: [U-Boot] Nokia N900 - eMMC not working after commit 02f3029f1810b99869254d0cf0a71946a008a728

2011-11-15 Thread Lei Wen
Hi Macpaul,

On Tue, Nov 15, 2011 at 11:34 AM, Macpaul Lin macp...@gmail.com wrote:
 HI Lei Wen,

 2011/11/14 Lei Wen adrian.w...@gmail.com:
 Hi Macpaul,

 It seems some socs always treat cmd8 as failed...?
 I think it is reasonable to add a quirk configuration surround the 
 judgement
 of cmd8 execution, so that even it is failed anyway, it could still go on 
 with
 the following cmd sequence. If this quirk is not defined, and return 
 behavior
 is still kept.

 What do you think for this?

 Thanks,
 Lei


 For easily to discuss about this problem, I've stripped the part from
 SD specification 3.0 as you mentioned.

 Figure 6.1
 http://i.imgur.com/bmoAX.jpg
 Figure 6.2
 http://i.imgur.com/7fxdx.jpg

 As you can see, after the power ramp up to 74 clocks (1msec), the CMD0
 can be send to the card.

 So it seems your controller will do power ramp up (dynamic clock
 gating?) only after the CMD0 has been send?
 Is this correct? However, it is weird and seem not followed the specification.

Yes, our controller use dynamic control gating for clock. The clock is
not sample out
while no command send out.


 Since only SD 2.0 cards can adopted with CMD8, other cards older than
 SD 2.0 should treat CMD8 as timeout (I guess).
 So CMD8 might be important for us to distinguish  the command sequence.
 Sending CMD8 many times might really introduce problem for other cards.

I realize now we at least cannot directly return err if the cmd8 is not succeed.
Please submit a patch to fix it.

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


Re: [U-Boot] Nokia N900 - eMMC not working after commit 02f3029f1810b99869254d0cf0a71946a008a728

2011-11-15 Thread Macpaul Lin
Hi Lei Wen,

2011/11/15 Lei Wen adrian.w...@gmail.com:
 Hi Macpaul,

 Figure 6.1
 http://i.imgur.com/bmoAX.jpg
 Figure 6.2
 http://i.imgur.com/7fxdx.jpg

 As you can see, after the power ramp up to 74 clocks (1msec), the CMD0
 can be send to the card.

 So it seems your controller will do power ramp up (dynamic clock
 gating?) only after the CMD0 has been send?
 Is this correct? However, it is weird and seem not followed the 
 specification.

 Yes, our controller use dynamic control gating for clock. The clock is
 not sample out
 while no command send out.

 I realize now we at least cannot directly return err if the cmd8 is not 
 succeed.
 Please submit a patch to fix it.

 Thanks,
 Lei


It seems your hardware doesn't follow the rule that specification
described and made
compatibility problem to other platform, includes the existing platforms.
I think you'd better report it to your hardware designer which is a
hardware bug need to be fixed.
And, I think you can send a quick fix patch like the #ifdef
as you've mention to workaround for your hardware only if you cannot
find a common solution right now.

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


[U-Boot] [PATCH v2 2/2] smsc95xx: Debug message cleanup

2011-11-15 Thread Wolfgang Grandegger
Cc: Simon Glass s...@chromium.org
Cc: Mike Frysinger vap...@gentoo.org
Signed-off-by: Wolfgang Grandegger w...@denx.de
---
 drivers/usb/eth/smsc95xx.c |   10 +++---
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index b5626e6..2f63340 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -380,18 +380,14 @@ static int smsc95xx_write_hwaddr(struct eth_device *eth)
/* set hardware address */
debug(** %s()\n, __func__);
ret = smsc95xx_write_reg(dev, ADDRL, addr_lo);
-   if (ret  0) {
-   debug(Failed to write ADDRL: %d\n, ret);
+   if (ret  0)
return ret;
-   }
 
ret = smsc95xx_write_reg(dev, ADDRH, addr_hi);
if (ret  0)
return ret;
-   debug(MAC %02x:%02x:%02x:%02x:%02x:%02x\n,
-   eth-enetaddr[0], eth-enetaddr[1],
-   eth-enetaddr[2], eth-enetaddr[3],
-   eth-enetaddr[4], eth-enetaddr[5]);
+
+   debug(MAC %pM\n, eth-enetaddr);
dev-have_hwaddr = 1;
return 0;
 }
-- 
1.7.4.1

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


[U-Boot] [PATCH v2 0/2] smsc95xx: Fix MAC address programming and some minor issues

2011-11-15 Thread Wolfgang Grandegger
Changes since v1:

- Use __get_unaligned_le16/32 as suggested by Mike Frysinger.
- Use format %pM to print ethernet address.
- Drop third patch as it is not really required/useful.

Wolfgang Grandegger (2):
  smsc95xx: Fix MAC address programming
  smsc95xx: Debug message cleanup

 drivers/usb/eth/smsc95xx.c |   16 ++--
 1 files changed, 6 insertions(+), 10 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 v2 1/2] smsc95xx: Fix MAC address programming

2011-11-15 Thread Wolfgang Grandegger
Commit 79ad54400932d6484178a372fb3b659e3437473b broke MAC address
programming in the SMSC95xx register set.

Cc: Marek Vasut marek.va...@gmail.com
Cc: Wolfgang Denk w...@denx.de
Cc: Simon Glass s...@chromium.org
Cc: Mike Frysinger vap...@gentoo.org
Signed-off-by: Wolfgang Grandegger w...@denx.de
---
 drivers/usb/eth/smsc95xx.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 7ee4f87..b5626e6 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -20,6 +20,7 @@
  * MA 02111-1307 USA
  */
 
+#include asm/unaligned.h
 #include common.h
 #include usb.h
 #include linux/mii.h
@@ -372,13 +373,12 @@ static int smsc95xx_init_mac_address(struct eth_device 
*eth,
 static int smsc95xx_write_hwaddr(struct eth_device *eth)
 {
struct ueth_data *dev = (struct ueth_data *)eth-priv;
-   u32 addr_lo, addr_hi;
+   u32 addr_lo = __get_unaligned_le32(eth-enetaddr[0]);
+   u32 addr_hi = __get_unaligned_le16(eth-enetaddr[4]);
int ret;
 
/* set hardware address */
debug(** %s()\n, __func__);
-   addr_lo = cpu_to_le32(*eth-enetaddr);
-   addr_hi = cpu_to_le16(*((u16 *)(eth-enetaddr + 4)));
ret = smsc95xx_write_reg(dev, ADDRL, addr_lo);
if (ret  0) {
debug(Failed to write ADDRL: %d\n, ret);
-- 
1.7.4.1

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


Re: [U-Boot] [PATCH 1/3] smsc95xx: Fix MAC address programming

2011-11-15 Thread Wolfgang Grandegger
On 11/14/2011 05:50 PM, Mike Frysinger wrote:
 On Monday 14 November 2011 03:25:37 Wolfgang Grandegger wrote:
 On 11/11/2011 04:18 PM, Mike Frysinger wrote:
 mine might take a little longer due to wrangling with wolfgang.  i'd
 suggest we go with your patch (although i have feedback on it).

 Well, I have no problem with your patch if it fixes the same issue
 correctly... and preparing and testing a new patch series takes time. I
 will simply add my Tested-by when I have feedback and we then can drop
 my other patches.
 
 let's not go with the one i submitted earlier.  tweak your patches with the 
 feedback posted and we'll go with those.

OK, just sent v2.

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


[U-Boot] [PATCH] Improve Power Management in SMC911X driver.

2011-11-15 Thread Bertrand Cachet
From datasheet, when READY bit is set inside PM_CTRL register, it means that
device is already in *normal* (D0) mode = it doesn't need to be wake-up.

With this patch, we only wake-up (writing on TEST_BYTE register) if PM_MODE
bits of PM_CTRL register is in sleep (D1/D2) mode.

Improve code styling by grouping two narrow comments.

Signed-off-by: Bertrand Cachet bertrand.cac...@heig-vd.ch
---
 drivers/net/smc911x.h |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index 8ce08a9..7f4156e 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -471,8 +471,11 @@ static void smc911x_reset(struct eth_device *dev)
 {
int timeout;
 
-   /* Take out of PM setting first */
-   if (smc911x_reg_read(dev, PMT_CTRL)  PMT_CTRL_READY) {
+   /*
+*  Take out of PM setting first
+*  Device is already wake up if PMT_CTRL_READY bit is set
+*/
+   if ((smc911x_reg_read(dev, PMT_CTRL)  PMT_CTRL_READY) == 0) {
/* Write to the bytetest will take out of powerdown */
smc911x_reg_write(dev, BYTE_TEST, 0x0);
 
-- 
1.7.5.4

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


[U-Boot] [PATCH] Revert mmc: retry the cmd8 to meet 74 clocks requirement in the spec

2011-11-15 Thread Macpaul Lin
This reverts commit 02f3029f1810b99869254d0cf0a71946a008a728.

This patch add 3 times retry to CMD8 because the Marvell mmc controller
doesn't obey the power ramp up process in the SD specification 6.4.1.
(Please refer to figure 6.1 and 6.2 in the specification.)

The CMD0 should be send after power ramp up has been finished.
However, the Marvell mmc contorller must do power ramp up after the
first CMD0 command has been send.

This patch also affect existing platforms like Nokia N900 and other
platforms.

Signed-off-by: Macpaul Lin macp...@andestech.com
---
 drivers/mmc/mmc.c |   16 ++--
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 37ce6e8..21665ec 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1190,7 +1190,7 @@ block_dev_desc_t *mmc_get_dev(int dev)
 
 int mmc_init(struct mmc *mmc)
 {
-   int err, retry = 3;
+   int err;
 
if (mmc-has_init)
return 0;
@@ -1213,19 +1213,7 @@ int mmc_init(struct mmc *mmc)
mmc-part_num = 0;
 
/* Test for SD version 2 */
-   /*
-* retry here for 3 times, as for some controller it has dynamic
-* clock gating, and only toggle out clk when the first cmd0 send
-* out, while some card strictly obey the 74 clocks rule, the interval
-* may not be sufficient between the cmd0 and this cmd8, retry to
-* fulfil the clock requirement
-*/
-   do {
-   err = mmc_send_if_cond(mmc);
-   } while (--retry  0  err);
-
-   if (err)
-   return err;
+   err = mmc_send_if_cond(mmc);
 
/* Now try to get the SD card's operating condition */
err = sd_send_op_cond(mmc);
-- 
1.7.3.5

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


Re: [U-Boot] [PATCH] Revert mmc: retry the cmd8 to meet 74 clocks requirement in the spec

2011-11-15 Thread Lei Wen
On Tue, Nov 15, 2011 at 5:35 PM, Macpaul Lin macp...@andestech.com wrote:
 This reverts commit 02f3029f1810b99869254d0cf0a71946a008a728.

 This patch add 3 times retry to CMD8 because the Marvell mmc controller
 doesn't obey the power ramp up process in the SD specification 6.4.1.
 (Please refer to figure 6.1 and 6.2 in the specification.)

 The CMD0 should be send after power ramp up has been finished.
 However, the Marvell mmc contorller must do power ramp up after the
 first CMD0 command has been send.

 This patch also affect existing platforms like Nokia N900 and other
 platforms.

 Signed-off-by: Macpaul Lin macp...@andestech.com
 ---
  drivers/mmc/mmc.c |   16 ++--
  1 files changed, 2 insertions(+), 14 deletions(-)

 diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
 index 37ce6e8..21665ec 100644
 --- a/drivers/mmc/mmc.c
 +++ b/drivers/mmc/mmc.c
 @@ -1190,7 +1190,7 @@ block_dev_desc_t *mmc_get_dev(int dev)

  int mmc_init(struct mmc *mmc)
  {
 -       int err, retry = 3;
 +       int err;

        if (mmc-has_init)
                return 0;
 @@ -1213,19 +1213,7 @@ int mmc_init(struct mmc *mmc)
        mmc-part_num = 0;

        /* Test for SD version 2 */
 -       /*
 -        * retry here for 3 times, as for some controller it has dynamic
 -        * clock gating, and only toggle out clk when the first cmd0 send
 -        * out, while some card strictly obey the 74 clocks rule, the interval
 -        * may not be sufficient between the cmd0 and this cmd8, retry to
 -        * fulfil the clock requirement
 -        */
 -       do {
 -               err = mmc_send_if_cond(mmc);
 -       } while (--retry  0  err);
 -
 -       if (err)
 -               return err;
 +       err = mmc_send_if_cond(mmc);

        /* Now try to get the SD card's operating condition */
        err = sd_send_op_cond(mmc);
 --
 1.7.3.5



Acked-by: Lei Wen lei...@marvell.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/6] i.mx: fsl_esdhc: add the i.mx6q support

2011-11-15 Thread Jason Hui
On Mon, Nov 14, 2011 at 6:42 PM, Marek Vasut marek.va...@gmail.com wrote:
 On Sun, Nov 13, 2011 at 12:35 AM, Marek Vasut marek.va...@gmail.com wrote:
  The mmc host controller on the i.mx6q is called usdhc which
  is redesigned based on the freescale esdhc controller.
 
  The usdhc controller is almost compatible with esdhc except
  it adds one misc control register from user using experience.
 
  Signed-off-by: Jason Liu jason@linaro.org
  ---
   drivers/mmc/fsl_esdhc.c |   14 +-
   1 files changed, 13 insertions(+), 1 deletions(-)
 
  diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
  index ec953f0..cd17ef2 100644
  --- a/drivers/mmc/fsl_esdhc.c
  +++ b/drivers/mmc/fsl_esdhc.c
  @@ -58,7 +58,12 @@ struct fsl_esdhc {
        uint    autoc12err;
        uint    hostcapblt;
        uint    wml;
  -     char    reserved1[8];
  +#if defined(CONFIG_FSL_USDHC)
  +     uint    mixctrl;
  +     char    reserved1[4];
  +#else
  +     char    reserved1[8];
  +#endif
 
  Hi Jason,
 
  can't we just drop this ifdef ?

 Yes, I think we can. I will drop it later.

 Please drop now so it's not forgotten ;-)


        uint    fevt;
        char    reserved2[168];
        uint    hostver;
  @@ -298,6 +303,9 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
  struct mmc_data *data)
 
        /* Send the command */
        esdhc_write32(regs-cmdarg, cmd-cmdarg);
  +#if defined(CONFIG_FSL_USDHC)
  +     esdhc_write32(regs-mixctrl, xfertyp  0x);
  +#endif
        esdhc_write32(regs-xfertyp, xfertyp);
 
  Why is this duplicated? This seems like a huge user-experience nonsense
  to me :)
 
  If you write to xfertyp register, you still have to write the same thing
  to mixctrl? Or if you do it vice versa, won't it work ? Why did you add
  the register?

 This is due to that on i.mx6q usdhc, it adds one extra mixctrl(offset
 0x48) register to accommodate the
 low 16-bits of tranfertype and the high 16-bits of tranfertype will
 still go via the xfertyp register.
 On the i.mx6q usdhc, the xfertyp(offset 0xc) register, the low 16-bits
 is not used and only
 high 16-bits have been used. I can make the above code clear as the
 followings,

 #if defined(CONFIG_FSL_USDHC)
 esdhc_write32(regs-mixctrl, xfertyp  0x);
 esdhc_write32(regs-xfertyp, xfertyp  0x);
 #else
 esdhc_write32(regs-xfertyp, xfertyp);
 #endif

 Well this is insane, is the datasheet for mx6q available already so I can 
 check
 for myself?

This is mx6q usdhc design and datasheet is not public now.
Without this, the mmc driver does not work.

Jason Liu



        /* Wait for the command to complete */
  @@ -482,7 +490,11 @@ int fsl_esdhc_initialize(bd_t *bis, struct
  fsl_esdhc_cfg *cfg)
 
        mmc = malloc(sizeof(struct mmc));
 
  +#if defined(CONFIG_FSL_USDHC)
  +     sprintf(mmc-name, FSL_USDHC);
  +#else
        sprintf(mmc-name, FSL_ESDHC);
  +#endif
 
  Why not just rename it to FSL_SDHC and be done with it ?

 OK, I will do it.

        regs = (struct fsl_esdhc *)cfg-esdhc_base;
 
        /* First reset the eSDHC controller */

 Jason Liu

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


Re: [U-Boot] [PATCH 2/6] i.mx: Add the initial support for freescale i.MX6Q processor

2011-11-15 Thread Jason Hui
On Mon, Nov 14, 2011 at 6:45 PM, Marek Vasut marek.va...@gmail.com wrote:
 On Mon, Nov 14, 2011 at 7:11 AM, Marek Vasut marek.va...@gmail.com wrote:
  i.MX6Q is freescale quad core processors with ARM cortex_a9 complex.
  This patch is to add the initial support for this processor.
 
  Signed-off-by: Jason Liu jason@linaro.org
  ---
   arch/arm/cpu/armv7/mx6/Makefile           |   48 +
   arch/arm/cpu/armv7/mx6/clock.c            |  388 +++
   arch/arm/cpu/armv7/mx6/iomux-v3.c         |   76 ++
   arch/arm/cpu/armv7/mx6/lowlevel_init.S    |   60 +
   arch/arm/cpu/armv7/mx6/soc.c              |   57 +
   arch/arm/include/asm/arch-mx6/ccm_regs.h  |  894 +++
   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  |  233 
   arch/arm/include/asm/arch-mx6/iomux-v3.h  |  104 ++
   arch/arm/include/asm/arch-mx6/mx6x_pins.h | 1683
  + arch/arm/include/asm/arch-mx6/sys_proto.h
  | 38 +
   12 files changed, 3666 insertions(+), 0 deletions(-)
 
  [...]
 
  diff --git a/arch/arm/cpu/armv7/mx6/lowlevel_init.S
  b/arch/arm/cpu/armv7/mx6/lowlevel_init.S new file mode 100644
  index 000..7a03f59
  --- /dev/null
  +++ b/arch/arm/cpu/armv7/mx6/lowlevel_init.S
  @@ -0,0 +1,60 @@
  +/*
  + * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
  + *
  + * 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 config.h
  +#include asm/arch/imx-regs.h
  +
  +/*
  + * AIPS setup - Only setup MPROTx registers.
  + * Set all MPROTx to be non-bufferable,
  + * trusted for R/W, not forced to user-mode.
  + * The PACR default values are good.
  + */
  +.macro init_aips
  +     ldr r0, =AIPS1_ON_BASE_ADDR
  +     ldr r1, =0x
  +     str r1, [r0, #0x0]
  +     str r1, [r0, #0x4]
  +     ldr r1, =0x0
  +     str r1, [r0, #0x40]
  +     str r1, [r0, #0x44]
  +     str r1, [r0, #0x48]
  +     str r1, [r0, #0x4C]
  +     str r1, [r0, #0x50]
  +
  +     ldr r0, =AIPS2_ON_BASE_ADDR
  +     ldr r1, =0x
  +     str r1, [r0, #0x0]
  +     str r1, [r0, #0x4]
  +     ldr r1, =0x0
  +     str r1, [r0, #0x40]
  +     str r1, [r0, #0x44]
  +     str r1, [r0, #0x48]
  +     str r1, [r0, #0x4C]
  +     str r1, [r0, #0x50]
  +.endm /* init_aips */
 
  Can't this be done in C code? Why the assembly ?

 I think this should be initialized as early as possible, so I put it here.

 As early as arch_cpu_init is late (see arch/arm/lib/board.c)?

ok, Let's put it to arch_cpu_init. Thanks.


  +
  +.section .text.init, x
  +
  +.globl lowlevel_init
  +lowlevel_init:
  +
  +     init_aips
  +
  +     mov pc, lr
 
  [...]
 
  +#define MXC_CCM_CSCMR2_CAN_CLK_SEL_OFFSET            (2)
 
  Drop parenthesis around stuff similar to this.

 Yes, thanks.

  +#endif /*__ARCH_ARM_MACH_MX6_CCM_REGS_H__ */
  diff --git a/arch/arm/include/asm/arch-mx6/clock.h
  b/arch/arm/include/asm/arch-mx6/clock.h new file mode 100644
  index 000..636458f
  --- /dev/null
  +++ b/arch/arm/include/asm/arch-mx6/clock.h
  @@ -0,0 +1,50 @@
  +/*
  + * (C) Copyright 2009
  + * Stefano Babic, DENX Software Engineering, sba...@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 __ASM_ARCH_CLOCK_H
  +#define __ASM_ARCH_CLOCK_H
  +
  +enum mxc_clock {
  +     MXC_ARM_CLK = 0,
  +     MXC_PER_CLK,
  +     MXC_AHB_CLK,
  +     MXC_IPG_CLK,
  +     MXC_IPG_PERCLK,
  +     MXC_UART_CLK,
  +     MXC_CSPI_CLK,
  +    

Re: [U-Boot] [PATCH 2/6] i.mx: Add the initial support for freescale i.MX6Q processor

2011-11-15 Thread Jason Hui
On Mon, Nov 14, 2011 at 7:49 PM, Stefano Babic sba...@denx.de wrote:
 On 11/14/2011 10:42 AM, Jason Hui wrote:


 All get_usdhcX function are identical, except for two masks
 (MXC_CCM_CSCDR1_USDHCx_PODF_MASK and MXC_CCM_CSCMR1_USDHCx_CLK_SEL).
 Merge them in a get_usdhc_clk(usdhc_number)


 Yes, I'm using mxc_ccm_reg.

 Ok - this structure is also used in most drivers - if I am not wrong
 (and I will better check), the struct clkctl is used only to generate
 the offsets in asm-offsets.h. If it is so, it could be drop in a future
 clean up patch...

Yes, agree!


 Maybe do we find a way to add a common include directory ? This file is
 duplicated. We can use include/asm/arch/imx-common

 I don't find one good way to add a common include directory. If I try
 to find one,
 I will put this head file to imx-common.

 The easy way is to add include/asm/arch-imx-common, and then the header
 are explicitely included as #include asm/arch-imx-common/...
 I have seen only another example in U-Boot for armv7:

 arch/arm/cpu/armv7/highbank/timer.c:#include asm/arch-armv7/systimer.h

 I am opened to other solutions, too, but I think that introducing a
 common repository for IMX include files (as Linux with plat_imx does) is
 the way to do.

ok,  thanks for the review.


 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] [RFC PATCH 1/8] arm, davinci: Move pinmux functions from board to arch tree

2011-11-15 Thread Christian Riesch

Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Sandeep Paulraj s-paul...@ti.com
---
 arch/arm/cpu/arm926ejs/davinci/Makefile|2 +-
 .../arm/cpu/arm926ejs/davinci/pinmux.c |0
 arch/arm/include/asm/arch-davinci/hardware.h   |2 ++
 board/davinci/common/Makefile  |2 +-
 board/davinci/da8xxevm/da830evm.c  |2 --
 board/davinci/da8xxevm/da850evm.c  |2 --
 board/davinci/da8xxevm/hawkboard_nand_spl.c|2 --
 board/davinci/ea20/ea20.c  |2 --
 nand_spl/board/davinci/da8xxevm/Makefile   |6 +++---
 9 files changed, 7 insertions(+), 13 deletions(-)
 rename board/davinci/common/davinci_pinmux.c = 
arch/arm/cpu/arm926ejs/davinci/pinmux.c (100%)

diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile 
b/arch/arm/cpu/arm926ejs/davinci/Makefile
index aeb058a..2105ec5 100644
--- a/arch/arm/cpu/arm926ejs/davinci/Makefile
+++ b/arch/arm/cpu/arm926ejs/davinci/Makefile
@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(SOC).o
 
-COBJS-y+= cpu.o timer.o psc.o
+COBJS-y+= cpu.o timer.o psc.o pinmux.o
 COBJS-$(CONFIG_DA850_LOWLEVEL) += da850_lowlevel.o
 COBJS-$(CONFIG_SOC_DM355)  += dm355.o
 COBJS-$(CONFIG_SOC_DM365)  += dm365.o
diff --git a/board/davinci/common/davinci_pinmux.c 
b/arch/arm/cpu/arm926ejs/davinci/pinmux.c
similarity index 100%
rename from board/davinci/common/davinci_pinmux.c
rename to arch/arm/cpu/arm926ejs/davinci/pinmux.c
diff --git a/arch/arm/include/asm/arch-davinci/hardware.h 
b/arch/arm/include/asm/arch-davinci/hardware.h
index f80f312..927aee4 100644
--- a/arch/arm/include/asm/arch-davinci/hardware.h
+++ b/arch/arm/include/asm/arch-davinci/hardware.h
@@ -479,6 +479,8 @@ struct davinci_syscfg_regs {
 #define davinci_syscfg_regs \
((struct davinci_syscfg_regs *)DAVINCI_BOOTCFG_BASE)
 
+#define pinmux(x)  (davinci_syscfg_regs-pinmux[x])
+
 /* Emulation suspend bits */
 #define DAVINCI_SYSCFG_SUSPSRC_EMAC(1  5)
 #define DAVINCI_SYSCFG_SUSPSRC_I2C (1  16)
diff --git a/board/davinci/common/Makefile b/board/davinci/common/Makefile
index 9d7b164..bc99da3 100644
--- a/board/davinci/common/Makefile
+++ b/board/davinci/common/Makefile
@@ -29,7 +29,7 @@ endif
 
 LIB= $(obj)lib$(VENDOR).o
 
-COBJS  := misc.o davinci_pinmux.o
+COBJS  := misc.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/board/davinci/da8xxevm/da830evm.c 
b/board/davinci/da8xxevm/da830evm.c
index 2021e73..c45c94b 100644
--- a/board/davinci/da8xxevm/da830evm.c
+++ b/board/davinci/da8xxevm/da830evm.c
@@ -46,8 +46,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define pinmux(x)  (davinci_syscfg_regs-pinmux[x])
-
 /* SPI0 pin muxer settings */
 static const struct pinmux_config spi0_pins[] = {
{ pinmux(7), 1, 3 },
diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index e0a3bbe..844e585 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -34,8 +34,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define pinmux(x)  (davinci_syscfg_regs-pinmux[x])
-
 /* SPI0 pin muxer settings */
 static const struct pinmux_config spi1_pins[] = {
{ pinmux(5), 1, 1 },
diff --git a/board/davinci/da8xxevm/hawkboard_nand_spl.c 
b/board/davinci/da8xxevm/hawkboard_nand_spl.c
index e5e65e5..2285e7c 100644
--- a/board/davinci/da8xxevm/hawkboard_nand_spl.c
+++ b/board/davinci/da8xxevm/hawkboard_nand_spl.c
@@ -32,8 +32,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define pinmux(x)  (davinci_syscfg_regs-pinmux[x])
-
 static const struct pinmux_config mii_pins[] = {
{ pinmux(2), 8, 1 },
{ pinmux(2), 8, 2 },
diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 720a360..9b6c4c0 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -40,8 +40,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define pinmux(x)  (davinci_syscfg_regs-pinmux[x])
-
 static const struct da8xx_panel lcd_panel = {
/* Casio COM57H531x */
.name = Casio_COM57H531x,
diff --git a/nand_spl/board/davinci/da8xxevm/Makefile 
b/nand_spl/board/davinci/da8xxevm/Makefile
index accf716..7b06cd2 100644
--- a/nand_spl/board/davinci/da8xxevm/Makefile
+++ b/nand_spl/board/davinci/da8xxevm/Makefile
@@ -42,7 +42,7 @@ SOBJS = _divsi3.o \
 
 COBJS  = cpu.o \
davinci_nand.o \
-   davinci_pinmux.o \
+   pinmux.o \
div0.o \
hawkboard_nand_spl.o \
memsize.o \
@@ -78,9 +78,9 @@ $(nandobj)u-boot.lds: $(LDSCRIPT)
 # create symbolic links for common files
 
 # from board directory
-$(obj)davinci_pinmux.c:
+$(obj)pinmux.c:
@rm -f $@
-   @ln -s $(TOPDIR)/board/davinci/common/davinci_pinmux.c $@
+   @ln -s $(TOPDIR)/arch/arm/cpu/arm926ejs/davinci/pinmux.c $@
 
 # from drivers/mtd/nand directory
 

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

2011-11-15 Thread Christian Riesch

Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Stefano Babic sba...@denx.de
Cc: Heiko Schocher h...@denx.de
---
 .gitignore |1 +
 Makefile   |7 +++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index 70a11f7..1c5defd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@
 /u-boot.dis
 /u-boot.lds
 /u-boot.ubl
+/u-boot.ais
 /u-boot.dtb
 
 #
diff --git a/Makefile b/Makefile
index 294c762..2fbc032 100644
--- a/Makefile
+++ b/Makefile
@@ -424,6 +424,13 @@ $(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
+   $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary 
$(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
+   $(obj)tools/mkimage -s -n /dev/null -T aisimage \
+   -e $(CONFIG_SPL_TEXT_BASE) -d $(obj)spl/u-boot-spl-pad.bin \
+   $(obj)u-boot.ais
+   rm $(obj)spl/u-boot-spl-pad.bin
+
 ifeq ($(CONFIG_SANDBOX),y)
 GEN_UBOOT = \
cd $(LNDIR)  $(CC) $(SYMS) -T $(obj)u-boot.lds \
-- 
1.7.0.4

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


[U-Boot] [RFC PATCH 7/8] mkimage: Fix variable length header support

2011-11-15 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
---
 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, ':');
+   if 

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

2011-11-15 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
---
 arch/arm/cpu/arm926ejs/davinci/Makefile |3 ++-
 arch/arm/cpu/arm926ejs/davinci/spl.c|   11 ++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile 
b/arch/arm/cpu/arm926ejs/davinci/Makefile
index 2105ec5..99df0df 100644
--- a/arch/arm/cpu/arm926ejs/davinci/Makefile
+++ b/arch/arm/cpu/arm926ejs/davinci/Makefile
@@ -37,7 +37,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..bb4ee13 100644
--- a/arch/arm/cpu/arm926ejs/davinci/spl.c
+++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
@@ -50,14 +50,23 @@ 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
+   hang();
+#endif
 }
-- 
1.7.0.4

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


[U-Boot] [RFC PATCH 5/8] arm, davinci: Replace pinmuxing in da850_lowlevel.c

2011-11-15 Thread Christian Riesch
This patch replaces the pinmuxing functions from
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c by those of
arch/arm/cpu/arm926ejs/davinci/pinmux.c

Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Heiko Schocher h...@denx.de
Cc: Sandeep Paulraj s-paul...@ti.com
---
 arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c |   34 +--
 1 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c 
b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
index c7ec70f..8dd897b 100644
--- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
+++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
@@ -30,6 +30,7 @@
 #include asm/arch/ddr2_defs.h
 #include asm/arch/emif_defs.h
 #include asm/arch/pll_defs.h
+#include asm/arch/davinci_misc.h
 
 void da850_waitloop(unsigned long loopcnt)
 {
@@ -248,6 +249,16 @@ void board_gpio_init(void)
return;
 }
 
+/* UART pin muxer settings */
+static const struct pinmux_config uart_pins[] = {
+#if CONFIG_SYS_NS16550_COM1 == DAVINCI_UART2_BASE
+   { pinmux(0), 4, 6 },
+   { pinmux(0), 4, 7 },
+   { pinmux(4), 2, 4 },
+   { pinmux(4), 2, 5 }
+#endif
+};
+
 int arch_cpu_init(void)
 {
/* Unlock kick registers */
@@ -257,27 +268,8 @@ int arch_cpu_init(void)
dv_maskbits(davinci_syscfg_regs-suspsrc,
CONFIG_SYS_DA850_SYSCFG_SUSPSRC);
 
-   /* Setup Pinmux */
-   da850_pinmux_ctl(0, 0x, CONFIG_SYS_DA850_PINMUX0);
-   da850_pinmux_ctl(1, 0x, CONFIG_SYS_DA850_PINMUX1);
-   da850_pinmux_ctl(2, 0x, CONFIG_SYS_DA850_PINMUX2);
-   da850_pinmux_ctl(3, 0x, CONFIG_SYS_DA850_PINMUX3);
-   da850_pinmux_ctl(4, 0x, CONFIG_SYS_DA850_PINMUX4);
-   da850_pinmux_ctl(5, 0x, CONFIG_SYS_DA850_PINMUX5);
-   da850_pinmux_ctl(6, 0x, CONFIG_SYS_DA850_PINMUX6);
-   da850_pinmux_ctl(7, 0x, CONFIG_SYS_DA850_PINMUX7);
-   da850_pinmux_ctl(8, 0x, CONFIG_SYS_DA850_PINMUX8);
-   da850_pinmux_ctl(9, 0x, CONFIG_SYS_DA850_PINMUX9);
-   da850_pinmux_ctl(10, 0x, CONFIG_SYS_DA850_PINMUX10);
-   da850_pinmux_ctl(11, 0x, CONFIG_SYS_DA850_PINMUX11);
-   da850_pinmux_ctl(12, 0x, CONFIG_SYS_DA850_PINMUX12);
-   da850_pinmux_ctl(13, 0x, CONFIG_SYS_DA850_PINMUX13);
-   da850_pinmux_ctl(14, 0x, CONFIG_SYS_DA850_PINMUX14);
-   da850_pinmux_ctl(15, 0x, CONFIG_SYS_DA850_PINMUX15);
-   da850_pinmux_ctl(16, 0x, CONFIG_SYS_DA850_PINMUX16);
-   da850_pinmux_ctl(17, 0x, CONFIG_SYS_DA850_PINMUX17);
-   da850_pinmux_ctl(18, 0x, CONFIG_SYS_DA850_PINMUX18);
-   da850_pinmux_ctl(19, 0x, CONFIG_SYS_DA850_PINMUX19);
+   /* setup serial port */
+   davinci_configure_pin_mux(uart_pins, ARRAY_SIZE(uart_pins));
 
/* PLL setup */
da850_pll_init(davinci_pllc0_regs, CONFIG_SYS_DA850_PLL0_PLLM);
-- 
1.7.0.4

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


[U-Boot] [RFC PATCH 4/8] arm: printf() is not available in the SPL

2011-11-15 Thread Christian Riesch

Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Wolfgang Denk w...@denx.de
---
 arch/arm/lib/eabi_compat.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
index eb3e26d..2d49a28 100644
--- a/arch/arm/lib/eabi_compat.c
+++ b/arch/arm/lib/eabi_compat.c
@@ -13,10 +13,13 @@
 
 int raise (int signum)
 {
+#ifndef CONFIG_SPL_BUILD
printf(raise: Signal # %d caught\n, signum);
+#endif
return 0;
 }
 
+
 /* Dummy function to avoid linker complaints */
 void __aeabi_unwind_cpp_pr0(void)
 {
-- 
1.7.0.4

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


[U-Boot] [RFC PATCH 6/8] da850evm: Add a basic SPL for SPI boot

2011-11-15 Thread Christian Riesch
The code does not actually load u-boot from the SPI flash but
rather illustrates how SPL support for this board could look like.
This patch is for discussion only.

Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Heiko Schocher h...@denx.de
Cc: Sandeep Paulraj s-paul...@ti.com
Cc: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
---
 board/davinci/da8xxevm/u-boot-spl.lds |   73 +
 include/configs/da850evm.h|   70 +++-
 2 files changed, 142 insertions(+), 1 deletions(-)
 create mode 100644 board/davinci/da8xxevm/u-boot-spl.lds

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/include/configs/da850evm.h b/include/configs/da850evm.h
index 4c14370..3a03822 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -29,7 +29,6 @@
 #define CONFIG_DRIVER_TI_EMAC
 #define CONFIG_USE_SPIFLASH
 
-
 /*
  * SoC Configuration
  */
@@ -64,6 +63,40 @@
 #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 ((1  27) | (1  22) | (1  20) | 
(1  5) | (1  16))
+
+/*
+ * PLL configuration
+ */
+#define CONFIG_SYS_DV_CLKMODE  0
+#define CONFIG_SYS_DA850_PLL0_POSTDIV  1
+#define CONFIG_SYS_DA850_PLL0_PLLDIV1  0x8000
+#define CONFIG_SYS_DA850_PLL0_PLLDIV2  0x8001
+#define CONFIG_SYS_DA850_PLL0_PLLDIV3  0x8002
+#define CONFIG_SYS_DA850_PLL0_PLLDIV4  0x8003
+#define CONFIG_SYS_DA850_PLL0_PLLDIV5  0x8002
+#define CONFIG_SYS_DA850_PLL0_PLLDIV6  CONFIG_SYS_DA850_PLL0_PLLDIV1
+#define CONFIG_SYS_DA850_PLL0_PLLDIV7  0x8005
+
+#define CONFIG_SYS_DA850_PLL1_POSTDIV  1
+#define CONFIG_SYS_DA850_PLL1_PLLDIV1  0x8000
+#define CONFIG_SYS_DA850_PLL1_PLLDIV2  0x8001
+#define CONFIG_SYS_DA850_PLL1_PLLDIV3  0x8002
+
+#define CONFIG_SYS_DA850_PLL0_PLLM 24
+#define CONFIG_SYS_DA850_PLL1_PLLM 21
+
+/*
+ * DDR2 memory configuration
+ */
+#define CONFIG_SYS_DA850_DDR2_DDRPHYCR 0x00C4
+#define CONFIG_SYS_DA850_DDR2_SDBCR0x0A034622
+#define CONFIG_SYS_DA850_DDR2_SDBCR2   0x
+#define CONFIG_SYS_DA850_DDR2_SDTIMR   0x184929C8
+#define CONFIG_SYS_DA850_DDR2_SDTIMR2  0xB80FC700
+#define CONFIG_SYS_DA850_DDR2_SDRCR0x0406
+#define CONFIG_SYS_DA850_DDR2_PBBPR0x30
+
 /*
  * Serial Driver info
  */
@@ -75,6 +108,7 @@
 #define CONFIG_CONS_INDEX  1   /* use UART0 for console */
 #define CONFIG_BAUDRATE115200  /* Default baud rate */
 #define CONFIG_SYS_BAUDRATE_TABLE  { 9600, 19200, 38400, 57600, 115200 }
+#define CONFIG_SYS_DA850_LPSC_UART DAVINCI_LPSC_UART2
 
 #define CONFIG_SPI
 #define CONFIG_SPI_FLASH
@@ -241,8 +275,42 @@
 #undef CONFIG_CMD_ENV
 #endif
 

[U-Boot] [RFC PATCH 2/8] arm, davinci: Fix clear_bss for zero length bss

2011-11-15 Thread Christian Riesch
This patch fixes the clear_bss loop for bss sections that have
zero length, i.e., where __bss_start == __bss_end__.

Signed-off-by: Christian Riesch christian.rie...@omicron.at
Cc: Albert Aribaud albert.u.b...@aribaud.net
---
 arch/arm/cpu/arm926ejs/start.S |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index 8b5355b..772793c 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -299,10 +299,12 @@ clear_bss:
 #endif
mov r2, #0x /* clear*/
 
-clbss_l:strr2, [r0]/* clear loop...*/
+clbss_l:cmpr0, r1  /* clear loop...*/
+   beq clbss_e
+   str r2, [r0]
add r0, r0, #4
-   cmp r0, r1
-   bne clbss_l
+   b   clbss_l
+clbss_e:
 
 #ifndef CONFIG_SPL_BUILD
bl coloured_LED_init
-- 
1.7.0.4

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


[U-Boot] [RFC PATCH 0/8] da850evm: Add SPL support for booting from SPI flash

2011-11-15 Thread Christian Riesch
Hi all,
Heiko Schocher added patches for the low level configuration
of the DA850 SoCs and I would like to use this code on my board. At the
same time I would like to add support for this low level configuration
for the da850evm board. This makes it possible to test/use the
lowlevel functions also for developers who don't have access neither to
Heiko's board nor to mine.

The patchset aims at implementing SPL support for the da850evm
configuration to allow booting this board from SPI flash without
using the UBL (see doc/README.davinci).

This patchset is not a complete implementation, it is missing the
code that is actually used to load u-boot from SPI flash to the
DDR memory. The code just hangs after the initialization is done. But
I submit it nevertheless as RFC and I am looking forward to your comments.

The patches apply on top of git://git.denx.de/u-boot-ti.git and Heiko's
patches 

arm, arm926ejs: always do cpu critical inits
http://patchwork.ozlabs.org/patch/124787/

arm, davinci: da850/dm365 lowlevel cleanup
http://patchwork.ozlabs.org/patch/124788/

To build run

make da850evm_config
make tools
make u-boot.ais

Then program u-boot.ais to SPI flash. The board responds with an
error message since we do hang() after the configuration.

Regards, Christian

Cc: Heiko Schocher h...@denx.de
Cc: Wolfgang Denk w...@denx.de
Cc: Sandeep Paulraj s-paul...@ti.com
Cc: Nagabhushana Netagunte nagabhushana.netagu...@ti.com
Cc: Stefano Babic sba...@denx.de
Cc: Albert Aribaud albert.u.b...@aribaud.net

Christian Riesch (8):
  arm, davinci: Move pinmux functions from board to arch tree
  arm, davinci: Fix clear_bss for zero length bss
  arm, davinci: Add SPL support for DA850 SoCs
  arm: printf() is not available in the SPL
  arm, davinci: Replace pinmuxing in da850_lowlevel.c
  da850evm: Add a basic SPL for SPI boot
  mkimage: Fix variable length header support
  arm, davinci: Add support for generating AIS images to the Makefile

 .gitignore |1 +
 Makefile   |7 ++
 arch/arm/cpu/arm926ejs/davinci/Makefile|5 +-
 arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|   34 +++
 .../arm/cpu/arm926ejs/davinci/pinmux.c |0
 arch/arm/cpu/arm926ejs/davinci/spl.c   |   11 ++-
 arch/arm/cpu/arm926ejs/start.S |8 +-
 arch/arm/include/asm/arch-davinci/hardware.h   |2 +
 arch/arm/lib/eabi_compat.c |3 +
 board/davinci/common/Makefile  |2 +-
 board/davinci/da8xxevm/da830evm.c  |2 -
 board/davinci/da8xxevm/da850evm.c  |2 -
 board/davinci/da8xxevm/hawkboard_nand_spl.c|2 -
 board/davinci/da8xxevm/u-boot-spl.lds  |   73 +++
 board/davinci/ea20/ea20.c  |2 -
 include/configs/da850evm.h |   70 ++-
 nand_spl/board/davinci/da8xxevm/Makefile   |6 +-
 tools/mkimage.c|   97 ++--
 18 files changed, 239 insertions(+), 88 deletions(-)
 rename board/davinci/common/davinci_pinmux.c = 
arch/arm/cpu/arm926ejs/davinci/pinmux.c (100%)
 create mode 100644 board/davinci/da8xxevm/u-boot-spl.lds

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


Re: [U-Boot] [PATCH 2/6] i.mx: Add the initial support for freescale i.MX6Q processor

2011-11-15 Thread Stefano Babic
On 11/15/2011 11:10 AM, Jason Hui wrote:
 yes, we already had drivers/gpio/mxc_gpio.c driver. In this driver, we will
 use this structure. And it's the same as i.mx5 before.

 So why do you need to expose the structure, isn't it internal to the driver?
 Yes, it's internal to the gpio driver, but, all the soc does not have
 the same gpio_regs layout,
 so we put it here in order to have multiple #ifdef.
 Stefano, any comments for this?

We are using now the general GPIO framework - changes were done for all
iMX SOCs, and it is used in most other SOCs, too. So the general API is
exposed in include/asm/gpio.h.

We can have different implementation for each specific SOC. We want to
maintain only one driver (mxc_gpio.c), and the differences in layout are
done in arch/gpio.h (at the end, the structure we are talking about). As
you can see, there is a lot of specific implementation in asm/arch-*.
The generic API (include/asm/gpio.h) includes an arch specific file
asm/arch/gpio, and this file must be provided.

This allows us (theoretically) to adapt the driver to the specific
layout of the SOC. This helps if the layout of MX3x is differnt form the
layout of MX5x, MX6x,...

I admit that the layout for the interesting fields (data, direction) is
the same (see asm/arch-mx25/gpio.h, asm/arch-mx35/gpio.h and
asm/arch-mx5/gpio.h). There is the definition of other registers, but
they are not used. We have to provide in any case an arch specific
gpio.h, and this can contains the differences in layout, if any.

Another possibility can be to put the registers in a common place for
all IMX SOCs, and the arch specific gpio.h, required by the generic
gpio.h, will only include it. But if we go on on this solution (only if
we have *really* the same layout for all SOCs), this should be done for
all IMX in a shot, not only for one of them - I do not like to have
inconsistencies in the interface between IMX SOCs.

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


Re: [U-Boot] [PATCH 5/6] i.mx: fsl_esdhc: add the i.mx6q support

2011-11-15 Thread Stefano Babic
On 11/15/2011 10:46 AM, Jason Hui wrote:

 Well this is insane, is the datasheet for mx6q available already so I can 
 check
 for myself?
 
 This is mx6q usdhc design and datasheet is not public now.
 Without this, the mmc driver does not work.

Can you at least add a useful comment explaining why it is required,
maybe copying only the few lines from the manual where it is described,
or adding the errata number if this is due to a bug ?

Best regards,
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 v3] Improve Power Management in SMC911X driver.

2011-11-15 Thread Bertrand Cachet
From datasheet, when READY bit is set inside PM_CTRL register, it means that
device is already in *normal* (D0) mode = it doesn't need to be wake-up.

With this patch, we only wake-up (writing on TEST_BYTE register) if PM_MODE
bits of PM_CTRL register is in sleep (D1/D2) mode.

Signed-off-by: Bertrand Cachet bertrand.cac...@heig-vd.ch
---
 v2: Improve code styling by grouping two narrow comments.
 v3: Place versions information under scissors line.

 drivers/net/smc911x.h |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index 8ce08a9..00e5b2e 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -471,8 +471,11 @@ static void smc911x_reset(struct eth_device *dev)
 {
int timeout;
 
-   /* Take out of PM setting first */
-   if (smc911x_reg_read(dev, PMT_CTRL)  PMT_CTRL_READY) {
+ /*
+  *  Take out of PM setting first
+  *  Device is already wake up if PMT_CTRL_READY bit is set
+  */
+   if ((smc911x_reg_read(dev, PMT_CTRL)  PMT_CTRL_READY) == 0) {
/* Write to the bytetest will take out of powerdown */
smc911x_reg_write(dev, BYTE_TEST, 0x0);
 
-- 
1.7.5.4

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


[U-Boot] uboot

2011-11-15 Thread siddharth baisane
Hi,
I am trying to boot beagle board by uart
can anybody help me on this issue?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/2] omap3evm: Add support for EFI partitions

2011-11-15 Thread Premi, Sanjeev
 -Original Message-
 From: u-boot-boun...@lists.denx.de 
 [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Premi, Sanjeev
 Sent: Tuesday, November 15, 2011 12:15 PM
 To: Tom Rini
 Cc: u-boot@lists.denx.de
 Subject: Re: [U-Boot] [PATCH 0/2] omap3evm: Add support for 
 EFI partitions
  -Original Message-
  From: Tom Rini [mailto:tom.r...@gmail.com] 
  Sent: Monday, November 14, 2011 9:05 PM
  To: Premi, Sanjeev
  Cc: u-boot@lists.denx.de
  Subject: Re: [U-Boot] [PATCH 0/2] omap3evm: Add support for 
  EFI partitions
  
  On Mon, Nov 14, 2011 at 8:19 AM, Sanjeev Premi pr...@ti.com wrote:
   After enabling CONFIG_EFI_PARTITION, following errors were
   noticed.
  
   part_efi.c: In function 'print_part_efi':
   part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid'
    from incompatible pointer type
   part_efi.c:95:12: note: expected 'struct gpt_header *' but arg
   ument is of type 'struct gpt_header **'
   part_efi.c: In function 'get_partition_info_efi':
   part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid
   ' from incompatible pointer type
   part_efi.c:95:12: note: expected 'struct gpt_header *' but arg
   ument is of type 'struct gpt_header **'
   part_efi.c: In function 'alloc_read_gpt_entries':
   part_efi.c:384:18: error: 'CONFIG_SYS_CACHELINE_SIZE' undeclar
   ed (first use in this function)
   part_efi.c:384:18: note: each undeclared identifier is reporte
   d only once for each function it appears in
   make[1]: *** [part_efi.o] Error 1
   make[1]: Leaving directory `/db/psp_git/users/a0756819/u-boot/
   disk'
   make: *** [disk/libdisk.o] Error 2
  
  Is there a reason EFI doesn't use ARCH_DMA_MINALIGN ?
 
 I have no idea, but use of CONFIG_SYS_CACHELINE_SIZE in part_efi.c
 was introduced in:
 
 commit f75dd584cdfe29dfdcfd424bb237b9238cfb8fe4
 Author: Anton staaf robot...@chromium.org
 Date:   Wed Oct 12 13:56:04 2011 +
 
 ~sanjeev

After a bit more digging, I see that ARCH_DMA_MINALIGN is set
to 64 OR CONFIG_SYS_CACHELINE_SIZE (if defined) - in this commit:

commit 3b75eeef620c018c312e8149246cd330cc27d16d
Author: Anton Staaf robot...@chromium.org
Date:   Mon Oct 17 16:46:03 2011 -0700

arm: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment

So, CONFIG_SYS_CACHELINE_SIZE shouldn't really be used in the
file.

I will submit fresh set soon.

~sanjeev

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


[U-Boot] [PATCH v4] Improve Power Management in SMC911X driver.

2011-11-15 Thread Bertrand Cachet
From datasheet, when READY bit is set inside PM_CTRL register, it means that
device is already in *normal* (D0) mode = it doesn't need to be wake-up.

With this patch, we only wake-up (writing on TEST_BYTE register) if PM_MODE
bits of PM_CTRL register is in sleep (D1/D2) mode.

Signed-off-by: Bertrand Cachet bertrand.cac...@heig-vd.ch
---
 v2: Improve code styling by grouping two narrow comments.
 v3: Place versions information under scissors line.
 v4: Use tabs instead of spaces (vimrc problem)

 drivers/net/smc911x.h |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index 8ce08a9..a290073 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -471,8 +471,11 @@ static void smc911x_reset(struct eth_device *dev)
 {
int timeout;
 
-   /* Take out of PM setting first */
-   if (smc911x_reg_read(dev, PMT_CTRL)  PMT_CTRL_READY) {
+   /*
+*  Take out of PM setting first
+*  Device is already wake up if PMT_CTRL_READY bit is set
+*/
+   if ((smc911x_reg_read(dev, PMT_CTRL)  PMT_CTRL_READY) == 0) {
/* Write to the bytetest will take out of powerdown */
smc911x_reg_write(dev, BYTE_TEST, 0x0);
 
-- 
1.7.5.4

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


[U-Boot] [PATCHv2 0/2] omap3evm: Add support for EFI partitions

2011-11-15 Thread Sanjeev Premi
After enabling CONFIG_EFI_PARTITION, following errors were
noticed.

part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid'
 from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg
ument is of type 'struct gpt_header **'
part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid
' from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg
ument is of type 'struct gpt_header **'
part_efi.c: In function 'alloc_read_gpt_entries':
part_efi.c:384:18: error: 'CONFIG_SYS_CACHELINE_SIZE' undeclar
ed (first use in this function)
part_efi.c:384:18: note: each undeclared identifier is reporte
d only once for each function it appears in
make[1]: *** [part_efi.o] Error 1
make[1]: Leaving directory `/home/premi/disk'
make: *** [disk/libdisk.o] Error 2

Tested working via command mmc part on OMAP3EVM on MMC card
with EFI partitions.


Changes since v1:
  * Use ARCH_DMA_MINALIGN instead of CONFIG_SYS_CACHELINE_SIZE
in disk/part_efi.c.
  * Removed (now) redundant definition of CONFIG_SYS_CACHELINE_SIZE
from /include/configs/omap3_evm_common.h

REF: http://lists.denx.de/pipermail/u-boot/2011-November/109895.html


Sanjeev Premi (2):
  part_efi: Fix compile errors
  omap3evm: Add support for EFI partitions

 disk/part_efi.c |6 +++---
 include/configs/omap3_evm.h |1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

Cc: Sandeep Paulraj s-paul...@ti.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCHv2 1/2] part_efi: Fix compile errors

2011-11-15 Thread Sanjeev Premi
Fix errors noticed after enabling CONFIG_EFI_PARTITION
for the OMAP3 EVM board:

part_efi.c: In function 'print_part_efi':
part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid'
 from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg
ument is of type 'struct gpt_header **'
part_efi.c: In function 'get_partition_info_efi':
part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid
' from incompatible pointer type
part_efi.c:95:12: note: expected 'struct gpt_header *' but arg
ument is of type 'struct gpt_header **'
part_efi.c: In function 'alloc_read_gpt_entries':
part_efi.c:384:18: error: 'CONFIG_SYS_CACHELINE_SIZE' undeclare
d (first use in this function)

Signed-off-by: Sanjeev Premi pr...@ti.com
Cc: Tom Rini tom.r...@gmail.com
Cc: Anton staaf robot...@chromium.org
---

 Changes since v1:
  * Use ARCH_DMA_MINALIGN instead of CONFIG_SYS_CACHELINE_SIZE
in disk/part_efi.c.

It is based on definition of ARCH_DMA_MINALIGN introduced
in 44d6cbb6a77665caa14be2a561c4148446b3ba7e:

arm: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment


 disk/part_efi.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/disk/part_efi.c b/disk/part_efi.c
index e7f2714..b6cda57 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -130,7 +130,7 @@ void print_part_efi(block_dev_desc_t * dev_desc)
}
/* This function validates AND fills in the GPT header and PTE */
if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
-(gpt_head), gpt_pte) != 1) {
+gpt_head, gpt_pte) != 1) {
printf(%s: *** ERROR: Invalid GPT ***\n, __func__);
return;
}
@@ -169,7 +169,7 @@ int get_partition_info_efi(block_dev_desc_t * dev_desc, int 
part,
 
/* This function validates AND fills in the GPT header and PTE */
if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
-   (gpt_head), gpt_pte) != 1) {
+   gpt_head, gpt_pte) != 1) {
printf(%s: *** ERROR: Invalid GPT ***\n, __func__);
return -1;
}
@@ -380,7 +380,7 @@ static gpt_entry *alloc_read_gpt_entries(block_dev_desc_t * 
dev_desc,
 
/* Allocate memory for PTE, remember to FREE */
if (count != 0) {
-   pte = memalign(CONFIG_SYS_CACHELINE_SIZE, count);
+   pte = memalign(ARCH_DMA_MINALIGN, count);
}
 
if (count == 0 || pte == NULL) {
-- 
1.7.0.4

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


[U-Boot] [PATCHv2 2/2] omap3evm: Add support for EFI partitions

2011-11-15 Thread Sanjeev Premi
Defines CONFIG_EFI_PARTITION for OMAP3 EVM.

Signed-off-by: Sanjeev Premi pr...@ti.com
Cc: Sandeep Paulraj s-paul...@ti.com
Cc: Tom Rini tom.r...@gmail.com
---

 Changes since v1:
  * Removed definition of CONFIG_SYS_CACHELINE_SIZE as it
is no longer needed - since ARCH_DMA_MINALIGN is being
used in previous patch.


 include/configs/omap3_evm.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 47ec39f..9228ef1 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -84,6 +84,7 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_OMAP_HSMMC
 #define CONFIG_DOS_PARTITION
+#define CONFIG_EFI_PARTITION
 
 /* USB
  *
-- 
1.7.0.4

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


[U-Boot] [STATUS] Help needed - urgently

2011-11-15 Thread Wolfgang Denk
Hello all,

I guess most of you will already have noticed that my activity on the
mailing list has significantly declined recently. I'm sorry for that,
but I find myself in a situation where I have even less time
available for U-Boot than usually. In the result, the number of
unapplied (and sometimes unreviewed) patches is growing and growing.

I need your help. we need to find a way to distribute the workload
for general patches (i. e. those that don't fall obviously into the
responsibility of a specific custodian) across more shoulders than
just mine. Pressure on me has been building up already for some time,
and now we've reached the point where we need to find a solution.


One possible approach has been suggested before:

  Maybe the load can be spread here - maintainers can put these in
  designated
  branches in their repositories. I know this will cause the odd
  conflict,
  
  If you script this (based on pwapply) you can bail out early if the
  patch is no longer in state New.
  
  but we (the maintainers) could also periodically sync between each
  other.
  Another alternative is to create a new repo that all the
  custodians have
  access to...
  
  That would be easy to do...
 
 Maybe that's what we do - Once a patch reaches maturity (a revision
 with an Ack and maybe a Tested-by) any maintainer can just put it in
 the 'next' repo - You can always veto it and not pull it into
 mainline anyway, but at least it gives everyone a semi-stable
 platform to base patches for the next merge window

I would like to try this out now, taking effect immediately.

I have created a new repository u-boot-staging, where all current
custodians (should) have write access to.

My proposal is as follows (please feel free to comment):

- Any custodian is able (and encouraged) to pick up unapplied patches
  that have reached maturity (ideally an Ack and maybe a
  Tested-by), but at least no negative feedback on the mailing list,
  and re-review these. If they are considered OK and do not cause any
  new build issues, they can be applied.  Please don't forget to
  update the entries in Patchwork.

- To ensure quality, no custodian should apply his own patches.

- After reviewing and build testing (MAKEALL for at least two
  different architectures) the stuff can be pushed into a _branch_ of
  the u-boot-staging repository.  I suggest to use the custodian's
  e-mail address as branch name.

- After that, the custodian can send a pull request to me.


Please let's try if this works.  If you have any suggestions how to
help better, please don't hesitate to tell us.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The important thing about being a leader is not being right or wrong,
but being *certain*.- Terry Pratchett, _Truckers_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-15 Thread s-paulraj
The following changes since commit 06194b6b65f701a9d6ef2d9b4123c4afe57d8783:
  Nagabhushana Netagunte (1):
da850: add new config file for AM18xx

are available in the git repository at:

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

Heiko Schocher (3):
  arm, davinci: da850/dm365 lowlevel cleanup
  arm, davinci_emac: fix driver bug if more then 3 PHYs are detected
  arm, davinci: add DAVINCI_MMC_CLKID

Sricharan (7):
  omap4: make omap4 code common for future reuse
  omap: Checkpatch fixes
  omap5: Add minimal support for omap5430.
  omap5: clocks: Add clocks support for omap5 platform.
  omap5: emif: Add emif/ddr configurations required for omap5 evm
  omap4/5: Add support for booting with CH.
  omap5: Add omap5_evm board build support.

 MAINTAINERS|1 +
 Makefile   |9 +-
 README |6 +
 arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|  122 +--
 arch/arm/cpu/arm926ejs/davinci/dm365_lowlevel.c|   73 +-
 arch/arm/cpu/armv7/omap-common/Makefile|   13 +
 arch/arm/cpu/armv7/omap-common/clocks-common.c |  609 +++
 arch/arm/cpu/armv7/omap-common/emif-common.c   | 1140 
 arch/arm/cpu/armv7/omap-common/hwinit-common.c |  267 +
 .../armv7/{omap4 = omap-common}/lowlevel_init.S   |   37 +-
 .../{omap4/mem.c = omap-common/mem-common.c}  |0
 arch/arm/cpu/armv7/omap-common/spl.c   |9 +-
 arch/arm/cpu/armv7/omap4/Makefile  |   11 +-
 arch/arm/cpu/armv7/omap4/board.c   |  384 ---
 arch/arm/cpu/armv7/omap4/clocks.c  |  628 ++-
 arch/arm/cpu/armv7/omap4/emif.c| 1135 +---
 arch/arm/cpu/armv7/omap4/hwinit.c  |  167 +++
 arch/arm/cpu/armv7/omap4/omap4_mux_data.h  |   83 --
 arch/arm/cpu/armv7/omap4/sdram_elpida.c|2 +-
 arch/arm/cpu/armv7/omap4/sys_info.c|   53 -
 arch/arm/cpu/armv7/omap5/Makefile  |   48 +
 arch/arm/cpu/armv7/omap5/clocks.c  |  432 
 arch/arm/cpu/armv7/omap5/config.mk |   28 +
 arch/arm/cpu/armv7/omap5/emif.c|  105 ++
 arch/arm/cpu/armv7/omap5/hwinit.c  |   78 ++
 arch/arm/cpu/armv7/omap5/sdram_elpida.c|  178 +++
 arch/arm/include/asm/arch-davinci/aintc_defs.h |2 +
 arch/arm/include/asm/arch-davinci/da850_lowlevel.h |2 +-
 arch/arm/include/asm/arch-davinci/ddr2_defs.h  |4 +
 arch/arm/include/asm/arch-davinci/emif_defs.h  |1 +
 arch/arm/include/asm/arch-davinci/hardware.h   |   21 +
 arch/arm/include/asm/arch-davinci/pll_defs.h   |   14 +
 arch/arm/include/asm/arch-omap3/mmc_host_def.h |   11 +-
 arch/arm/include/asm/arch-omap4/clocks.h   |   23 +
 arch/arm/include/asm/arch-omap4/emif.h | 1021 --
 arch/arm/include/asm/arch-omap4/mmc_host_def.h |   11 +-
 .../arm/include/asm/arch-omap4/{omap4.h = omap.h} |   46 +-
 arch/arm/include/asm/arch-omap4/sys_proto.h|   38 +-
 arch/arm/include/asm/arch-omap5/clocks.h   |  722 +
 arch/arm/include/asm/arch-omap5/cpu.h  |  175 +++
 arch/arm/include/asm/arch-omap5/gpio.h |   50 +
 arch/arm/include/asm/arch-omap5/i2c.h  |   74 ++
 arch/arm/include/asm/arch-omap5/mmc_host_def.h |  174 +++
 arch/arm/include/asm/arch-omap5/mux_omap5.h|  344 ++
 .../asm/{arch-omap4/omap4.h = arch-omap5/omap.h}  |  104 +-
 arch/arm/include/asm/arch-omap5/sys_proto.h|  122 +++
 arch/arm/include/asm/armv7.h   |3 +
 arch/arm/include/asm/emif.h| 1035 ++
 arch/arm/include/asm/mach-types.h  |   13 +
 arch/arm/include/asm/omap_common.h |   31 +-
 board/ti/omap5_evm/Makefile|   49 +
 board/ti/omap5_evm/evm.c   |  101 ++
 board/ti/omap5_evm/mux_data.h  |  275 +
 board/ti/panda/Makefile|2 -
 board/ti/panda/panda.c |   27 +-
 board/ti/panda/panda_mux_data.h|   54 +-
 board/ti/sdp4430/Makefile  |4 +-
 board/ti/sdp4430/sdp.c |   27 +-
 board/ti/sdp4430/sdp4430_mux_data.h|   53 +-
 boards.cfg |1 +
 drivers/mmc/omap_hsmmc.c   |   26 +-
 drivers/net/davinci_emac.c |   24 +-
 include/configs/omap4_common.h |7 +-
 include/configs/omap5_evm.h|  284 +
 spl/Makefile   |3 +
 65 files changed, 7108 insertions(+), 3488 deletions(-)
 create mode 

[U-Boot] [PATCH 1/5] mx53loco: Configure the pins as GPIOs prior to using gpio_get_value

2011-11-15 Thread Fabio Estevam
Configure the pins as GPIO prior to using gpio_get_value.

Cc: Jason Liu r64...@freescale.com
Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 board/freescale/mx53loco/mx53loco.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx53loco/mx53loco.c 
b/board/freescale/mx53loco/mx53loco.c
index b4c7f33..5e5c38f 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -139,6 +139,9 @@ struct fsl_esdhc_cfg esdhc_cfg[2] = {
 int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 {
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
+
+   mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
+   mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
 
if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR)
*cd = gpio_get_value(77); /*GPIO3_13*/
-- 
1.7.1

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


[U-Boot] [PATCH 3/5] mx53evk: Configure the pins as GPIOs prior to using gpio_get_value

2011-11-15 Thread Fabio Estevam
Configure the pins as GPIO prior to using gpio_get_value.

Cc: Jason Liu r64...@freescale.com
Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 board/freescale/mx53evk/mx53evk.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx53evk/mx53evk.c 
b/board/freescale/mx53evk/mx53evk.c
index 335661f..aa4a2c9 100644
--- a/board/freescale/mx53evk/mx53evk.c
+++ b/board/freescale/mx53evk/mx53evk.c
@@ -212,6 +212,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 {
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
 
+   mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
+   mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
+
if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR)
*cd = gpio_get_value(77); /*GPIO3_13*/
else
-- 
1.7.1

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


[U-Boot] [PATCH 2/5] mx53ard: Configure the pins as GPIOs prior to using gpio_get_value

2011-11-15 Thread Fabio Estevam
Configure the pins as GPIO prior to using gpio_get_value.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 board/freescale/mx53ard/mx53ard.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx53ard/mx53ard.c 
b/board/freescale/mx53ard/mx53ard.c
index be32aee..e5a1142 100644
--- a/board/freescale/mx53ard/mx53ard.c
+++ b/board/freescale/mx53ard/mx53ard.c
@@ -87,6 +87,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 {
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
 
+   mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT1);
+   mxc_request_iomux(MX53_PIN_GPIO_4, IOMUX_CONFIG_ALT1);
+
if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR)
*cd = gpio_get_value(1); /*GPIO1_1*/
else
-- 
1.7.1

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


[U-Boot] [PATCH 4/5] mx53smd: Configure the pins as GPIOs prior to using gpio_get_value

2011-11-15 Thread Fabio Estevam
Configure the pins as GPIO prior to using gpio_get_value.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 board/freescale/mx53smd/mx53smd.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx53smd/mx53smd.c 
b/board/freescale/mx53smd/mx53smd.c
index 87fa7fa..55af4e4 100644
--- a/board/freescale/mx53smd/mx53smd.c
+++ b/board/freescale/mx53smd/mx53smd.c
@@ -134,6 +134,7 @@ struct fsl_esdhc_cfg esdhc_cfg[1] = {
 
 int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 {
+   mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
*cd = gpio_get_value(77); /*GPIO3_13*/
 
return 0;
-- 
1.7.1

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


[U-Boot] [PATCH 5/5] mx51evk: Configure the pins as GPIOs prior to using gpio_get_value

2011-11-15 Thread Fabio Estevam
Configure the pins as GPIO prior to using gpio_get_value.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 board/freescale/mx51evk/mx51evk.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx51evk/mx51evk.c 
b/board/freescale/mx51evk/mx51evk.c
index 37e6e4d..e5b0929 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -265,6 +265,9 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 {
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv;
 
+   mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1);
+   mxc_request_iomux(MX51_PIN_GPIO1_6, IOMUX_CONFIG_ALT0);
+
if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR)
*cd = gpio_get_value(0);
else
-- 
1.7.1

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


Re: [U-Boot] [PATCH v2 2/2] smsc95xx: Debug message cleanup

2011-11-15 Thread Mike Frysinger
Acked-by: Mike Frysinger vap...@gentoo.org
-mike


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


Re: [U-Boot] [PATCH v2 1/2] smsc95xx: Fix MAC address programming

2011-11-15 Thread Mike Frysinger
Acked-by: Mike Frysinger vap...@gentoo.org
-mike


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


Re: [U-Boot] [RFC PATCH 4/8] arm: printf() is not available in the SPL

2011-11-15 Thread Tom Rini
On Tue, Nov 15, 2011 at 3:37 AM, Christian Riesch
christian.rie...@omicron.at wrote:

 Signed-off-by: Christian Riesch christian.rie...@omicron.at
 Cc: Wolfgang Denk w...@denx.de
 ---
  arch/arm/lib/eabi_compat.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
 index eb3e26d..2d49a28 100644
 --- a/arch/arm/lib/eabi_compat.c
 +++ b/arch/arm/lib/eabi_compat.c
 @@ -13,10 +13,13 @@

  int raise (int signum)
  {
 +#ifndef CONFIG_SPL_BUILD
        printf(raise: Signal # %d caught\n, signum);
 +#endif
        return 0;
  }

 +
  /* Dummy function to avoid linker complaints */
  void __aeabi_unwind_cpp_pr0(void)
  {

printf exists for omap3 SPL.  But perhaps the question is, why isn't
this code being gc'd away in your SPL?

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


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

2011-11-15 Thread Stefan Roese
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
---
 arch/powerpc/cpu/ppc4xx/usbdev.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/usbdev.c b/arch/powerpc/cpu/ppc4xx/usbdev.c
index fe398af..fc7da89 100644
--- a/arch/powerpc/cpu/ppc4xx/usbdev.c
+++ b/arch/powerpc/cpu/ppc4xx/usbdev.c
@@ -26,7 +26,6 @@ void process_endpoints(unsigned short usb2d0_intrin)
struct devrequest setup_packet;
unsigned int *setup_packet_pt;
unsigned char *packet_pt = NULL;
-   int temp, temp1;
 
int i;
 
@@ -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;
 
/*do some swapping */
setup_packet.value = swap_16(setup_packet.value);
-- 
1.7.7.3

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


[U-Boot] [PATCH 01/19] usb_ohci.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
usb_ohci.c: In function 'dl_transfer_length':
usb_ohci.c:756:8: warning: variable 'tdINFO' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 arch/powerpc/cpu/ppc4xx/usb_ohci.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/usb_ohci.c 
b/arch/powerpc/cpu/ppc4xx/usb_ohci.c
index fe091e3..065730d 100644
--- a/arch/powerpc/cpu/ppc4xx/usb_ohci.c
+++ b/arch/powerpc/cpu/ppc4xx/usb_ohci.c
@@ -753,10 +753,9 @@ static void td_submit_job (struct usb_device *dev, 
unsigned long pipe, void *buf
 
 static void dl_transfer_length(td_t * td)
 {
-   __u32 tdINFO, tdBE, tdCBP;
+   __u32 tdBE, tdCBP;
urb_priv_t *lurb_priv = urb_priv;
 
-   tdINFO = ohci_cpu_to_le32 (td-hwINFO);
tdBE   = ohci_cpu_to_le32 (td-hwBE);
tdCBP  = ohci_cpu_to_le32 (td-hwCBP);
 
-- 
1.7.7.3

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


[U-Boot] [PATCH 03/19] 4xx_enet.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
4xx_enet.c: In function 'ppc_4xx_eth_init':
4xx_enet.c:875:6: warning: variable 'ethgroup' set but not used 
[-Wunused-but-set-variable]

I used __maybe_unused here intentionally, since all other
alternatives to fix this compilation warning would result in more
ifdef's.

Signed-off-by: Stefan Roese s...@denx.de
---
 drivers/net/4xx_enet.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index a771139..73700dd 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -92,6 +92,7 @@
 #include asm/ppc4xx-mal.h
 #include miiphy.h
 #include malloc.h
+#include linux/compiler.h
 
 #if !(defined(CONFIG_MII) || defined(CONFIG_CMD_MII))
 #error CONFIG_MII has to be defined!
@@ -872,7 +873,7 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * 
bis)
 defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
 defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
 defined(CONFIG_405EX)
-   int ethgroup = -1;
+   __maybe_unused int ethgroup = -1;
 #endif
 #endif
u32 bd_cached;
-- 
1.7.7.3

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


[U-Boot] [PATCH 04/19] 4xx_pcie.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
4xx_pcie.c: In function 'pcie_read_config':
4xx_pcie.c:230:6: warning: variable 'address' set but not used 
[-Wunused-but-set-variable]
4xx_pcie.c: In function 'pcie_write_config':
4xx_pcie.c:290:6: warning: variable 'address' set but not used 
[-Wunused-but-set-variable]
4xx_pcie.c: In function 'ppc4xx_setup_pcie_rootpoint':
4xx_pcie.c:1066:17: warning: variable 'rmbase' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 arch/powerpc/cpu/ppc4xx/4xx_pcie.c |   11 ++-
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/4xx_pcie.c 
b/arch/powerpc/cpu/ppc4xx/4xx_pcie.c
index a87e93b..43b972f 100644
--- a/arch/powerpc/cpu/ppc4xx/4xx_pcie.c
+++ b/arch/powerpc/cpu/ppc4xx/4xx_pcie.c
@@ -227,7 +227,6 @@ static void pcie_dmer_enable(void)
 static int pcie_read_config(struct pci_controller *hose, unsigned int devfn,
int offset, int len, u32 *val) {
 
-   u8 *address;
*val = 0;
 
if (validate_endpoint(hose))
@@ -255,7 +254,7 @@ static int pcie_read_config(struct pci_controller *hose, 
unsigned int devfn,
((PCI_BUS(devfn) == 0) || (PCI_BUS(devfn) == 1)))
return 0;
 
-   address = pcie_get_base(hose, devfn);
+   pcie_get_base(hose, devfn);
offset += devfn  4;
 
/*
@@ -287,8 +286,6 @@ static int pcie_read_config(struct pci_controller *hose, 
unsigned int devfn,
 static int pcie_write_config(struct pci_controller *hose, unsigned int devfn,
int offset, int len, u32 val) {
 
-   u8 *address;
-
if (validate_endpoint(hose))
return 0;   /* No upstream config access */
 
@@ -307,7 +304,7 @@ static int pcie_write_config(struct pci_controller *hose, 
unsigned int devfn,
((PCI_BUS(devfn) == 0) || (PCI_BUS(devfn) == 1)))
return 0;
 
-   address = pcie_get_base(hose, devfn);
+   pcie_get_base(hose, devfn);
offset += devfn  4;
 
/*
@@ -1063,7 +1060,6 @@ int ppc4xx_init_pcie_endport(int port)
 void ppc4xx_setup_pcie_rootpoint(struct pci_controller *hose, int port)
 {
volatile void *mbase = NULL;
-   volatile void *rmbase = NULL;
 
pci_set_ops(hose,
pcie_read_config_byte,
@@ -1076,18 +1072,15 @@ void ppc4xx_setup_pcie_rootpoint(struct pci_controller 
*hose, int port)
switch (port) {
case 0:
mbase = (u32 *)CONFIG_SYS_PCIE0_XCFGBASE;
-   rmbase = (u32 *)CONFIG_SYS_PCIE0_CFGBASE;
hose-cfg_data = (u8 *)CONFIG_SYS_PCIE0_CFGBASE;
break;
case 1:
mbase = (u32 *)CONFIG_SYS_PCIE1_XCFGBASE;
-   rmbase = (u32 *)CONFIG_SYS_PCIE1_CFGBASE;
hose-cfg_data = (u8 *)CONFIG_SYS_PCIE1_CFGBASE;
break;
 #if CONFIG_SYS_PCIE_NR_PORTS  2
case 2:
mbase = (u32 *)CONFIG_SYS_PCIE2_XCFGBASE;
-   rmbase = (u32 *)CONFIG_SYS_PCIE2_CFGBASE;
hose-cfg_data = (u8 *)CONFIG_SYS_PCIE2_CFGBASE;
break;
 #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 05/19] 4xx_ibm_ddr2_autocalib.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
4xx_ibm_ddr2_autocalib.c: In function 'get_membase':
4xx_ibm_ddr2_autocalib.c:157:8: warning: variable 'bxcf' set but not used 
[-Wunused-but-set-variable]
4xx_ibm_ddr2_autocalib.c: In function 'DQS_calibration_methodB':
4xx_ibm_ddr2_autocalib.c:722:8: warning: variable 'rffd' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c |   15 +--
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c 
b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
index 4b8e65a..3c87bfb 100644
--- a/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
+++ b/arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
@@ -154,18 +154,20 @@ u32 ddr_rdss_opt(ulong) __attribute__((weak, 
alias(__ddr_rdss_opt)));
 
 static u32 *get_membase(int bxcr_num)
 {
-   ulong bxcf;
u32 *membase;
 
 #if defined(SDRAM_R0BAS)
/* BAS from Memory Queue rank reg. */
membase =
(u32 *)(SDRAM_RXBAS_SDBA_DECODE(mfdcr_any(SDRAM_R0BAS+bxcr_num)));
-   bxcf = 0;   /* just to satisfy the compiler */
 #else
-   /* BAS from SDRAM_MBxCF mem rank reg. */
-   mfsdram(SDRAM_MB0CF + (bxcr_num2), bxcf);
-   membase = (u32 *)((bxcf  0xfff8)  3);
+   {
+   ulong bxcf;
+
+   /* BAS from SDRAM_MBxCF mem rank reg. */
+   mfsdram(SDRAM_MB0CF + (bxcr_num2), bxcf);
+   membase = (u32 *)((bxcf  0xfff8)  3);
+   }
 #endif
 
return membase;
@@ -719,7 +721,9 @@ static u32 program_DQS_calibration_methodB(struct 
ddrautocal *ddrcal)
 static u32 DQS_calibration_methodB(struct ddrautocal *cal)
 {
ulong rfdc_reg;
+#ifndef CONFIG_DDR_RFDC_FIXED
ulong rffd;
+#endif
 
ulong rqdc_reg;
ulong rqfd;
@@ -837,7 +841,6 @@ static u32 DQS_calibration_methodB(struct ddrautocal *cal)
mtsdram(SDRAM_RFDC, rfdc_reg | SDRAM_RFDC_RFFD_ENCODE(rffd_average));
 #endif /* CONFIG_DDR_RFDC_FIXED */
 
-   rffd = rffd_average;
in_window = 0;
 
curr_win_min = curr_win_max = 0;
-- 
1.7.7.3

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


[U-Boot] [PATCH 07/19] 44x_spd_ddr.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
44x_spd_ddr.c: In function 'program_cfg0':
44x_spd_ddr.c:384:16: warning: variable 'dimm_64bit' set but not used 
[-Wunused-but-set-variable]
44x_spd_ddr.c:383:16: warning: variable 'dimm_32bit' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c 
b/arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c
index e05daf2..8a20a2b 100644
--- a/arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c
+++ b/arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c
@@ -380,8 +380,6 @@ static void program_cfg0(unsigned long *dimm_populated,
unsigned char ecc;
unsigned char attributes;
unsigned long data_width;
-   unsigned long dimm_32bit;
-   unsigned long dimm_64bit;
 
/*
 * get Memory Controller Options 0 data
@@ -423,10 +421,8 @@ static void program_cfg0(unsigned long *dimm_populated,
(unsigned 
long)spd_read(iic0_dimm_addr[dimm_num],6) +
(((unsigned 
long)spd_read(iic0_dimm_addr[dimm_num],7))  8);
if (data_width == 64 || data_width == 72) {
-   dimm_64bit = TRUE;
cfg0 |= SDRAM_CFG0_DMWD_64;
} else if (data_width == 32 || data_width == 40) {
-   dimm_32bit = TRUE;
cfg0 |= SDRAM_CFG0_DMWD_32;
} else {
printf(WARNING: DIMM with datawidth of %lu 
bits.\n,
-- 
1.7.7.3

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


[U-Boot] [PATCH 06/19] cmd_ecctest.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
cmd_ecctest.c: In function 'inject_ecc_error':
cmd_ecctest.c:116:6: warning: variable 'val' set but not used 
[-Wunused-but-set-variable]
cmd_ecctest.c: In function 'rewrite_ecc_parity':
cmd_ecctest.c:154:6: warning: variable 'val' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 arch/powerpc/cpu/ppc4xx/cmd_ecctest.c |9 +++--
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/cmd_ecctest.c 
b/arch/powerpc/cpu/ppc4xx/cmd_ecctest.c
index 542ab69..231f69e 100644
--- a/arch/powerpc/cpu/ppc4xx/cmd_ecctest.c
+++ b/arch/powerpc/cpu/ppc4xx/cmd_ecctest.c
@@ -113,8 +113,6 @@ static force_inline void set_mcopt1_mchk(u32 bits)
  */
 static void inject_ecc_error(void *ptr, int par)
 {
-   u32 val;
-
/*
 * Taken from PPC460EX/EXr/GT users manual (Rev 1.21)
 * 22.2.17.13 ECC Diagnostics
@@ -124,7 +122,7 @@ static void inject_ecc_error(void *ptr, int par)
 */
 
out_be32(ptr, 0x);
-   val = in_be32(ptr);
+   in_be32(ptr);
 
/* 6. Set memory controller to no error checking */
set_mcopt1_mchk(SDRAM_MCOPT1_MCHK_NON);
@@ -136,7 +134,7 @@ static void inject_ecc_error(void *ptr, int par)
out_be32(ptr, in_be32(ptr) ^ 0x0003);
 
/* 8. Wait for SDRAM idle */
-   val = in_be32(ptr);
+   in_be32(ptr);
set_mcopt1_mchk(SDRAM_MCOPT1_MCHK_CHK_REP);
 
/* Wait for SDRAM idle */
@@ -151,7 +149,6 @@ static void rewrite_ecc_parity(void *ptr, int par)
u32 end_address;
u32 address_increment;
u32 mcopt1;
-   u32 val;
 
/*
 * Fill ECC parity byte again. Otherwise further accesses to
@@ -159,7 +156,7 @@ static void rewrite_ecc_parity(void *ptr, int par)
 */
 
/* Wait for SDRAM idle */
-   val = in_be32(0x);
+   in_be32(0x);
set_mcopt1_mchk(SDRAM_MCOPT1_MCHK_GEN);
 
/* ECC bit set method for non-cached memory */
-- 
1.7.7.3

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


[U-Boot] [PATCH 09/19] 40x_spd_sdram.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
40x_spd_sdram.c: In function 'spd_sdram':
40x_spd_sdram.c:137:6: warning: variable 'sdram0_b3cr' set but not used 
[-Wunused-but-set-variable]
40x_spd_sdram.c:136:6: warning: variable 'sdram0_b2cr' set but not used 
[-Wunused-but-set-variable]
40x_spd_sdram.c:129:6: warning: variable 'sdram0_ecccfg' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 arch/powerpc/cpu/ppc4xx/40x_spd_sdram.c |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/40x_spd_sdram.c 
b/arch/powerpc/cpu/ppc4xx/40x_spd_sdram.c
index a31b17e..48aa753 100644
--- a/arch/powerpc/cpu/ppc4xx/40x_spd_sdram.c
+++ b/arch/powerpc/cpu/ppc4xx/40x_spd_sdram.c
@@ -116,26 +116,25 @@ long int spd_sdram(int(read_spd)(uint addr))
 {
int tmp,row,col;
int total_size,bank_size,bank_code;
-   int ecc_on;
int mode;
int bank_cnt;
 
int sdram0_pmit=0x07c0;
+   int sdram0_b0cr;
+   int sdram0_b1cr = 0;
 #ifndef CONFIG_405EP /* not on PPC405EP */
+   int sdram0_b2cr = 0;
+   int sdram0_b3cr = 0;
int sdram0_besr0 = -1;
int sdram0_besr1 = -1;
int sdram0_eccesr = -1;
-#endif
int sdram0_ecccfg;
+   int ecc_on;
+#endif
 
int sdram0_rtr=0;
int sdram0_tr=0;
 
-   int sdram0_b0cr;
-   int sdram0_b1cr;
-   int sdram0_b2cr;
-   int sdram0_b3cr;
-
int sdram0_cfg=0;
 
int t_rp;
@@ -295,6 +294,7 @@ long int spd_sdram(int(read_spd)(uint addr))
if (bank_cnt  4)   /* we only have 4 banks to work with */
SPD_ERR(SDRAM - unsupported module rows for this width\n);
 
+#ifndef CONFIG_405EP /* not on PPC405EP */
/* now check for ECC ability of module. We only support ECC
 *   on 32 bit wide devices with 8 bit ECC.
 */
@@ -305,6 +305,7 @@ long int spd_sdram(int(read_spd)(uint addr))
sdram0_ecccfg = 0;
ecc_on = 0;
}
+#endif
 
/*--
 * calculate total size
@@ -378,9 +379,6 @@ long int spd_sdram(int(read_spd)(uint addr))
 * using the calculated values, compute the bank
 * config register values.
 * ---*/
-   sdram0_b1cr = 0;
-   sdram0_b2cr = 0;
-   sdram0_b3cr = 0;
 
/* compute the size of each bank */
bank_size = total_size / bank_cnt;
@@ -444,8 +442,10 @@ long int spd_sdram(int(read_spd)(uint addr))
/* SDRAM have a power on delay,  500 micro should do */
udelay(500);
sdram0_cfg = SDRAM0_CFG_DCE | SDRAM0_CFG_BRPF(1) | SDRAM0_CFG_ECCDD | 
SDRAM0_CFG_EMDULR;
+#ifndef CONFIG_405EP /* not on PPC405EP */
if (ecc_on)
sdram0_cfg |= SDRAM0_CFG_MEMCHK;
+#endif
mtsdram(SDRAM0_CFG, sdram0_cfg);
 
return (total_size);
-- 
1.7.7.3

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


[U-Boot] [PATCH 11/19] sata_dwc.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
sata_dwc.c: In function 'sata_dwc_softreset':
sata_dwc.c:444:5: warning: variable 'status' set but not used 
[-Wunused-but-set-variable]
sata_dwc.c:443:6: warning: variable 'serror' set but not used 
[-Wunused-but-set-variable]
sata_dwc.c: In function 'scan_sata':
sata_dwc.c:654:16: warning: variable 'lba_desc' set but not used 
[-Wunused-but-set-variable]
sata_dwc.c:538:16: warning: variable 'xfer_mask' set but not used 
[-Wunused-but-set-variable]
sata_dwc.c: In function 'ata_dev_read_id':
sata_dwc.c:747:14: warning: variable 'reason' set but not used 
[-Wunused-but-set-variable]
sata_dwc.c: In function 'ata_dev_read_sectors':
sata_dwc.c:1810:6: warning: variable 'rc' set but not used 
[-Wunused-but-set-variable]
sata_dwc.c: In function 'ata_dev_write_sectors':
sata_dwc.c:1994:6: warning: variable 'rc' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 drivers/block/sata_dwc.c |   35 +++
 1 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/drivers/block/sata_dwc.c b/drivers/block/sata_dwc.c
index b2b3804..69ec5fd 100644
--- a/drivers/block/sata_dwc.c
+++ b/drivers/block/sata_dwc.c
@@ -440,11 +440,9 @@ static int sata_dwc_softreset(struct ata_port *ap)
 {
u8 nsect,lbal = 0;
u8 tmp = 0;
-   u32 serror = 0;
-   u8 status = 0;
struct ata_ioports *ioaddr = ap-ioaddr;
 
-   serror = in_le32((void *)ap-ioaddr.scr_addr + (SCR_ERROR * 4));
+   in_le32((void *)ap-ioaddr.scr_addr + (SCR_ERROR * 4));
 
writeb(0x55, ioaddr-nsect_addr);
writeb(0xaa, ioaddr-lbal_addr);
@@ -476,7 +474,7 @@ static int sata_dwc_softreset(struct ata_port *ap)
writeb(ap-ctl, ioaddr-ctl_addr);
 
msleep(150);
-   status = ata_check_status(ap);
+   ata_check_status(ap);
 
msleep(50);
ata_check_status(ap);
@@ -535,7 +533,6 @@ int scan_sata(int dev)
const u16 *id;
struct ata_device *ata_dev = ata_device;
unsigned long pio_mask, mwdma_mask, udma_mask;
-   unsigned long xfer_mask;
char revbuf[7];
u16 iobuf[ATA_SECTOR_WORDS];
 
@@ -629,10 +626,6 @@ int scan_sata(int dev)
if (id[ATA_ID_FIELD_VALID]  (1  2))
udma_mask = id[ATA_ID_UDMA_MODES]  0xff;
 
-   xfer_mask = ((pio_mask  ATA_SHIFT_PIO)  ATA_MASK_PIO) |
-   ((mwdma_mask  ATA_SHIFT_MWDMA)  ATA_MASK_MWDMA) |
-   ((udma_mask  ATA_SHIFT_UDMA)  ATA_MASK_UDMA);
-
if (ata_dev-class == ATA_DEV_ATA) {
if (ata_id_is_cfa(id)) {
if (id[162]  1)
@@ -651,14 +644,11 @@ int scan_sata(int dev)
ata_dev-multi_count = ata_dev-id[59]  0xff;
 
if (ata_id_has_lba(id)) {
-   const char *lba_desc;
char ncq_desc[20];
 
-   lba_desc = LBA;
ata_dev-flags |= ATA_DFLAG_LBA;
if (ata_id_has_lba48(id)) {
ata_dev-flags |= ATA_DFLAG_LBA48;
-   lba_desc = LBA48;
 
if (ata_dev-n_sectors = (1UL  28) 
ata_id_has_flush_ext(id))
@@ -890,6 +880,7 @@ retry:
return 0;
 
 err_out:
+   printf(failed to READ ID (%s, err_mask=0x%x)\n, reason, err_mask);
return rc;
 }
 
@@ -1807,7 +1798,6 @@ static int ata_dev_read_sectors(unsigned char *pdata, 
unsigned long datalen,
unsigned int err_mask = 0;
const char *reason;
int may_fallback = 1;
-   int rc;
 
if (dev_state == SATA_ERROR)
return FALSE;
@@ -1904,19 +1894,10 @@ retry:
return -ENOENT;
}
 
-   rc = -EIO;
reason = I/O error;
goto err_out;
}
 
-   /* Falling back doesn't make sense if ID data was read
-* successfully at least once.
-*/
-   may_fallback = 0;
-
-   rc = -EINVAL;
-   reason = device reports invalid type;
-
return TRUE;
 
 err_out:
@@ -1991,7 +1972,6 @@ static int ata_dev_write_sectors(unsigned char* pdata, 
unsigned long datalen,
unsigned int err_mask = 0;
const char *reason;
int may_fallback = 1;
-   int rc;
 
if (dev_state == SATA_ERROR)
return FALSE;
@@ -2089,19 +2069,10 @@ retry:
return -ENOENT;
}
 
-   rc = -EIO;
reason = I/O error;
goto err_out;
}
 
-   /* Falling back doesn't make sense if ID data was read
-* successfully at least once.
-*/
-   may_fallback = 0;
-
-   rc = -EINVAL;
-   reason = device reports invalid type;
-
return TRUE;
 
 err_out:
-- 
1.7.7.3

___
U-Boot mailing list
U-Boot@lists.denx.de

[U-Boot] [PATCH 08/19] 44x_spd_ddr2.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
44x_spd_ddr2.c: In function 'initdram':
44x_spd_ddr2.c:450:17: warning: variable 'dimm_spd' set but not used 
[-Wunused-but-set-variable]
44x_spd_ddr2.c: In function 'program_copt1':
44x_spd_ddr2.c:1003:16: warning: variable 'ddrtype' set but not used 
[-Wunused-but-set-variable]
44x_spd_ddr2.c: In function 'DQS_calibration_process':
44x_spd_ddr2.c:2498:7: warning: variable 'window_found' set but not used 
[-Wunused-but-set-variable]
44x_spd_ddr2.c:2497:16: warning: variable 'end_rffd' set but not used 
[-Wunused-but-set-variable]
44x_spd_ddr2.c:2496:16: warning: variable 'end_rqfd' set but not used 
[-Wunused-but-set-variable]
44x_spd_ddr2.c:2495:16: warning: variable 'begin_rffd' set but not used 
[-Wunused-but-set-variable]
44x_spd_ddr2.c:2494:16: warning: variable 'begin_rqfd' set but not used 
[-Wunused-but-set-variable]
44x_spd_ddr2.c:2493:7: warning: variable 'min_end' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c |   32 +---
 1 files changed, 1 insertions(+), 31 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c 
b/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c
index 4a2f337..85217ea 100644
--- a/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c
+++ b/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c
@@ -445,9 +445,6 @@ static unsigned char spd_read(uchar chip, uint addr)
 phys_size_t initdram(int board_type)
 {
unsigned char iic0_dimm_addr[] = SPD_EEPROM_ADDRESS;
-   unsigned char spd0[MAX_SPD_BYTES];
-   unsigned char spd1[MAX_SPD_BYTES];
-   unsigned char *dimm_spd[MAXDIMMS];
unsigned long dimm_populated[MAXDIMMS] = {SDRAM_NONE, SDRAM_NONE};
unsigned long num_dimm_banks;   /* on board dimm banks */
unsigned long val;
@@ -458,12 +455,6 @@ phys_size_t initdram(int board_type)
num_dimm_banks = sizeof(iic0_dimm_addr);
 
/*--
-* Set up an array of SPD matrixes.
-*-*/
-   dimm_spd[0] = spd0;
-   dimm_spd[1] = spd1;
-
-   /*--
 * Reset the DDR-SDRAM controller.
 *-*/
mtsdr(SDR0_SRST, SDR0_SRST0_DMC);
@@ -1000,7 +991,6 @@ static void program_copt1(unsigned long *dimm_populated,
unsigned long attribute = 0;
unsigned long buf0, buf1; /* TODO: code to be changed for IOP1.6 to 
support 4 DIMMs */
unsigned long bankcount;
-   unsigned long ddrtype;
unsigned long val;
 
 #ifdef CONFIG_DDR_ECC
@@ -1045,8 +1035,6 @@ static void program_copt1(unsigned long *dimm_populated,
else /* bank count = 8 */
mcopt1 |= SDRAM_MCOPT1_8_BANKS;
 
-   /* test DDR type */
-   ddrtype = (unsigned 
long)spd_read(iic0_dimm_addr[dimm_num], 2);
/* test for buffered/unbuffered, registered, 
differential clocks */
registered = (unsigned 
long)spd_read(iic0_dimm_addr[dimm_num], 20);
attribute = (unsigned 
long)spd_read(iic0_dimm_addr[dimm_num], 21);
@@ -1500,7 +1488,6 @@ static void program_mode(unsigned long *dimm_populated,
else
sdram_ddr1 = FALSE;
 
-   /* t_wr_ns = max(t_wr_ns, (unsigned 
long)dimm_spd[dimm_num][36]  2); */ /*  not used in this loop. */
cas_bit = spd_read(iic0_dimm_addr[dimm_num], 18);
debug(cas_bit[SPD byte 18]=%02lx\n, cas_bit);
 
@@ -2490,12 +2477,6 @@ static void DQS_calibration_process(void)
unsigned long val;
long rffd_average;
long max_start;
-   long min_end;
-   unsigned long begin_rqfd[MAXRANKS];
-   unsigned long begin_rffd[MAXRANKS];
-   unsigned long end_rqfd[MAXRANKS];
-   unsigned long end_rffd[MAXRANKS];
-   char window_found;
unsigned long dlycal;
unsigned long dly_val;
unsigned long max_pass_length;
@@ -2506,6 +2487,7 @@ static void DQS_calibration_process(void)
unsigned char fail_found;
unsigned char pass_found;
 #if !defined(CONFIG_DDR_RQDC_FIXED)
+   int window_found;
u32 rqdc_reg;
u32 rqfd;
u32 rqfd_start;
@@ -2559,16 +2541,6 @@ calibration_loop:
 #endif /* CONFIG_DDR_RQDC_FIXED */
 
max_start = 0;
-   min_end = 0;
-   begin_rqfd[0] = 0;
-   begin_rffd[0] = 0;
-   begin_rqfd[1] = 0;
-   begin_rffd[1] = 0;
-   end_rqfd[0] = 0;
-   end_rffd[0] = 0;
-   end_rqfd[1] = 0;
-   end_rffd[1] = 0;
-   window_found = FALSE;
 
max_pass_length = 0;
max_start = 0;
@@ -2576,7 +2548,6 @@ calibration_loop:
current_pass_length = 0;

Re: [U-Boot] [PATCH] tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

2011-11-15 Thread Stephen Warren
Thierry Reding wrote at Tuesday, November 15, 2011 12:19 AM:
 NVIDIA's flashing tools assume that the bootloader is loaded at address
 0x00108000. Instead of requiring non-standard builds of those tools
 which allow a load address of 0x00E08000, this commit just switches all
 Tegra2 boards to use the standard load address.

 Note that to successfully boot a standalone U-Boot with this load
 address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

Isn't that true irrespective of TEXT_BASE? That's certainly been my
experience.

-- 
nvpublic

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


[U-Boot] [PATCH 10/19] 20001122-1.c: Fix GCC 4.6 build warning

2011-11-15 Thread Stefan Roese
Fix:
20001122-1.c: In function 'fpu_post_test_math1':
20001122-1.c:37:22: warning: variable 'p' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 post/lib_powerpc/fpu/20001122-1.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/post/lib_powerpc/fpu/20001122-1.c 
b/post/lib_powerpc/fpu/20001122-1.c
index 4af300d..5b4f42c 100644
--- a/post/lib_powerpc/fpu/20001122-1.c
+++ b/post/lib_powerpc/fpu/20001122-1.c
@@ -34,12 +34,11 @@ GNU_FPOST_ATTR
 
 int fpu_post_test_math1 (void)
 {
-   volatile double a, *p;
+   volatile double a;
double c, d;
volatile double b;
 
d = 1.0;
-   p = b;
 
do
{
-- 
1.7.7.3

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


[U-Boot] [PATCH 13/19] dlvision-10g.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
dlvision-10g.c: In function 'print_fpga_info':
dlvision-10g.c:90:11: warning: variable 'feature_compression' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 board/gdsys/405ep/dlvision-10g.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/board/gdsys/405ep/dlvision-10g.c b/board/gdsys/405ep/dlvision-10g.c
index ecba66e..f55afbd 100644
--- a/board/gdsys/405ep/dlvision-10g.c
+++ b/board/gdsys/405ep/dlvision-10g.c
@@ -87,7 +87,6 @@ static void print_fpga_info(unsigned dev)
u16 fpga_features = in_le16(fpga-fpga_features);
unsigned unit_type;
unsigned hardware_version;
-   unsigned feature_compression;
unsigned feature_rs232;
unsigned feature_audio;
unsigned feature_sysclock;
@@ -111,7 +110,6 @@ static void print_fpga_info(unsigned dev)
 
unit_type = (versions  4)  0x000f;
hardware_version = versions  0x000f;
-   feature_compression = (fpga_features  13)  0x0003;
feature_rs232 = fpga_features  (111);
feature_audio = (fpga_features  9)  0x0003;
feature_sysclock = (fpga_features  7)  0x0003;
-- 
1.7.7.3

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


[U-Boot] [PATCH 12/19] nand_boot.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
nand_boot.c: In function 'nand_read_page':
nand_boot.c:190:6: warning: variable 'stat' set but not used 
[-Wunused-but-set-variable]
nand_boot.c: In function 'nand_boot':
nand_boot.c:271:6: warning: variable 'ret' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 nand_spl/nand_boot.c |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
index 615ef25..bee1029 100644
--- a/nand_spl/nand_boot.c
+++ b/nand_spl/nand_boot.c
@@ -187,7 +187,6 @@ static int nand_read_page(struct mtd_info *mtd, int block, 
int page, uchar *dst)
int eccbytes = CONFIG_SYS_NAND_ECCBYTES;
int eccsteps = CONFIG_SYS_NAND_ECCSTEPS;
uint8_t *p = dst;
-   int stat;
 
nand_command(mtd, block, page, 0, NAND_CMD_READ0);
 
@@ -217,7 +216,7 @@ static int nand_read_page(struct mtd_info *mtd, int block, 
int page, uchar *dst)
 * from correct_data(). We just hope that all possible errors
 * are corrected by this routine.
 */
-   stat = this-ecc.correct(mtd, p, ecc_code[i], ecc_calc[i]);
+   this-ecc.correct(mtd, p, ecc_code[i], ecc_calc[i]);
}
 
return 0;
@@ -268,7 +267,6 @@ void nand_boot(void)
 {
struct nand_chip nand_chip;
nand_info_t nand_info;
-   int ret;
__attribute__((noreturn)) void (*uboot)(void);
 
/*
@@ -287,8 +285,8 @@ void nand_boot(void)
/*
 * Load U-Boot image from NAND into RAM
 */
-   ret = nand_load(nand_info, CONFIG_SYS_NAND_U_BOOT_OFFS, 
CONFIG_SYS_NAND_U_BOOT_SIZE,
-   (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
+   nand_load(nand_info, CONFIG_SYS_NAND_U_BOOT_OFFS, 
CONFIG_SYS_NAND_U_BOOT_SIZE,
+ (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
 
 #ifdef CONFIG_NAND_ENV_DST
nand_load(nand_info, CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
-- 
1.7.7.3

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


[U-Boot] [PATCH 14/19] cmd_pci405.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
cmd_pci405.c: In function 'do_loadpci':
cmd_pci405.c:45:6: warning: variable 'status' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 board/esd/pci405/cmd_pci405.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/board/esd/pci405/cmd_pci405.c b/board/esd/pci405/cmd_pci405.c
index 13f9019..f570ef3 100644
--- a/board/esd/pci405/cmd_pci405.c
+++ b/board/esd/pci405/cmd_pci405.c
@@ -42,7 +42,6 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
unsigned int *ptr = 0;
int count = 0;
int count2 = 0;
-   int status;
int i;
char addr[16];
char str[] = \\|/-;
@@ -99,7 +98,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
 
local_args[0] = argv[0];
local_args[1] = NULL;
-   status = do_bootm (cmdtp, 0, 1, local_args);
+   do_bootm (cmdtp, 0, 1, local_args);
}
 
return 0;
-- 
1.7.7.3

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


[U-Boot] [PATCH 16/19] iop480_uart.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
iop480_uart.c: In function 'serial_init':
iop480_uart.c:137:16: warning: variable 'val' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 arch/powerpc/cpu/ppc4xx/iop480_uart.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/iop480_uart.c 
b/arch/powerpc/cpu/ppc4xx/iop480_uart.c
index 0e3423f..027ca30 100644
--- a/arch/powerpc/cpu/ppc4xx/iop480_uart.c
+++ b/arch/powerpc/cpu/ppc4xx/iop480_uart.c
@@ -134,7 +134,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int serial_init (void)
 {
-   volatile char val;
unsigned short br_reg;
 
br_reg = CONFIG_CPUCLOCK * 100) / 16) / gd-baudrate) - 1);
@@ -149,7 +148,7 @@ int serial_init (void)
out_8((u8 *)SPU_BASE + spu_RxCmd, 0xb0);/* Enable Rx */
out_8((u8 *)SPU_BASE + spu_TxCmd, 0x9c);/* Enable Tx */
out_8((u8 *)SPU_BASE + spu_Handshk_rc, 0xff);   /* Clear Handshake */
-   val = in_8((u8 *)SPU_BASE + spu_RxBuff);/* Dummy read, to clear 
receiver */
+   in_8((u8 *)SPU_BASE + spu_RxBuff);  /* Dummy read, to clear 
receiver */
 
return (0);
 }
-- 
1.7.7.3

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


[U-Boot] [PATCH 17/19] auto_update.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
../common/auto_update.c: In function 'au_check_header_valid':
../common/auto_update.c:94:16: warning: variable 'checksum' set but not used 
[-Wunused-but-set-variable]
../common/auto_update.c: In function 'do_auto_update':
../common/auto_update.c:400:30: warning: variable 'got_ctrlc' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 board/esd/common/auto_update.c |8 +---
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/board/esd/common/auto_update.c b/board/esd/common/auto_update.c
index 4dfea71..fc60545 100644
--- a/board/esd/common/auto_update.c
+++ b/board/esd/common/auto_update.c
@@ -91,7 +91,6 @@ int au_check_cksum_valid(int i, long nbytes)
 int au_check_header_valid(int i, long nbytes)
 {
image_header_t *hdr;
-   unsigned long checksum;
 
hdr = (image_header_t *)LOAD_ADDR;
 #if defined(CONFIG_FIT)
@@ -127,9 +126,6 @@ int au_check_header_valid(int i, long nbytes)
return -1;
}
 
-   /* recycle checksum */
-   checksum = image_get_data_size (hdr);
-
return 0;
 }
 
@@ -397,7 +393,7 @@ int do_auto_update(void)
 {
block_dev_desc_t *stor_dev = NULL;
long sz;
-   int i, res, cnt, old_ctrlc, got_ctrlc;
+   int i, res, cnt, old_ctrlc;
char buffer[32];
char str[80];
int n;
@@ -473,8 +469,6 @@ int do_auto_update(void)
/* let the user break out of the loop */
if (ctrlc() || had_ctrlc ()) {
clear_ctrlc ();
-   if (res  0)
-   got_ctrlc = 1;
break;
}
cnt++;
-- 
1.7.7.3

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


[U-Boot] [PATCH 15/19] cmd_dasa_sim.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
cmd_dasa_sim.c: In function 'updatePci9054':
cmd_dasa_sim.c:135:6: warning: variable 'val' set but not used 
[-Wunused-but-set-variable]
cmd_dasa_sim.c: In function 'clearPci9054':
cmd_dasa_sim.c:189:6: warning: variable 'val' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 board/esd/dasa_sim/cmd_dasa_sim.c |   52 +
 1 files changed, 24 insertions(+), 28 deletions(-)

diff --git a/board/esd/dasa_sim/cmd_dasa_sim.c 
b/board/esd/dasa_sim/cmd_dasa_sim.c
index 4946538..0014808 100644
--- a/board/esd/dasa_sim/cmd_dasa_sim.c
+++ b/board/esd/dasa_sim/cmd_dasa_sim.c
@@ -132,8 +132,6 @@ static void showPci9054 (void)
 
 static void updatePci9054 (void)
 {
-   int val;
-
/*
 * Set EEPROM write-protect register to 0
 */
@@ -141,44 +139,44 @@ static void updatePci9054 (void)
  in_be32 ((void *)(pci9054_iobase + 0x0c))  0x00ff);
 
/* Long Serial EEPROM Load Registers... */
-   val = PciEepromWriteLongVPD (0x00, 0x905410b5);
-   val = PciEepromWriteLongVPD (0x04, 0x0981); /* other input 
controller */
-   val = PciEepromWriteLongVPD (0x08, 0x28140100);
+   PciEepromWriteLongVPD (0x00, 0x905410b5);
+   PciEepromWriteLongVPD (0x04, 0x0981);   /* other input 
controller */
+   PciEepromWriteLongVPD (0x08, 0x28140100);
 
-   val = PciEepromWriteLongVPD (0x0c, 0x); /* MBOX0... */
-   val = PciEepromWriteLongVPD (0x10, 0x);
+   PciEepromWriteLongVPD (0x0c, 0x);   /* MBOX0... */
+   PciEepromWriteLongVPD (0x10, 0x);
 
/* las0: fpga access (0x. ... 0x0003.) */
-   val = PciEepromWriteLongVPD (0x14, 0xfffc); /* LAS0RR... */
-   val = PciEepromWriteLongVPD (0x18, 0x0001); /* LAS0BA */
+   PciEepromWriteLongVPD (0x14, 0xfffc);   /* LAS0RR... */
+   PciEepromWriteLongVPD (0x18, 0x0001);   /* LAS0BA */
 
-   val = PciEepromWriteLongVPD (0x1c, 0x0020); /* MARBR... */
-   val = PciEepromWriteLongVPD (0x20, 0x00300500); /* LMISC/BIGEND */
+   PciEepromWriteLongVPD (0x1c, 0x0020);   /* MARBR... */
+   PciEepromWriteLongVPD (0x20, 0x00300500);   /* LMISC/BIGEND */
 
-   val = PciEepromWriteLongVPD (0x24, 0x); /* EROMRR... */
-   val = PciEepromWriteLongVPD (0x28, 0x); /* EROMBA */
+   PciEepromWriteLongVPD (0x24, 0x);   /* EROMRR... */
+   PciEepromWriteLongVPD (0x28, 0x);   /* EROMBA */
 
-   val = PciEepromWriteLongVPD (0x2c, 0x4303); /* LBRD0... */
+   PciEepromWriteLongVPD (0x2c, 0x4303);   /* LBRD0... */
 
-   val = PciEepromWriteLongVPD (0x30, 0x); /* DMRR... */
-   val = PciEepromWriteLongVPD (0x34, 0x);
-   val = PciEepromWriteLongVPD (0x38, 0x);
+   PciEepromWriteLongVPD (0x30, 0x);   /* DMRR... */
+   PciEepromWriteLongVPD (0x34, 0x);
+   PciEepromWriteLongVPD (0x38, 0x);
 
-   val = PciEepromWriteLongVPD (0x3c, 0x); /* DMPBAM... */
-   val = PciEepromWriteLongVPD (0x40, 0x);
+   PciEepromWriteLongVPD (0x3c, 0x);   /* DMPBAM... */
+   PciEepromWriteLongVPD (0x40, 0x);
 
/* Extra Long Serial EEPROM Load Registers... */
-   val = PciEepromWriteLongVPD (0x44, 0x010212fe); /* PCISID... */
+   PciEepromWriteLongVPD (0x44, 0x010212fe);   /* PCISID... */
 
/* las1: 505-sram access (0x0004. ... 0x001f.) */
/* Offset to LAS1: Group 1: 0x0004 */
/* Group 2: 0x0008 */
/* Group 3: 0x000c */
-   val = PciEepromWriteLongVPD (0x48, 0xffe0); /* LAS1RR */
-   val = PciEepromWriteLongVPD (0x4c, 0x00040001); /* LAS1BA */
-   val = PciEepromWriteLongVPD (0x50, 0x0208); /* LBRD1 */ /* so wars 
bisher */
+   PciEepromWriteLongVPD (0x48, 0xffe0);   /* LAS1RR */
+   PciEepromWriteLongVPD (0x4c, 0x00040001);   /* LAS1BA */
+   PciEepromWriteLongVPD (0x50, 0x0208);   /* LBRD1 */ /* so wars 
bisher */
 
-   val = PciEepromWriteLongVPD (0x54, 0x4c06); /* HotSwap... */
+   PciEepromWriteLongVPD (0x54, 0x4c06);   /* HotSwap... */
 
printf (Finished writing defaults into PLX PCI9054 EEPROM!\n);
 }
@@ -186,8 +184,6 @@ static void updatePci9054 (void)
 
 static void clearPci9054 (void)
 {
-   int val;
-
/*
 * Set EEPROM write-protect register to 0
 */
@@ -195,8 +191,8 @@ static void clearPci9054 (void)
  in_be32 ((void *)(pci9054_iobase + 0x0c))  0x00ff);
 
/* Long Serial EEPROM Load Registers... */
-   val = PciEepromWriteLongVPD (0x00, 0x);
-   val = PciEepromWriteLongVPD (0x04, 0x); /* other input 
controller */
+   

[U-Boot] [PATCH 18/19] mip405.c: Fix GCC 4.6 build warnings

2011-11-15 Thread Stefan Roese
Fix:
mip405.c: In function 'init_sdram':
mip405.c:250:4: warning: variable 'tctp_clocks' set but not used 
[-Wunused-but-set-variable]
mip405.c: In function 'initdram':
mip405.c:629:9: warning: variable 'ds' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 board/mpl/mip405/mip405.c |   10 +++---
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c
index e93d994..9d0db64 100644
--- a/board/mpl/mip405/mip405.c
+++ b/board/mpl/mip405/mip405.c
@@ -246,8 +246,7 @@ int init_sdram (void)
unsigned char   trp_clocks,
trcd_clocks,
tras_clocks,
-   trc_clocks,
-   tctp_clocks;
+   trc_clocks;
unsigned char   cal_val;
unsigned char   bc;
unsigned long   sdram_tim, sdram_bank;
@@ -345,7 +344,6 @@ int init_sdram (void)
trcd_clocks = sdram_table[i].trcd;  /* 20ns /7.5 ns (datain[29]) */
tras_clocks = sdram_table[i].tras;  /* 44ns /7.5 ns  (datain[30]) */
/* ctp = ((trp + tras) - trp - trcd) = tras - trcd */
-   tctp_clocks = sdram_table[i].tctp;  /* 44 - 20ns = 24ns */
/* trc_clocks is sum of trp_clocks + tras_clocks */
trc_clocks = trp_clocks + tras_clocks;
/* get SDRAM timing register */
@@ -626,10 +624,9 @@ phys_size_t initdram (int board_type)
 {
 
unsigned long bank_reg[4], tmp, bank_size;
-   int i, ds;
+   int i;
unsigned long TotalSize;
 
-   ds = 0;
/* since the DRAM controller is allready set up, calculate the size 
with the
   bank registers*/
mtdcr (SDRAM0_CFGADDR, SDRAM0_B0CR);
@@ -646,8 +643,7 @@ phys_size_t initdram (int board_type)
tmp = (bank_reg[i]  17)  0x7;
bank_size = 4  tmp;
TotalSize += bank_size;
-   } else
-   ds = 1;
+   }
}
mtdcr (SDRAM0_CFGADDR, SDRAM0_ECCCFG);
tmp = mfdcr (SDRAM0_CFGDATA);
-- 
1.7.7.3

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


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

2011-11-15 Thread Stefan Roese
Fix:
pip405.c: In function 'board_early_init_f':
pip405.c:192:16: warning: variable 'tctp_clocks' set but not used 
[-Wunused-but-set-variable]
pip405.c:182:16: warning: variable 'dataout' set but not used 
[-Wunused-but-set-variable]

Signed-off-by: Stefan Roese s...@denx.de
---
 board/mpl/pip405/pip405.c |   11 +++
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index 7b48c06..a1f0b65 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -179,7 +179,6 @@ void write_4hex (unsigned long val)
 
 int board_early_init_f (void)
 {
-   unsigned char dataout[1];
unsigned char datain[128];
unsigned long sdram_size = 0;
SDRAM_SETUP *t = (SDRAM_SETUP *) sdram_setup_table;
@@ -189,9 +188,13 @@ int board_early_init_f (void)
unsigned short i;
unsigned char rows, cols, banks, sdram_banks, density;
unsigned char supported_cal, trp_clocks, trcd_clocks, tras_clocks,
-   trc_clocks, tctp_clocks;
+   trc_clocks;
unsigned char cal_index, cal_val, spd_version, spd_chksum;
unsigned char buf[8];
+#ifdef SDRAM_DEBUG
+   unsigned char tctp_clocks;
+#endif
+
/* set up the config port */
mtdcr (EBC0_CFGADDR, PB7AP);
mtdcr (EBC0_CFGDATA, CONFIG_PORT_AP);
@@ -210,7 +213,6 @@ int board_early_init_f (void)
 
/* Read Serial Presence Detect Information */
i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-   dataout[0] = 0;
for (i = 0; i  128; i++)
datain[i] = 127;
i2c_read(SPD_EEPROM_ADDRESS,0,1,datain,128);
@@ -307,12 +309,13 @@ int board_early_init_f (void)
 
/* trc_clocks is sum of trp_clocks + tras_clocks */
trc_clocks = trp_clocks + tras_clocks;
+
+#ifdef SDRAM_DEBUG
/* ctp = ((trp + tras) - trp - trcd) = tras - trcd */
tctp_clocks =
((NSto10PS (datain[30]) - NSto10PS (datain[29])) +
 (tmemclk - 1)) / tmemclk;
 
-#ifdef SDRAM_DEBUG
serial_puts (c_RP: );
write_hex (trp_clocks);
serial_puts (\nc_RCD: );
-- 
1.7.7.3

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


Re: [U-Boot] [PATCH 2/3 v2] devkit3250: add Timll DevKit3250 board initial support

2011-11-15 Thread Vladimir Zapolskiy
On 15.11.2011 09:48, Igor Grinberg wrote:
 On 11/15/11 09:25, Vladimir Zapolskiy wrote:
 Hi Igor,

 On 15.11.2011 08:42, Igor Grinberg wrote:
 Hi Vladimir,

 On 11/14/11 19:43, Vladimir Zapolskiy wrote:
 This change adds a basic support for Embest/Timll DevKit3250 board,
 NOR and UART are the only supported peripherals for a moment. The board
 doesn't require low-level init, because the initial SDRAM and GPIO
 configuration is performed during kickstart bootloader execution.

 Signed-off-by: Vladimir Zapolskiyv...@mleia.com
 ---
 Changes from v1 to v2:
 * corrected address in GPLv2+ licence header in files

 I think you should remove the address part completely,
 because next time it changes, will you be around to fix it?
 I promise I'll be around, that's why I desire to become a maintainer of this 
 board.

 Nice! Though I don't think you can foresee the future or do you?

That's a rhetorical question, wasn't it? :)


 I know that there are many files already with address, but
 to make a big change it is better to start it from small -
 say all new coming patches.
 Well, my small contribution is verifying address in license header found in 
 new files.

 Thanks, that is fare enough!
 I want to make sure you understand, that having the right
 address in the license statement is not a blocker.

I hope that Albert being ARM custodian thinks similarly, because for a 
long time I didn't get any feedback about my change (your comment is the 
single one given from October 25), and by some reason it is still not 
integrated...


 I'd like to invite Wolfgang into discussion to get his opinion about the 
 topic. Well, I do not feel myself as a lawer to allege that removing address 
 info from the license notice is ok. Has it already been discussed in the 
 mailing list?

 Actually, you don't have to be a lawyer to verify
 if there is a requirement to have the postal address
 (that changes from time to time) in the license statement.
 AFAIK, there is no such requirement and the fact that huge
 amount of files has a wrong postal address just emphasizes
 this.

 What I'm proposing here is a way to spare the effort of changing
 the postal address in the future. And if no one cares for the
 right address, then why bother writing it in the source code?
 To make the source code larger?

 And yes of course, I would like to here what Wolfgang has to say
 about this.

Actually this topic might be discussed in a separate mail thread.


 * removed clean and distclean targets from board makefile
 * do not set machine id explicitly, if CONFIG_MACH_TYPE is defined
 * minor indentation cleanups

board/timll/devkit3250/Makefile |   44 +
board/timll/devkit3250/devkit3250.c |   71 
boards.cfg  |3 +-
include/configs/devkit3250.h|  121 
 +++
4 files changed, 238 insertions(+), 1 deletions(-)
create mode 100644 board/timll/devkit3250/Makefile
create mode 100644 board/timll/devkit3250/devkit3250.c
create mode 100644 include/configs/devkit3250.h


 [snip]



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


Re: [U-Boot] [PATCH] disk: part_efi: fix regression due to incorrect buffer usage

2011-11-15 Thread Anton Staaf
Tested-by: Anton Staaf robot...@chromium.org
Mike, do you think you could pull this into staging as per Wolfgang's
recent request for help?

Thanks,
Anton

On Sun, Oct 30, 2011 at 8:44 AM, Mike Frysinger vap...@gentoo.org wrote:
 Acked-by: Mike Frysinger vap...@gentoo.org
 -mike

 ___
 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] Using Micron (Numonyx) m28w640hcb with u-boot (Solved)

2011-11-15 Thread Gudjon I. Gudjonsson
Hello Vipin
  
  Now I have spent the whole day on trying to mount the device from Linux
  as a read/write partition but without luck.
 
 Ideally, it should have happened now

Setting FORCE_WORD_WRITE to 1 in the cfi_cmdset_0001.c fixes the problem.
#define FORCE_WORD_WRITE 1
but it is set to 0 by default.

Thanks again a lot for your help

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


Re: [U-Boot] [PATCH] tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

2011-11-15 Thread Tom Warren
Yes, USE_PRIVATE_LIBGCC=yes is needed for any U-Boot Tegra build, regardless. 
It has to do with lib functions executing on the ARM7TDMI (AVP) IIRC.

Tom

-Original Message-
From: Stephen Warren 
Sent: Tuesday, November 15, 2011 11:03 AM
To: Thierry Reding; u-boot@lists.denx.de
Cc: Tom Warren
Subject: RE: [U-Boot] [PATCH] tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

Thierry Reding wrote at Tuesday, November 15, 2011 12:19 AM:
 NVIDIA's flashing tools assume that the bootloader is loaded at 
 address 0x00108000. Instead of requiring non-standard builds of those 
 tools which allow a load address of 0x00E08000, this commit just 
 switches all
 Tegra2 boards to use the standard load address.

 Note that to successfully boot a standalone U-Boot with this load 
 address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

Isn't that true irrespective of TEXT_BASE? That's certainly been my experience.

--
nvpublic

___
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-11-15 Thread Albert ARIBAUD
Hi Stefano,

Le 11/11/2011 11:40, Stefano Babic a écrit :
 Hi Albert,

 please pull from u-boot-imx.

 The following changes since commit 06194b6b65f701a9d6ef2d9b4123c4afe57d8783:

da850: add new config file for AM18xx (2011-11-10 16:30:41 +0100)

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

 Fabio Estevam (5):
qong: Use generic function for configuring GPR register
mx31: Remove duplicate definition for GPR register
mx31: Use proper IO accessor for GPR register
mx31: Fix checkpatch warnings in generic.c
m28evk: Fix comment about the number of RAM banks

 Marek Vasut (20):
iMX28: Initial support for iMX28 CPU
iMX28: Add SSP MMC driver
FEC: Add support for iMX28 quirks
iMX28: Add PINMUX control
iMX28: Add I2C bus driver
iMX28: Add GPIO control
iMX28: Add SPI driver
iMX28: Add APBH DMA driver
iMX28: Add GPMI NAND driver
iMX28: Add driver for internal RTC
iMX28: Add image header generator tool
iMX28: Add u-boot.sb target to Makefile
iMX28: Add support for DENX M28EVK board
M28: Add MMC SPL
M28: Add doc/README.m28 documentation
iMX28: Fix ARM vector handling
M28: Add memory detection into SPL
iMX28: Add USB and USB PHY register definitions
iMX28: Add USB HOST driver
M28EVK: Enable USB HOST support

 Stefano Babic (1):
MX25: zmx25: GCC4.6 fix build warnings

   .gitignore|1 +
   MAINTAINERS   |1 +
   Makefile  |5 +
   arch/arm/cpu/arm1136/mx31/generic.c   |   11 +-
   arch/arm/cpu/arm926ejs/mx28/Makefile  |   46 +
   arch/arm/cpu/arm926ejs/mx28/clock.c   |  355 +++
   arch/arm/cpu/arm926ejs/mx28/iomux.c   |  109 +++
   arch/arm/cpu/arm926ejs/mx28/mx28.c|  221 +
   arch/arm/cpu/arm926ejs/mx28/timer.c   |  141 +++
   arch/arm/include/asm/arch-mx28/clock.h|   61 ++
   arch/arm/include/asm/arch-mx28/dma.h  |  170 
   arch/arm/include/asm/arch-mx28/gpio.h |   32 +
   arch/arm/include/asm/arch-mx28/imx-regs.h |   39 +
   arch/arm/include/asm/arch-mx28/iomux-mx28.h   |  537 +++
   arch/arm/include/asm/arch-mx28/iomux.h|  168 
   arch/arm/include/asm/arch-mx28/regs-apbh.h|  466 +
   arch/arm/include/asm/arch-mx28/regs-base.h|   88 ++
   arch/arm/include/asm/arch-mx28/regs-bch.h |  230 +
   arch/arm/include/asm/arch-mx28/regs-clkctrl.h |  312 ++
   arch/arm/include/asm/arch-mx28/regs-common.h  |   66 ++
   arch/arm/include/asm/arch-mx28/regs-gpmi.h|  222 +
   arch/arm/include/asm/arch-mx28/regs-i2c.h |  207 
   arch/arm/include/asm/arch-mx28/regs-ocotp.h   |  173 
   arch/arm/include/asm/arch-mx28/regs-pinctrl.h | 1284
 +
   arch/arm/include/asm/arch-mx28/regs-power.h   |  413 
   arch/arm/include/asm/arch-mx28/regs-rtc.h |  147 +++
   arch/arm/include/asm/arch-mx28/regs-ssp.h |  349 +++
   arch/arm/include/asm/arch-mx28/regs-timrot.h  |  171 
   arch/arm/include/asm/arch-mx28/regs-usb.h |  178 
   arch/arm/include/asm/arch-mx28/regs-usbphy.h  |  151 +++
   arch/arm/include/asm/arch-mx28/sys_proto.h|   32 +
   arch/arm/include/asm/arch-mx31/imx-regs.h |7 +-
   board/davedenx/qong/qong.c|2 +-
   board/denx/m28evk/Makefile|   56 ++
   board/denx/m28evk/m28_init.h  |   41 +
   board/denx/m28evk/m28evk.c|  216 +
   board/denx/m28evk/mem_init.c  |  240 +
   board/denx/m28evk/mmc_boot.c  |  273 ++
   board/denx/m28evk/power_init.c|  913 ++
   board/denx/m28evk/start.S |  234 +
   board/denx/m28evk/u-boot-spl.lds  |   87 ++
   board/denx/m28evk/u-boot.bd   |   14 +
   board/syteco/zmx25/zmx25.c|2 -
   boards.cfg|1 +
   doc/README.m28|  223 +
   drivers/dma/Makefile  |1 +
   drivers/dma/apbh_dma.c|  691 +
   drivers/gpio/Makefile |1 +
   drivers/gpio/mxs_gpio.c   |  136 +++
   drivers/i2c/Makefile  |1 +
   drivers/i2c/mxs_i2c.c |  246 +
   drivers/mmc/Makefile  |1 +
   drivers/mmc/mxsmmc.c  |  351 +++
   drivers/mtd/nand/Makefile |1 +
   drivers/mtd/nand/mxs_nand.c   | 1118 +
   drivers/net/fec_mxc.c |   44 +-
   drivers/rtc/Makefile  

Re: [U-Boot] [PULL] u-boot-pxa / master

2011-11-15 Thread Albert ARIBAUD
Hi Marek,

Le 12/11/2011 03:44, Marek Vasut a écrit :
 Hi Albert,

 I chose a few significant patches that should make it to .12.

 The following changes since commit 06194b6b65f701a9d6ef2d9b4123c4afe57d8783:

da850: add new config file for AM18xx (2011-11-10 16:30:41 +0100)

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

 Marek Vasut (6):
PXA: Drop csb226 and innokom boards (unmaintained)
PXA: Cleanup serial_pxa
PXA: vpac270: Enable the new generic MMC driver
OneNAND: Add simple OneNAND SPL
GCC4.6: Fix common/usb.c on xscale
GCC4.6: Squash warnings in onenand_base.c

   MAINTAINERS   |5 -
   arch/arm/include/asm/arch-pxa/pxa-regs.h  |  111 ---
   arch/arm/include/asm/arch-pxa/regs-uart.h |  109 ++
   board/csb226/Makefile |   43 ---
   board/csb226/csb226.c |  166 --
   board/csb226/flash.c  |  368 -
   board/innokom/Makefile|   43 ---
   board/innokom/flash.c |  421 
   board/innokom/innokom.c   |  190 ---
   board/vpac270/vpac270.c   |9 +
   boards.cfg|2 -
   common/usb.c  |   13 +-
   drivers/mtd/onenand/Makefile  |4 +
   drivers/mtd/onenand/onenand_base.c|   18 +-
   drivers/mtd/onenand/onenand_spl.c |  146 +
   drivers/serial/serial_pxa.c   |  464 +++
   include/configs/csb226.h  |  506 
 
   include/configs/innokom.h |  507 
 -
   include/configs/vpac270.h |3 +-
   include/onenand_uboot.h   |3 +
   spl/Makefile  |1 +
   21 files changed, 478 insertions(+), 2654 deletions(-)
   create mode 100644 arch/arm/include/asm/arch-pxa/regs-uart.h
   delete mode 100644 board/csb226/Makefile
   delete mode 100644 board/csb226/csb226.c
   delete mode 100644 board/csb226/flash.c
   delete mode 100644 board/innokom/Makefile
   delete mode 100644 board/innokom/flash.c
   delete mode 100644 board/innokom/innokom.c
   create mode 100644 drivers/mtd/onenand/onenand_spl.c
   delete mode 100644 include/configs/csb226.h
   delete mode 100644 include/configs/innokom.h

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-ti/master

2011-11-15 Thread Albert ARIBAUD
Hi Sandeep,

Le 15/11/2011 16:11, s-paul...@ti.com a écrit :
 The following changes since commit 06194b6b65f701a9d6ef2d9b4123c4afe57d8783:
Nagabhushana Netagunte (1):
  da850: add new config file for AM18xx

 are available in the git repository at:

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

 Heiko Schocher (3):
arm, davinci: da850/dm365 lowlevel cleanup
arm, davinci_emac: fix driver bug if more then 3 PHYs are detected
arm, davinci: add DAVINCI_MMC_CLKID

 Sricharan (7):
omap4: make omap4 code common for future reuse
omap: Checkpatch fixes
omap5: Add minimal support for omap5430.
omap5: clocks: Add clocks support for omap5 platform.
omap5: emif: Add emif/ddr configurations required for omap5 evm
omap4/5: Add support for booting with CH.
omap5: Add omap5_evm board build support.

   MAINTAINERS|1 +
   Makefile   |9 +-
   README |6 +
   arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|  122 +--
   arch/arm/cpu/arm926ejs/davinci/dm365_lowlevel.c|   73 +-
   arch/arm/cpu/armv7/omap-common/Makefile|   13 +
   arch/arm/cpu/armv7/omap-common/clocks-common.c |  609 +++
   arch/arm/cpu/armv7/omap-common/emif-common.c   | 1140 
 
   arch/arm/cpu/armv7/omap-common/hwinit-common.c |  267 +
   .../armv7/{omap4 =  omap-common}/lowlevel_init.S   |   37 +-
   .../{omap4/mem.c =  omap-common/mem-common.c}  |0
   arch/arm/cpu/armv7/omap-common/spl.c   |9 +-
   arch/arm/cpu/armv7/omap4/Makefile  |   11 +-
   arch/arm/cpu/armv7/omap4/board.c   |  384 ---
   arch/arm/cpu/armv7/omap4/clocks.c  |  628 ++-
   arch/arm/cpu/armv7/omap4/emif.c| 1135 
 +---
   arch/arm/cpu/armv7/omap4/hwinit.c  |  167 +++
   arch/arm/cpu/armv7/omap4/omap4_mux_data.h  |   83 --
   arch/arm/cpu/armv7/omap4/sdram_elpida.c|2 +-
   arch/arm/cpu/armv7/omap4/sys_info.c|   53 -
   arch/arm/cpu/armv7/omap5/Makefile  |   48 +
   arch/arm/cpu/armv7/omap5/clocks.c  |  432 
   arch/arm/cpu/armv7/omap5/config.mk |   28 +
   arch/arm/cpu/armv7/omap5/emif.c|  105 ++
   arch/arm/cpu/armv7/omap5/hwinit.c  |   78 ++
   arch/arm/cpu/armv7/omap5/sdram_elpida.c|  178 +++
   arch/arm/include/asm/arch-davinci/aintc_defs.h |2 +
   arch/arm/include/asm/arch-davinci/da850_lowlevel.h |2 +-
   arch/arm/include/asm/arch-davinci/ddr2_defs.h  |4 +
   arch/arm/include/asm/arch-davinci/emif_defs.h  |1 +
   arch/arm/include/asm/arch-davinci/hardware.h   |   21 +
   arch/arm/include/asm/arch-davinci/pll_defs.h   |   14 +
   arch/arm/include/asm/arch-omap3/mmc_host_def.h |   11 +-
   arch/arm/include/asm/arch-omap4/clocks.h   |   23 +
   arch/arm/include/asm/arch-omap4/emif.h | 1021 --
   arch/arm/include/asm/arch-omap4/mmc_host_def.h |   11 +-
   .../arm/include/asm/arch-omap4/{omap4.h =  omap.h} |   46 +-
   arch/arm/include/asm/arch-omap4/sys_proto.h|   38 +-
   arch/arm/include/asm/arch-omap5/clocks.h   |  722 +
   arch/arm/include/asm/arch-omap5/cpu.h  |  175 +++
   arch/arm/include/asm/arch-omap5/gpio.h |   50 +
   arch/arm/include/asm/arch-omap5/i2c.h  |   74 ++
   arch/arm/include/asm/arch-omap5/mmc_host_def.h |  174 +++
   arch/arm/include/asm/arch-omap5/mux_omap5.h|  344 ++
   .../asm/{arch-omap4/omap4.h =  arch-omap5/omap.h}  |  104 +-
   arch/arm/include/asm/arch-omap5/sys_proto.h|  122 +++
   arch/arm/include/asm/armv7.h   |3 +
   arch/arm/include/asm/emif.h| 1035 ++
   arch/arm/include/asm/mach-types.h  |   13 +
   arch/arm/include/asm/omap_common.h |   31 +-
   board/ti/omap5_evm/Makefile|   49 +
   board/ti/omap5_evm/evm.c   |  101 ++
   board/ti/omap5_evm/mux_data.h  |  275 +
   board/ti/panda/Makefile|2 -
   board/ti/panda/panda.c |   27 +-
   board/ti/panda/panda_mux_data.h|   54 +-
   board/ti/sdp4430/Makefile  |4 +-
   board/ti/sdp4430/sdp.c |   27 +-
   board/ti/sdp4430/sdp4430_mux_data.h|   53 +-
   boards.cfg |1 +
   drivers/mmc/omap_hsmmc.c   |   26 +-
   drivers/net/davinci_emac.c |   24 +-
   include/configs/omap4_common.h   

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

2011-11-15 Thread Albert ARIBAUD
Hi Wolfgang,

The following changes since commit 5721385b187b3154c7768e6c182501022f4e2e45:

   Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx (2011-11-08 
07:44:52 +0100)

are available in the git repository at:

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

Alexander Holler (1):
   BeagleBoard: config: Switch to ttyO2

Asen Dimov (1):
   ARM: define CONFIG_MACH_TYPE for all ronetix boards

Christian Riesch (3):
   arm, davinci: Rename AM1808 lowlevel functions to DA850
   arm, davinci: Remove the duplication of LPSC functions
   arm, davinci: Fix setting of the SDRAM configuration register

David Müller (ELSOFT AG) (2):
   ARM: re-add MACH_TYPE_XX for VCMA9 board and add CONFIG_MACH_TYPE
   ARM: remove superfluous setting of arch_number in board specific 
code.

Fabio Estevam (5):
   qong: Use generic function for configuring GPR register
   mx31: Remove duplicate definition for GPR register
   mx31: Use proper IO accessor for GPR register
   mx31: Fix checkpatch warnings in generic.c
   m28evk: Fix comment about the number of RAM banks

Heiko Schocher (3):
   arm, davinci: da850/dm365 lowlevel cleanup
   arm, davinci_emac: fix driver bug if more then 3 PHYs are detected
   arm, davinci: add DAVINCI_MMC_CLKID

Linus Walleij (7):
   integrator: do not test first part of the memory
   integrator: pass configs for core modules
   integrator: move text offset to config
   integrator: use io-accessors for board init
   integrator: make flash writeable on boot
   integrator: add system controller header
   integrator: enable Vpp and disable flash protection

Manjunath Hadli (2):
   dm646x: add new configuration for dm6467T
   dm646x: pass board revision info to kernel

Marek Vasut (27):
   SPL: Allow ARM926EJS to avoid compiling in the CPU support code
   iMX28: Initial support for iMX28 CPU
   iMX28: Add SSP MMC driver
   FEC: Add support for iMX28 quirks
   iMX28: Add PINMUX control
   iMX28: Add I2C bus driver
   iMX28: Add GPIO control
   iMX28: Add SPI driver
   iMX28: Add APBH DMA driver
   iMX28: Add GPMI NAND driver
   iMX28: Add driver for internal RTC
   iMX28: Add image header generator tool
   iMX28: Add u-boot.sb target to Makefile
   iMX28: Add support for DENX M28EVK board
   M28: Add MMC SPL
   M28: Add doc/README.m28 documentation
   iMX28: Fix ARM vector handling
   M28: Add memory detection into SPL
   iMX28: Add USB and USB PHY register definitions
   iMX28: Add USB HOST driver
   M28EVK: Enable USB HOST support
   PXA: Drop csb226 and innokom boards (unmaintained)
   PXA: Cleanup serial_pxa
   PXA: vpac270: Enable the new generic MMC driver
   OneNAND: Add simple OneNAND SPL
   GCC4.6: Fix common/usb.c on xscale
   GCC4.6: Squash warnings in onenand_base.c

Nagabhushana Netagunte (1):
   da850: add new config file for AM18xx

Po-Yu Chuang (1):
   arm: a320: fix broken timer

Prabhakar Lad (1):
   da8xxevm: fix build error

Sricharan (7):
   omap4: make omap4 code common for future reuse
   omap: Checkpatch fixes
   omap5: Add minimal support for omap5430.
   omap5: clocks: Add clocks support for omap5 platform.
   omap5: emif: Add emif/ddr configurations required for omap5 evm
   omap4/5: Add support for booting with CH.
   omap5: Add omap5_evm board build support.

Stefano Babic (1):
   MX25: zmx25: GCC4.6 fix build warnings

Tom Rini (2):
   devkit8000: Fix NAND SPL on boards with 256MB NAND
   OMAP3: Change omap3_evm maintainer

  .gitignore |1 +
  MAINTAINERS|   15 +-
  Makefile   |   14 +-
  README |6 +
  arch/arm/cpu/arm1136/mx31/generic.c|   11 +-
  arch/arm/cpu/arm920t/a320/timer.c  |  134 +--
  arch/arm/cpu/arm926ejs/Makefile|6 +
  arch/arm/cpu/arm926ejs/davinci/Makefile|2 +-
  arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c   |  428 ---
  arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|  311 +
  arch/arm/cpu/arm926ejs/davinci/dm365_lowlevel.c|   73 +-
  .../arm/cpu/arm926ejs/mx28}/Makefile   |   11 +-
  arch/arm/cpu/arm926ejs/mx28/clock.c|  355 ++
  arch/arm/cpu/arm926ejs/mx28/iomux.c|  109 ++
  arch/arm/cpu/arm926ejs/mx28/mx28.c |  221 
  arch/arm/cpu/arm926ejs/mx28/timer.c|  141 +++
  arch/arm/cpu/armv7/omap-common/Makefile|   13 +
  arch/arm/cpu/armv7/omap-common/clocks-common.c |  609 ++
  arch/arm/cpu/armv7/omap-common/emif-common.c   | 1140 
+
  arch/arm/cpu/armv7/omap-common/hwinit-common.c |  267 
  .../armv7/{omap4 = 

Re: [U-Boot] [PATCH 0/3] devkit3250: add Timll DevKit3250 board initial support

2011-11-15 Thread Vladimir Zapolskiy
Hello Albert,

I kindly ask you to pick up these changes based on u-boot-arm/next.

Thank you very much in advance.

On 14.11.2011 19:43, Vladimir Zapolskiy wrote:
 This patchset adds generic NXP LPC32XX SoC support and basic support
 for Embest/Timll DevKit3250 board, which powered by this SoC.

 The patchset is done on top of u-boot-arm/next branch.

 Vladimir Zapolskiy (3):
arm926ejs: add NXP LPC32x0 cpu series support
devkit3250: add Timll DevKit3250 board initial support
devkit3250: add DevKit3250 board maintainer

   MAINTAINERS   |4 +
   arch/arm/cpu/arm926ejs/lpc32xx/Makefile   |   45 +++
   arch/arm/cpu/arm926ejs/lpc32xx/clkpwr.c   |  118 ++
   arch/arm/cpu/arm926ejs/lpc32xx/cpu.c  |   58 +
   arch/arm/cpu/arm926ejs/lpc32xx/devices.c  |   47 +++
   arch/arm/cpu/arm926ejs/lpc32xx/timer.c|   94 ++
   arch/arm/include/asm/arch-lpc32xx/clk.h   |  163 
 +
   arch/arm/include/asm/arch-lpc32xx/config.h|   59 +
   arch/arm/include/asm/arch-lpc32xx/cpu.h   |   64 ++
   arch/arm/include/asm/arch-lpc32xx/emc.h   |   92 ++
   arch/arm/include/asm/arch-lpc32xx/sys_proto.h |   25 
   arch/arm/include/asm/arch-lpc32xx/timer.h |   74 +++
   arch/arm/include/asm/arch-lpc32xx/uart.h  |   54 
   arch/arm/include/asm/arch-lpc32xx/wdt.h   |   51 
   board/timll/devkit3250/Makefile   |   44 +++
   board/timll/devkit3250/devkit3250.c   |   71 +++
   boards.cfg|3 +-
   include/configs/devkit3250.h  |  121 ++
   18 files changed, 1186 insertions(+), 1 deletions(-)
   create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/Makefile
   create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/clkpwr.c
   create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
   create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/devices.c
   create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/timer.c
   create mode 100644 arch/arm/include/asm/arch-lpc32xx/clk.h
   create mode 100644 arch/arm/include/asm/arch-lpc32xx/config.h
   create mode 100644 arch/arm/include/asm/arch-lpc32xx/cpu.h
   create mode 100644 arch/arm/include/asm/arch-lpc32xx/emc.h
   create mode 100644 arch/arm/include/asm/arch-lpc32xx/sys_proto.h
   create mode 100644 arch/arm/include/asm/arch-lpc32xx/timer.h
   create mode 100644 arch/arm/include/asm/arch-lpc32xx/uart.h
   create mode 100644 arch/arm/include/asm/arch-lpc32xx/wdt.h
   create mode 100644 board/timll/devkit3250/Makefile
   create mode 100644 board/timll/devkit3250/devkit3250.c
   create mode 100644 include/configs/devkit3250.h


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


Re: [U-Boot] [PATCH v7 3/4] tegra2: Modify MMC driver to handle power and cd GPIOs

2011-11-15 Thread Stephen Warren
On 11/02/2011 08:30 PM, Andy Fleming wrote:
 On Mon, Oct 31, 2011 at 11:51 AM, Stephen Warren swar...@nvidia.com wrote:
 Pass the GPIO numbers for power and card detect to tegra2_mmc_init(), and
 modify that function to perform all required GPIO initialization. This
 removes the need for board files to perform these operations.

 Move board_mmc_getcd() into tegra2_mmc.c now that the driver knows which
 GPIOs to use.

 Update affected call-sites in seaboard.c and harmony.c. Note that this
 change should make all SD ports work on Harmony, since the required GPIO
 setup is now being performed.

 v4: Fix prototype of tegra2_mmc_init() in board.h to match driver change.
Remove prototype of gpio_config_mmc() from board.h

 Signed-off-by: Stephen Warren swar...@nvidia.com
 Cc: Andy Fleming aflem...@gmail.com
 Tested-by: Simon Glass s...@chromium.org
 Acked-by: Simon Glass s...@chromium.org
 
 This patch depends heavily on patch #2 (ie, won't apply without it),
 which doesn't touch drivers/mmc.
 
 Lacking an ACK from Albert, I hesitate to just apply the whole series.
 I've applied patch #1, and I'll let Albert decide whether to apply the
 other 3:
 
 Acked-by: Andy Fleming aflem...@freescale.com
 
 I have also re-assigned this patch in patchworks to Albert.

Albert, Do the remaining 3 patches in this series look good?

Thanks.

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


Re: [U-Boot] [PATCH] tegra2: Use new GPIO APIs in gpio_config_uart()

2011-11-15 Thread Stephen Warren
On 10/11/2011 06:07 PM, Simon Glass wrote:
 Hi Stephen,
 
 On Thu, Oct 6, 2011 at 3:52 PM, Stephen Warren swar...@nvidia.com wrote:
 ... rather than open-coding the register accesses.

 However, gpio_request() typically stores the label parameter in a global
 data structure. This causes problems when called from gpio_config_uart(),
 since the code is running before relocation. To solve this, pass a NULL
 string to gpio_request(), and modify gpio_request() not to touch the string
 if it's NULL.

 Signed-off-by: Stephen Warren swar...@nvidia.com
 
 Acked-by: Simon Glass s...@chromium.org
 Tested-by: Simon Glass s...@chromium.org

Albert, sorry I forgot to CC you on my original patch submission. Can
you please also consider this patch. Thanks.

 ---
 I tested this on Seaboard. With the code in the patch below, the UART works.
 If I comment out the body of gpio_config_uart_seaboard(), the UART does not
 work.

 This patch should work with ToT U-Boot, but the context relies on the rename
 of gpio_config_uart() to gpio_config_uart_seaboard() contained in:
 http://patchwork.ozlabs.org/patch/118144/

  board/nvidia/seaboard/seaboard.c |   18 ++
  drivers/gpio/tegra2_gpio.c   |6 --
  2 files changed, 6 insertions(+), 18 deletions(-)

 diff --git a/board/nvidia/seaboard/seaboard.c 
 b/board/nvidia/seaboard/seaboard.c
 index 260a56d..4492c28 100644
 --- a/board/nvidia/seaboard/seaboard.c
 +++ b/board/nvidia/seaboard/seaboard.c
 @@ -36,23 +36,9 @@
  */
  void gpio_config_uart_seaboard(void)
  {
 -   int gp = GPIO_PI3;
 -   struct gpio_ctlr *gpio = (struct gpio_ctlr *)NV_PA_GPIO_BASE;
 -   struct gpio_ctlr_bank *bank = gpio-gpio_bank[GPIO_BANK(gp)];
 -   u32 val;
 -
/* Enable UART via GPIO_PI3 (port 8, bit 3) so serial console works */
 -   val = readl(bank-gpio_config[GPIO_PORT(gp)]);
 -   val |= 1  GPIO_BIT(gp);
 -   writel(val, bank-gpio_config[GPIO_PORT(gp)]);
 -
 -   val = readl(bank-gpio_out[GPIO_PORT(gp)]);
 -   val = ~(1  GPIO_BIT(gp));
 -   writel(val, bank-gpio_out[GPIO_PORT(gp)]);
 -
 -   val = readl(bank-gpio_dir_out[GPIO_PORT(gp)]);
 -   val |= 1  GPIO_BIT(gp);
 -   writel(val, bank-gpio_dir_out[GPIO_PORT(gp)]);
 +   gpio_request(GPIO_PI3, NULL);
 +   gpio_direction_output(GPIO_PI3, 0);
  }

  void gpio_config_uart(void)
 diff --git a/drivers/gpio/tegra2_gpio.c b/drivers/gpio/tegra2_gpio.c
 index f686e80..22669b6 100644
 --- a/drivers/gpio/tegra2_gpio.c
 +++ b/drivers/gpio/tegra2_gpio.c
 @@ -146,8 +146,10 @@ int gpio_request(int gp, const char *label)
if (gp = MAX_NUM_GPIOS)
return -1;

 -   strncpy(gpio_names[gp].name, label, GPIO_NAME_SIZE);
 -   gpio_names[gp].name[GPIO_NAME_SIZE - 1] = '\0';
 +   if (label != NULL) {
 +   strncpy(gpio_names[gp].name, label, GPIO_NAME_SIZE);
 +   gpio_names[gp].name[GPIO_NAME_SIZE - 1] = '\0';
 +   }

/* Configure as a GPIO */
set_config(gp, 1);
 --
 1.7.0.4

-- 
nvpublic
___
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-11-15 Thread Mike Frysinger
On Tuesday 15 November 2011 13:01:52 Stefan Roese wrote:
 --- a/arch/powerpc/cpu/ppc4xx/usbdev.c
 +++ b/arch/powerpc/cpu/ppc4xx/usbdev.c

 - int temp, temp1;
 ...
   /*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;

this seems to be treading into possible ugly volatile area ... perhaps best if 
this was acked/tested by someone with actual hardware first ...
-mike


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


Re: [U-Boot] Bug introduced in x86 cleanup patches

2011-11-15 Thread Wolfgang Denk
Dear Graeme,

In message calbutcjfyqwb4ttf_nwjgk6haceeb1pntqzufk_npxwts3c...@mail.gmail.com 
you wrote:
 
 My recent x86 cleanup added a small, but very nasty, bug at line 231 of
 arch/x86/lib/board.c:
 
   offset_ptr_ram = offset_ptr_rom + gd-reloc_off
 
 Because offset_ptr_rom is a pointer, when gd-reloc_off gets added, there
 is a silent 4x multiplication. The solution is (tested):
 
   offset_ptr_ram = (Elf32_Rel *)((ulong)offset_ptr_rom
   + gd-reloc_off);
 
 Or (haven't tested - will test tonight):
 
   offset_ptr_ram = offset_ptr_rom + (Elf32_Rel *)gd-reloc_off;
 
 I have two options
   - Fix it in the existing commit. As it has not been pulled into
 u-boot/master yet, distribution is likely limited to yourself only
   - Add a fixup patch

As far as I'm concerned, I'm OK with a fix in the existing commit and
a rebase of your tree.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Success in marriage is not so much finding the right person as it  is
being the right person.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-15 Thread Anatolij Gustschin
Hello Wolfgang,

The following changes since commit 5721385b187b3154c7768e6c182501022f4e2e45:

  Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx (2011-11-08 
07:44:52 +0100)

are available in the git repository at:

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

Che-Liang Chiou (4):
  lcd: add clear and draw bitmap declaration
  tools: logo: split bmp arrays from bmp_logo.h
  font: split font data from video_font.h
  api: export LCD device to external apps

Jerry Huang (1):
  Powerpc/DIU: Fixed the 800x600 and 1024x768 resolution bug

Stefano Babic (1):
  VIDEO: mx3fb: GCC4.6 fix build warnings

 Makefile|1 +
 api/Makefile|3 +-
 api/api.c   |   47 +
 api/api_display.c   |   74 +
 api/api_private.h   |4 +
 arch/powerpc/cpu/mpc8xx/video.c |1 +
 board/mcc200/lcd.c  |4 +-
 common/cmd_bmp.c|4 +-
 common/lcd.c|   18 +-
 drivers/video/cfb_console.c |2 +
 drivers/video/fsl_diu_fb.c  |2 +
 drivers/video/mx3fb.c   |3 +-
 drivers/video/sed156x.c |1 +
 examples/api/demo.c |   31 +
 examples/api/glue.c |   31 +
 examples/api/glue.h |5 +
 include/.gitignore  |1 +
 include/api_public.h|   16 +
 include/lcd.h   |2 +
 include/video_font.h| 4614 +--
 include/video_font_data.h   | 4639 +++
 tools/Makefile  |8 +-
 tools/bmp_logo.c|   80 +-
 23 files changed, 4944 insertions(+), 4647 deletions(-)
 create mode 100644 api/api_display.c
 create mode 100644 include/video_font_data.h

Please pull. Thanks!

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


Re: [U-Boot] [PATCH] tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

2011-11-15 Thread Simon Glass
Hi Thierry.

On Mon, Nov 14, 2011 at 11:19 PM, Thierry Reding
thierry.red...@avionic-design.de wrote:
 NVIDIA's flashing tools assume that the bootloader is loaded at address
 0x00108000. Instead of requiring non-standard builds of those tools
 which allow a load address of 0x00E08000, this commit just switches all
 Tegra2 boards to use the standard load address.

 Note that to successfully boot a standalone U-Boot with this load
 address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

Would you please remove this comment? As mentioned by others on this
thread it isn't affected by your change. Anyway:

Tested-by: Simon Glass s...@chromium.org


 Signed-off-by: Thierry Reding thierry.red...@avionic-design.de
 ---
  include/configs/tegra2-common.h |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h
 index 9c3b9fa..bcdfe61 100644
 --- a/include/configs/tegra2-common.h
 +++ b/include/configs/tegra2-common.h
 @@ -153,7 +153,7 @@
  #define PHYS_SDRAM_1           TEGRA2_SDRC_CS0
  #define PHYS_SDRAM_1_SIZE      0x2000      /* 512M */

 -#define CONFIG_SYS_TEXT_BASE   0x00E08000
 +#define CONFIG_SYS_TEXT_BASE   0x00108000
  #define CONFIG_SYS_SDRAM_BASE  PHYS_SDRAM_1

  #define CONFIG_SYS_INIT_RAM_ADDR       CONFIG_STACKBASE
 --
 1.7.7.3


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


Re: [U-Boot] [PATCH v2 3/3] tegra2: Add Avionic Design Medcom support.

2011-11-15 Thread Stephen Warren
Thierry Reding wrote at Tuesday, November 15, 2011 12:27 AM:
 The Medcom is a 16:9 15 terminal that is used for patient infotainment
 in hospitals.
...
 +/*
 + * Routine: gpio_config_uart
 + * Description: Does nothing on Medcom - no conflict w/SPI.
 + */
 +void gpio_config_uart(void)
 +{
 +}

I'd say just remove all references to this function from your new boards;
the SPI/UART switch is something pretty specific to Seaboard, so I don't
think there's any need to include this function in general.

Same comment for all the patches in the series.

-- 
nvpublic

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


[U-Boot] [PATCH 00/12] Some GCC 4.6 build warning fixes

2011-11-15 Thread Anatolij Gustschin
These patches can also be pulled from

 git://git.denx.de/u-boot-video.git gcc46-warning-fixes

Anatolij Gustschin (12):
  drivers/spi/atmel_spi.c: Fix GCC 4.6 warning
  drivers/mtd/dataflash.c: Fix GCC 4.6 warning
  drivers/net/at91_emac.c: Fix GCC 4.6 warning
  drivers/net/enc28j60.c: Fix GCC 4.6 warnings
  board/cm41xx/flash.c: Fix GCC 4.6 warnings
  board/cm4008/flash.c: Fix GCC 4.6 warnings
  drivers/video/da8xx-fb.c: Fix GCC 4.6 warning
  drivers/video/bus_vcxk.c: Fix GCC 4.6 warning
  drivers/i2c/davinci_i2c.c: Fix GCC 4.6 warning
  arch/arm/cpu/armv7/s5p-common/pwm.c: fix GCC 4.6 warning
  fs/yaffs2/yaffs_guts.c: Fix some GCC 4.6 warnings
  drivers/rtc/s3c24x0_rtc.c: fix GCC 4.6 warnings

 arch/arm/cpu/armv7/s5p-common/pwm.c |2 --
 board/cm4008/flash.c|7 +++
 board/cm41xx/flash.c|7 +++
 drivers/i2c/davinci_i2c.c   |4 +---
 drivers/mtd/dataflash.c |3 ---
 drivers/net/at91_emac.c |2 --
 drivers/net/enc28j60.c  |8 +++-
 drivers/rtc/s3c24x0_rtc.c   |6 +++---
 drivers/spi/atmel_spi.c |2 --
 drivers/video/bus_vcxk.c|2 --
 drivers/video/da8xx-fb.c|3 ---
 fs/yaffs2/yaffs_guts.c  |   32 +---
 12 files changed, 22 insertions(+), 56 deletions(-)

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


[U-Boot] [PATCH 03/12] drivers/net/at91_emac.c: Fix GCC 4.6 warning

2011-11-15 Thread Anatolij Gustschin
Fix:
at91_emac.c: In function 'at91emac_write_hwaddr':
at91_emac.c:477:15: warning: variable 'dev' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 drivers/net/at91_emac.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 97d2739..9bda1fc 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -474,11 +474,9 @@ static int at91emac_recv(struct eth_device *netdev)
 
 static int at91emac_write_hwaddr(struct eth_device *netdev)
 {
-   emac_device *dev;
at91_emac_t *emac;
at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC;
emac = (at91_emac_t *) netdev-iobase;
-   dev = (emac_device *) netdev-priv;
 
writel(1  ATMEL_ID_EMAC, pmc-pcer);
DEBUG_AT91EMAC(init MAC-ADDR %02x:%02x:%02x:%02x:%02x:%02x\n,
-- 
1.7.1

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


[U-Boot] [PATCH 06/12] board/cm4008/flash.c: Fix GCC 4.6 warnings

2011-11-15 Thread Anatolij Gustschin
Fix:
flash.c: In function 'flash_erase':
flash.c:209:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'write_data':
flash.c:373:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 board/cm4008/flash.c |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/board/cm4008/flash.c b/board/cm4008/flash.c
index 2e1356f..5522bf0 100644
--- a/board/cm4008/flash.c
+++ b/board/cm4008/flash.c
@@ -206,7 +206,7 @@ static ulong flash_get_size (unsigned char * addr, 
flash_info_t * info)
 
 int flash_erase (flash_info_t * info, int s_first, int s_last)
 {
-   int flag, prot, sect;
+   int prot, sect;
ulong type;
int rcode = 0;
ulong start;
@@ -240,7 +240,7 @@ int flash_erase (flash_info_t * info, int s_first, int 
s_last)
printf (\n);
 
/* Disable interrupts which might cause a timeout here */
-   flag = disable_interrupts ();
+   disable_interrupts();
 
/* Start erase on unprotected sectors */
for (sect = s_first; sect = s_last; sect++) {
@@ -370,7 +370,6 @@ static int write_data (flash_info_t * info, ulong dest, 
unsigned char data)
 {
volatile unsigned char *addr = (volatile unsigned char *) dest;
ulong status;
-   int flag;
ulong start;
 
/* Check if Flash is (sufficiently) erased */
@@ -380,7 +379,7 @@ static int write_data (flash_info_t * info, ulong dest, 
unsigned char data)
return (2);
}
/* Disable interrupts which might cause a timeout here */
-   flag = disable_interrupts ();
+   disable_interrupts();
 
*addr = 0x40;   /* write setup */
*addr = data;
-- 
1.7.1

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


[U-Boot] [PATCH 05/12] board/cm41xx/flash.c: Fix GCC 4.6 warnings

2011-11-15 Thread Anatolij Gustschin
Fix:
flash.c: In function 'flash_erase':
flash.c:209:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'write_data':
flash.c:373:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 board/cm41xx/flash.c |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/board/cm41xx/flash.c b/board/cm41xx/flash.c
index 2e1356f..5522bf0 100644
--- a/board/cm41xx/flash.c
+++ b/board/cm41xx/flash.c
@@ -206,7 +206,7 @@ static ulong flash_get_size (unsigned char * addr, 
flash_info_t * info)
 
 int flash_erase (flash_info_t * info, int s_first, int s_last)
 {
-   int flag, prot, sect;
+   int prot, sect;
ulong type;
int rcode = 0;
ulong start;
@@ -240,7 +240,7 @@ int flash_erase (flash_info_t * info, int s_first, int 
s_last)
printf (\n);
 
/* Disable interrupts which might cause a timeout here */
-   flag = disable_interrupts ();
+   disable_interrupts();
 
/* Start erase on unprotected sectors */
for (sect = s_first; sect = s_last; sect++) {
@@ -370,7 +370,6 @@ static int write_data (flash_info_t * info, ulong dest, 
unsigned char data)
 {
volatile unsigned char *addr = (volatile unsigned char *) dest;
ulong status;
-   int flag;
ulong start;
 
/* Check if Flash is (sufficiently) erased */
@@ -380,7 +379,7 @@ static int write_data (flash_info_t * info, ulong dest, 
unsigned char data)
return (2);
}
/* Disable interrupts which might cause a timeout here */
-   flag = disable_interrupts ();
+   disable_interrupts();
 
*addr = 0x40;   /* write setup */
*addr = data;
-- 
1.7.1

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


[U-Boot] [PATCH 07/12] drivers/video/da8xx-fb.c: Fix GCC 4.6 warning

2011-11-15 Thread Anatolij Gustschin
Fix:
da8xx-fb.c: In function 'video_hw_init':
da8xx-fb.c:688:6: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 drivers/video/da8xx-fb.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index bca9fb5..a2981b1 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -685,7 +685,6 @@ static u32 wait_for_event(u32 event)
 void *video_hw_init(void)
 {
struct da8xx_fb_par *par;
-   int ret;
u32 size;
char *p;
 
@@ -738,7 +737,6 @@ void *video_hw_init(void)
 
if (lcd_init(par, lcd_cfg, lcd_panel)  0) {
printf(lcd_init failed\n);
-   ret = -EFAULT;
goto err_release_fb;
}
 
@@ -754,7 +752,6 @@ void *video_hw_init(void)
(unsigned int)par-vram_virt);
if (!par-vram_virt) {
printf(GLCD: malloc for frame buffer failed\n);
-   ret = -EINVAL;
goto err_release_fb;
}
 
-- 
1.7.1

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


[U-Boot] [PATCH 04/12] drivers/net/enc28j60.c: Fix GCC 4.6 warnings

2011-11-15 Thread Anatolij Gustschin
Fix:
enc28j60.c: In function 'enc_receive':
enc28j60.c:435:5: warning: variable 'eir_reg' set but not used
[-Wunused-but-set-variable]
enc28j60.c: In function 'enc_poll':
enc28j60.c:503:5: warning: variable 'estat_reg' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 drivers/net/enc28j60.c |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index d55cacd..e2011ae 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -432,7 +432,6 @@ static void enc_receive(enc_dev_t *enc)
u16 pkt_len;
u16 copy_len;
u16 status;
-   u8 eir_reg;
u8 pkt_cnt = 0;
u16 rxbuf_rdpt;
u8 hbuf[6];
@@ -476,7 +475,7 @@ static void enc_receive(enc_dev_t *enc)
/* read pktcnt */
pkt_cnt = enc_r8(enc, CTL_REG_EPKTCNT);
if (copy_len == 0) {
-   eir_reg = enc_r8(enc, CTL_REG_EIR);
+   (void)enc_r8(enc, CTL_REG_EIR);
enc_reset_rx(enc);
printf(%s: receive copy_len=0\n, enc-dev-name);
continue;
@@ -489,7 +488,7 @@ static void enc_receive(enc_dev_t *enc)
NetReceive(packet, pkt_len);
if (enc_claim_bus(enc))
return;
-   eir_reg = enc_r8(enc, CTL_REG_EIR);
+   (void)enc_r8(enc, CTL_REG_EIR);
} while (pkt_cnt);
/* Use EPKTCNT not EIR.PKTIF flag, see errata pt. 6 */
 }
@@ -500,14 +499,13 @@ static void enc_receive(enc_dev_t *enc)
 static void enc_poll(enc_dev_t *enc)
 {
u8 eir_reg;
-   u8 estat_reg;
u8 pkt_cnt;
 
 #ifdef CONFIG_USE_IRQ
/* clear global interrupt enable bit in enc28j60 */
enc_bclr(enc, CTL_REG_EIE, ENC_EIE_INTIE);
 #endif
-   estat_reg = enc_r8(enc, CTL_REG_ESTAT);
+   (void)enc_r8(enc, CTL_REG_ESTAT);
eir_reg = enc_r8(enc, CTL_REG_EIR);
if (eir_reg  ENC_EIR_TXIF) {
/* clear TXIF bit in EIR */
-- 
1.7.1

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


[U-Boot] [PATCH 09/12] drivers/i2c/davinci_i2c.c: Fix GCC 4.6 warning

2011-11-15 Thread Anatolij Gustschin
Fix:
davinci_i2c.c: In function 'flush_rx':
davinci_i2c.c:81:6: warning: variable 'dummy' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
Cc: Heiko Schocher h...@denx.de
---
 drivers/i2c/davinci_i2c.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index 5e3406d..a09dc76 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -78,13 +78,11 @@ static int poll_i2c_irq(int mask)
 
 void flush_rx(void)
 {
-   int dummy;
-
while (1) {
if (!(REG(I2C_STAT)  I2C_STAT_RRDY))
break;
 
-   dummy = REG(I2C_DRR);
+   (void)REG(I2C_DRR);
REG(I2C_STAT) = I2C_STAT_RRDY;
udelay(1000);
}
-- 
1.7.1

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


[U-Boot] [PATCH 11/12] fs/yaffs2/yaffs_guts.c: Fix some GCC 4.6 warnings

2011-11-15 Thread Anatolij Gustschin
Fix:
yaffs_guts.c: In function 'yaffs_CheckChunkErased':
yaffs_guts.c:854:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_UpdateObjectHeader':
yaffs_guts.c:3463:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_GrabChunkCache':
yaffs_guts.c:3774:6: warning: variable 'pushout' set but not used
yaffs_guts.c: In function 'yaffs_Scan':
yaffs_guts.c:5237:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_CheckObjectDetailsLoaded':
yaffs_guts.c:5748:6: warning: variable 'alloc_failed' set but not used
yaffs_guts.c:5747:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_ScanBackwards':
yaffs_guts.c:5808:6: warning: variable 'deleted' set but not used
yaffs_guts.c:5806:6: warning: variable 'result' set but not used
yaffs_guts.c: In function 'yaffs_GetObjectName':
yaffs_guts.c:6657:7: warning: variable 'result' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 fs/yaffs2/yaffs_guts.c |   32 +---
 1 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
index c4329af..f0ef8db 100644
--- a/fs/yaffs2/yaffs_guts.c
+++ b/fs/yaffs2/yaffs_guts.c
@@ -851,9 +851,8 @@ static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct 
*dev,
int retval = YAFFS_OK;
__u8 *data = yaffs_GetTempBuffer(dev, __LINE__);
yaffs_ExtendedTags tags;
-   int result;
 
-   result = yaffs_ReadChunkWithTagsFromNAND(dev, chunkInNAND, data, tags);
+   yaffs_ReadChunkWithTagsFromNAND(dev, chunkInNAND, data, tags);
 
if(tags.eccResult  YAFFS_ECC_RESULT_NO_ERROR)
retval = YAFFS_FAIL;
@@ -3460,7 +3459,6 @@ int yaffs_UpdateObjectHeader(yaffs_Object * in, const 
YCHAR * name, int force,
 
int prevChunkId;
int retVal = 0;
-   int result = 0;
 
int newChunkId;
yaffs_ExtendedTags newTags;
@@ -3484,7 +3482,7 @@ int yaffs_UpdateObjectHeader(yaffs_Object * in, const 
YCHAR * name, int force,
prevChunkId = in-chunkId;
 
if (prevChunkId = 0) {
-   result = yaffs_ReadChunkWithTagsFromNAND(dev, 
prevChunkId,
+   yaffs_ReadChunkWithTagsFromNAND(dev, prevChunkId,
buffer, oldTags);
 
yaffs_VerifyObjectHeader(in,oh,oldTags,0);
@@ -3771,7 +3769,6 @@ static yaffs_ChunkCache 
*yaffs_GrabChunkCache(yaffs_Device * dev)
yaffs_Object *theObj;
int usage;
int i;
-   int pushout;
 
if (dev-nShortOpCaches  0) {
/* Try find a non-dirty one... */
@@ -3790,7 +3787,6 @@ static yaffs_ChunkCache 
*yaffs_GrabChunkCache(yaffs_Device * dev)
theObj = NULL;
usage = -1;
cache = NULL;
-   pushout = -1;
 
for (i = 0; i  dev-nShortOpCaches; i++) {
if (dev-srCache[i].object 
@@ -3800,7 +3796,6 @@ static yaffs_ChunkCache 
*yaffs_GrabChunkCache(yaffs_Device * dev)
usage = dev-srCache[i].lastUse;
theObj = dev-srCache[i].object;
cache = dev-srCache[i];
-   pushout = i;
}
}
 
@@ -5234,7 +5229,6 @@ static int yaffs_Scan(yaffs_Device * dev)
int startIterator;
int endIterator;
int nBlocksToScan = 0;
-   int result;
 
int chunk;
int c;
@@ -5377,7 +5371,7 @@ static int yaffs_Scan(yaffs_Device * dev)
/* Read the tags and decide what to do */
chunk = blk * dev-nChunksPerBlock + c;
 
-   result = yaffs_ReadChunkWithTagsFromNAND(dev, chunk, 
NULL,
+   yaffs_ReadChunkWithTagsFromNAND(dev, chunk, NULL,
tags);
 
/* Let's have a good look at this chunk... */
@@ -5474,7 +5468,7 @@ static int yaffs_Scan(yaffs_Device * dev)
yaffs_SetChunkBit(dev, blk, c);
bi-pagesInUse++;
 
-   result = yaffs_ReadChunkWithTagsFromNAND(dev, 
chunk,
+   yaffs_ReadChunkWithTagsFromNAND(dev, chunk,
chunkData,
NULL);
 
@@ -5744,8 +5738,6 @@ static void yaffs_CheckObjectDetailsLoaded(yaffs_Object 
*in)
yaffs_ObjectHeader *oh;
yaffs_Device *dev = in-myDev;
yaffs_ExtendedTags tags;
-   int result;
-   int alloc_failed = 0;
 
if(!in)
return;

[U-Boot] [PATCH 12/12] drivers/rtc/s3c24x0_rtc.c: fix GCC 4.6 warnings

2011-11-15 Thread Anatolij Gustschin
Fix:
s3c24x0_rtc.c: In function 'rtc_get':
s3c24x0_rtc.c:67:53: warning: variable 'a_armed' set but not used
s3c24x0_rtc.c:67:45: warning: variable 'a_year' set but not used
s3c24x0_rtc.c:67:38: warning: variable 'a_mon' set but not used
s3c24x0_rtc.c:67:30: warning: variable 'a_date' set but not used
s3c24x0_rtc.c:67:22: warning: variable 'a_hour' set but not used
s3c24x0_rtc.c:67:15: warning: variable 'a_min' set but not used
s3c24x0_rtc.c:67:8: warning: variable 'a_sec' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 drivers/rtc/s3c24x0_rtc.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/s3c24x0_rtc.c b/drivers/rtc/s3c24x0_rtc.c
index 9667939..c16ff2e 100644
--- a/drivers/rtc/s3c24x0_rtc.c
+++ b/drivers/rtc/s3c24x0_rtc.c
@@ -34,8 +34,7 @@
 
 #include rtc.h
 #include asm/io.h
-
-/*#define  DEBUG*/
+#include linux/compiler.h
 
 typedef enum {
RTC_ENABLE,
@@ -64,7 +63,8 @@ int rtc_get(struct rtc_time *tmp)
 {
struct s3c24x0_rtc *rtc = s3c24x0_get_base_rtc();
uchar sec, min, hour, mday, wday, mon, year;
-   uchar a_sec, a_min, a_hour, a_date, a_mon, a_year, a_armed;
+   __maybe_unused uchar a_sec, a_min, a_hour, a_date,
+a_mon, a_year, a_armed;
 
/* enable access to RTC registers */
SetRTC_Access(RTC_ENABLE);
-- 
1.7.1

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


[U-Boot] [PATCH 08/12] drivers/video/bus_vcxk.c: Fix GCC 4.6 warning

2011-11-15 Thread Anatolij Gustschin
Fix:
bus_vcxk.c: In function 'vcxk_display_bitmap':
bus_vcxk.c:396:16: warning: variable 'compression' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 drivers/video/bus_vcxk.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/video/bus_vcxk.c b/drivers/video/bus_vcxk.c
index 7aecb92..9c4714d 100644
--- a/drivers/video/bus_vcxk.c
+++ b/drivers/video/bus_vcxk.c
@@ -393,7 +393,6 @@ int vcxk_display_bitmap(ulong addr, int x, int y)
unsigned long width;
unsigned long height;
unsigned long bpp;
-   unsigned long compression;
 
unsigned long lw;
 
@@ -404,7 +403,6 @@ int vcxk_display_bitmap(ulong addr, int x, int y)
bmp = (bmp_image_t *) addr;
if ((bmp-header.signature[0] == 'B') 
(bmp-header.signature[1] == 'M')) {
-   compression  = le32_to_cpu(bmp-header.compression);
width= le32_to_cpu(bmp-header.width);
height   = le32_to_cpu(bmp-header.height);
bpp  = le16_to_cpu(bmp-header.bit_count);
-- 
1.7.1

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


[U-Boot] [PATCH 10/12] arch/arm/cpu/armv7/s5p-common/pwm.c: fix GCC 4.6 warning

2011-11-15 Thread Anatolij Gustschin
Fix:
pwm.c: In function 'pwm_config':
pwm.c:85:16: warning: variable 'timer_rate_hz' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 arch/arm/cpu/armv7/s5p-common/pwm.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/armv7/s5p-common/pwm.c 
b/arch/arm/cpu/armv7/s5p-common/pwm.c
index ff95b84..58d279e 100644
--- a/arch/arm/cpu/armv7/s5p-common/pwm.c
+++ b/arch/arm/cpu/armv7/s5p-common/pwm.c
@@ -82,7 +82,6 @@ int pwm_config(int pwm_id, int duty_ns, int period_ns)
unsigned long period;
unsigned long tcon;
unsigned long tcnt;
-   unsigned long timer_rate_hz;
unsigned long tcmp;
 
/*
@@ -100,7 +99,6 @@ int pwm_config(int pwm_id, int duty_ns, int period_ns)
 
/* Check to see if we are changing the clock rate of the PWM */
tin_rate = pwm_calc_tin(pwm_id, period);
-   timer_rate_hz = tin_rate;
 
tin_ns = NS_IN_HZ / tin_rate;
tcnt = period_ns / tin_ns;
-- 
1.7.1

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


Re: [U-Boot] [PATCH v2 1/2] smsc95xx: Fix MAC address programming

2011-11-15 Thread Simon Glass
Hi Wolfgang,

On Tue, Nov 15, 2011 at 1:19 AM, Wolfgang Grandegger w...@denx.de wrote:
 Commit 79ad54400932d6484178a372fb3b659e3437473b broke MAC address
 programming in the SMSC95xx register set.

 Cc: Marek Vasut marek.va...@gmail.com
 Cc: Wolfgang Denk w...@denx.de
 Cc: Simon Glass s...@chromium.org
 Cc: Mike Frysinger vap...@gentoo.org
 Signed-off-by: Wolfgang Grandegger w...@denx.de
 ---
  drivers/usb/eth/smsc95xx.c |    6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)

 diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
 index 7ee4f87..b5626e6 100644
 --- a/drivers/usb/eth/smsc95xx.c
 +++ b/drivers/usb/eth/smsc95xx.c
 @@ -20,6 +20,7 @@
  * MA 02111-1307 USA
  */

 +#include asm/unaligned.h
  #include common.h
  #include usb.h
  #include linux/mii.h
 @@ -372,13 +373,12 @@ static int smsc95xx_init_mac_address(struct eth_device 
 *eth,
  static int smsc95xx_write_hwaddr(struct eth_device *eth)
  {
        struct ueth_data *dev = (struct ueth_data *)eth-priv;
 -       u32 addr_lo, addr_hi;
 +       u32 addr_lo = __get_unaligned_le32(eth-enetaddr[0]);
 +       u32 addr_hi = __get_unaligned_le16(eth-enetaddr[4]);

Would prefer that you leave the definitions alone, but it's not important.

        int ret;

        /* set hardware address */
        debug(** %s()\n, __func__);
 -       addr_lo = cpu_to_le32(*eth-enetaddr);
 -       addr_hi = cpu_to_le16(*((u16 *)(eth-enetaddr + 4)));
        ret = smsc95xx_write_reg(dev, ADDRL, addr_lo);
        if (ret  0) {
                debug(Failed to write ADDRL: %d\n, ret);
 --
 1.7.4.1


Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/2] smsc95xx: Debug message cleanup

2011-11-15 Thread Simon Glass
On Tue, Nov 15, 2011 at 1:19 AM, Wolfgang Grandegger w...@denx.de wrote:
 Cc: Simon Glass s...@chromium.org
 Cc: Mike Frysinger vap...@gentoo.org
 Signed-off-by: Wolfgang Grandegger w...@denx.de
 ---
  drivers/usb/eth/smsc95xx.c |   10 +++---
  1 files changed, 3 insertions(+), 7 deletions(-)

Acked-by: Simon Glass s...@chromium.org


 diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
 index b5626e6..2f63340 100644
 --- a/drivers/usb/eth/smsc95xx.c
 +++ b/drivers/usb/eth/smsc95xx.c
 @@ -380,18 +380,14 @@ static int smsc95xx_write_hwaddr(struct eth_device *eth)
        /* set hardware address */
        debug(** %s()\n, __func__);
        ret = smsc95xx_write_reg(dev, ADDRL, addr_lo);
 -       if (ret  0) {
 -               debug(Failed to write ADDRL: %d\n, ret);
 +       if (ret  0)
                return ret;
 -       }

        ret = smsc95xx_write_reg(dev, ADDRH, addr_hi);
        if (ret  0)
                return ret;
 -       debug(MAC %02x:%02x:%02x:%02x:%02x:%02x\n,
 -               eth-enetaddr[0], eth-enetaddr[1],
 -               eth-enetaddr[2], eth-enetaddr[3],
 -               eth-enetaddr[4], eth-enetaddr[5]);
 +
 +       debug(MAC %pM\n, eth-enetaddr);
        dev-have_hwaddr = 1;
        return 0;
  }
 --
 1.7.4.1


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


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

2011-11-15 Thread Simon Glass
Hi Albert,

On Tue, Nov 15, 2011 at 1:28 PM, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:
 Hi Wolfgang,

 The following changes since commit 5721385b187b3154c7768e6c182501022f4e2e45:

   Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx (2011-11-08
 07:44:52 +0100)

 are available in the git repository at:

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

As with the last pull request, I don't see the Tegra patches in your
list here. Is the problem that we don't have our own Tegra maintainer?

Please can you suggest what we can do here to get things moving?

Regards,
Simon



 Alexander Holler (1):
       BeagleBoard: config: Switch to ttyO2

 Asen Dimov (1):
       ARM: define CONFIG_MACH_TYPE for all ronetix boards

 Christian Riesch (3):
       arm, davinci: Rename AM1808 lowlevel functions to DA850
       arm, davinci: Remove the duplication of LPSC functions
       arm, davinci: Fix setting of the SDRAM configuration register

 David Müller (ELSOFT AG) (2):
       ARM: re-add MACH_TYPE_XX for VCMA9 board and add CONFIG_MACH_TYPE
       ARM: remove superfluous setting of arch_number in board specific
 code.

 Fabio Estevam (5):
       qong: Use generic function for configuring GPR register
       mx31: Remove duplicate definition for GPR register
       mx31: Use proper IO accessor for GPR register
       mx31: Fix checkpatch warnings in generic.c
       m28evk: Fix comment about the number of RAM banks

 Heiko Schocher (3):
       arm, davinci: da850/dm365 lowlevel cleanup
       arm, davinci_emac: fix driver bug if more then 3 PHYs are detected
       arm, davinci: add DAVINCI_MMC_CLKID

 Linus Walleij (7):
       integrator: do not test first part of the memory
       integrator: pass configs for core modules
       integrator: move text offset to config
       integrator: use io-accessors for board init
       integrator: make flash writeable on boot
       integrator: add system controller header
       integrator: enable Vpp and disable flash protection

 Manjunath Hadli (2):
       dm646x: add new configuration for dm6467T
       dm646x: pass board revision info to kernel

 Marek Vasut (27):
       SPL: Allow ARM926EJS to avoid compiling in the CPU support code
       iMX28: Initial support for iMX28 CPU
       iMX28: Add SSP MMC driver
       FEC: Add support for iMX28 quirks
       iMX28: Add PINMUX control
       iMX28: Add I2C bus driver
       iMX28: Add GPIO control
       iMX28: Add SPI driver
       iMX28: Add APBH DMA driver
       iMX28: Add GPMI NAND driver
       iMX28: Add driver for internal RTC
       iMX28: Add image header generator tool
       iMX28: Add u-boot.sb target to Makefile
       iMX28: Add support for DENX M28EVK board
       M28: Add MMC SPL
       M28: Add doc/README.m28 documentation
       iMX28: Fix ARM vector handling
       M28: Add memory detection into SPL
       iMX28: Add USB and USB PHY register definitions
       iMX28: Add USB HOST driver
       M28EVK: Enable USB HOST support
       PXA: Drop csb226 and innokom boards (unmaintained)
       PXA: Cleanup serial_pxa
       PXA: vpac270: Enable the new generic MMC driver
       OneNAND: Add simple OneNAND SPL
       GCC4.6: Fix common/usb.c on xscale
       GCC4.6: Squash warnings in onenand_base.c

 Nagabhushana Netagunte (1):
       da850: add new config file for AM18xx

 Po-Yu Chuang (1):
       arm: a320: fix broken timer

 Prabhakar Lad (1):
       da8xxevm: fix build error

 Sricharan (7):
       omap4: make omap4 code common for future reuse
       omap: Checkpatch fixes
       omap5: Add minimal support for omap5430.
       omap5: clocks: Add clocks support for omap5 platform.
       omap5: emif: Add emif/ddr configurations required for omap5 evm
       omap4/5: Add support for booting with CH.
       omap5: Add omap5_evm board build support.

 Stefano Babic (1):
       MX25: zmx25: GCC4.6 fix build warnings

 Tom Rini (2):
       devkit8000: Fix NAND SPL on boards with 256MB NAND
       OMAP3: Change omap3_evm maintainer

  .gitignore                                         |    1 +
  MAINTAINERS                                        |   15 +-
  Makefile                                           |   14 +-
  README                                             |    6 +
  arch/arm/cpu/arm1136/mx31/generic.c                |   11 +-
  arch/arm/cpu/arm920t/a320/timer.c                  |  134 +--
  arch/arm/cpu/arm926ejs/Makefile                    |    6 +
  arch/arm/cpu/arm926ejs/davinci/Makefile            |    2 +-
  arch/arm/cpu/arm926ejs/davinci/am1808_lowlevel.c   |  428 ---
  arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c    |  311 +
  arch/arm/cpu/arm926ejs/davinci/dm365_lowlevel.c    |   73 +-
  .../arm/cpu/arm926ejs/mx28}/Makefile               |   11 +-
  arch/arm/cpu/arm926ejs/mx28/clock.c                |  355 ++
  arch/arm/cpu/arm926ejs/mx28/iomux.c                |  109 ++
  arch/arm/cpu/arm926ejs/mx28/mx28.c                 |  221 
  

Re: [U-Boot] [PATCH 5/6] i.mx: fsl_esdhc: add the i.mx6q support

2011-11-15 Thread Jason Hui
On Tue, Nov 15, 2011 at 7:56 PM, Stefano Babic sba...@denx.de wrote:
 On 11/15/2011 10:46 AM, Jason Hui wrote:

 Well this is insane, is the datasheet for mx6q available already so I can 
 check
 for myself?

 This is mx6q usdhc design and datasheet is not public now.
 Without this, the mmc driver does not work.

 Can you at least add a useful comment explaining why it is required,
 maybe copying only the few lines from the manual where it is described,
 or adding the errata number if this is due to a bug ?

It's not the bug but the design. I will extend the commit message.


 Best regards,
 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


Re: [U-Boot] [PATCH 5/6] i.mx: fsl_esdhc: add the i.mx6q support

2011-11-15 Thread Marek Vasut
 On Tue, Nov 15, 2011 at 7:56 PM, Stefano Babic sba...@denx.de wrote:
  On 11/15/2011 10:46 AM, Jason Hui wrote:
  Well this is insane, is the datasheet for mx6q available already so I
  can check for myself?
  
  This is mx6q usdhc design and datasheet is not public now.
  Without this, the mmc driver does not work.
  
  Can you at least add a useful comment explaining why it is required,
  maybe copying only the few lines from the manual where it is described,
  or adding the errata number if this is due to a bug ?
 
 It's not the bug but the design.

Yep, I fully understand, you had to come with something new for mx6q :-) But 
please reconsider letting your hardware dudes inovating their drug arsenal next 
time you introduce new line of CPUs, it's really hard to understand their 
reasons for introducing such changes ;-D

 I will extend the commit message.

Thanks!

 
  Best regards,
  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


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

2011-11-15 Thread Marek Vasut
 On Tuesday 15 November 2011 13:01:52 Stefan Roese wrote:
  --- a/arch/powerpc/cpu/ppc4xx/usbdev.c
  +++ b/arch/powerpc/cpu/ppc4xx/usbdev.c
  
  -   int temp, temp1;
  ...
  
  /*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;
 
 this seems to be treading into possible ugly volatile area ... perhaps best
 if this was acked/tested by someone with actual hardware first ...
 -mike

My words definitelly ... maybe replace with in_be32() ? It seems very 
suspicious, as if there was a reason for this access. Like you need to do more 
accesses to the fifo to clean up some trailing crud.

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


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

2011-11-15 Thread Marek Vasut
 Hi Albert,
 
 On Tue, Nov 15, 2011 at 1:28 PM, Albert ARIBAUD
 
 albert.u.b...@aribaud.net wrote:
  Hi Wolfgang,
  
  The following changes since commit
  5721385b187b3154c7768e6c182501022f4e2e45:
  
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx (2011-11-08
  07:44:52 +0100)
  
  are available in the git repository at:
  
git://git.denx.de/u-boot-arm.git master
 
 As with the last pull request, I don't see the Tegra patches in your
 list here. Is the problem that we don't have our own Tegra maintainer?
 
 Please can you suggest what we can do here to get things moving?

CCing Wolfgang.

It'd be good to get a tegra maintainer -- suggestions?

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


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

2011-11-15 Thread Simon Glass
Hi,

On Tue, Nov 15, 2011 at 6:27 PM, Marek Vasut marek.va...@gmail.com wrote:
 Hi Albert,

 On Tue, Nov 15, 2011 at 1:28 PM, Albert ARIBAUD

 albert.u.b...@aribaud.net wrote:
  Hi Wolfgang,
 
  The following changes since commit
  5721385b187b3154c7768e6c182501022f4e2e45:
 
    Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx (2011-11-08
  07:44:52 +0100)
 
  are available in the git repository at:
 
    git://git.denx.de/u-boot-arm.git master

 As with the last pull request, I don't see the Tegra patches in your
 list here. Is the problem that we don't have our own Tegra maintainer?

 Please can you suggest what we can do here to get things moving?

 CCing Wolfgang.

 It'd be good to get a tegra maintainer -- suggestions?

+Mike also who has helped reviewing some of this and might have ideas.

If there is no better candidate I am happy to act as Tegra maintainer
in the meantime (say 3 months) if it will help reduce workload on
Albert. The main thing is to get things moving and I'm happy to help
any way I can. There seems to be an enormous amount of activity in
U-Boot at the moment, which is great, but it does create a load on the
maintainers, particularly Wolfgang and Albert.

Regards,
Simon


 M

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


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

2011-11-15 Thread Mike Frysinger
On Tuesday 15 November 2011 22:45:52 Simon Glass wrote:
 On Tue, Nov 15, 2011 at 6:27 PM, Marek Vasut wrote:
  On Tue, Nov 15, 2011 at 1:28 PM, Albert ARIBAUD wrote:
   Hi Wolfgang,
   
   The following changes since commit
   5721385b187b3154c7768e6c182501022f4e2e45:
   
 Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
   (2011-11-08 07:44:52 +0100)
   
   are available in the git repository at:
   
 git://git.denx.de/u-boot-arm.git master
  
  As with the last pull request, I don't see the Tegra patches in your
  list here. Is the problem that we don't have our own Tegra maintainer?
  
  Please can you suggest what we can do here to get things moving?
  
  CCing Wolfgang.
  
  It'd be good to get a tegra maintainer -- suggestions?
 
 +Mike also who has helped reviewing some of this and might have ideas.

i thought Albert said he didn't want this last time we explicitly asked about 
creating an arm/tegra sub-arch tree ...

i think there should be one
-mike


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


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

2011-11-15 Thread Simon Glass
Hi Mike,

On Tue, Nov 15, 2011 at 7:53 PM, Mike Frysinger vap...@gentoo.org wrote:
 On Tuesday 15 November 2011 22:45:52 Simon Glass wrote:
 On Tue, Nov 15, 2011 at 6:27 PM, Marek Vasut wrote:
  On Tue, Nov 15, 2011 at 1:28 PM, Albert ARIBAUD wrote:
   Hi Wolfgang,
  
   The following changes since commit
   5721385b187b3154c7768e6c182501022f4e2e45:
  
     Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
   (2011-11-08 07:44:52 +0100)
  
   are available in the git repository at:
  
     git://git.denx.de/u-boot-arm.git master
 
  As with the last pull request, I don't see the Tegra patches in your
  list here. Is the problem that we don't have our own Tegra maintainer?
 
  Please can you suggest what we can do here to get things moving?
 
  CCing Wolfgang.
 
  It'd be good to get a tegra maintainer -- suggestions?

 +Mike also who has helped reviewing some of this and might have ideas.

 i thought Albert said he didn't want this last time we explicitly asked about
 creating an arm/tegra sub-arch tree ...

 i think there should be one
 -mike


Yes, I found it, you said:

 if people dont care either way, we can just set up a u-boot/u-boot-tegra.git
 tree for Albert to pull from

and Albert replied:

 Seems like people don't care, and I'm fine with applying the patches myself, 
 but I don't want to pull from a tree: I'll apply the patches as they appear 
 on patchwork.

We have built up quite a large number of patches which are currently
sitting in the Chromium tree - something like 200. If we continue to
dribble these out at 10-20 a month it will take a while. Current
mainline U-Boot support for Tegra is pretty basic, but with these
patches it is pretty slick. It would be great to take advantage of the
oppty at the moment to upstream this material. Tegra 30 is already
starting to get into the kernel and I feel U-Boot is behind! We are
the boot loader. We need to be ahead :-)

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


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

2011-11-15 Thread Simon Glass
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(-)

diff --git a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c 
b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
index 263d2ce..80bb61b27 100644
--- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
+++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
@@ -1041,8 +1041,12 @@ static int ohci_submit_rh_msg(struct usb_device *dev, 
unsigned long pipe,
int leni = transfer_len;
int len = 0;
int stat = 0;
-   __u32 datab[4];
-   __u8 *data_buf = (__u8 *) datab;
+   union {
+   __u32 word[4];
+   __u16 hword[8];
+   __u8 byte[16];
+   } datab;
+   __u8 *data_buf = datab.byte;
__u16 bmRType_bReq;
__u16 wValue;
__u16 wIndex;
@@ -1078,20 +1082,20 @@ static int ohci_submit_rh_msg(struct usb_device *dev, 
unsigned long pipe,
 */
 
case RH_GET_STATUS:
-   *(__u16 *) data_buf = m16_swap(1);
+   datab.hword[0] = m16_swap(1);
OK(2);
case RH_GET_STATUS | RH_INTERFACE:
-   *(__u16 *) data_buf = m16_swap(0);
+   datab.hword[0] = m16_swap(0);
OK(2);
case RH_GET_STATUS | RH_ENDPOINT:
-   *(__u16 *) data_buf = m16_swap(0);
+   datab.hword[0] = m16_swap(0);
OK(2);
case RH_GET_STATUS | RH_CLASS:
-   *(__u32 *) data_buf =
+   datab.word[0] =
m32_swap(RD_RH_STAT  ~(RH_HS_CRWE | RH_HS_DRWE));
OK(4);
case RH_GET_STATUS | RH_OTHER | RH_CLASS:
-   *(__u32 *) data_buf = m32_swap(RD_RH_PORTSTAT);
+   datab.word[0] = m32_swap(RD_RH_PORTSTAT);
OK(4);
 
case RH_CLEAR_FEATURE | RH_ENDPOINT:
@@ -1223,7 +1227,7 @@ static int ohci_submit_rh_msg(struct usb_device *dev, 
unsigned long pipe,
data_buf[3] |= 0x8;
 
/* corresponds to data_buf[4-7] */
-   datab[1] = 0;
+   datab.word[1] = 0;
data_buf[5] = (temp  RH_A_POTPGT)  24;
temp = roothub_b(gohci);
data_buf[7] = temp  RH_B_DR;
-- 
1.7.3.1

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


[U-Boot] [PATCH 2/2] Fix warnings in yaffs

2011-11-15 Thread Simon Glass
Sorry if this is already fixed somewhere - I could not find it.

This fixes the warnings show below.

yaffs_tagscompat.c: In function 
'yaffs_TagsCompatabilityReadChunkWithTagsFromNAND':
yaffs_tagscompat.c:151: warning: dereferencing pointer 'tu' does break 
strict-aliasing rules
yaffs_tagscompat.c:150: warning: dereferencing pointer 'tu' does break 
strict-aliasing rules
yaffs_tagscompat.c:149: warning: dereferencing pointer 'tu' does break 
strict-aliasing rules
yaffs_tagscompat.c:148: warning: dereferencing pointer 'tu' does break 
strict-aliasing rules
yaffs_tagscompat.c:147: warning: dereferencing pointer 'tu' does break 
strict-aliasing rules
yaffs_tagscompat.c:146: warning: dereferencing pointer 'tu' does break 
strict-aliasing rules
yaffs_tagscompat.c:145: warning: dereferencing pointer 'tu' does break 
strict-aliasing rules
yaffs_tagscompat.c:144: warning: dereferencing pointer 'tu' does break 
strict-aliasing rules
yaffs_tagscompat.c:141: note: initialized from here

Signed-off-by: Simon Glass s...@chromium.org
---
 fs/yaffs2/yaffs_tagscompat.c |   15 +++
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/fs/yaffs2/yaffs_tagscompat.c b/fs/yaffs2/yaffs_tagscompat.c
index 70a8a8c..e872323 100644
--- a/fs/yaffs2/yaffs_tagscompat.c
+++ b/fs/yaffs2/yaffs_tagscompat.c
@@ -136,9 +136,8 @@ static void yaffs_LoadTagsIntoSpare(yaffs_Spare * sparePtr,
 }
 
 static void yaffs_GetTagsFromSpare(yaffs_Device * dev, yaffs_Spare * sparePtr,
-  yaffs_Tags * tagsPtr)
+  yaffs_TagsUnion *tu)
 {
-   yaffs_TagsUnion *tu = (yaffs_TagsUnion *) tagsPtr;
int result;
 
tu-asBytes[0] = sparePtr-tagByte0;
@@ -150,7 +149,7 @@ static void yaffs_GetTagsFromSpare(yaffs_Device * dev, 
yaffs_Spare * sparePtr,
tu-asBytes[6] = sparePtr-tagByte6;
tu-asBytes[7] = sparePtr-tagByte7;
 
-   result = yaffs_CheckECCOnTags(tagsPtr);
+   result = yaffs_CheckECCOnTags(tu-asTags);
if (result  0) {
dev-tagsEccFixed++;
} else if (result  0) {
@@ -437,7 +436,7 @@ int 
yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(yaffs_Device * dev,
 {
 
yaffs_Spare spare;
-   yaffs_Tags tags;
+   yaffs_TagsUnion tags;
yaffs_ECCResult eccResult;
 
static yaffs_Spare spareFF;
@@ -467,10 +466,10 @@ int 
yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(yaffs_Device * dev,
if (eTags-chunkUsed) {
yaffs_GetTagsFromSpare(dev, spare, tags);
 
-   eTags-objectId = tags.objectId;
-   eTags-chunkId = tags.chunkId;
-   eTags-byteCount = tags.byteCount;
-   eTags-serialNumber = tags.serialNumber;
+   eTags-objectId = tags.asTags.objectId;
+   eTags-chunkId = tags.asTags.chunkId;
+   eTags-byteCount = tags.asTags.byteCount;
+   eTags-serialNumber = tags.asTags.serialNumber;
}
}
 
-- 
1.7.3.1

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


  1   2   >