[U-Boot] nice to meet you

2011-11-25 Thread lowrta bugiba
My Dear One,
I am more than happy to contact you through your Email. How are you today? l 
hope fine,I really want to have a good friendship with you. Beside i have 
something very vital to disclose with you, but I found it difficult to express 
myself here,I will be very happy, If you can get back to me, through my 
e-mail,So we can get to know each other better,and i well give you my pictures 
and also tell you more about me OK
Yours Forever,  
Lowrrta
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Please pull u-boot-mmc.git

2011-11-25 Thread Andy Fleming
These are all fairly minor bug fixes.

The following changes since commit fdbe8b9a2d1858ba35dd6214315563ad44d4a0e3:

  Merge branch 'h...@denx.de' of git://git.denx.de/u-boot-staging (2011-11-23 
21:23:45 +0100)

are available in the git repository at:

  git://www.denx.de/git/u-boot-mmc.git master

Ajay Bhargav (1):
  mmc: mv_sdhci: Fix host version read for Armada100

Macpaul Lin (1):
  Revert "mmc: retry the cmd8 to meet 74 clocks requirement in the spec"

 drivers/mmc/mmc.c  |   16 ++--
 drivers/mmc/mv_sdhci.c |5 -
 include/sdhci.h|1 +
 3 files changed, 7 insertions(+), 15 deletions(-)

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


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

2011-11-25 Thread Andy Fleming
On Fri, Nov 25, 2011 at 4:18 AM, Jason Liu  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 mix register to support debug/SD3.0 and move
> the low bit 0-6 of XFERTYP register to the mix control reg
> low bit 0-6. Thus on i.mx6q, we have the following compared
> with the previous soc: (can refer to RM of chapter 56.3.3)
>
> i.mx6q:
> mix control:
> bit 31 - bit 7: Added for debug/SD3.0 support
> bit 6  - bit 0: move in the XFERTYP register bit 6-0 on previous soc
> XFERTYP register:
> bit 31 - bit 7: the same as before,
> bit 6  - bit 0: no-use
>
> previous soc
> mix control: no
> XFERTYP register:
> bit 31 - bit 0: xfertype information
>
> Signed-off-by: Jason Liu 
> Cc: Andy Fleming 
> Cc: Stefano Babic 
> Acked-by: Stefano Babic 

Applied to mmc-next branch, thanks!

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


Re: [U-Boot] [PATCH] mmc: Implement card detection.

2011-11-25 Thread Andy Fleming
On Thu, Nov 17, 2011 at 5:51 AM, Thierry Reding
 wrote:
> Check for board-specific card detect each time an MMC/SD device is
> initialized. If card detection is not implemented, this code behaves as
> before and continues assuming a card is present. If no card is detected,
> has_init is reset for the MMC/SD device (to force initialization next
> time) and an error is returned.
>
> Signed-off-by: Thierry Reding 
> ---
>  drivers/mmc/mmc.c |    9 +
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 37ce6e8..d18c095 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -1191,6 +1191,15 @@ block_dev_desc_t *mmc_get_dev(int dev)
>  int mmc_init(struct mmc *mmc)
>  {
>        int err, retry = 3;
> +       u8 card_detect = 0;
> +
> +       if (board_mmc_getcd(&card_detect, mmc) == 0) {


Well, now the time has come to think about how we want this to work.
As some others noted, the FSL code has been treating the cd argument
to board_mmc_getcd() as a bit that is asserted low. My inclination is
to change all of them to work as you have proposed (cd == 1 ==> card
is detected), but I'd like input from the community. Card detection
isn't so speedy that the extra inversion required is much of a factor.
Are there any good arguments for keeping the meaning as ~CD?

Also, to handle code like is in fsl_esdhc.c for fallback in case no
board-specific code is written, I'm thinking we should use a mechanism
similar to the ethernet drivers:

if (board_eth_init != __def_eth_init) {
if (board_eth_init(bis) < 0)
printf("Board Net Initialization Failed\n");
} else if (cpu_eth_init != __def_eth_init) {
if (cpu_eth_init(bis) < 0)
printf("CPU Net Initialization Failed\n");

Basically, if the board_eth_init is set to something, call it.
Otherwise, call the cpu_eth_init, if it exists.

So we could have:

int mmc_getcd(mmc, &cd) // mmc should always have been the first argument...
{
if (board_mmc_getcd != __def_mmc_getcd)
return board_mmc_getcd(mmc, cd);
else if (cpu_mmc_getcd != __def_mmc_getcd)
return cpu_mmc_getcd(mmc, cd);

return -1;
}

Open questions:
1) If we use this sort of mechanism, we don't really need the "-1
means it's not implemented" error. Perhaps we could change it to be:
cd = mmc_getcd(mmc) ?
2) Should we add the ability for *drivers* to specify a card detect
mechanism, and if so, where should it fit in the priority order? Most
systems seem to provide GPIOs for the card detection, and even the
controllers which support card detection from the device are often not
always hooked up in such a way to actually *use* that support.



> +               if (!card_detect) {
> +                       mmc->has_init = 0;
> +                       printf("MMC: no card present\n");
> +                       return NO_CARD_ERR;
> +               }
> +       }

Anyway, I liked this patch, and want to apply it, but there are some
issues we need to resolve before we can apply it.

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


Re: [U-Boot] [PATCH v3] ftsdc010: improve performance and capability

2011-11-25 Thread Andy Fleming
On Thu, Nov 17, 2011 at 3:34 AM, Macpaul Lin  wrote:
> This patch improve the performance by spliting flag examination code
> in ftsdc010_send_cmd() into 3 functions.
> This patch also reordered the function which made better capability to
> some high performance cards against to the next version of ftsdc010
> hardware.
>
> Signed-off-by: Macpaul Lin 
> ---
> Changes for v2:
>  - Fix the problem if we read status register too fast in FTSDC010_CMD_RETRY
>    loop. If we read status register here too fast, the hardware will report
>    RSP_TIMEOUT incorrectly.
> Changes for v3:
>  - Remove host high speed capability due to hardware limitation.
>  - Remove unused variables.
>
>  drivers/mmc/ftsdc010_esdhc.c |  184 
> +++---
>  1 files changed, 101 insertions(+), 83 deletions(-)

> @@ -146,7 +151,7 @@ static void ftsdc010_pio_write(struct mmc_host *host, 
> const char *buf,
>        while (size) {
>                status = readl(&host->reg->status);
>
> -               if (status & FTSDC010_STATUS_FIFO_ORUN) {
> +               if (status & FTSDC010_STATUS_FIFO_URUN) {


Was this a bug before? If so, it should be mentioned in the changelog
that you fixed it.


> -static int ftsdc010_pio_check_status(struct mmc *mmc, struct mmc_cmd *cmd,
> +static int ftsdc010_check_rsp(struct mmc *mmc, struct mmc_cmd *cmd,
>                        struct mmc_data *data)
>  {
>        struct mmc_host *host = mmc->priv;
> -
>        unsigned int sta, clear;
> -       unsigned int i;
> -
> -       /* check response and hardware status */
> -       clear = 0;
> -
> -       /* chech CMD_SEND */
> -       for (i = 0; i < FTSDC010_CMD_RETRY; i++) {
> -               sta = readl(&host->reg->status);
> -               /* Command Complete */
> -               if (sta & FTSDC010_STATUS_CMD_SEND) {
> -                       if (!data)
> -                               clear |= FTSDC010_CLR_CMD_SEND;
> -                       break;
> -               }
> -       }
> -
> -       if (i > FTSDC010_CMD_RETRY) {
> -               printf("%s: send command timeout\n", __func__);
> -               return TIMEOUT;
> -       }
> -
> -       /* debug: print status register and command index*/
> -       debug("sta: %08x cmd %d\n", sta, cmd->cmdidx);
>
> -       /* handle data FIFO */
> -       if ((sta & FTSDC010_STATUS_FIFO_ORUN) ||
> -               (sta & FTSDC010_STATUS_FIFO_URUN)) {
> -
> -               /* Wrong DATA FIFO Flag */
> -               if (data == NULL)
> -                       printf("%s, data fifo wrong: sta: %08x cmd %d\n",
> -                               __func__, sta, cmd->cmdidx);
> -
> -               if (sta & FTSDC010_STATUS_FIFO_ORUN)
> -                       clear |= FTSDC010_STATUS_FIFO_ORUN;
> -               if (sta & FTSDC010_STATUS_FIFO_URUN)
> -                       clear |= FTSDC010_STATUS_FIFO_URUN;
> -       }
> +       sta = readl(&host->reg->status);
> +       debug("%s: sta: %08x cmd %d\n", __func__, sta, cmd->cmdidx);
>
>        /* check RSP TIMEOUT or FAIL */
>        if (sta & FTSDC010_STATUS_RSP_TIMEOUT) {
>                /* RSP TIMEOUT */
> -               debug("%s: RSP timeout: sta: %08x cmd %d\n",
> -                               __func__, sta, cmd->cmdidx);
> +               debug("%s: RSP timeout: sta: %08x\n", __func__, sta);
>
>                clear |= FTSDC010_CLR_RSP_TIMEOUT;
>                writel(clear, &host->reg->clr);
> @@ -226,47 +193,62 @@ static int ftsdc010_pio_check_status(struct mmc *mmc, 
> struct mmc_cmd *cmd,
>                return TIMEOUT;
>        } else if (sta & FTSDC010_STATUS_RSP_CRC_FAIL) {
>                /* clear response fail bit */
> -               debug("%s: RSP CRC FAIL: sta: %08x cmd %d\n",
> -                               __func__, sta, cmd->cmdidx);
> +               debug("%s: RSP CRC FAIL: sta: %08x\n", __func__, sta);
>
>                clear |= FTSDC010_CLR_RSP_CRC_FAIL;
>                writel(clear, &host->reg->clr);
>
> -               return 0;
> +               return COMM_ERR;
>        } else if (sta & FTSDC010_STATUS_RSP_CRC_OK) {
>
>                /* clear response CRC OK bit */
>                clear |= FTSDC010_CLR_RSP_CRC_OK;
>        }
>
> +       writel(clear, &host->reg->clr);
> +       return 0;
> +}
> +
> +static int ftsdc010_check_data(struct mmc *mmc, struct mmc_cmd *cmd,
> +                       struct mmc_data *data)
> +{
> +       struct mmc_host *host = mmc->priv;
> +       unsigned int sta, clear;
> +
> +       sta = readl(&host->reg->status);
> +       debug("%s: sta: %08x cmd %d\n", __func__, sta, cmd->cmdidx);
> +
>        /* check DATA TIMEOUT or FAIL */
>        if (data) {
> +               if (sta & FTSDC010_STATUS_DATA_END) {
> +                       /* Transfer Complete */
> +                       clear |= FTSDC010_STATUS_DATA_END;
> +               }
> +
> +               if (sta & FTSDC010_STATUS_DATA_CRC_OK) {
> +                       /* Data CRC_OK */
> +                      

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

2011-11-25 Thread Andy Fleming
On Tue, Nov 15, 2011 at 3:35 AM, Macpaul Lin  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 

Applied, thanks everyone!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [Patch V2] mmc: mv_sdhci: Fix host version read for Armada100

2011-11-25 Thread Andy Fleming
On Mon, Nov 14, 2011 at 3:43 AM, Ajay Bhargav
 wrote:
> sdhci_readw does not work for host version read in Armada100 series
> SoCs. This patch fix this issue by making a sdhci_readl call to get host
> version.
>
> Signed-off-by: Ajay Bhargav 

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


Re: [U-Boot] [PATCH] Add PR1 Appliance - ISDN PRI board

2011-11-25 Thread Dimitar Penev

Hi Mike,



Currently we keep the MAC as u-boot variable 'ethaddr' and pass it to 
Linux

using the boot comand line.


right, generally all boards use the 'ethaddr' env var.  the question is how
does that get initialized ?  many boards have dedicated storage so that 
even

if the env gets erased, the value can be recovered from elsewhere.  i guess
this board doesn't have that redundancy ?



Indeed, PR1 & BR4 Appliance don't keep MAC in a dedicated storage.
It is probably not a bad idea but at the moment we just use the u-boot
environment to store our parameters.
The 'ethaddr' variable is assigned manually by the person who test the 
boards


Best Regards
Dimitar


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


Re: [U-Boot] [PATCH] mmc: add host_caps checking avoid switch card improperly

2011-11-25 Thread Andy Fleming
On Thu, Nov 17, 2011 at 3:31 AM, Macpaul Lin  wrote:
> Add a host capability checking to avoid the mmc stack
> switch the card to HIGHSPEED mode when the card supports
> HIGHSPEED while the host doesn't.
>
> This patch avoid furthur transaction problem when the
> mmc/sd card runs different mode to the host.
>
> Signed-off-by: Macpaul Lin 
> ---
>  drivers/mmc/mmc.c |   10 ++
>  1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 21665ec..ce34d05 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -785,6 +785,16 @@ retry_scr:
>        if (!(__be32_to_cpu(switch_status[3]) & SD_HIGHSPEED_SUPPORTED))
>                return 0;
>
> +       /*
> +        * If the host doesn't support SD_HIGHSPEED, do not switch card to
> +        * HIGHSPEED mode even if the card support SD_HIGHSPPED.
> +        * This can avoid furthur problem when the card runs in different
> +        * mode between the host.
> +        */
> +       if (!((mmc->host_caps & MMC_MODE_HS_52MHz) ||
> +               (mmc->host_caps & MMC_MODE_HS)))
> +               return 0;
> +

Isn't this the wrong logic? It seems like you don't want to switch
unless both support high speed. But this logic says to switch if
either one does.

Shouldn't it be:

if (!((mmc->host_caps & MMC_MODE_HS_52MHz) &&
   (mmc->host_caps & MMC_MODE_HS)))
return 0;

?

Andy
>        err = sd_switch(mmc, SD_SWITCH_SWITCH, 0, 1, (u8 *)switch_status);
>
>        if (err)
> --
> 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] Add PR1 Appliance - ISDN PRI board

2011-11-25 Thread Mike Frysinger
On Friday 25 November 2011 16:54:29 Dimitar Penev wrote:
> >On Sunday 20 November 2011 15:24:12 Dimitar Penev wrote:
> >> I have noticed however that you have removed the random MAC generation
> >> which I would consider as a good feature.
> >> What is your reasoning behind this?
> >
> >MAC randomization should not be the default mode for boards.  where does
> >this board store its MAC address in general ?
> >
> >on the bf537-stamp, we use the last sector of the parallel flash to store
> >the MAC so that it is saved across u-boot/linux updates and recovery.
> 
> Currently we keep the MAC as u-boot variable 'ethaddr' and pass it to Linux
> using the boot comand line.

right, generally all boards use the 'ethaddr' env var.  the question is how 
does that get initialized ?  many boards have dedicated storage so that even 
if the env gets erased, the value can be recovered from elsewhere.  i guess 
this board doesn't have that redundancy ?
-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] u-boot-pxa / master

2011-11-25 Thread Anatolij Gustschin
On Fri, 25 Nov 2011 22:29:59 +0100
Albert ARIBAUD  wrote:

> Le 25/11/2011 22:13, Marek Vasut a écrit :
...
> Ok, so I consider those four as dead, I confirm your pull request as 
> accepted and I mark Anatolij's patches as rejected.
> 
> Anatolij, what about your other machine ID addition patches?

I've found another older mach-id patch for a320evb board [1] and
queued it in my staging branch. So my mach-id patch for a320evb can
be marked as rejected, too.

The remaining two patches [2] and [3] should be applied, I think.

[1] http://patchwork.ozlabs.org/patch/124269/
[2] http://patchwork.ozlabs.org/patch/126542/
[3] http://patchwork.ozlabs.org/patch/126546/

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


Re: [U-Boot] [PATCH] Add PR1 Appliance - ISDN PRI board

2011-11-25 Thread Dimitar Penev

Hi Mike,


On Sunday 20 November 2011 15:24:12 Dimitar Penev wrote:

I have noticed however that you have removed the random MAC generation
which I would consider as a good feature.
What is your reasoning behind this?


MAC randomization should not be the default mode for boards.  where does 
this

board store its MAC address in general ?


on the bf537-stamp, we use the last sector of the parallel flash to store 
the

MAC so that it is saved across u-boot/linux updates and recovery.
-mike


Currently we keep the MAC as u-boot variable 'ethaddr' and pass it to Linux 
using the boot comand line.


Best Regards
Dimitar




- Original Message - 
From: "Mike Frysinger" 

To: "Dimitar Penev" 
Cc: 
Sent: Friday, November 25, 2011 10:55 PM
Subject: Re: [U-Boot] [PATCH] Add PR1 Appliance - ISDN PRI board


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


Re: [U-Boot] [PATCH 9/9] mkenvimage: Default to stdout if the output argument is absent or "-"

2011-11-25 Thread Mike Frysinger
squash this into the first stdin patch ?
[PATCH 5/9] mkenvimage: Read from stdin if the filename is "-"
-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 8/9] mkenvimage: Really set the redundant byte when applicable

2011-11-25 Thread Mike Frysinger
On Wednesday 23 November 2011 15:28:17 David Wagner wrote:
> --- a/tools/mkenvimage.c
> +++ b/tools/mkenvimage.c
> 
> + if (redundant)
> + *(dataptr + sizeof(targetendian_crc)) = 1;

dataptr[sizeof(targetendian_crc)] = 1;
-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 v3 11/15] sf: Add spi_boot() to allow booting from SPI flash in an SPL

2011-11-25 Thread Mike Frysinger
On Friday 25 November 2011 07:37:40 Christian Riesch wrote:
> --- a/drivers/mtd/spi/Makefile
> +++ b/drivers/mtd/spi/Makefile
> 
> +ifdef CONFIG_SPL_BUILD
> +ifdef CONFIG_SPL_SPI_LOAD
> +COBJS-y += spi_spl_load.o
> +endif
> +endif

COBJS-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o

> --- /dev/null
> +++ b/drivers/mtd/spi/spi_spl_load.c
>
> + __attribute__((noreturn)) void (*uboot)(void);

__noreturn
-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] u-boot-pxa / master

2011-11-25 Thread Albert ARIBAUD

Le 25/11/2011 22:13, Marek Vasut a écrit :

Hi Albert,

On Fri, 25 Nov 2011 20:50:55 +0100

Albert ARIBAUD  wrote:

Hi Marek, Anatolij,

Le 25/11/2011 20:46, Albert ARIBAUD a écrit :

Hi Marek,

Le 25/11/2011 19:56, Marek Vasut a écrit :

The following changes since commit
19cdfd3e84bff108febb127b598ac3f1634c768c:

Ethernut 5 board support (2011-11-21 17:51:06 +0100)

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

Marek Vasut (4):
PXA: Drop CERF250 board
PXA: Drop CRADLE board
PXA: Drop PLEB2 board
PXA: Drop XM250 board


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


Wait... Anatolij submitted patches to add machine ID back to these
boards.

Anatolij, do you intend to take maintainership of these boards ?


I do not have any of these boards, so I can't really maintain
the code for them. Also I'm not sure whether the current U-Boot
runs on these boards (I've seen patches to fix PXA relocation [1]).

Does it make sense to keep them?


Not even the original maintainer responds by now. So I think they are dead now.

M



Ok, so I consider those four as dead, I confirm your pull request as 
accepted and I mark Anatolij's patches as rejected.


Anatolij, what about your other machine ID addition patches?

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


Re: [U-Boot] [PATCH] Blackfin: br4: new board port

2011-11-25 Thread Mike Frysinger
i tweaked a few things (like disabling the CONFIG_ETHADDR).  same question for
this board ... where is the MAC normally stored ?

updated patch is below
-mike

>From 6ff79ef55cb414b0dfb08b8aa9db2baf8849545b Mon Sep 17 00:00:00 2001
From: Dimitar Penev 
Date: Fri, 25 Nov 2011 16:05:54 -0500
Subject: [PATCH] Blackfin: br4: new board port

This adds support for the BR4 Appliance.  It is a quad channel ISDN BRI
board based on Blackfin BF537 CPU.

Signed-off-by: Dimitar Penev 
Signed-off-by: Mike Frysinger 
---
 MAINTAINERS   |1 +
 board/br4/Makefile|   50 +++
 board/br4/br4.c   |   30 +
 board/br4/config.mk   |   30 +
 boards.cfg|1 +
 include/configs/br4.h |  160 +
 6 files changed, 272 insertions(+), 0 deletions(-)
 create mode 100644 board/br4/Makefile
 create mode 100644 board/br4/br4.c
 create mode 100644 board/br4/config.mk
 create mode 100644 include/configs/br4.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 0c7e15a..5932b67 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1136,6 +1136,7 @@ Chong Huang 
 
 Dimitar Penev 
 
+   BR4 Appliance   BF537
PR1 Appliance   BF537
 
 #
diff --git a/board/br4/Makefile b/board/br4/Makefile
new file mode 100644
index 000..6ae998f
--- /dev/null
+++ b/board/br4/Makefile
@@ -0,0 +1,50 @@
+#
+# U-boot - Makefile
+#
+# Copyright (c) Switchfin Org. 
+#
+# Copyright (c) 2005-2007 Analog Device Inc.
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS-y:= $(BOARD).o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/br4/br4.c b/board/br4/br4.c
new file mode 100644
index 000..bc034e3
--- /dev/null
+++ b/board/br4/br4.c
@@ -0,0 +1,30 @@
+/*
+ * U-boot - main board file
+ *
+ * Copyright (c) Switchfin Org. 
+ *
+ * Copyright (c) 2005-2008 Analog Devices Inc.
+ *
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include 
+#include 
+#include 
+
+int checkboard(void)
+{
+   printf("Board: Switchvoice BR4 Appliance\n");
+   printf("   Support: http://www.switchvoice.com/\n";);
+   return 0;
+}
+
+#ifdef CONFIG_BFIN_MAC
+int board_eth_init(bd_t *bis)
+{
+   return bfin_EMAC_initialize(bis);
+}
+#endif
diff --git a/board/br4/config.mk b/board/br4/config.mk
new file mode 100644
index 000..9d66d26
--- /dev/null
+++ b/board/br4/config.mk
@@ -0,0 +1,30 @@
+#
+# Copyright (c) Switchfin Org.  
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2001
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+CFLAGS_lib += -O2
+CFLAGS_lib/lzma += -O2
+CFLAGS_lib/zlib += -O2
diff --git a/boards.cfg b/boards.cfg
index 420d7eb..a3b3814 100644
--- a/bo

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

2011-11-25 Thread Marek Vasut
> Hi Albert,
> 
> On Fri, 25 Nov 2011 20:50:55 +0100
> 
> Albert ARIBAUD  wrote:
> > Hi Marek, Anatolij,
> > 
> > Le 25/11/2011 20:46, Albert ARIBAUD a écrit :
> > > Hi Marek,
> > > 
> > > Le 25/11/2011 19:56, Marek Vasut a écrit :
> > >> The following changes since commit
> > >> 19cdfd3e84bff108febb127b598ac3f1634c768c:
> > >> 
> > >> Ethernut 5 board support (2011-11-21 17:51:06 +0100)
> > >> 
> > >> are available in the git repository at:
> > >> git://git.denx.de/u-boot-pxa.git master
> > >> 
> > >> Marek Vasut (4):
> > >> PXA: Drop CERF250 board
> > >> PXA: Drop CRADLE board
> > >> PXA: Drop PLEB2 board
> > >> PXA: Drop XM250 board
> > > 
> > > Applied to u-boot-arm/master, thanks!
> > 
> > Wait... Anatolij submitted patches to add machine ID back to these
> > boards.
> > 
> > Anatolij, do you intend to take maintainership of these boards ?
> 
> I do not have any of these boards, so I can't really maintain
> the code for them. Also I'm not sure whether the current U-Boot
> runs on these boards (I've seen patches to fix PXA relocation [1]).
> 
> Does it make sense to keep them?

Not even the original maintainer responds by now. So I think they are dead now.

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


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

2011-11-25 Thread Mike Frysinger
On Thursday 17 November 2011 11:07:23 Igor Grinberg wrote:
> --- a/tools/envcrc.c
> +++ b/tools/envcrc.c
> 
>  #if defined(ENV_IS_EMBEDDED) && !defined(CONFIG_BUILD_ENVCRC)
> +# include 
>  # define CONFIG_BUILD_ENVCRC 1
>  #endif
> ...
>  #ifdef CONFIG_BUILD_ENVCRC
>  extern unsigned int env_size;
> -extern unsigned char environment;
> +extern env_t environment;
>  #endif   /* CONFIG_BUILD_ENVCRC */

this breaks when CONFIG_BUILD_ENVCRC is defined.  you include environment.h 
when it isn't defined, but then use env_t when it is defined.
-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


[U-Boot] [PATCH] ignore new mkenvimage tool

2011-11-25 Thread Mike Frysinger
Signed-off-by: Mike Frysinger 
---
 tools/.gitignore |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/.gitignore b/tools/.gitignore
index 98a5c78..e4d2c2f 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -2,6 +2,7 @@
 /envcrc
 /gen_eth_addr
 /img2srec
+/mkenvimage
 /mkimage
 /mpc86x_clk
 /mxsboot
-- 
1.7.6.1

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


[U-Boot] (no subject)

2011-11-25 Thread ALANTIC LOANS HAPPY OFFER


BUSINESS AND PERSONAL LOANS AVAILABLE AT 2% REPLY IF INTERESTED.___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Add PR1 Appliance - ISDN PRI board

2011-11-25 Thread Mike Frysinger
On Sunday 20 November 2011 15:24:12 Dimitar Penev wrote:
> I have noticed however that you have removed the random MAC generation
> which I would consider as a good feature.
> What is your reasoning behind this?

MAC randomization should not be the default mode for boards.  where does this 
board store its MAC address in general ?

on the bf537-stamp, we use the last sector of the parallel flash to store the 
MAC so that it is saved across u-boot/linux updates and recovery.
-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] u-boot-pxa / master

2011-11-25 Thread Anatolij Gustschin
Hi Albert,

On Fri, 25 Nov 2011 20:50:55 +0100
Albert ARIBAUD  wrote:

> Hi Marek, Anatolij,
> 
> Le 25/11/2011 20:46, Albert ARIBAUD a écrit :
> > Hi Marek,
> >
> > Le 25/11/2011 19:56, Marek Vasut a écrit :
> >> The following changes since commit
> >> 19cdfd3e84bff108febb127b598ac3f1634c768c:
> >>
> >> Ethernut 5 board support (2011-11-21 17:51:06 +0100)
> >>
> >> are available in the git repository at:
> >> git://git.denx.de/u-boot-pxa.git master
> >>
> >> Marek Vasut (4):
> >> PXA: Drop CERF250 board
> >> PXA: Drop CRADLE board
> >> PXA: Drop PLEB2 board
> >> PXA: Drop XM250 board
> >
> > Applied to u-boot-arm/master, thanks!
> 
> Wait... Anatolij submitted patches to add machine ID back to these boards.
> 
> Anatolij, do you intend to take maintainership of these boards ?

I do not have any of these boards, so I can't really maintain
the code for them. Also I'm not sure whether the current U-Boot
runs on these boards (I've seen patches to fix PXA relocation [1]).

Does it make sense to keep them?

Thanks,
Anatolij

[1] http://patchwork.ozlabs.org/patch/120240
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-25 Thread Marek Vasut
> Hi Marek, Anatolij,
> 
> Le 25/11/2011 20:46, Albert ARIBAUD a écrit :
> > Hi Marek,
> > 
> > Le 25/11/2011 19:56, Marek Vasut a écrit :
> >> The following changes since commit
> >> 19cdfd3e84bff108febb127b598ac3f1634c768c:
> >> 
> >> Ethernut 5 board support (2011-11-21 17:51:06 +0100)
> >> 
> >> are available in the git repository at:
> >> git://git.denx.de/u-boot-pxa.git master
> >> 
> >> Marek Vasut (4):
> >> PXA: Drop CERF250 board
> >> PXA: Drop CRADLE board
> >> PXA: Drop PLEB2 board
> >> PXA: Drop XM250 board
> > 
> > Applied to u-boot-arm/master, thanks!
> 
> Wait... Anatolij submitted patches to add machine ID back to these boards.
> 
> Anatolij, do you intend to take maintainership of these boards ?
> 
> Amicalement,

I saw the patches and replied to these. I'd take much more than to add the 
machine ID back to consider there "maintained".

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


[U-Boot] MPC8536 problems II

2011-11-25 Thread David Lynch Jr.
Trying again, with an effort to be more concise. 

What are the minimums that need to be setup correctly to access DDR for
an MPC8536 in u-boot ? This is probably my most important question. 
I do not want to fixate on DDR controler timing issues, when the Local
Access Windows, TLB's or L2 Cache are also likely culprits.  

Do the TLB's have to be correct ? Are the default u-boot TLB's likely to
work for DDR starting at 0 ?

I believe the MPC8536 u-boot configuration uses the L2 as memory during
early startup. Does anything cache related have to be changed when DDR
is enabled ?

I am not seeing where the Local Access Windows are set for DDR, they are
set for NAND, NOR, ... most everything else. Do they need to be set for
DDR ?

I grasp that getting reliable operation requires perfect programming of
the DDR controller, but right now unreliable would be a step forward. 
What are the most likely DDR register culprits for complete inability to
read. 

I can write DDR - meaning the operation completes. I have no idea
whether any data is actually written, but any attempt to read leaves the
processor waiting forever at the instruction reading memory. 
 
I am trying per Wolfgang's recommendations to switch to the u-boot git
tree rather than 2009.03. But that does not appear to build. 




On Wed, 2011-11-23 at 23:44 -0500, David Lynch Jr. wrote:
> I am bringing u-boot-2009.03-rc1 up on an MPC8536 target, and I am
> having some problems reading DDR, suggestions would be greatly
> appreciated. 
> I am using this particular u-boot, because the client succeeded in
> getting that working on an MPC8536DS (that I do not have access to). I
> can not even get the serial port working on the target with newer
> versions of u-boot. 
> This target is much simpler than the MPC8526DS and I have disabled
> everything but Serial, DDR, and NOR in the board configuration file. The
> only thing that must work is booting linux. This board has no PIXIS, no
> ISC307, and the DDR does not have SPD.  
> I now appear to have everything but DDR working. I can not get u-boot to
> relocate to ram. Writing to RAM seems to work - in the sense there are
> no faults and writes do not hang, but reading RAM stalls the instruction
> forever without error. 
> I am using a BDI3000 - which I am not fluent in. The BDI3000
> configuration is minimal - only enough to read/write/erase NOR, and
> manipulate the processor. The BDI3000 faults when reading DDR - but it
> is not setup for that. 
> The MPC8536DS code to setup DDR without SPD would not compile as it was,
> but I beleive I have fixed that. I have played with myriads of DDR
> controller register value changes without change in behavior. As this is
> a total read failure - rather than just unreliable operation I am
> leaning towards looking for other culprits - though the DDR
> configuration is still high on the list as u-boot works ont he
> development system and the remaining difference of consequence is that
> the DDR is manually programmed on the target. 
> Access to the hardware is severely limited - it is two hours away in a
> secure facility, and I must try as much as possible during the limited
> time I have access. 
> 
> 
> 
> 
> 





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


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

2011-11-25 Thread Mike Frysinger
On Friday 25 November 2011 07:29:57 Daniel Schwierzeck wrote:
> On Fri, Nov 25, 2011 at 9:49 AM, Marek Vasut  wrote:
> >> On Thursday 24 November 2011 08:57:56 Daniel Schwierzeck wrote:
> >> > Build dbau1550_el only in LIST_au1xx0_el and LIST_mips_el.
> >> > Also remove obsolete lists for mips5kc.
> >> 
> >> if possible, i'd really like to kill off all the specialized mips lists
> >> and do selection purely based on fields in boards.cfg.
> > 
> > I have to agree here.
> 
> that is currently not possible because -EB and -EL are not properly
> handled in CFLAGS and LDFLAGS.

can we get this fixed ?  it makes running MAKEALL a pain (i've hit this a few 
times).

are there any mips cores which can run in either endian ?  if so, we should 
add a config option to control this which the top level Makefile can key off 
of.  
otherwise, should be easy to tweak the subdirs in arch/mips/ to add -EB/-EL as 
needed.

the top level option would be useful for arm boards though as they do have 
processors that can run in either endian ...
-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] board/esd/cpci405/cpci405.c: Fix GCC 4.6 warning

2011-11-25 Thread Mike Frysinger
On Friday 25 November 2011 03:33:39 Marek Vasut wrote:
> > On Thursday 24 November 2011 10:39:21 Matthias Fuchs wrote:
> > > - sprintf(str, "%08X%04X",
> > > - *(unsigned int *)&ow_id[0],
> > > - *(unsigned short *)&ow_id[4]);
> > > + sprintf(str, "%02X%02X%02X%02X%02X%02X",
> > > + ow_id[0], ow_id[1], ow_id[2], ow_id[3], ow_id[4], ow_id[5]);
> > 
> > use __get_unaligned_le32 and __get_unaligned_le16 helpers to avoid having
> > to decode each byte.
> 
> Is there any overhead introduced ?

i imagine get_unaligned will be as worse as indexing every byte (which is what 
Matthias is proposing we change to), or as good as the current code (just 
casting the data).  depends on the arch.
-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


[U-Boot] [PATCH v4] ulpi: add generic ULPI functionality

2011-11-25 Thread Jana Rapava
Add generic functions for ULPI init and setting bits in
ULPI registers.

Signed-off-by: Jana Rapava 
Cc: Marek Vasut 
Cc: Remy Bohmer 
Cc: Stefano Babic 
Cc: Igor Grinberg 
Cc: Wolfgang Grandegger 
---
Changes for v2:
   - make code EHCI-independent
   - use udelay() in waiting loop
   - mark static functions as static
   - naming changes
Changes for v3:
- merge with patch ulpi: add generic ULPI support header file
- rewrite ULPI interface in more functionality-oriented way
Changes for v4:
- add error-checking
- add waiting for completion into ulpi_reset() function

 Makefile |1 +
 drivers/usb/ulpi/Makefile|   45 +++
 drivers/usb/ulpi/ulpi-viewport.c |   91 ++
 drivers/usb/ulpi/ulpi.c  |  256 ++
 include/usb/ulpi.h   |  221 
 5 files changed, 614 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/ulpi/Makefile
 create mode 100644 drivers/usb/ulpi/ulpi-viewport.c
 create mode 100644 drivers/usb/ulpi/ulpi.c
 create mode 100644 include/usb/ulpi.h

diff --git a/Makefile b/Makefile
index c9e2624..da7352c 100644
--- a/Makefile
+++ b/Makefile
@@ -283,6 +283,7 @@ LIBS += drivers/usb/gadget/libusb_gadget.o
 LIBS += drivers/usb/host/libusb_host.o
 LIBS += drivers/usb/musb/libusb_musb.o
 LIBS += drivers/usb/phy/libusb_phy.o
+LIBS += drivers/usb/ulpi/libusb_ulpi.o
 LIBS += drivers/video/libvideo.o
 LIBS += drivers/watchdog/libwatchdog.o
 LIBS += common/libcommon.o
diff --git a/drivers/usb/ulpi/Makefile b/drivers/usb/ulpi/Makefile
new file mode 100644
index 000..a1a2244
--- /dev/null
+++ b/drivers/usb/ulpi/Makefile
@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2011 Jana Rapava 
+# 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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB:= $(obj)libusb_ulpi.o
+
+COBJS-$(CONFIG_USB_ULPI)   += ulpi.o
+COBJS-$(CONFIG_USB_ULPI_VIEWPORT)  += ulpi-viewport.o
+
+COBJS  := $(COBJS-y)
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+all:   $(LIB)
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/drivers/usb/ulpi/ulpi-viewport.c b/drivers/usb/ulpi/ulpi-viewport.c
new file mode 100644
index 000..8f7d94c
--- /dev/null
+++ b/drivers/usb/ulpi/ulpi-viewport.c
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2011 Jana Rapava 
+ * Based on:
+ * linux/drivers/usb/otg/ulpi_viewport.c
+ *
+ * Original Copyright follow:
+ * Copyright (C) 2011 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include 
+#include 
+#include 
+
+/* ULPI viewport control bits */
+#define ULPI_WU(1 << 31)
+#define ULPI_SS(1 << 27)
+#define ULPI_RWRUN (1 << 30)
+#define ULPI_RWCTRL(1 << 29)
+
+#define ULPI_ADDR_SHIFT16
+#define ulpi_write_mask(value) ((value) & 0xff)
+#define ulpi_read_mask(value)  (((value) >> 8) & 0xff)
+
+static int ulpi_wait(u32 ulpi_viewport, u32 ulpi_value, u32 ulpi_mask)
+{
+   int timeout = CONFIG_USB_ULPI_TIMEOUT;
+   u32 tmp;
+
+   writel(ulpi_value, ulpi_viewport);
+
+   /* Wait for the bits in ulpi_mask to become zero. */
+   while (--timeout) {
+   tmp = readl(ulpi_viewport);
+   if (!(tmp & ulpi_mask))
+   break;
+   udelay(1);
+   }
+
+   return !timeout;
+}
+
+static int ulpi_wakeup(u32 ulpi_viewport)
+{
+   if (readl(ulpi_viewport) & ULPI_SS)
+   return 0; /* already awake */
+
+

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

2011-11-25 Thread Albert ARIBAUD

Hi Marek, Anatolij,

Le 25/11/2011 20:46, Albert ARIBAUD a écrit :

Hi Marek,

Le 25/11/2011 19:56, Marek Vasut a écrit :

The following changes since commit
19cdfd3e84bff108febb127b598ac3f1634c768c:

Ethernut 5 board support (2011-11-21 17:51:06 +0100)

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

Marek Vasut (4):
PXA: Drop CERF250 board
PXA: Drop CRADLE board
PXA: Drop PLEB2 board
PXA: Drop XM250 board


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


Wait... Anatolij submitted patches to add machine ID back to these boards.

Anatolij, do you intend to take maintainership of these boards ?

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


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

2011-11-25 Thread Albert ARIBAUD

Hi Marek,

Le 25/11/2011 19:56, Marek Vasut a écrit :

The following changes since commit 19cdfd3e84bff108febb127b598ac3f1634c768c:

   Ethernut 5 board support (2011-11-21 17:51:06 +0100)

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

Marek Vasut (4):
   PXA: Drop CERF250 board
   PXA: Drop CRADLE board
   PXA: Drop PLEB2 board
   PXA: Drop XM250 board


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] [PATCH V3 0/2] fix: regression in SMDK6400

2011-11-25 Thread Albert ARIBAUD

Hi Simon,

Le 31/10/2011 17:34, Simon Schwarz a écrit :

This is a fix for a regression introduced by my patch
55f429bb39614a16b1bacc9a8bea9ac01a60bfc8 to u-boot-ti/next

The issue is described here:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/108873

changes V3:
- fix for: http://article.gmane.org/gmane.comp.boot-loaders.u-boot/114559
- http://article.gmane.org/gmane.comp.boot-loaders.u-boot/114558


Simon Schwarz (2):
   nand: Add common functions to linux/mtd/nand.h
   Fix regression in SMDK6400

  drivers/mtd/nand/nand_base.c |6 +++---
  drivers/mtd/nand/s3c64xx.c   |   28 ++--
  include/linux/mtd/nand.h |7 +++
  include/nand.h   |3 ---
  nand_spl/board/samsung/smdk6400/Makefile |9 ++---
  5 files changed, 18 insertions(+), 35 deletions(-)


Applied to u-boot-arm/master, under the assumption that you're taking up 
maintainer role for SMDK6400. If you do indeed, can you send a patch to 
MAINTAINERS to make it official? Thanks.


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


Re: [U-Boot] yet another arm mach-types.h thread

2011-11-25 Thread Albert ARIBAUD

Le 24/11/2011 23:29, Michael Walle a écrit :


Hi,

As there was no real conclusion on my previous "arm mach-types.h" thread, i
have to reemphasize that the current mach types handling is broken.

  1. u-boot follows linux mach-types.h
  2. linux only includes ids
  a, they have (non DT!) board support for or
  b, id which are not older than 12 months.

Now there are the following cases with problems:
  - boards which have no linux support but uboot support


These need no machine ID. Machine ID is a Linux thing, right?


  - boards which have only dt support within linux. uboot won't be able to boot
these board with older kernels, which do not have dt support, but instead
still using the old-fashioned setup code.


I'm not sure I get this one right. If we're talking about boards that 
started out with a machine ID and then went DT-only, then they did not 
lose their machine ID, did they? And U-Boot is aiming at supporting 
device trees, right, so boards with DT support won't need a machine ID 
long, right?



  - boards which have only dt support in mainline kernel but have been
backported to older kernels and old-fashioned setup code.
  - there will always be regressions when pulling the newest mach-types.h from
linux


Indeed. And these regressions will help show which boards are still 
alive and which are dead and should be removed from the codebase (or 
maybe have moved to DT and might require device tree support in U-Boot).



The proposed solution was to add the ID to the board config. Why not put all
ids into the board configs then and remove the mach-types.h?


There is no need for a broad generalization. The general case should be 
that board support in U-Boot provide device tree (resp. machine ID) 
support to boards for which Linux supports device trees (resp. machine 
IDs), and other cases are exceptions that deserve specific treatment 
such as, for instance, custom machine ID support in config files.



Maybe you want to
have database with all ids? But with tracking the linux mach-types.h you
always have the database with boards _linux mainline_ supports and not the
boards uboot supports. Something seems to be broken there :)


That's because you consider machine IDs to mean "supported by U-Boot" 
whereas basically they say "still supported by Linux without a device tree".



IMHO either you say
  - you have a database, that way you have to include the ids _you_ support or
  - you don't have such a file and have the ids scattered all across the board
configs.


There is a database, it is mach-types.h, and it lists the boards for 
which Linux currently supports machine IDs. IDs in config files are for 
boards which want to advertise a machine ID to Linux despite mainline 
Linux currently not supporting their machine ID.


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


Re: [U-Boot] [PATCH] tools/os_support: add OS X Lion support

2011-11-25 Thread Andy Fleming
I've been trying to get the compiler to run on Mac OS X for a bit, but
haven't managed to get it to build (let alone get U-Boot to build).
Any chance you could send me some pointers to how you got one up and
running?

On Thu, Nov 24, 2011 at 3:36 PM, Andreas Bießmann
 wrote:
> OS X Lion's c-library implements getline(), therefore prevent including the 
> old
> helper implementation for __DARWIN_C_LEVEL < 200809L.
>
> Without this patch following error occours:
>
> ---8<---
> In file included from os_support.h:32,
>                 from img2srec.c:55:
> getline.h:1: error: conflicting types for ‘getline’
> /usr/include/stdio.h:449: error: previous declaration of ‘getline’ was
> here
> --->8---
>
> Signed-off-by: Andreas Bießmann 
> ---
> total: 0 errors, 0 warnings, 15 lines checked
>
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX 
> MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> 0001-tools-os_support-add-OS-X-Lion-support.patch has no obvious style 
> problems and is ready for submission.
>
>  tools/os_support.c |    2 +-
>  tools/os_support.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/os_support.c b/tools/os_support.c
> index 1ed89e6..319c0fe 100644
> --- a/tools/os_support.c
> +++ b/tools/os_support.c
> @@ -23,6 +23,6 @@
>  #ifdef __MINGW32__
>  #include "mingw_support.c"
>  #endif
> -#ifdef __APPLE__
> +#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L
>  #include "getline.c"
>  #endif
> diff --git a/tools/os_support.h b/tools/os_support.h
> index 7dcbee4..5bf7add 100644
> --- a/tools/os_support.h
> +++ b/tools/os_support.h
> @@ -28,7 +28,7 @@
>  #include "mingw_support.h"
>  #endif
>
> -#ifdef __APPLE__
> +#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L
>  #include "getline.h"
>  #endif
>
> --
> 1.7.7.4
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 1/2] nand: Add common functions to linux/mtd/nand.h

2011-11-25 Thread Albert ARIBAUD

Le 25/11/2011 20:05, Albert ARIBAUD a écrit :

Hi Simon, Scott,

Le 31/10/2011 18:52, Scott Wood a écrit :

On 10/31/2011 11:34 AM, Simon Schwarz wrote:

Functions often used in SPL are now part of linux/mtd/nand.h.
Static modifiers are removed from these functions in
drivers/mtd/nand/nand_base.c.

Signed-off-by: Simon Schwarz
Cc: scottw...@freescale.com
Cc: s-paul...@ti.com
Cc: albert.u.b...@aribaud.net


Acked-by: Scott Wood

-Scott


Uhm... Why was this delegated to me? It doesn't seem ARM related, does it?


Never mind. Got it.


Amicalement,


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


Re: [U-Boot] [PATCH V3 1/2] nand: Add common functions to linux/mtd/nand.h

2011-11-25 Thread Albert ARIBAUD

Hi Simon, Scott,

Le 31/10/2011 18:52, Scott Wood a écrit :

On 10/31/2011 11:34 AM, Simon Schwarz wrote:

Functions often used in SPL are now part of linux/mtd/nand.h.
Static modifiers are removed from these functions in
drivers/mtd/nand/nand_base.c.

Signed-off-by: Simon Schwarz
Cc: scottw...@freescale.com
Cc: s-paul...@ti.com
Cc: albert.u.b...@aribaud.net


Acked-by: Scott Wood

-Scott


Uhm... Why was this delegated to me? It doesn't seem ARM related, does  it?

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


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

2011-11-25 Thread Marek Vasut
The following changes since commit 19cdfd3e84bff108febb127b598ac3f1634c768c:

  Ethernut 5 board support (2011-11-21 17:51:06 +0100)

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

Marek Vasut (4):
  PXA: Drop CERF250 board
  PXA: Drop CRADLE board
  PXA: Drop PLEB2 board
  PXA: Drop XM250 board

 MAINTAINERS   |5 -
 board/cerf250/Makefile|   43 ---
 board/cerf250/cerf250.c   |   85 -
 board/cerf250/flash.c |  429 
 board/cradle/Makefile |   43 ---
 board/cradle/cradle.c |  236 -
 board/cradle/flash.c  |  361 
 board/pleb2/Makefile  |   44 ---
 board/pleb2/flash.c   |  814 -
 board/pleb2/pleb2.c   |   71 
 board/xm250/Makefile  |   43 ---
 board/xm250/flash.c   |  535 -
 board/xm250/xm250.c   |   95 --
 boards.cfg|4 -
 doc/README.scrapyard  |4 +
 include/configs/cerf250.h |  229 -
 include/configs/cradle.h  |  358 
 include/configs/pleb2.h   |  266 ---
 include/configs/xm250.h   |  369 
 19 files changed, 4 insertions(+), 4030 deletions(-)
 delete mode 100644 board/cerf250/Makefile
 delete mode 100644 board/cerf250/cerf250.c
 delete mode 100644 board/cerf250/flash.c
 delete mode 100644 board/cradle/Makefile
 delete mode 100644 board/cradle/cradle.c
 delete mode 100644 board/cradle/flash.c
 delete mode 100644 board/pleb2/Makefile
 delete mode 100644 board/pleb2/flash.c
 delete mode 100644 board/pleb2/pleb2.c
 delete mode 100644 board/xm250/Makefile
 delete mode 100644 board/xm250/flash.c
 delete mode 100644 board/xm250/xm250.c
 delete mode 100644 include/configs/cerf250.h
 delete mode 100644 include/configs/cradle.h
 delete mode 100644 include/configs/pleb2.h
 delete mode 100644 include/configs/xm250.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/4] PXA: Drop XM250 board

2011-11-25 Thread Marek Vasut
The board is unmaintained and maintainer doesn't respond.

Signed-off-by: Marek Vasut 
Cc: Simon Glass 
Cc: Anatolij Gustschin 
---
 board/xm250/Makefile|   43 
 board/xm250/flash.c |  535 ---
 board/xm250/xm250.c |   95 -
 boards.cfg  |1 -
 doc/README.scrapyard|1 +
 include/configs/xm250.h |  369 
 6 files changed, 1 insertions(+), 1043 deletions(-)
 delete mode 100644 board/xm250/Makefile
 delete mode 100644 board/xm250/flash.c
 delete mode 100644 board/xm250/xm250.c
 delete mode 100644 include/configs/xm250.h

diff --git a/board/xm250/Makefile b/board/xm250/Makefile
deleted file mode 100644
index 6a0cca0..000
--- a/board/xm250/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-include $(TOPDIR)/config.mk
-
-LIB= $(obj)lib$(BOARD).o
-
-COBJS  := xm250.o flash.o
-
-SRCS   := $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
-
-$(LIB):$(obj).depend $(OBJS)
-   $(call cmd_link_o_target, $(OBJS))
-
-#
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#
diff --git a/board/xm250/flash.c b/board/xm250/flash.c
deleted file mode 100644
index e825aba..000
--- a/board/xm250/flash.c
+++ /dev/null
@@ -1,535 +0,0 @@
-/*
- * (C) Copyright 2001
- * Kyle Harris, Nexus Technologies, Inc. khar...@nexus-tech.net
- *
- * (C) Copyright 2001-2004
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include 
-#include 
-
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips 
   */
-
-/* Board support for 1 or 2 flash devices */
-#define FLASH_PORT_WIDTH32
-#undef FLASH_PORT_WIDTH16
-
-#ifdef FLASH_PORT_WIDTH16
-#define FLASH_PORT_WIDTH   ushort
-#define FLASH_PORT_WIDTHV  vu_short
-#define SWAP(x)   __swab16(x)
-#else
-#define FLASH_PORT_WIDTH   ulong
-#define FLASH_PORT_WIDTHV  vu_long
-#define SWAP(x)   __swab32(x)
-#endif
-
-/* Intel-compatible flash ID */
-#define INTEL_COMPAT  0x00890089
-#define INTEL_ALT 0x00B000B0
-
-/* Intel-compatible flash commands */
-#define INTEL_PROGRAM 0x00100010
-#define INTEL_ERASE   0x00200020
-#define INTEL_CLEAR   0x00500050
-#define INTEL_LOCKBIT 0x00600060
-#define INTEL_PROTECT 0x00010001
-#define INTEL_STATUS  0x00700070
-#define INTEL_READID  0x00900090
-#define INTEL_CONFIRM 0x00D000D0
-#define INTEL_RESET   0x
-
-/* Intel-compatible flash status bits */
-#define INTEL_FINISHED 0x00800080
-#define INTEL_OK   0x00800080
-
-#define FPW   FLASH_PORT_WIDTH
-#define FPWV   FLASH_PORT_WIDTHV
-
-#define mb() __asm__ __volatile__ ("" : : : "memory")
-
-/*---
- * Functions
- */
-static ulong flash_get_size (FPW *addr, flash_info_t *info);
-static int write_data (flash_info_t *info, ulong dest, FPW data);
-static void flash_get_offsets (ulong base, flash_info_t *info);
-void inline spin_wheel (void);
-
-/*---
- */
-
-unsigned long flash

[U-Boot] [PATCH 3/4] PXA: Drop PLEB2 board

2011-11-25 Thread Marek Vasut
The board is unmaintained and maintainer doesn't respond.

Signed-off-by: Marek Vasut 
Cc: Simon Glass 
Cc: Anatolij Gustschin 
---
 board/pleb2/Makefile|   44 ---
 board/pleb2/flash.c |  814 ---
 board/pleb2/pleb2.c |   71 
 boards.cfg  |1 -
 doc/README.scrapyard|1 +
 include/configs/pleb2.h |  266 ---
 6 files changed, 1 insertions(+), 1196 deletions(-)
 delete mode 100644 board/pleb2/Makefile
 delete mode 100644 board/pleb2/flash.c
 delete mode 100644 board/pleb2/pleb2.c
 delete mode 100644 include/configs/pleb2.h

diff --git a/board/pleb2/Makefile b/board/pleb2/Makefile
deleted file mode 100644
index bc29610..000
--- a/board/pleb2/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-include $(TOPDIR)/config.mk
-
-LIB= $(obj)lib$(BOARD).o
-
-COBJS  := pleb2.o flash.o
-
-SRCS   := $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
-
-$(LIB):$(obj).depend $(OBJS)
-   $(call cmd_link_o_target, $(OBJS))
-
-#
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#
diff --git a/board/pleb2/flash.c b/board/pleb2/flash.c
deleted file mode 100644
index 2406c5f..000
--- a/board/pleb2/flash.c
+++ /dev/null
@@ -1,814 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include 
-#include 
-/* environment.h defines the various CONFIG_ENV_... values in terms
- * of whichever ones are given in the configuration file.
- */
-#include 
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips 
   */
-
-/* NOTE - CONFIG_FLASH_16BIT means the CPU interface is 16-bit, it
- *has nothing to do with the flash chip being 8-bit or 16-bit.
- */
-#ifdef CONFIG_FLASH_16BIT
-typedef unsigned short FLASH_PORT_WIDTH;
-typedef volatile unsigned short FLASH_PORT_WIDTHV;
-
-#defineFLASH_ID_MASK   0x
-#else
-typedef unsigned long FLASH_PORT_WIDTH;
-typedef volatile unsigned long FLASH_PORT_WIDTHV;
-
-#defineFLASH_ID_MASK   0x
-#endif
-
-#define FPWFLASH_PORT_WIDTH
-#define FPWV   FLASH_PORT_WIDTHV
-
-#define ORMASK(size) ((-size) & OR_AM_MSK)
-
-/*---
- * Functions
- */
-static ulong flash_get_size (FPWV * addr, flash_info_t * info);
-static void flash_reset (flash_info_t * info);
-static int write_word_intel (flash_info_t * info, FPWV * dest, FPW data);
-static int write_word_amd (flash_info_t * info, FPWV * dest, FPW data);
-static void flash_get_offsets (ulong base, flash_info_t * info);
-
-#ifdef CONFIG_SYS_FLASH_PROTECTION
-static void flash_sync_real_protect (flash_info_t * info);
-#endif
-
-/*---
- * flash_init()
- *
- * sets up flash_info and returns size of FLASH (bytes)
- */
-unsigned long flash_init (void)
-{
-   unsigned long size_b;
-   int i;
-
-   /* Init: no FLASHes known */
-   for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
-   flash_info[i].flash_id = FLASH_UNKNOWN;
-   }
-
- 

[U-Boot] [PATCH 1/4] PXA: Drop CERF250 board

2011-11-25 Thread Marek Vasut
The board is unmaintained and maintainer doesn't respond.

Signed-off-by: Marek Vasut 
Cc: Simon Glass 
Cc: Anatolij Gustschin 
---
 MAINTAINERS   |4 -
 board/cerf250/Makefile|   43 -
 board/cerf250/cerf250.c   |   85 -
 board/cerf250/flash.c |  429 -
 boards.cfg|1 -
 doc/README.scrapyard  |1 +
 include/configs/cerf250.h |  229 
 7 files changed, 1 insertions(+), 791 deletions(-)
 delete mode 100644 board/cerf250/Makefile
 delete mode 100644 board/cerf250/cerf250.c
 delete mode 100644 board/cerf250/flash.c
 delete mode 100644 include/configs/cerf250.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 37bbb34..3835154 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -711,10 +711,6 @@ Sergey Kubushyn 
SONATA  ARM926EJS
SCHMOOGIE   ARM926EJS
 
-Prakash Kumar 
-
-   cerf250 xscale/pxa
-
 Vipin Kumar 
 
spear300ARM926EJS (spear300 Soc)
diff --git a/board/cerf250/Makefile b/board/cerf250/Makefile
deleted file mode 100644
index cf4742e..000
--- a/board/cerf250/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-include $(TOPDIR)/config.mk
-
-LIB= $(obj)lib$(BOARD).o
-
-COBJS  := cerf250.o flash.o
-
-SRCS   := $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
-
-$(LIB):$(obj).depend $(OBJS)
-   $(call cmd_link_o_target, $(OBJS))
-
-#
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#
diff --git a/board/cerf250/cerf250.c b/board/cerf250/cerf250.c
deleted file mode 100644
index 043afea..000
--- a/board/cerf250/cerf250.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * (C) Copyright 2002
- * Kyle Harris, Nexus Technologies, Inc. khar...@nexus-tech.net
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH 
- * Marius Groeger 
- *
- * 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
- */
-
-#include 
-#include 
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/* - */
-
-
-/*
- * Miscelaneous platform dependent initialisations
- */
-
-int board_init (void)
-{
-   /* We have RAM, disable cache */
-   dcache_disable();
-   icache_disable();
-
-   /* arch number of cerf PXA Board */
-   gd->bd->bi_arch_number = MACH_TYPE_PXA_CERF;
-
-   /* adress of boot parameters */
-   gd->bd->bi_boot_params = 0xa100;
-
-   return 0;
-}
-
-int board_late_init(void)
-{
-   setenv("stdout", "serial");
-   setenv("stderr", "serial");
-   return 0;
-}
-
-extern void pxa_dram_init(void);
-int dram_init(void)
-{
-   pxa_dram_init();
-   gd->ram_size = PHYS_SDRAM_1_SIZE;
-   return 0;
-}
-
-void dram_init_banksize(void)
-{
-   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-   gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-}
-
-#ifdef CONFIG_CMD_NET
-int board_eth_init(bd_t *bis)
-{
-   int rc = 0;
-#ifdef CONFIG_SMC9
-   rc = smc9_initialize(0, CONFIG_SMC9_BASE);
-#endif
-   return rc;
-}
-#endif
diff --git a/board/cerf250/flash.c b/board/cerf250/flash.c
deleted file mode 100644
index e1e7807..000
--- a/board/ce

[U-Boot] [PATCH 2/4] PXA: Drop CRADLE board

2011-11-25 Thread Marek Vasut
The board is unmaintained and maintainer doesn't respond.

Signed-off-by: Marek Vasut 
Cc: Simon Glass 
Cc: Anatolij Gustschin 
---
 MAINTAINERS  |1 -
 board/cradle/Makefile|   43 --
 board/cradle/cradle.c|  236 --
 board/cradle/flash.c |  361 --
 boards.cfg   |1 -
 doc/README.scrapyard |1 +
 include/configs/cradle.h |  358 -
 7 files changed, 1 insertions(+), 1000 deletions(-)
 delete mode 100644 board/cradle/Makefile
 delete mode 100644 board/cradle/cradle.c
 delete mode 100644 board/cradle/flash.c
 delete mode 100644 include/configs/cradle.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 3835154..a77f23c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -900,7 +900,6 @@ Sughosh Ganu 
 Unknown / orphaned boards:
Board   CPU Last known maintainer / Comment
 .
-   cradle  xscale/pxa  Kyle Harris  / 
dead address
lubbock xscale/pxa  Kyle Harris  / 
dead address
 
imx31_phycore_eet i.MX31  Guennadi Liakhovetski  
/ resigned
diff --git a/board/cradle/Makefile b/board/cradle/Makefile
deleted file mode 100644
index bdc91d8..000
--- a/board/cradle/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-include $(TOPDIR)/config.mk
-
-LIB= $(obj)lib$(BOARD).o
-
-COBJS  := cradle.o flash.o
-
-SRCS   := $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
-
-$(LIB):$(obj).depend $(OBJS)
-   $(call cmd_link_o_target, $(OBJS))
-
-#
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#
diff --git a/board/cradle/cradle.c b/board/cradle/cradle.c
deleted file mode 100644
index 2bbf2d5..000
--- a/board/cradle/cradle.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * (C) Copyright 2002
- * Kyle Harris, Nexus Technologies, Inc. khar...@nexus-tech.net
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH 
- * Marius Groeger 
- *
- * 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
- */
-
-#include 
-#include 
-#include 
-#include 
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/* - */
-
-
-/* local prototypes */
-void set_led (int led, int color);
-void error_code_halt (int code);
-int init_sio (int led, unsigned long base);
-inline void cradle_outb (unsigned short val, unsigned long base,
-unsigned long reg);
-inline unsigned char cradle_inb (unsigned long base, unsigned long reg);
-inline void sleep (int i);
-
-inline void
-/**/
-sleep (int i)
-/**/
-{
-   while (i--) {
-   udelay (100);
-   }
-}
-
-void
-/**/
-error_code_halt (int code)
-/**/
-{
-   while (1) {
-   led_code (code, RED);
-   sleep (1);
-   led_code (0, OFF);
-   sleep (1);
-   }

Re: [U-Boot] [PATCH v3]ulpi: add generic ULPI functionality

2011-11-25 Thread Jana Rapava
2011/11/24 Igor Grinberg 

> > +/*
> > + * If enable is 0, pull-down resistor not connected to D+, else
> pull-down
> > + * resistor connected to D+.
> > + * Default behaviour is as for enable equal to 1.
> > + */
> > +void ulpi_dp_pulldown(u32 ulpi_viewport, int enable)
> > +{
> > + if (enable)
> > + ulpi_write(ulpi_viewport,
> > + (u32)&ulpi->otg_ctrl_set, ULPI_OTG_DP_PULLDOWN);
> > + else
> > + ulpi_write(ulpi_viewport,
> > + (u32)&ulpi->otg_ctrl_clear, ULPI_OTG_DP_PULLDOWN);
> > +}
> > +
> > +/*
> > + * If enable is 0, pull-down resistor not connected to D- else pull-down
> > + * resistor connected to D-.
> > + * Default behaviour is as for enable equal to 1.
> > + */
> > +void ulpi_dm_pulldown(u32 ulpi_viewport, int enable)
> > +{
> > + if (enable)
> > + ulpi_write(ulpi_viewport,
> > + (u32)&ulpi->otg_ctrl_set, ULPI_OTG_DM_PULLDOWN);
> > + else
> > + ulpi_write(ulpi_viewport,
> > + (u32)&ulpi->otg_ctrl_clear, ULPI_OTG_DM_PULLDOWN);
> > +}
>
>
> Correct me if I'm wrong, but I don't think there is a use for
> the above functions in separate and the user will have to
> call them both.
> So, can these two functions be united in one,
> say ulpi_pulldown(u32 ..., int enable)?
>
>
If I understand ULPI specification well, the overall effect is the same
when both bits are set to 1 as when they are set to 0.
And default setting is for both bits to be 1, so I don't think that have
one function for both bits make sense.

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


[U-Boot] [PATCH] Blackfin: br4: new board port

2011-11-25 Thread Dimitar Penev

Hi Guys,

The following patch adds BR4 Appliance support in u-boot.
It is quad channels ISDN BRI board based on Blackfin BF537 CPU

The patch is based on u-boot-2011R1-RC3 from the ADI u-boot git repository
It is pretty similar as the PR1 Appliance patch I have suggested recently.

My email client is folding the patch lines so I dare to post the link to the
patch instead.

Signed-off-by: Dimitar Penev 
Cc: Mike Frysinger  

www.switchfin.org/patches/uBoot-br4-v1.patch

Best Regards
Dimitar Penev 


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


Re: [U-Boot] [PATCH 05/11] MIPS: add sleep handler for slave CPUs in multi-processor systems

2011-11-25 Thread Andrew Dyer
On Fri, Nov 25, 2011 at 02:44, Marek Vasut  wrote:

> > This handler can be activated on multi-processor systems to boot only
> > the master CPU. All slave CPUs are halted by executing the WAIT
> > instruction. This is also useful to reduce the power consumption at
> > boot time.
> >
> > Signed-off-by: Daniel Schwierzeck 
> > ---
> >  arch/mips/cpu/mips32/start.S |   16 
> >  1 files changed, 16 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S
> > index 9c1b2f7..b6cb4be 100644
> > --- a/arch/mips/cpu/mips32/start.S
> > +++ b/arch/mips/cpu/mips32/start.S
> > @@ -224,6 +224,14 @@ reset:
> >
> >   setup_c0_status_reset
> >
> > + /* Set all slave CPUs in sleep mode */
> > +#ifdef CONFIG_SYS_MPS_SLAVE_CPU_SLEEP
>

shouldn't this be CONFIG_SYS_MIPS_SLAVE_CPU_SLEEP?  (s/MPS/MIPS/)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] M28: GPIO pin validity check added

2011-11-25 Thread Robert Deliën
Hi Wolfgang,

How nice of you to drop a message, I really appreciate it.

> Part of this problem might be the result from an attitude of "I don't
> have the time to learn doing thisngs right, but I always have time to
> repeat them wrongly again and again".

In the end, doing things right always pays, but that's not always obvious
at the beginning. I figured that I could just hand-craft these three
patches in three hours and be done with it. Just for that, switching from
SVN to GIT didn't seem worth the effort.
Now it turns out that whole the mxs gpio subsystem just doesn't work
(consider the irony of bickering about tabs and spaces), so I'll may send
my work to Marek and have him decide whether he will put it to use or
throw it away.

> For example, you still haven't figured out how to configure your
> mailer so it wraps lines after some 70 characters or so.

Exchange can do it, but copying/pasting to exchange damages it.
Exchange Webmail cannot do it, neither can Mac Mail: The option just
isn't there.
This message is hand-wrapped; our of respect.

> This is something that I really cannot understand.  If I find myself
> in such a situation, I would probably start tinking what can be done
> to avoid such pain when I do this the second time.  If it's any
> significant amount of time I would nover do it a third time, but
> rather think of alternatives.

The point is that every time I do it, I think it's the last time I need to, so
there's no point in finding a structural solution. In hindsight however...

> Yes, this might involve learning git, but each hour invested in that
> is _much_ better spent then performing repeated, mechanical work.

It's good to get used to GIT, it's just that timing is a bit inconvenient
right now. In two months from now, when our A-sample is brought
up and all subsystems are working, things will look differently.

> Did you read the available instructions for sending patches, or for
> configuring mailers not to mess with your code?

I've read the instructions on your page on creating and submitting
patches. I have adhered where I could, but unfortunately I couldn't
get GIT to talk to our corporate mail server. I still need to reconfigure
my own Exchange 2010 server to accept mail from GIT, but I lack
some knowledge there (and proud of it).

> Again, there are _tons_ of checklists on the web that explain how to
> configure your MUA - not to mention that there is wide choice of MUA
> for basicly all systems.

I have searched the web, but Mail really doesn't support it. Apple is
using format=flow and assumes everybody handles that properly. 

> Friction usually requires two sides…

That's very Zen-like. And between you and me; Yes, we've had our
history there, if you remember. But I have learned from that and tried
to do things differently, trying to be cooperative, modest and accepting
the Custodian's authorities. But still I didn't feel appreciated or even
welcome. I don't need gratitude, but I do deserve the same social
courtesy as people do in real life. That's what I try to do.
For example, if somebody - who you have never met before - is trying
to help you in real life, would you respond like this if the help turns out
to be a bit clumsy:

> AARGH! Please add the following lines to the commit message:
> 
> Cc: Marek Vasut 
> Cc: Stefano Babic 
> 
> 

Even without politenesses like 'sorries' and 'pleases', this looks a lot
friendlier and is educational at the same time:

Next time, include the lines below in the body of your message, and the
mailing list will take care of the rest:
Cc: Marek Vasut 
Cc: Stefano Babic 

No caps-lock nor multiple exclamation marks involved.
Or how about this:

> sorry if my messages have been a bit harsh with gpio freedback.  the 
> unwrapped 
> lines and broken patch formats make me see red.

I took it as an informal apology, lightened up with a joke. But if it's not,
please seek help! I can only hope you don't have a gun permit.

It's such a putty: U-Boot is a fantastic Open Source project. Before U-Boot,
it took me a year to develop a proprietary boot loader that didn't do much
more than booting and loading. Nowadays nearly every SoC imaginable
is supported by U-Boot, and U-Boot support has become a mandatory
criterion for SoC selection. Besides regular booting, it caters for very
complicated boot scenarios too. It became an essential tool for development
and board bring up too. Many attempts have been made to copy it, but there
is no equal by far, and all thanks to the people of the community. Unbelievable
what motivated like-minded people can achieve.

Thank you Wolfgang.

Cheers,

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


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

2011-11-25 Thread thomas.langer
Hello Daniel,

Daniel Schwierzeck wrote on 2011-11-25:
> On Fri, Nov 25, 2011 at 9:49 AM, Marek Vasut 
> wrote:
>>> On Thursday 24 November 2011 08:57:56 Daniel Schwierzeck wrote:
 Build dbau1550_el only in LIST_au1xx0_el and LIST_mips_el.
 Also remove obsolete lists for mips5kc.
>>> 
>>> if possible, i'd really like to kill off all the specialized mips
>>> lists and do selection purely based on fields in boards.cfg. -mike
>> 
>> I have to agree here.
>> M
>> 
> 
> that is currently not possible because -EB and -EL are not properly
> handled in CFLAGS and LDFLAGS.
> Until this is fixed we have to run MAKEALL twice with mips and mipsel
> and different toolchains.

I have seen that barebox[1] has got support for MIPS some releases ago.
They define the endianess in the config, so it is easier to handle in the
build process.
Also the handling of compiler and linker options is more optimized[2].

Maybe we should take advantage of it and port some of this over to u-boot?
I think the current handling of -EB and -EL is still from Wolfgangs first
port of a MIPS board.

Best Regards,
Thomas

PS: Sorry for sending multiple times, I have problem to suppress base64 
encoding.
   I hope it is okay now.

[1] http://www.barebox.org/
[2] 
http://git.pengutronix.de/?p=barebox.git;a=blob;f=arch/mips/Makefile;hb=HEAD 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] mx28: Saving env vars on MMC

2011-11-25 Thread Marek Vasut
> On Fri, Nov 25, 2011 at 12:30 PM, Marek Vasut  wrote:
> > I did the following change and tested u-boot on m28evk. I saved env,
> > restarted board etc.
> > 
> > 1) Env was successfully saved to MMC sector 2 (at offset 1024 bytes from
> > start). 2) Env was successfully loaded from MMC after reset
> > 
> > Basically ... give it a go, Fabio, maybe you just missed something :)
> 
> Thanks for trying it on your board, Marek.
> 
> I applied the same changes here and I still get a corrupted card after
> running "save".
> 
> Will keep investigating.
> 
> Thanks,
> 
> Fabio Estevam

Still writing to block 0 then?

Can you push your current preliminary MX28EVK stuff somewhere so I can check ?

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


Re: [U-Boot] How to resolve CRC issue in Uboot and maintain the env variables

2011-11-25 Thread Stefano Babic
On 25/11/2011 14:42, Zaheer Sheriff wrote:
> Stefan,
> 
> I thought the error is generic, I never know it is processor or board
> specific error.

You are wrong. It is not the same thing to store on NAND, on CFI flash,
on I2C Eprom, on .

> Here are the details:
> OMAPL138 EVM board u-boot version 2011.9 NOvember release.
  ^--- September

> modified env in da850 config file as :
> ---
> /*
> * Linux Information
> */
> #define LINUX_BOOT_PARAM_ADDR(PHYS_SDRAM_1 + 0x100)
> #define CONFIG_CMDLINE_TAG
> #define CONFIG_SETUP_MEMORY_TAGS
> #define CONFIG_BOOTARGS"mem=32M console=ttyS2,115200n8 noinitrd
> rw ip=10.1.5.115:10.1.5.69:10.1.5.1:255.255.255.0::eth0: root=/dev/nfs
> nfsroot=10.1.5.69:/home/targetNFS"
> #define CONFIG_BOOTCOMMAND"if mmc rescan 0:1; then fatload mmc 0:1
> 0xc070 uImage; bootm c070; fi;"
> #define CONFIG_BOOTDELAY3
> #define CONFIG_EXTRA_ENV_SETTINGS "ethaddr=00:08:ee:03:6a:c4\0"
> ---
> Will this extra env creates CRC error.

This is only the default environment when no environment is found. After
the first time the environment is set, it is not used again.

> 
> this is my env variable:
> 
> setenv bootcmd 'sf probe 0;sf read c0008000 4 34; go c0008000'

Well, the environment in da850_am18xxevm.h (I assume, you have not yet
said *exactly* which board you used as reference) starts at offset
0x4. And it seems you put some code at this offset, else why do you
want run it...

Are you sure you are not overwriting the SPI flash ?

Best regards,
Stefano Babic


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


Re: [U-Boot] mx28: Saving env vars on MMC

2011-11-25 Thread Fabio Estevam
On Fri, Nov 25, 2011 at 12:30 PM, Marek Vasut  wrote:

> I did the following change and tested u-boot on m28evk. I saved env, restarted
> board etc.
>
> 1) Env was successfully saved to MMC sector 2 (at offset 1024 bytes from 
> start).
> 2) Env was successfully loaded from MMC after reset
>
> Basically ... give it a go, Fabio, maybe you just missed something :)

Thanks for trying it on your board, Marek.

I applied the same changes here and I still get a corrupted card after
running "save".

Will keep investigating.

Thanks,

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


Re: [U-Boot] mx28: Saving env vars on MMC

2011-11-25 Thread Marek Vasut
> On Fri, Nov 25, 2011 at 6:13 AM, Marek Vasut  wrote:
> > You have to be careful on the imx28 about the following:
> > 
> > 1) sector 0 / first 512 bytes : That's where MBR is
> > 2) sector 2048 + ... : That's where U-Boot is located
> > 
> > But it's strange, there's about 1MB of space between MBR and U-Boot ...
> > can you actually check the first 2MB of the card and run binary diff on
> > the good and bad card ? That way you'll see what changed.
> 
> What I see is that when I do a 'save' the env variables are written to
> 0 and this causes the boot to fail.
> 
> Has the mxsmmc driver been tested?
> 
> Regards,
> 
> Fabio Estevam

I did the following change and tested u-boot on m28evk. I saved env, restarted 
board etc.

1) Env was successfully saved to MMC sector 2 (at offset 1024 bytes from start).
2) Env was successfully loaded from MMC after reset

Basically ... give it a go, Fabio, maybe you just missed something :)

PATCH:

diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index d4bd207..25edab8 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h  


@@ -147,7 +147,7 @@ 


 #defineNAND_MAX_CHIPS  8   





 /* Environment is in NAND */   


-#defineCONFIG_ENV_IS_IN_NAND   


+/*#define  CONFIG_ENV_IS_IN_NAND   


 #defineCONFIG_ENV_SIZE (16 * 1024) 


 #defineCONFIG_ENV_SIZE_REDUND  CONFIG_ENV_SIZE 


 #defineCONFIG_ENV_SECT_SIZE(128 * 1024)


@@ -155,6 +155,12 @@


 #defineCONFIG_ENV_OFFSET   0x30


 #defineCONFIG_ENV_OFFSET_REDUND\   


(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)  


+*/
+
+#defineCONFIG_ENV_IS_IN_MMC
+#defineCONFIG_SYS_MMC_ENV_DEV  0
+#defineCONFIG_ENV_SIZE (16 * 1024)
+#defineCONFIG_ENV_OFFSET   1024
 
 #defineCONFIG_CMD_UBI
 #defineCONFIG_CMD_UBIFS
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] How to resolve CRC issue in Uboot and maintain the env variables

2011-11-25 Thread Zaheer Sheriff

Stefan,

I thought the error is generic, I never know it is processor or board 
specific error.

Here are the details:
OMAPL138 EVM board 
u-boot version 2011.9 NOvember release.


modified env in da850 config file as :
---
/*
* Linux Information
*/
#define LINUX_BOOT_PARAM_ADDR   (PHYS_SDRAM_1 + 0x100)
#define CONFIG_CMDLINE_TAG
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_BOOTARGS		"mem=32M console=ttyS2,115200n8 noinitrd rw 
ip=10.1.5.115:10.1.5.69:10.1.5.1:255.255.255.0::eth0: root=/dev/nfs 
nfsroot=10.1.5.69:/home/targetNFS"
#define CONFIG_BOOTCOMMAND	"if mmc rescan 0:1; then fatload mmc 0:1 
0xc070 uImage; bootm c070; fi;"

#define CONFIG_BOOTDELAY3
#define CONFIG_EXTRA_ENV_SETTINGS "ethaddr=00:08:ee:03:6a:c4\0"
---
Will this extra env creates CRC error.

this is my env variable:

setenv bootcmd 'sf probe 0;sf read c0008000 4 34; go c0008000'

Image file size is: 335268 hex

how to resolve this.

Zaheer

On Friday, November 25, 2011 5:52:42 PM, Stefano Babic wrote:

On 25/11/2011 11:51, Zaheer Sheriff wrote:

Hi,
When I got the warning like

 Warning - bad CRC, using default environment*

I came across the reason for this in
_http://www.denx.de/wiki/view/DULG/WarningBadCRCUsingDefaultEnvironment_

Question:
I have ported U-Boot to a custom board. It seems to boot OK, but it
prints:

*** Warning - bad CRC, using default environment

Why?
Answer:
Most probably everything is OK. The message is printed because the
flash sector or ERPROM containing the environment variables has
never been initialized yet. The message will go away as soon as you
save the envrionment variables using the |*saveenv*| command.



How to resolve this. Yes every time I could not save the environment,


You have not said which processor you use, which kind of board, which
board you used as reference, if you are running the current U-boot
version...you told us nothing, how can we help ?

Best regards,
Stefano Babic





--
Zaheer Sheriff K
--

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.

www.easunreyrolle.com

This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this e-mail is strictly prohibited and may be unlawful.

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


Re: [U-Boot] mx28: Saving env vars on MMC

2011-11-25 Thread Marek Vasut
> On Fri, Nov 25, 2011 at 6:13 AM, Marek Vasut  wrote:
> > You have to be careful on the imx28 about the following:
> > 
> > 1) sector 0 / first 512 bytes : That's where MBR is
> > 2) sector 2048 + ... : That's where U-Boot is located
> > 
> > But it's strange, there's about 1MB of space between MBR and U-Boot ...
> > can you actually check the first 2MB of the card and run binary diff on
> > the good and bad card ? That way you'll see what changed.
> 
> What I see is that when I do a 'save' the env variables are written to
> 0 and this causes the boot to fail.
> 
> Has the mxsmmc driver been tested?

Definitelly, yes. Do you want to look into it or shall I do that ?

Now it might be worth trying to trace if there's a problem in the env_mmc (aka. 
who introduces the 0)

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


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

2011-11-25 Thread Marek Vasut
> On Fri, Nov 25, 2011 at 9:39 AM, Marek Vasut  wrote:
> >> board.c: In function 'board_init_r':
> >> board.c:280:8: warning: unused variable 's'
> >> 
> >> Signed-off-by: Daniel Schwierzeck 
> >> ---
> >>  arch/mips/lib/board.c |3 +--
> >>  1 files changed, 1 insertions(+), 2 deletions(-)
> >> 
> >> diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
> >> index 9585db7..aac7690 100644
> >> --- a/arch/mips/lib/board.c
> >> +++ b/arch/mips/lib/board.c
> >> @@ -266,7 +266,6 @@ void board_init_r(gd_t *id, ulong dest_addr)
> >>  #ifndef CONFIG_ENV_IS_NOWHERE
> >>   extern char *env_name_spec;
> >>  #endif
> >> - char *s;
> >>   bd_t *bd;
> >> 
> >>   gd = id;
> >> @@ -347,7 +346,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
> >>   /* Initialize from environment */
> >>   load_addr = getenv_ulong("loadaddr", 16, load_addr);
> >>  #if defined(CONFIG_CMD_NET)
> >> - s = getenv("bootfile");
> >> + const char *s = getenv("bootfile");
> >>   if (s)
> >>   copy_filename(BootFile, s, sizeof(BootFile));
> >>  #endif
> > 
> > Are you sure about this "const" thing? Also, try compiling the stuff with
> > gcc4.6, it'll reveal more errors.
> 
> yes, s is only used in the if and as parameter for copy_filename. The
> function signature
> also have const:
> 
> extern void   copy_filename (char *dst, const char *src, int size);
> 
> And gcc-4.6.2 compiles that part without warnings.

Ok, that's good then! :)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 05/11] MIPS: add sleep handler for slave CPUs in multi-processor systems

2011-11-25 Thread Marek Vasut
> On Fri, Nov 25, 2011 at 9:44 AM, Marek Vasut  wrote:
> >> This handler can be activated on multi-processor systems to boot only
> >> the master CPU. All slave CPUs are halted by executing the WAIT
> >> instruction. This is also useful to reduce the power consumption at
> >> boot time.
> >> 
> >> Signed-off-by: Daniel Schwierzeck 
> >> ---
> >>  arch/mips/cpu/mips32/start.S |   16 
> >>  1 files changed, 16 insertions(+), 0 deletions(-)
> >> 
> >> diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S
> >> index 9c1b2f7..b6cb4be 100644
> >> --- a/arch/mips/cpu/mips32/start.S
> >> +++ b/arch/mips/cpu/mips32/start.S
> >> @@ -224,6 +224,14 @@ reset:
> >> 
> >>   setup_c0_status_reset
> >> 
> >> + /* Set all slave CPUs in sleep mode */
> >> +#ifdef CONFIG_SYS_MPS_SLAVE_CPU_SLEEP
> >> + mfc0k0, CP0_EBASE
> >> + and k0, EBASEF_CPUNUM
> >> + bne k0, zero, slave_cpu_sleep
> >> +  nop
> >> +#endif
> >> +
> >>   /* Init Timer */
> >>   mtc0zero, CP0_COUNT
> >>   mtc0zero, CP0_COMPARE
> >> @@ -383,3 +391,11 @@ romReserved:
> >> 
> >>  romExcHandle:
> >>   b   romExcHandle
> >> +
> >> + /* Additional handlers */
> >> +#ifdef CONFIG_SYS_MPS_SLAVE_CPU_SLEEP
> >> +slave_cpu_sleep:
> >> + wait
> >> + b   slave_cpu_sleep
> >> +  nop
> >> +#endif
> > 
> > Can't you stall the CPU instead of letting it run in an empty loop? If
> > not:
> > 
> > Acked-by: Marek Vasut 
> 
> the CPU is stalled with the wait instruction. The loop is actually paranoia
> ;)
> 
> From MIPS32 24KE Processor Core Family Software User's Manual:
> 
> The WAIT instruction forces the core into low power mode. The pipeline
> is stalled and when all external requests are
> completed, the processor’s main clock is stopped. The processor will
> restart when reset (SI_Reset) is signaled, or a
> non-masked interrupt is taken (SI_NMI, SI_Int, or EJ_DINT). Note that
> the core does not use the code field in this
> instruction.

Oh yea, this kind of stuff I remember like I hacked on it yesterday :)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] mx28: Saving env vars on MMC

2011-11-25 Thread Fabio Estevam
On Fri, Nov 25, 2011 at 6:13 AM, Marek Vasut  wrote:

> You have to be careful on the imx28 about the following:
>
> 1) sector 0 / first 512 bytes : That's where MBR is
> 2) sector 2048 + ... : That's where U-Boot is located
>
> But it's strange, there's about 1MB of space between MBR and U-Boot ... can 
> you
> actually check the first 2MB of the card and run binary diff on the good and 
> bad
> card ? That way you'll see what changed.

What I see is that when I do a 'save' the env variables are written to
0 and this causes the boot to fail.

Has the mxsmmc driver been tested?

Regards,

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


Re: [U-Boot] [PATCH] M28: GPIO pin validity check added

2011-11-25 Thread Wolfgang Denk
Dear Robert,

In message  you wrote:
> > sorry if my messages have been a bit harsh with gpio freedback.  the 
> > unwrapped 
> > lines and broken patch formats make me see red.
> 
> I understand; There are rules to adhere to.
> But please also understand what I'm working with here. Making a single patch 
> takes me - I kid you not - one hour. And still it comes out borked.

Part of this problem might be the result from an attitude of "I don't
have the time to learn doing thisngs right, but I always have time to
repeat them wrongly again and again".

For example, you still haven't figured out how to configure your
mailer so it wraps lines after some 70 characters or so.

...
> At the office we're using Perforce. Not a bad system, but it doesn't deal 
> with patches very well and it's inaccessible from my home office. So I'm 
> using Subversion on my NAS as an intermediate archive to work from, 
> committing my changes to P4 every now 
> and then. You guys are using Git; I'm sure it's superior but I don't have 
> time now to figure that one beyond the basics. Every time I need to make or 
> re-make a patch, I have to clone a clean Git repository, revert my SVN 
> workspace back to the work I'm m
> aking a patch off, merge that into the clean Git repository and create a new 
> patch.

This is something that I really cannot understand.  If I find myself
in such a situation, I would probably start tinking what can be done
to avoid such pain when I do this the second time.  If it's any
significant amount of time I would nover do it a third time, but
rather think of alternatives.

For example, why can't you keep a permanent git tree on your system,
and import your SVN stuff into a branch in that repository.

Yes, this might involve learning git, but each hour invested in that
is _much_ better spent then performing repeated, mechanical work.

> And I still have to mail the patch. No attachments allowed, I understand, but 
> copying and pasting between a Linux VM and Windows host trashes the leading 
> space, so I either have to go through the patch and put it back myself. Or I 
> can use Exchange web-b
> ased mail, that sometimes decides to send HTML mail anyway.

Did you read the available instructions for sending patches, or for
configuring mailers not to mess with your code?

> In my home office I'm using a 12-core MacPro as a workstation. Again Linux is 
> under a VM, because I need a Windows VM too, to have crippled access to the 
> office network. To post patches from my home office, I'm using Mac Mail 
> through my own windows serv
> er, but Mail somehow doesn't offer the feature to wrap lines at column 72. 
> Instead it uses the format designator to indicate flow-format, understood by 
> any modern email program, but not anticipating people on the other side 
> receiving email in Vim, or ap
> plying patches directly from their mailbox.

Again, there are _tons_ of checklists on the web that explain how to
configure your MUA - not to mention that there is wide choice of MUA
for basicly all systems.

> So even though I had finally convinced management that it's in their best 
> interest to get our work back into the mainline, I decided to bail out 
> because it's just too much work. Even though not ideal, I think we're better 
> off maintaining our 100 lines w
> orth of work. And even if all technical difficulties could be fixed - I'll 
> express myself mildly, but I cannot leave this unsaid - the social standards 
> here are not really my thing.

Friction usually requires two sides...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You see things; and you say ``Why?'' But I dream  things  that  never
were; and I say ``Why not?''
   - George Bernard Shaw _Back to Methuselah_ (1921) pt. 1, act 1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] board/esd/cpci405/cpci405.c: Fix GCC 4.6 warning

2011-11-25 Thread Matthias Fuchs
On 11/24/2011 06:40 PM, Mike Frysinger wrote:
> On Thursday 24 November 2011 10:39:21 Matthias Fuchs wrote:
>> -sprintf(str, "%08X%04X",
>> -*(unsigned int *)&ow_id[0],
>> -*(unsigned short *)&ow_id[4]);
>> +sprintf(str, "%02X%02X%02X%02X%02X%02X",
>> +ow_id[0], ow_id[1], ow_id[2], ow_id[3], ow_id[4], ow_id[5]);
> 
> use __get_unaligned_le32 and __get_unaligned_le16 helpers to avoid having to 
> decode each byte.
I must admit that I like the new style much more. But thanks for the hint on the
__get-unaligned macros :-)

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


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

2011-11-25 Thread Christian Riesch
On Fri, Nov 25, 2011 at 1:37 PM, Christian Riesch
 wrote:
> diff --git a/board/davinci/da8xxevm/config.mk 
> b/board/davinci/da8xxevm/config.mk
> new file mode 100644
> index 000..05cf77f
> --- /dev/null
> +++ b/board/davinci/da8xxevm/config.mk
> @@ -0,0 +1,5 @@
> +# required for SPI flash SPL
> +#
> +
> +PAD_TO := 32768
> +

Uh, this file is not required anymore of course. Missed that.
Christian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-25 Thread Daniel Schwierzeck
On Fri, Nov 25, 2011 at 9:39 AM, Marek Vasut  wrote:
>> board.c: In function 'board_init_r':
>> board.c:280:8: warning: unused variable 's'
>>
>> Signed-off-by: Daniel Schwierzeck 
>> ---
>>  arch/mips/lib/board.c |    3 +--
>>  1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
>> index 9585db7..aac7690 100644
>> --- a/arch/mips/lib/board.c
>> +++ b/arch/mips/lib/board.c
>> @@ -266,7 +266,6 @@ void board_init_r(gd_t *id, ulong dest_addr)
>>  #ifndef CONFIG_ENV_IS_NOWHERE
>>       extern char *env_name_spec;
>>  #endif
>> -     char *s;
>>       bd_t *bd;
>>
>>       gd = id;
>> @@ -347,7 +346,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
>>       /* Initialize from environment */
>>       load_addr = getenv_ulong("loadaddr", 16, load_addr);
>>  #if defined(CONFIG_CMD_NET)
>> -     s = getenv("bootfile");
>> +     const char *s = getenv("bootfile");
>>       if (s)
>>               copy_filename(BootFile, s, sizeof(BootFile));
>>  #endif
>
> Are you sure about this "const" thing? Also, try compiling the stuff with
> gcc4.6, it'll reveal more errors.
>

yes, s is only used in the if and as parameter for copy_filename. The
function signature
also have const:

extern void copy_filename (char *dst, const char *src, int size);

And gcc-4.6.2 compiles that part without warnings.

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


[U-Boot] [PATCH v3 08/15] arm, davinci: Fix clear bss loop for zero length bss

2011-11-25 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 
Cc: Albert Aribaud 
Cc: Heiko Schocher 
---
 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] [PATCH v3 04/15] arm, da850: Add pinmux configurations to the arch tree

2011-11-25 Thread Christian Riesch
Up to now nearly every davinci board has separate code for the
definition of pinmux configurations. This patch adds pinmux
configurations for the DA850 SoCs to the arch tree which may later
be used for all DA850 based boards.

Signed-off-by: Christian Riesch 
Cc: Sandeep Paulraj 
Cc: Heiko Schocher 
Cc: Mike Frysinger 
---
 arch/arm/cpu/arm926ejs/davinci/Makefile |1 +
 arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c   |  166 +++
 arch/arm/include/asm/arch-davinci/pinmux_defs.h |   50 +++
 3 files changed, 217 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c
 create mode 100644 arch/arm/include/asm/arch-davinci/pinmux_defs.h

diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile 
b/arch/arm/cpu/arm926ejs/davinci/Makefile
index 2105ec5..4ac187a 100644
--- a/arch/arm/cpu/arm926ejs/davinci/Makefile
+++ b/arch/arm/cpu/arm926ejs/davinci/Makefile
@@ -33,6 +33,7 @@ COBJS-$(CONFIG_SOC_DM355) += dm355.o
 COBJS-$(CONFIG_SOC_DM365)  += dm365.o
 COBJS-$(CONFIG_SOC_DM644X) += dm644x.o
 COBJS-$(CONFIG_SOC_DM646X) += dm646x.o
+COBJS-$(CONFIG_SOC_DA850)  += da850_pinmux.o
 COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o
 
 ifdef CONFIG_SPL_BUILD
diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c 
b/arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c
new file mode 100644
index 000..a3472ea
--- /dev/null
+++ b/arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c
@@ -0,0 +1,166 @@
+/*
+ * Pinmux configurations for the DA850 SoCs
+ *
+ * Copyright (C) 2011 OMICRON electronics GmbH
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+/* SPI pin muxer settings */
+const struct pinmux_config spi1_pins_base[] = {
+   { pinmux(5), 1, 2 }, /* SPI1_CLK */
+   { pinmux(5), 1, 4 }, /* SPI1_SOMI */
+   { pinmux(5), 1, 5 }, /* SPI1_SIMO */
+};
+
+const struct pinmux_config spi1_pins_scs0[] = {
+   { pinmux(5), 1, 1 }, /* SPI1_SCS[0] */
+};
+
+/* UART pin muxer settings */
+const struct pinmux_config uart2_pins_txrx[] = {
+   { pinmux(4), 2, 4 }, /* UART2_RXD */
+   { pinmux(4), 2, 5 }, /* UART2_TXD */
+};
+
+const struct pinmux_config uart2_pins_rtscts[] = {
+   { pinmux(0), 4, 6 }, /* UART2_RTS */
+   { pinmux(0), 4, 7 }, /* UART2_CTS */
+};
+
+/* EMAC pin muxer settings*/
+const struct pinmux_config emac_pins_rmii[] = {
+   { pinmux(14), 8, 2 }, /* RMII_TXD[1] */
+   { pinmux(14), 8, 3 }, /* RMII_TXD[0] */
+   { pinmux(14), 8, 4 }, /* RMII_TXEN */
+   { pinmux(14), 8, 5 }, /* RMII_RXD[1] */
+   { pinmux(14), 8, 6 }, /* RMII_RXD[0] */
+   { pinmux(14), 8, 7 }, /* RMII_RXER */
+   { pinmux(15), 8, 1 }, /* RMII_CRS_DV */
+};
+
+const struct pinmux_config emac_pins_mii[] = {
+   { pinmux(2), 8, 1 }, /* MII_TXEN */
+   { pinmux(2), 8, 2 }, /* MII_TXCLK */
+   { pinmux(2), 8, 3 }, /* MII_COL */
+   { pinmux(2), 8, 4 }, /* MII_TXD[3] */
+   { pinmux(2), 8, 5 }, /* MII_TXD[2] */
+   { pinmux(2), 8, 6 }, /* MII_TXD[1] */
+   { pinmux(2), 8, 7 }, /* MII_TXD[0] */
+   { pinmux(3), 8, 0 }, /* MII_RXCLK */
+   { pinmux(3), 8, 1 }, /* MII_RXDV */
+   { pinmux(3), 8, 2 }, /* MII_RXER */
+   { pinmux(3), 8, 3 }, /* MII_CRS */
+   { pinmux(3), 8, 4 }, /* MII_RXD[3] */
+   { pinmux(3), 8, 5 }, /* MII_RXD[2] */
+   { pinmux(3), 8, 6 }, /* MII_RXD[1] */
+   { pinmux(3), 8, 7 }, /* MII_RXD[0] */
+};
+
+const struct pinmux_config emac_pins_mdio[] = {
+   { pinmux(4), 8, 0 }, /* MDIO_CLK */
+   { pinmux(4), 8, 1 }, /* MDIO_D */
+};
+
+/* I2C pin muxer settings */
+const struct pinmux_config i2c0_pins[] = {
+   { pinmux(4), 2, 2 }, /* I2C0_SCL */
+   { pinmux(4), 2, 3 }, /* I2C0_SDA */
+};
+
+const struct pinmux_config i2c1_pins[] = {
+   { pinmux(4), 4, 4 }, /* I2C1_SCL */
+   { pinmux(4), 4, 5 }, /* I2C1_SDA */
+};
+
+/* EMIFA pin muxer settings */
+const struct pinmux_config emifa_pins_cs2[] = {
+   { pinmux(7), 1, 0 }, /* EMA_CS2 */
+};
+
+const struct pinmux_config emifa_pins_cs3[] = {
+   { pinmux(7), 1, 1 }, /* EMA_CS[3] */
+};
+
+const struct pinmux_config emifa_pins_cs4[] = {
+   { pinmux(7), 1, 2 }, /* EMA_CS[4] */
+};
+
+const struct pinmux_config emifa_pins_nand[] = {
+  

[U-Boot] [PATCH v3 14/15] mkimage: Fix variable length header support

2011-11-25 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 
Cc: Stefano Babic 
Cc: Heiko Schocher 
---
 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 (sep) {
+

[U-Boot] [PATCH v3 13/15] arm, da850evm: Add an SPL for SPI boot

2011-11-25 Thread Christian Riesch
Signed-off-by: Christian Riesch 
Cc: Heiko Schocher 
Cc: Sandeep Paulraj 
Cc: Sudhakar Rajashekhara 
---
 board/davinci/da8xxevm/da850evm.c |4 +-
 board/davinci/da8xxevm/u-boot-spl.lds |   73 +
 include/configs/da850evm.h|   53 
 3 files changed, 129 insertions(+), 1 deletions(-)
 create mode 100644 board/davinci/da8xxevm/u-boot-spl.lds

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index e827256..8e66c35 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -108,7 +108,7 @@ static const struct pinmux_config gpio_pins[] = {
 #endif
 };
 
-static const struct pinmux_resource pinmuxes[] = {
+const struct pinmux_resource pinmuxes[] = {
 #ifdef CONFIG_DRIVER_TI_EMAC
PINMUX_ITEM(emac_pins_mdio),
 #ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
@@ -135,6 +135,8 @@ static const struct pinmux_resource pinmuxes[] = {
PINMUX_ITEM(gpio_pins),
 };
 
+const int pinmuxes_size = ARRAY_SIZE(pinmuxes);
+
 static const struct lpsc_resource lpsc[] = {
{ DAVINCI_LPSC_AEMIF }, /* NAND, NOR */
{ DAVINCI_LPSC_SPI1 },  /* Serial Flash */
diff --git a/board/davinci/da8xxevm/u-boot-spl.lds 
b/board/davinci/da8xxevm/u-boot-spl.lds
new file mode 100644
index 000..6f6e065
--- /dev/null
+++ b/board/davinci/da8xxevm/u-boot-spl.lds
@@ -0,0 +1,73 @@
+/*
+ * (C) Copyright 2002
+ * Gary Jennejohn, DENX Software Engineering, 
+ *
+ * (C) Copyright 2008
+ * Guennadi Liakhovetki, DENX Software Engineering, 
+ *
+ * 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 2e2aa19..23eed0f 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -65,6 +65,41 @@
 #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_SDRCR

[U-Boot] [PATCH v3 06/15] arm, hawkboard: Use the pinmux configurations defined in the arch tree

2011-11-25 Thread Christian Riesch
The boards in board/davinci/da8xxevm/ define pinmux_config[] vectors
that contain pinmux configurations for emac, uarts, memory controllers...
In an earlier patch such pinmux configurations were added to the arch
tree. This patch makes the hawkboard use these definitions instead of
defining its own.

Signed-off-by: Christian Riesch 
Cc: Sandeep Paulraj 
Cc: Heiko Schocher 
Cc: Syed Mohammed Khasim 
Cc: Sughosh Ganu 
Cc: Mike Frysinger 
---
 board/davinci/da8xxevm/hawkboard_nand_spl.c |   51 --
 include/configs/hawkboard.h |1 +
 nand_spl/board/davinci/da8xxevm/Makefile|5 +++
 3 files changed, 14 insertions(+), 43 deletions(-)

diff --git a/board/davinci/da8xxevm/hawkboard_nand_spl.c 
b/board/davinci/da8xxevm/hawkboard_nand_spl.c
index fd130fa..df97963 100644
--- a/board/davinci/da8xxevm/hawkboard_nand_spl.c
+++ b/board/davinci/da8xxevm/hawkboard_nand_spl.c
@@ -27,55 +27,20 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static const struct pinmux_config mii_pins[] = {
-   { pinmux(2), 8, 1 },
-   { pinmux(2), 8, 2 },
-   { pinmux(2), 8, 3 },
-   { pinmux(2), 8, 4 },
-   { pinmux(2), 8, 5 },
-   { pinmux(2), 8, 6 },
-   { pinmux(2), 8, 7 }
-};
-
-static const struct pinmux_config mdio_pins[] = {
-   { pinmux(4), 8, 0 },
-   { pinmux(4), 8, 1 }
-};
-
-static const struct pinmux_config nand_pins[] = {
-   { pinmux(7), 1, 1 },
-   { pinmux(7), 1, 2 },
-   { pinmux(7), 1, 4 },
-   { pinmux(7), 1, 5 },
-   { pinmux(9), 1, 0 },
-   { pinmux(9), 1, 1 },
-   { pinmux(9), 1, 2 },
-   { pinmux(9), 1, 3 },
-   { pinmux(9), 1, 4 },
-   { pinmux(9), 1, 5 },
-   { pinmux(9), 1, 6 },
-   { pinmux(9), 1, 7 },
-   { pinmux(12), 1, 5 },
-   { pinmux(12), 1, 6 }
-};
-
-static const struct pinmux_config uart2_pins[] = {
-   { pinmux(0), 4, 6 },
-   { pinmux(0), 4, 7 },
-   { pinmux(4), 2, 4 },
-   { pinmux(4), 2, 5 }
-};
-
 static const struct pinmux_resource pinmuxes[] = {
-   PINMUX_ITEM(mii_pins),
-   PINMUX_ITEM(mdio_pins),
-   PINMUX_ITEM(nand_pins),
-   PINMUX_ITEM(uart2_pins),
+   PINMUX_ITEM(emac_pins_mii),
+   PINMUX_ITEM(emac_pins_mdio),
+   PINMUX_ITEM(emifa_pins_cs3),
+   PINMUX_ITEM(emifa_pins_cs4),
+   PINMUX_ITEM(emifa_pins_nand),
+   PINMUX_ITEM(uart2_pins_txrx),
+   PINMUX_ITEM(uart2_pins_rtscts),
 };
 
 static const struct lpsc_resource lpsc[] = {
diff --git a/include/configs/hawkboard.h b/include/configs/hawkboard.h
index 638643a..12acb27 100644
--- a/include/configs/hawkboard.h
+++ b/include/configs/hawkboard.h
@@ -34,6 +34,7 @@
 #define CONFIG_MACH_DAVINCI_HAWK
 #define CONFIG_ARM926EJS   /* arm926ejs CPU core */
 #define CONFIG_SOC_DA8XX   /* TI DA8xx SoC */
+#define CONFIG_SOC_DA850   /* TI DA850 SoC */
 #define CONFIG_SYS_CLK_FREQclk_get(DAVINCI_ARM_CLKID)
 #define CONFIG_SYS_OSCIN_FREQ  2400
 #define CONFIG_SYS_TIMERBASE   DAVINCI_TIMER0_BASE
diff --git a/nand_spl/board/davinci/da8xxevm/Makefile 
b/nand_spl/board/davinci/da8xxevm/Makefile
index 7b06cd2..616e6f1 100644
--- a/nand_spl/board/davinci/da8xxevm/Makefile
+++ b/nand_spl/board/davinci/da8xxevm/Makefile
@@ -43,6 +43,7 @@ SOBJS = _divsi3.o \
 COBJS  = cpu.o \
davinci_nand.o \
pinmux.o \
+   da850_pinmux.o \
div0.o \
hawkboard_nand_spl.o \
memsize.o \
@@ -82,6 +83,10 @@ $(obj)pinmux.c:
@rm -f $@
@ln -s $(TOPDIR)/arch/arm/cpu/arm926ejs/davinci/pinmux.c $@
 
+$(obj)da850_pinmux.c:
+   @rm -f $@
+   @ln -s $(TOPDIR)/arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c $@
+
 # from drivers/mtd/nand directory
 $(obj)davinci_nand.c:
@rm -f $@
-- 
1.7.0.4

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


[U-Boot] [PATCH v3 10/15] spl: display_options.o is required for SPI flash support in SPL

2011-11-25 Thread Christian Riesch
Signed-off-by: Christian Riesch 
Cc: Heiko Schocher 
Cc: Mike Frysinger 
---
 lib/Makefile |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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

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


[U-Boot] [PATCH v3 12/15] arm, davinci: Add SPL support for DA850 SoCs

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

Signed-off-by: Christian Riesch 
Cc: Heiko Schocher 
Cc: Sandeep Paulraj 
---
 arch/arm/cpu/arm926ejs/davinci/Makefile |3 +-
 arch/arm/cpu/arm926ejs/davinci/spl.c|   34 ++-
 2 files changed, 35 insertions(+), 2 deletions(-)

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

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


[U-Boot] [PATCH v3 01/15] arm, davinci: Move pinmux functions from board to arch tree

2011-11-25 Thread Christian Riesch
Signed-off-by: Christian Riesch 
Cc: Sandeep Paulraj 
Cc: Heiko Schocher 
Cc: Sudhakar Rajashekhara 
Cc: Syed Mohammed Khasim 
Cc: Sughosh Ganu 
Cc: Nick Thompson 
Cc: Stefano Babic 
---
 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 3e9a3b6..06819a6 100644
--- a/arch/arm/include/asm/arch-davinci/hardware.h
+++ b/arch/arm/include/asm/arch-davinci/hardware.h
@@ -480,6 +480,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 32b17ce..0fdccac 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 $(TOPD

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

2011-11-25 Thread Christian Riesch
Signed-off-by: Christian Riesch 
Cc: Stefano Babic 
Cc: Heiko Schocher 
Cc: Mike Frysinger 
---
 .gitignore   |1 +
 Makefile |   13 +
 board/davinci/da8xxevm/config.mk |5 +
 3 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100644 board/davinci/da8xxevm/config.mk

diff --git a/.gitignore b/.gitignore
index ff4bae0..e4e95e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@
 /u-boot.dis
 /u-boot.lds
 /u-boot.ubl
+/u-boot.ais
 /u-boot.dtb
 /u-boot.sb
 
diff --git a/Makefile b/Makefile
index d84b350..484a05c 100644
--- a/Makefile
+++ b/Makefile
@@ -417,6 +417,18 @@ $(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin 
$(obj)u-boot.bin
rm $(obj)u-boot-ubl.bin
rm $(obj)spl/u-boot-spl-pad.bin
 
+$(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
+   $(obj)tools/mkimage -s -n /dev/null -T aisimage \
+   -e $(CONFIG_SPL_TEXT_BASE) -d $(obj)spl/u-boot-spl.bin \
+   $(obj)spl/u-boot-spl.ais
+   $(OBJCOPY) ${OBJCFLAGS} -I binary \
+   --pad-to=$(CONFIG_SPL_MAX_SIZE) -O binary \
+   $(obj)spl/u-boot-spl.ais $(obj)spl/u-boot-spl-pad.ais
+   cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin > \
+   $(obj)u-boot.ais
+   rm $(obj)spl/u-boot-spl.ais
+   rm $(obj)spl/u-boot-spl-pad.ais
+
 $(obj)u-boot.sb:   $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
-o $(obj)u-boot.sb
@@ -788,6 +800,7 @@ clobber:clean
@rm -f $(obj)u-boot.kwb
@rm -f $(obj)u-boot.imx
@rm -f $(obj)u-boot.ubl
+   @rm -f $(obj)u-boot.ais
@rm -f $(obj)u-boot.dtb
@rm -f $(obj)u-boot.sb
@rm -f $(obj)tools/inca-swap-bytes
diff --git a/board/davinci/da8xxevm/config.mk b/board/davinci/da8xxevm/config.mk
new file mode 100644
index 000..05cf77f
--- /dev/null
+++ b/board/davinci/da8xxevm/config.mk
@@ -0,0 +1,5 @@
+# required for SPI flash SPL
+#
+
+PAD_TO := 32768
+
-- 
1.7.0.4

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


[U-Boot] [PATCH v3 11/15] sf: Add spi_boot() to allow booting from SPI flash in an SPL

2011-11-25 Thread Christian Riesch
Signed-off-by: Christian Riesch 
Cc: Heiko Schocher 
Cc: Mike Frysinger 
Cc: Scott Wood 
---
 doc/README.SPL |1 +
 drivers/mtd/spi/Makefile   |6 
 drivers/mtd/spi/spi_spl_load.c |   58 
 include/spi_flash.h|3 ++
 4 files changed, 68 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/spi/spi_spl_load.c

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

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


[U-Boot] [PATCH v3 07/15] arm, davinci: Remove duplication of pinmux configuration code

2011-11-25 Thread Christian Riesch
This patch replaces the pinmux configuration code in
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c by the code from
arch/arm/cpu/arm926ejs/davinci/pinmux.c.

Signed-off-by: Christian Riesch 
Cc: Sandeep Paulraj 
Cc: Heiko Schocher 
---
 arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c |   36 +-
 1 files changed, 8 insertions(+), 28 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c 
b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
index c7ec70f..a532f8a 100644
--- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
+++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -235,19 +236,16 @@ int da850_ddr_setup(void)
return 0;
 }
 
-void da850_pinmux_ctl(unsigned long offset, unsigned long mask,
-   unsigned long value)
-{
-   clrbits_le32(&davinci_syscfg_regs->pinmux[offset], mask);
-   setbits_le32(&davinci_syscfg_regs->pinmux[offset], (mask & value));
-}
-
 __attribute__((weak))
 void board_gpio_init(void)
 {
return;
 }
 
+/* pinmux_resource[] vector is defined in the board specific file */
+extern const struct pinmux_resource pinmuxes[];
+extern const int pinmuxes_size;
+
 int arch_cpu_init(void)
 {
/* Unlock kick registers */
@@ -257,27 +255,9 @@ 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);
+   /* configure pinmux settings */
+   if (davinci_configure_pin_mux_items(pinmuxes, pinmuxes_size))
+   return 1;
 
/* 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] [PATCH v3 09/15] arm: printf() is not available in some SPL configurations

2011-11-25 Thread Christian Riesch
This patch avoids build breakage for SPLs that do not support printf.

Signed-off-by: Christian Riesch 
Cc: Wolfgang Denk 
Cc: Tom Rini 
Cc: Andreas Bie�mann 
Cc: Scott Wood 
---
 arch/arm/lib/eabi_compat.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
index eb3e26d..e1b87be 100644
--- a/arch/arm/lib/eabi_compat.c
+++ b/arch/arm/lib/eabi_compat.c
@@ -13,7 +13,9 @@
 
 int raise (int signum)
 {
+#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
printf("raise: Signal # %d caught\n", signum);
+#endif
return 0;
 }
 
-- 
1.7.0.4

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


[U-Boot] [PATCH v3 05/15] arm, da850evm: Use the pinmux configurations defined in the arch tree

2011-11-25 Thread Christian Riesch
The boards in board/davinci/da8xxevm/ define pinmux_config[] vectors
that contain pinmux configurations for emac, uarts, memory controllers...
In an earlier patch such pinmux configurations were added to the arch
tree. This patch makes the da850evm use these definitions instead of
defining its own.

Signed-off-by: Christian Riesch 
Cc: Sandeep Paulraj 
Cc: Heiko Schocher 
Cc: Sudhakar Rajashekhara 
Cc: Mike Frysinger 
---
 board/davinci/da8xxevm/da850evm.c |  153 ++---
 include/configs/da850_am18xxevm.h |1 +
 include/configs/da850evm.h|1 +
 3 files changed, 27 insertions(+), 128 deletions(-)

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index 9b68c5c..e827256 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -28,135 +28,14 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* SPI0 pin muxer settings */
-static const struct pinmux_config spi1_pins[] = {
-   { pinmux(5), 1, 1 },
-   { pinmux(5), 1, 2 },
-   { pinmux(5), 1, 4 },
-   { pinmux(5), 1, 5 }
-};
-
-/* UART pin muxer settings */
-static const struct pinmux_config uart_pins[] = {
-   { pinmux(0), 4, 6 },
-   { pinmux(0), 4, 7 },
-   { pinmux(4), 2, 4 },
-   { pinmux(4), 2, 5 }
-};
-
 #ifdef CONFIG_DRIVER_TI_EMAC
-static const struct pinmux_config emac_pins[] = {
-#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
-   { pinmux(14), 8, 2 },
-   { pinmux(14), 8, 3 },
-   { pinmux(14), 8, 4 },
-   { pinmux(14), 8, 5 },
-   { pinmux(14), 8, 6 },
-   { pinmux(14), 8, 7 },
-   { pinmux(15), 8, 1 },
-#else /* ! CONFIG_DRIVER_TI_EMAC_USE_RMII */
-   { pinmux(2), 8, 1 },
-   { pinmux(2), 8, 2 },
-   { pinmux(2), 8, 3 },
-   { pinmux(2), 8, 4 },
-   { pinmux(2), 8, 5 },
-   { pinmux(2), 8, 6 },
-   { pinmux(2), 8, 7 },
-   { pinmux(3), 8, 0 },
-   { pinmux(3), 8, 1 },
-   { pinmux(3), 8, 2 },
-   { pinmux(3), 8, 3 },
-   { pinmux(3), 8, 4 },
-   { pinmux(3), 8, 5 },
-   { pinmux(3), 8, 6 },
-   { pinmux(3), 8, 7 },
-#endif /* CONFIG_DRIVER_TI_EMAC_USE_RMII */
-   { pinmux(4), 8, 0 },
-   { pinmux(4), 8, 1 }
-};
-
-/* I2C pin muxer settings */
-static const struct pinmux_config i2c_pins[] = {
-   { pinmux(4), 2, 2 },
-   { pinmux(4), 2, 3 }
-};
-
-#ifdef CONFIG_NAND_DAVINCI
-const struct pinmux_config nand_pins[] = {
-   { pinmux(7), 1, 1 },
-   { pinmux(7), 1, 2 },
-   { pinmux(7), 1, 4 },
-   { pinmux(7), 1, 5 },
-   { pinmux(9), 1, 0 },
-   { pinmux(9), 1, 1 },
-   { pinmux(9), 1, 2 },
-   { pinmux(9), 1, 3 },
-   { pinmux(9), 1, 4 },
-   { pinmux(9), 1, 5 },
-   { pinmux(9), 1, 6 },
-   { pinmux(9), 1, 7 },
-   { pinmux(12), 1, 5 },
-   { pinmux(12), 1, 6 }
-};
-#elif defined(CONFIG_USE_NOR)
-/* NOR pin muxer settings */
-const struct pinmux_config nor_pins[] = {
-   /* GP0[11] is required for NOR to work on Rev 3 EVMs */
-   { pinmux(0), 8, 4 },/* GP0[11] */
-   { pinmux(5), 1, 6 },
-   { pinmux(6), 1, 6 },
-   { pinmux(7), 1, 0 },
-   { pinmux(7), 1, 4 },
-   { pinmux(7), 1, 5 },
-   { pinmux(8), 1, 0 },
-   { pinmux(8), 1, 1 },
-   { pinmux(8), 1, 2 },
-   { pinmux(8), 1, 3 },
-   { pinmux(8), 1, 4 },
-   { pinmux(8), 1, 5 },
-   { pinmux(8), 1, 6 },
-   { pinmux(8), 1, 7 },
-   { pinmux(9), 1, 0 },
-   { pinmux(9), 1, 1 },
-   { pinmux(9), 1, 2 },
-   { pinmux(9), 1, 3 },
-   { pinmux(9), 1, 4 },
-   { pinmux(9), 1, 5 },
-   { pinmux(9), 1, 6 },
-   { pinmux(9), 1, 7 },
-   { pinmux(10), 1, 0 },
-   { pinmux(10), 1, 1 },
-   { pinmux(10), 1, 2 },
-   { pinmux(10), 1, 3 },
-   { pinmux(10), 1, 4 },
-   { pinmux(10), 1, 5 },
-   { pinmux(10), 1, 6 },
-   { pinmux(10), 1, 7 },
-   { pinmux(11), 1, 0 },
-   { pinmux(11), 1, 1 },
-   { pinmux(11), 1, 2 },
-   { pinmux(11), 1, 3 },
-   { pinmux(11), 1, 4 },
-   { pinmux(11), 1, 5 },
-   { pinmux(11), 1, 6 },
-   { pinmux(11), 1, 7 },
-   { pinmux(12), 1, 0 },
-   { pinmux(12), 1, 1 },
-   { pinmux(12), 1, 2 },
-   { pinmux(12), 1, 3 },
-   { pinmux(12), 1, 4 },
-   { pinmux(12), 1, 5 },
-   { pinmux(12), 1, 6 },
-   { pinmux(12), 1, 7 }
-};
-#endif
-
 #ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
 #define HAS_RMII 1
 #else
@@ -222,20 +101,38 @@ int misc_init_r(void)
return 0;
 }
 
+static const struct pinmux_config gpio_pins[] = {
+#ifdef CONFIG_USE_NOR
+   /* GP0[11] is required for NOR to work on Rev 3 EVMs */
+   { pinmux(0), 8, 4 },/* GP0[11] */
+#endif
+};
+
 static const struct pinmux_resource pinmuxes[] = {
 #ifdef CONFIG_DRIVER_TI_EMAC
-   PINMUX_ITEM(emac_pins),
+   PINMUX_ITEM(emac_pins_mdio),
+#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
+

[U-Boot] [PATCH v3 02/15] arm, hawkboard: Remove obsolete struct pinmux_config i2c_pins

2011-11-25 Thread Christian Riesch
The configuration in struct pinmux_config i2c_pins does not configure
the pins for i2c but for uart. Since this function is already
configured by struct pinmux_config uart2_pins the i2c_pins struct
is obsolete.

Signed-off-by: Christian Riesch 
Cc: Heiko Schocher 
Cc: Syed Mohammed Khasim 
Cc: Sughosh Ganu 
Cc: Sandeep Paulraj 
---
 board/davinci/da8xxevm/hawkboard_nand_spl.c |6 --
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/board/davinci/da8xxevm/hawkboard_nand_spl.c 
b/board/davinci/da8xxevm/hawkboard_nand_spl.c
index 0fdccac..fd130fa 100644
--- a/board/davinci/da8xxevm/hawkboard_nand_spl.c
+++ b/board/davinci/da8xxevm/hawkboard_nand_spl.c
@@ -71,15 +71,9 @@ static const struct pinmux_config uart2_pins[] = {
{ pinmux(4), 2, 5 }
 };
 
-static const struct pinmux_config i2c_pins[] = {
-   { pinmux(4), 2, 4 },
-   { pinmux(4), 2, 5 }
-};
-
 static const struct pinmux_resource pinmuxes[] = {
PINMUX_ITEM(mii_pins),
PINMUX_ITEM(mdio_pins),
-   PINMUX_ITEM(i2c_pins),
PINMUX_ITEM(nand_pins),
PINMUX_ITEM(uart2_pins),
 };
-- 
1.7.0.4

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


[U-Boot] [PATCH v3 00/15] Add an SPL to boot the da850evm from SPI

2011-11-25 Thread Christian Riesch

Hi all,

Heiko Schocher added support 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).

Changes for v3:
- removed definition of variables from header files (pinmux configs),
  added .c file for these definitions instead
- removed noise and hardcoded values from drivers/mtd/spi/spi_spl_load.c
- split large patches into smaller ones
- replaced $(PAD_TO) in Makefile by $(CONFIG_SPL_MAX_SIZE)
- moving the pinmux definitions for da830 is not included anymore, I'll
  do this later in a separate patch

Not changed for v3:
- I kept the #if !defined... in arch/arm/lib/eabi_compat.c since I am
  afraid that this will cause problems when debugging SPLs, see
  my comment in [1].

Major changes for v2:
- Added header files that contain the definition of the pinmux structs.
- Added code that actually loads u-boot from SPI flash and starts it.

The first patches move the pinmux functions from the board tree
to the arch tree and also use the in the lowlevel configuration
in arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c. 

Patches #8 and #9 fix two problems I had during development.

The other patches add the SPL and fix mkimage for the building of AIS
images. 

The patches apply on top of mainline u-boot and Heiko's patch

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

To build run

make da850evm_config
make u-boot.ais

Then program u-boot.ais to SPI flash on the da850evm.

Regards, Christian

[1] http://lists.denx.de/pipermail/u-boot/2011-November/110727.html
[2] http://lists.denx.de/pipermail/u-boot/2011-November/109997.html

Cc: Heiko Schocher 
Cc: Sandeep Paulraj 

Christian Riesch (15):
  arm, davinci: Move pinmux functions from board to arch tree
  arm, hawkboard: Remove obsolete struct pinmux_config i2c_pins
  arm, da850evm: Do pinmux configuration for EMAC together with other
pinmuxes
  arm, da850: Add pinmux configurations to the arch tree
  arm, da850evm: Use the pinmux configurations defined in the arch tree
  arm, hawkboard: Use the pinmux configurations defined in the arch
tree
  arm, davinci: Remove duplication of pinmux configuration code
  arm, davinci: Fix clear bss loop for zero length bss
  arm: printf() is not available in some SPL configurations
  spl: display_options.o is required for SPI flash support in SPL
  sf: Add spi_boot() to allow booting from SPI flash in an SPL
  arm, davinci: Add SPL support for DA850 SoCs
  arm, da850evm: Add an SPL for SPI boot
  mkimage: Fix variable length header support
  arm, davinci: Add support for generating AIS images to the Makefile

 .gitignore |1 +
 Makefile   |   13 ++
 arch/arm/cpu/arm926ejs/davinci/Makefile|6 +-
 arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|   36 +
 arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c  |  166 
 .../arm/cpu/arm926ejs/davinci/pinmux.c |0
 arch/arm/cpu/arm926ejs/davinci/spl.c   |   34 -
 arch/arm/cpu/arm926ejs/start.S |8 +-
 arch/arm/include/asm/arch-davinci/hardware.h   |2 +
 arch/arm/include/asm/arch-davinci/pinmux_defs.h|   50 ++
 arch/arm/lib/eabi_compat.c |2 +
 board/davinci/common/Makefile  |2 +-
 board/davinci/da8xxevm/config.mk   |5 +
 board/davinci/da8xxevm/da830evm.c  |2 -
 board/davinci/da8xxevm/da850evm.c  |  163 
 board/davinci/da8xxevm/hawkboard_nand_spl.c|   59 +--
 board/davinci/da8xxevm/u-boot-spl.lds  |   73 +
 board/davinci/ea20/ea20.c  |2 -
 doc/README.SPL |1 +
 drivers/mtd/spi/Makefile   |6 +
 drivers/mtd/spi/spi_spl_load.c |   58 +++
 include/configs/da850_am18xxevm.h  |1 +
 include/configs/da850evm.h |   54 +++
 include/configs/hawkboard.h|1 +
 include/spi_flash.h|3 +
 lib/Makefile   |2 +
 nand_spl/board/davinci/da8xxevm/Makefile   |   11 +-
 tools/mkimage.c|   97 ++--
 28 files changed, 584 insertions(+), 274 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c
 rename board/davinci/common/davinci_pinmux.c =

[U-Boot] [PATCH v3 03/15] arm, da850evm: Do pinmux configuration for EMAC together with other pinmuxes

2011-11-25 Thread Christian Riesch
Pinmux configuration for the EMAC was done in a separate call
of davinci_configure_pin_mux(). This patch moves all the pinmux
configuration that is done for this board to a common place.

Signed-off-by: Christian Riesch 
Cc: Heiko Schocher 
Cc: Sandeep Paulraj 
Cc: Sudhakar Rajashekhara 
---
 board/davinci/da8xxevm/da850evm.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index 844e585..9b68c5c 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -223,6 +223,9 @@ int misc_init_r(void)
 }
 
 static const struct pinmux_resource pinmuxes[] = {
+#ifdef CONFIG_DRIVER_TI_EMAC
+   PINMUX_ITEM(emac_pins),
+#endif
 #ifdef CONFIG_SPI_FLASH
PINMUX_ITEM(spi1_pins),
 #endif
@@ -344,9 +347,6 @@ int board_init(void)
 #endif
 
 #ifdef CONFIG_DRIVER_TI_EMAC
-   if (davinci_configure_pin_mux(emac_pins, ARRAY_SIZE(emac_pins)) != 0)
-   return 1;
-
davinci_emac_mii_mode_sel(HAS_RMII);
 #endif /* CONFIG_DRIVER_TI_EMAC */
 
-- 
1.7.0.4

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


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

2011-11-25 Thread Daniel Schwierzeck
On Fri, Nov 25, 2011 at 9:49 AM, Marek Vasut  wrote:
>> On Thursday 24 November 2011 08:57:56 Daniel Schwierzeck wrote:
>> > Build dbau1550_el only in LIST_au1xx0_el and LIST_mips_el.
>> > Also remove obsolete lists for mips5kc.
>>
>> if possible, i'd really like to kill off all the specialized mips lists and
>> do selection purely based on fields in boards.cfg.
>> -mike
>
> I have to agree here.
> M
>

that is currently not possible because -EB and -EL are not properly
handled in CFLAGS and LDFLAGS.
Until this is fixed we have to run MAKEALL twice with mips and mipsel
and different toolchains.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] How to resolve CRC issue in Uboot and maintain the env variables

2011-11-25 Thread Stefano Babic
On 25/11/2011 11:51, Zaheer Sheriff wrote:
> Hi,
> When I got the warning like
> 
>  Warning - bad CRC, using default environment*
> 
> I came across the reason for this in
> _http://www.denx.de/wiki/view/DULG/WarningBadCRCUsingDefaultEnvironment_
> 
> Question:
>I have ported U-Boot to a custom board. It seems to boot OK, but it
>prints:
> 
>*** Warning - bad CRC, using default environment
> 
>Why?
> Answer:
>Most probably everything is OK. The message is printed because the
>flash sector or ERPROM containing the environment variables has
>never been initialized yet. The message will go away as soon as you
>save the envrionment variables using the |*saveenv*| command.
> 
> 
> 
> How to resolve this. Yes every time I could not save the environment,

You have not said which processor you use, which kind of board, which
board you used as reference, if you are running the current U-boot
version...you told us nothing, how can we help ?

Best regards,
Stefano Babic

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


Re: [U-Boot] [PATCH 05/11] MIPS: add sleep handler for slave CPUs in multi-processor systems

2011-11-25 Thread Daniel Schwierzeck
On Fri, Nov 25, 2011 at 9:44 AM, Marek Vasut  wrote:
>> This handler can be activated on multi-processor systems to boot only
>> the master CPU. All slave CPUs are halted by executing the WAIT
>> instruction. This is also useful to reduce the power consumption at
>> boot time.
>>
>> Signed-off-by: Daniel Schwierzeck 
>> ---
>>  arch/mips/cpu/mips32/start.S |   16 
>>  1 files changed, 16 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S
>> index 9c1b2f7..b6cb4be 100644
>> --- a/arch/mips/cpu/mips32/start.S
>> +++ b/arch/mips/cpu/mips32/start.S
>> @@ -224,6 +224,14 @@ reset:
>>
>>       setup_c0_status_reset
>>
>> +     /* Set all slave CPUs in sleep mode */
>> +#ifdef CONFIG_SYS_MPS_SLAVE_CPU_SLEEP
>> +     mfc0    k0, CP0_EBASE
>> +     and     k0, EBASEF_CPUNUM
>> +     bne     k0, zero, slave_cpu_sleep
>> +      nop
>> +#endif
>> +
>>       /* Init Timer */
>>       mtc0    zero, CP0_COUNT
>>       mtc0    zero, CP0_COMPARE
>> @@ -383,3 +391,11 @@ romReserved:
>>
>>  romExcHandle:
>>       b       romExcHandle
>> +
>> +     /* Additional handlers */
>> +#ifdef CONFIG_SYS_MPS_SLAVE_CPU_SLEEP
>> +slave_cpu_sleep:
>> +     wait
>> +     b       slave_cpu_sleep
>> +      nop
>> +#endif
>
> Can't you stall the CPU instead of letting it run in an empty loop? If not:
>
> Acked-by: Marek Vasut 
>

the CPU is stalled with the wait instruction. The loop is actually paranoia ;)

From MIPS32 24KE Processor Core Family Software User's Manual:

The WAIT instruction forces the core into low power mode. The pipeline
is stalled and when all external requests are
completed, the processor’s main clock is stopped. The processor will
restart when reset (SI_Reset) is signaled, or a
non-masked interrupt is taken (SI_NMI, SI_Int, or EJ_DINT). Note that
the core does not use the code field in this
instruction.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] MX35: flea3: changes due to hardware revision B

2011-11-25 Thread Stefano Babic
Revision B of the board uses CSD0 for the DRAM,
as usual for MX3 boards. The patch fixes also
some values in the U-Boot environment.

Signed-off-by: Stefano Babic 
---
 board/CarMediaLab/flea3/flea3.c |4 ++--
 include/configs/flea3.h |   20 
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c
index 64f4b57..34ede87 100644
--- a/board/CarMediaLab/flea3/flea3.c
+++ b/board/CarMediaLab/flea3/flea3.c
@@ -160,7 +160,7 @@ static void board_setup_sdram(void)
writel(0x2000, &esdc->esdctl0);
writel(0x2000, &esdc->esdctl1);
 
-   board_setup_sdram_bank(CSD1_BASE_ADDR);
+   board_setup_sdram_bank(CSD0_BASE_ADDR);
 }
 
 static void setup_iomux_uart3(void)
@@ -229,7 +229,7 @@ int board_early_init_f(void)
(struct ccm_regs *)IMX_CCM_BASE;
 
/* setup GPIO3_1 to set HighVCore signal */
-   mxc_request_iomux(MX35_PIN_ATA_DATA1, MUX_CONFIG_ALT5);
+   mxc_request_iomux(MX35_PIN_ATA_DA1, MUX_CONFIG_ALT5);
gpio_direction_output(65, 1);
 
/* initialize PLL and clock configuration */
diff --git a/include/configs/flea3.h b/include/configs/flea3.h
index 20100c2..aac3930 100644
--- a/include/configs/flea3.h
+++ b/include/configs/flea3.h
@@ -107,7 +107,7 @@
 
 #define CONFIG_BOOTDELAY   3
 
-#define CONFIG_LOADADDR0x9080  /* loadaddr env var */
+#define CONFIG_LOADADDR0x8080  /* loadaddr env var */
 
 
 /*
@@ -162,10 +162,10 @@
  * Physical Memory Map
  */
 #define CONFIG_NR_DRAM_BANKS   1
-#define PHYS_SDRAM_1   CSD1_BASE_ADDR
+#define PHYS_SDRAM_1   CSD0_BASE_ADDR
 #define PHYS_SDRAM_1_SIZE  (128 * 1024 * 1024)
 
-#define CONFIG_SYS_SDRAM_BASE  CSD1_BASE_ADDR
+#define CONFIG_SYS_SDRAM_BASE  CSD0_BASE_ADDR
 #define CONFIG_SYS_INIT_RAM_ADDR   (IRAM_BASE_ADDR + 0x1)
 #define CONFIG_SYS_INIT_RAM_SIZE   (IRAM_SIZE / 2)
 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
@@ -181,10 +181,14 @@
 #define CONFIG_FLASH_CFI_MTD
 #define CONFIG_MTD_PARTITIONS
 #define MTDIDS_DEFAULT "nand0=mxc_nand,nor0=physmap-flash.0"
-#define MTDPARTS_DEFAULT   "mtdparts=mxc_nand:196m(root1)," \
-   "196m(root2),-(user);"  \
+#define MTDPARTS_DEFAULT   "mtdparts=mxc_nand:50m(root1)," \
+   "32m(rootfb)," \
+   "64m(pcache)," \
+   "64m(app1)," \
+   "10m(app2),-(spool);" \
"physmap-flash.0:512k(u-boot),64k(env1)," \
"64k(env2),3776k(kernel1),3776k(kernel2)"
+
 /*
  * FLASH and environment organization
  */
@@ -249,10 +253,10 @@
"else run addip_sta;fi\0"   \
"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"  \
"addtty=setenv bootargs ${bootargs}"\
-   " console=ttymxc0,${baudrate}\0"\
+   " console=ttymxc2,${baudrate}\0"\
"addmisc=setenv bootargs ${bootargs} ${misc}\0" \
-   "loadaddr=9080\0"   \
-   "kernel_addr_r=9080\0"  \
+   "loadaddr=8080\0"   \
+   "kernel_addr_r=8080\0"  \
"hostname=" xstr(CONFIG_HOSTNAME) "\0"  \
"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"   \
"ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0" \
-- 
1.7.5.4

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


Re: [U-Boot] [PATCH 04/11] MIPS: add register definition for EBase register

2011-11-25 Thread Daniel Schwierzeck
On Fri, Nov 25, 2011 at 9:43 AM, Marek Vasut  wrote:
>> The CPUNum field in the Ebase register contains an unique identifier
>> for each CPU. This helps to distinguish between CPU cores in
>> multi-processor systems.
>>
>> Signed-off-by: Daniel Schwierzeck 
>> ---
>>  arch/mips/include/asm/mipsregs.h |   13 +
>>  1 files changed, 13 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/mips/include/asm/mipsregs.h
>> b/arch/mips/include/asm/mipsregs.h index be7e5c6..15a9fd5 100644
>> --- a/arch/mips/include/asm/mipsregs.h
>> +++ b/arch/mips/include/asm/mipsregs.h
>> @@ -89,6 +89,13 @@
>>  #define CP0_DWATCH $19
>>
>>  /*
>> + * Additional Coprocessor 0 register names.
>> + * These registers are listed for completeness and are intended
>> + * for usage in assembly code.
>> + */
>> +#define CP0_EBASE $15,1
>> +
>> +/*
>>   * Coprocessor 0 Set 1 register names
>>   */
>>  #define CP0_S1_DERRADDR0  $26
>> @@ -395,6 +402,12 @@
>>  #define  CAUSEF_BD           (_ULCAST_(1)   << 31)
>>
>>  /*
>> + * Bits in the coprocessor 0 EBase register.
>> + */
>> +#define EBASEB_CPUNUM                0
>> +#define EBASEF_CPUNUM                (_ULCAST_(1023))
>
> What's this? Isn't the maximum CPU number on MIPS 32 CPUs? Or maybe that's 
> only
> 4kc limit?
>

that is only the bit shift and bit mask for the CPUNum[9:0] field in
the EBase Register.

CPUNum = (EBASE & EBASEF_CPUNUM) >> EBASEB_CPUNUM
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] CONFIG_BOOTCOUNT_LIMIT

2011-11-25 Thread Sridhar Addagada
I' need to enable CONFIG_BOOTCOUNT_LIMIT, which is based one MPC8377ERDB,  and 
am looking for recommended address for CONFIG_BOOTCOUNT_ADDR, any suggestions.

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


[U-Boot] Your New Friend Rama.

2011-11-25 Thread Mrama Djirama
Hello Dear,

How are you today, Hope all is well with you and your family? My name is Miss 
Rama Djirama. However it really pleases me to write you for a lovely and 
sincere friendship even if we haven’t met or seen each other before. I will so 
much appreciate to see your reply soon so that we can share pictures and know 
more about ourselves.
I shall appreciate an urgent responce from you, because i have something to 
discuss with you.

With lots of love from your new friend,
Miss Rama Djirama.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4] Add board_pre_console_putc to deal with early console output

2011-11-25 Thread Stefano Babic
On 25/11/2011 08:35, Simon Glass wrote:
> Hi,
> 
> On Tue, Oct 18, 2011 at 4:50 PM, Graeme Russ  wrote:
>> Hi Simon,
>>

Hi Simon,

>>> A new board_pre_console_putc() function is added to the board API. If
>>> provided by the board it will be called in the event of console output
>>> before the console is ready. This function should turn on all UARTs and
>>> spray the character out if it possibly can.
>>>
>>> The feature is controlled by a new CONFIG_PRE_CONSOLE_PUTC option.
>>>
>>> Signed-off-by: Simon Glass 
>>
>> Acked-by: Graeme Russ 
>>
> Just going through my backlog. Any interest in merging this?

I have frankly missed the patch - I will read the related thread, and I
will take a look. For now I will put this patch in my TODO list in
patchwork.

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] How to resolve CRC issue in Uboot and maintain the env variables

2011-11-25 Thread Zaheer Sheriff

Hi,
When I got the warning like

 Warning - bad CRC, using default environment*

I came across the reason for this in 
_http://www.denx.de/wiki/view/DULG/WarningBadCRCUsingDefaultEnvironment_


Question:
   I have ported U-Boot to a custom board. It seems to boot OK, but it
   prints:

   *** Warning - bad CRC, using default environment

   Why? 


Answer:
   Most probably everything is OK. The message is printed because the
   flash sector or ERPROM containing the environment variables has
   never been initialized yet. The message will go away as soon as you
   save the envrionment variables using the |*saveenv*| command. 





How to resolve this. Yes every time I could not save the environment, 
how to resolve this.!!

Please help me in this regard. Your help would be appreciable.

--
Zaheer Sheriff K


--

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.

www.easunreyrolle.com

This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this e-mail is strictly prohibited and may be unlawful.

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


Re: [U-Boot] [PATCH v2] microblaze: usable uart16550 for big endian systems

2011-11-25 Thread Michal Simek

Stephan Linz wrote:

As a result of the commit 6833260 the uart16550 driver
is broken for Microblaze big endian systems, because of
the missing 3 byte offset. Other than as described, not
all U-Boot BSP will treat properly the 3 byte offset.

This why prefer to mask out the 3 byte offset in general
and setup correct _REG_SIZE value depending on edianess.

Signed-off-by: Stephan Linz 
---
v2: Mask out 3 byte offset
Set correct _REG_SIZE values for big/little endianess
---
 include/configs/microblaze-generic.h |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Tested-by: Michal Simek 

Wolfgang: Can you please apply this patch directly to your repo.

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] microblaze: usable uart16550 for big endian systems

2011-11-25 Thread Michal Simek

Stephan Linz wrote:

Am Donnerstag, den 24.11.2011, 20:13 +0100 schrieb Michal Simek:

Stephan Linz wrote:

--snip--

Here is patch I have used. Please add that changes to v2 patch.

I'll do it this way. Give me a little time to change and test it.
Currently I am sill working on refactoring of the LL TEMAC driver. I
hope, the refactored driver than can merge in mainline ...

I have done it some time ago and look at "[PATCH v3] net: ll_temac:
Add LL TEMAC driver to u-boot thread".


Hi Michal,

yes, I've read the whole thread.


ok.




I have attached the latest version I have and I am not going to change
it to follow "new" u-boot network driver style


Hm, but it is possible ...


sure, it is software almost everything is possible.




because  I would like to keep ppc dcr support.


Even this was the main work I've done last week. I've split the driver
code into differnt sub modules (xilinx_ll_temac_fifo and
xilinx_ll_temac_sdram), introduce some call back functions into the sub
modules to harmonize the main driver code and divide the sdma code into
the two different bus access methodes: direct 32 bit memory access
(Microblaze) and indirect access via DCR (Xilinx PPC4xx).

Please, give me some time to finish the refactoring. I'll release all
results as fast as possible her in U-Boot list.


ok. Look forward for patches.



But, one issue was uncleare to me. Some functions, for example
xps_ll_temac_hostif_set(), were prepared to set bit 10 of CTL register.
But CTL bit 10 is not defined by any LL TEMAC documentation. Why did you
done this?


I was in origin Yoshio Kashiwagi's driver. emac parameter should be possible to
remove entirely as below.

static unsigned int xps_ll_temac_hostif_get(struct eth_device *dev,
int phy_addr, int reg_addr)
{
struct temac_reg *regs = (struct temac_reg *)dev->iobase;

out_be32(®s->lsw, (phy_addr << 5) | reg_addr);
out_be32(®s->ctl, MIIMAI);
xps_ll_temac_check_status(regs, XTE_RSE_MIIM_RR_MASK);
return in_be32(®s->lsw);
}

Thanks,
Michal


--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-25 Thread Jason Liu
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 mix register to support debug/SD3.0 and move
the low bit 0-6 of XFERTYP register to the mix control reg
low bit 0-6. Thus on i.mx6q, we have the following compared
with the previous soc: (can refer to RM of chapter 56.3.3)

i.mx6q:
mix control:
bit 31 - bit 7: Added for debug/SD3.0 support
bit 6  - bit 0: move in the XFERTYP register bit 6-0 on previous soc
XFERTYP register:
bit 31 - bit 7: the same as before,
bit 6  - bit 0: no-use

previous soc
mix control: no
XFERTYP register:
bit 31 - bit 0: xfertype information

Signed-off-by: Jason Liu 
Cc: Andy Fleming 
Cc: Stefano Babic 
Acked-by: Stefano Babic 
---
v3: cc Andy for mmc maintainer
v2: extend the commit message by adding mix/xtertype register change
remove one #ifdef as Marek suggested
change the print of USDHC/ESDHC to SDHC
---
 drivers/mmc/fsl_esdhc.c |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index ec953f0..ddd1b4c 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -58,7 +58,8 @@ struct fsl_esdhc {
uintautoc12err;
uinthostcapblt;
uintwml;
-   charreserved1[8];
+   uintmixctrl;
+   charreserved1[4];
uintfevt;
charreserved2[168];
uinthostver;
@@ -298,8 +299,13 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, 
struct mmc_data *data)
 
/* Send the command */
esdhc_write32(®s->cmdarg, cmd->cmdarg);
+#if defined(CONFIG_FSL_USDHC)
+   esdhc_write32(®s->mixctrl,
+   (esdhc_read32(®s->mixctrl) & 0xFF80) | (xfertyp & 0x7F));
+   esdhc_write32(®s->xfertyp, xfertyp & 0x);
+#else
esdhc_write32(®s->xfertyp, xfertyp);
-
+#endif
/* Wait for the command to complete */
while (!(esdhc_read32(®s->irqstat) & IRQSTAT_CC))
;
@@ -482,7 +488,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg 
*cfg)
 
mmc = malloc(sizeof(struct mmc));
 
-   sprintf(mmc->name, "FSL_ESDHC");
+   sprintf(mmc->name, "FSL_SDHC");
regs = (struct fsl_esdhc *)cfg->esdhc_base;
 
/* First reset the eSDHC controller */
-- 
1.7.4.1


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


[U-Boot] [PATCH V3 1/5] i.mx: introduce the armv7/imx-common folder

2011-11-25 Thread Jason Liu
In order to support the coming MX6 platform and to reducde
the duplicated code, we had better move some common files
or functions to the imx-common folder for sharing.

This patch does the following:
- move speed.c file from armv7/mx5/speed.c to armv7/imx-common/speed.c
- move armv7/mx5/timer.c to armv7/imx-common/timer.c, no any new feature
  added but just fix the checkpatch errors in the old file and remove
  the CONFIG_SYS_MX5_CLK32 reference in the file
- create one new file cpu.c file to store the common function with i.mx5/6

Signed-off-by: Jason Liu 
Cc:Stefano Babic 
Acked-by: Stefano Babic 
---
V2:extend the commit message to reflect all the changes in the patch
   rename cpu_info.c to cpu.c file under imx-common as Stefano comments
---
 Makefile   |8 ++
 arch/arm/cpu/armv7/imx-common/Makefile |   47 ++
 arch/arm/cpu/armv7/imx-common/cpu.c|  108 
 arch/arm/cpu/armv7/{mx5 => imx-common}/speed.c |0
 arch/arm/cpu/armv7/{mx5 => imx-common}/timer.c |   17 ++--
 arch/arm/cpu/armv7/mx5/Makefile|2 +-
 arch/arm/cpu/armv7/mx5/soc.c   |   77 -
 7 files changed, 173 insertions(+), 86 deletions(-)

diff --git a/Makefile b/Makefile
index d84b350..977da65 100644
--- a/Makefile
+++ b/Makefile
@@ -293,6 +293,14 @@ LIBS += post/libpost.o
 ifneq ($(CONFIG_AM335X)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
 LIBS += $(CPUDIR)/omap-common/libomap-common.o
 endif
+
+ifeq ($(SOC),mx5)
+LIBS += $(CPUDIR)/imx-common/libimx-common.o
+endif
+ifeq ($(SOC),mx6)
+LIBS += $(CPUDIR)/imx-common/libimx-common.o
+endif
+
 ifeq ($(SOC),s5pc1xx)
 LIBS += $(CPUDIR)/s5p-common/libs5p-common.o
 endif
diff --git a/arch/arm/cpu/armv7/imx-common/Makefile 
b/arch/arm/cpu/armv7/imx-common/Makefile
new file mode 100644
index 000..e5ff375
--- /dev/null
+++ b/arch/arm/cpu/armv7/imx-common/Makefile
@@ -0,0 +1,47 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# (C) Copyright 2011 Freescale Semiconductor, Inc.
+#
+# 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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = $(obj)libimx-common.o
+
+COBJS  = timer.o cpu.o speed.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/arch/arm/cpu/armv7/imx-common/cpu.c 
b/arch/arm/cpu/armv7/imx-common/cpu.c
new file mode 100644
index 000..1e30ae5
--- /dev/null
+++ b/arch/arm/cpu/armv7/imx-common/cpu.c
@@ -0,0 +1,108 @@
+/*
+ * (C) Copyright 2007
+ * Sascha Hauer, Pengutronix
+ *
+ * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifdef CONFIG_FSL_ESDHC
+#include 
+#endif
+
+static char *get_reset_cause(void)
+{
+   u32 cause;
+   struct src *src_regs = (struct src *)SRC_BASE_ADDR;
+
+   cause = readl(&src_regs->srsr);
+   writel(cause, &src_regs->srsr);
+
+   switch (cause) {
+   case 0x1:
+   return "POR";
+   case 0x00

[U-Boot] [PATCH V3 5/5] i.mx: i.mx6q: add the initial support for i.mx6q ARM2 board

2011-11-25 Thread Jason Liu
Add the initial support for Freescale i.MX6Q Armadillo2 board
Support: MMC boot from slot 0/1, debug UART(UART4), usdhc.

There is two MMC slots on the boards:
mmc dev 0 -> connect USDHC3 -> the lower slot on the board,
mmc dev 1 -> connect USDHC4 -> the upper slot on the board,

Signed-off-by: Jason Liu 
Cc: Stefano Babic 
Tested-by: Dirk Behme 
---
v3: based on the uart clean up patch:http://patchwork.ozlabs.org/patch/127115/
add CONFIG_MXC_UART_BASE,remove CONFIG_MX6Q_UART4 in board config file

v2:fix sd3 card detection GPIO
   remove unneeded parentheses such as (IRAM_SIZE)
   remove clean and distclean targets in Makefile
   remove CONFIG_MACH_TYPE setup since linux use DT
   some cleanup/improvement for the config file from Dirk
   remove imx_iomux_v3_init call since assign the base in iomux-v3.c
   improve the commit message to add the mmc slot description
---
 MAINTAINERS   |1 +
 board/freescale/mx6qarm2/Makefile |   42 
 board/freescale/mx6qarm2/imximage.cfg |  167 +
 board/freescale/mx6qarm2/mx6qarm2.c   |  155 ++
 boards.cfg|1 +
 include/configs/mx6qarm2.h|  162 
 6 files changed, 528 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index f6f6b72..52d86bd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -568,6 +568,7 @@ Jason Liu 
 
mx53evk i.MX53
mx53locoi.MX53
+   mx6qarm2i.MX6Q
 
 Enric Balletbo i Serra 
 
diff --git a/board/freescale/mx6qarm2/Makefile 
b/board/freescale/mx6qarm2/Makefile
new file mode 100644
index 000..79bc315
--- /dev/null
+++ b/board/freescale/mx6qarm2/Makefile
@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2007, Guennadi Liakhovetski 
+#
+# (C) Copyright 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := mx6qarm2.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/freescale/mx6qarm2/imximage.cfg 
b/board/freescale/mx6qarm2/imximage.cfg
new file mode 100644
index 000..ffac1b4
--- /dev/null
+++ b/board/freescale/mx6qarm2/imximage.cfg
@@ -0,0 +1,167 @@
+# Copyright (C) 2011 Freescale Semiconductor, Inc.
+# Jason Liu 
+#
+# 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. 51 Franklin Street Fifth Floor Boston,
+# MA 02110-1301 USA
+#
+# Refer docs/README.imxmage for more details about how-to configure
+# and create imximage boot image
+#
+# The syntax is taken as close as possible with the kwbimage
+
+# image version
+
+IMAGE_VERSION 2
+
+# Boot Device : one of
+# spi, sd (the board has no nand neither onenand)
+
+BOOT_FROM  sd
+
+# Device Configuration Data (DCD)
+#
+# Each entry must have the format:
+# Addr-type   AddressValue
+#
+# where:
+#  Addr-type register length (1,2 or 4 bytes)
+#  Address   absolute address of the register
+#  value value to be stored in the register
+DATA 4 0x020e05a8 0x0030
+DATA 4 0x020e05b0 0x0030
+DATA 4 0x020e0524 0x0030
+DATA 4 0x020e051c 0x0030
+
+DATA 4 0x020e0518 0x0030
+DATA 4 0x020e050c 

[U-Boot] [PATCH V3 0/5] i.mx: add the initial i.mx6q core/board support

2011-11-25 Thread Jason Liu
This patch-set add the initial support for freescale i.mx6q support.
freescale i.mx6q is a quad core built on arm cortex_a9 complex.

The patch-set has been tested ok on freescale i.mx6q Armadillo2 board and also
make sure it does not break i.mx5 support

The v1 patch-set has also been tested Ok by: Dirk Behme
Tested-by: Dirk Behme 

The patch-set is based on Stefano's uart clean up patch:
http://patchwork.ozlabs.org/patch/127115/

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

 MAINTAINERS|1 +
 Makefile   |8 +
 arch/arm/cpu/armv7/imx-common/Makefile |   47 +
 arch/arm/cpu/armv7/imx-common/cpu.c|  108 ++
 arch/arm/cpu/armv7/{mx5 => imx-common}/speed.c |0
 arch/arm/cpu/armv7/{mx5 => imx-common}/timer.c |   17 +-
 arch/arm/cpu/armv7/mx5/Makefile|2 +-
 arch/arm/cpu/armv7/mx5/soc.c   |   77 -
 arch/arm/cpu/armv7/mx6/Makefile|   48 +
 arch/arm/cpu/armv7/mx6/clock.c |  366 +
 arch/arm/cpu/armv7/mx6/iomux-v3.c  |   71 +
 .../cpu/armv7/{mx5/speed.c => mx6/lowlevel_init.S} |   27 +-
 arch/arm/cpu/armv7/mx6/soc.c   |   82 +
 arch/arm/include/asm/arch-mx6/ccm_regs.h   |  892 +++
 .../mx5/speed.c => include/asm/arch-mx6/clock.h}   |   45 +-
 .../mx5/speed.c => include/asm/arch-mx6/gpio.h}|   30 +-
 arch/arm/include/asm/arch-mx6/imx-regs.h   |  236 +++
 arch/arm/include/asm/arch-mx6/iomux-v3.h   |  103 ++
 arch/arm/include/asm/arch-mx6/mx6x_pins.h  | 1683 
 .../speed.c => include/asm/arch-mx6/sys_proto.h}   |   31 +-
 board/freescale/mx6qarm2/Makefile  |   42 +
 board/freescale/mx6qarm2/imximage.cfg  |  167 ++
 board/freescale/mx6qarm2/mx6qarm2.c|  155 ++
 boards.cfg |1 +
 drivers/gpio/mxc_gpio.c|4 +-
 drivers/mmc/fsl_esdhc.c|   12 +-
 include/configs/mx6qarm2.h |  162 ++
 27 files changed, 4251 insertions(+), 166 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/imx-common/Makefile
 create mode 100644 arch/arm/cpu/armv7/imx-common/cpu.c
 copy arch/arm/cpu/armv7/{mx5 => imx-common}/speed.c (100%)
 rename arch/arm/cpu/armv7/{mx5 => imx-common}/timer.c (84%)
 mode change 100644 => 100755
 create mode 100644 arch/arm/cpu/armv7/mx6/Makefile
 create mode 100644 arch/arm/cpu/armv7/mx6/clock.c
 create mode 100644 arch/arm/cpu/armv7/mx6/iomux-v3.c
 copy arch/arm/cpu/armv7/{mx5/speed.c => mx6/lowlevel_init.S} (58%)
 create mode 100644 arch/arm/cpu/armv7/mx6/soc.c
 create mode 100644 arch/arm/include/asm/arch-mx6/ccm_regs.h
 copy arch/arm/{cpu/armv7/mx5/speed.c => include/asm/arch-mx6/clock.h} (59%)
 copy arch/arm/{cpu/armv7/mx5/speed.c => include/asm/arch-mx6/gpio.h} (64%)
 create mode 100644 arch/arm/include/asm/arch-mx6/imx-regs.h
 create mode 100644 arch/arm/include/asm/arch-mx6/iomux-v3.h
 create mode 100644 arch/arm/include/asm/arch-mx6/mx6x_pins.h
 rename arch/arm/{cpu/armv7/mx5/speed.c => include/asm/arch-mx6/sys_proto.h} 
(65%)
 create mode 100644 board/freescale/mx6qarm2/Makefile
 create mode 100644 board/freescale/mx6qarm2/imximage.cfg
 create mode 100644 board/freescale/mx6qarm2/mx6qarm2.c
 create mode 100644 include/configs/mx6qarm2.h

-- 
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] M28: GPIO pin validity check added

2011-11-25 Thread Robert Deliën
> sorry if my messages have been a bit harsh with gpio freedback.  the 
> unwrapped 
> lines and broken patch formats make me see red.

I understand; There are rules to adhere to.
But please also understand what I'm working with here. Making a single patch 
takes me - I kid you not - one hour. And still it comes out borked.

We are obliged to strictly work under Windows. Laptops with full partition true 
crypt avoids dual boot and gets the i7 quad-core on it's knees like a heroine 
hooker. On that base I'm running VM-ware...

At the office we're using Perforce. Not a bad system, but it doesn't deal with 
patches very well and it's inaccessible from my home office. So I'm using 
Subversion on my NAS as an intermediate archive to work from, committing my 
changes to P4 every now and then. You guys are using Git; I'm sure it's 
superior but I don't have time now to figure that one beyond the basics. Every 
time I need to make or re-make a patch, I have to clone a clean Git repository, 
revert my SVN workspace back to the work I'm making a patch off, merge that 
into the clean Git repository and create a new patch.

And I still have to mail the patch. No attachments allowed, I understand, but 
copying and pasting between a Linux VM and Windows host trashes the leading 
space, so I either have to go through the patch and put it back myself. Or I 
can use Exchange web-based mail, that sometimes decides to send HTML mail 
anyway.

In my home office I'm using a 12-core MacPro as a workstation. Again Linux is 
under a VM, because I need a Windows VM too, to have crippled access to the 
office network. To post patches from my home office, I'm using Mac Mail through 
my own windows server, but Mail somehow doesn't offer the feature to wrap lines 
at column 72. Instead it uses the format designator to indicate flow-format, 
understood by any modern email program, but not anticipating people on the 
other side receiving email in Vim, or applying patches directly from their 
mailbox.

So even though I had finally convinced management that it's in their best 
interest to get our work back into the mainline, I decided to bail out because 
it's just too much work. Even though not ideal, I think we're better off 
maintaining our 100 lines worth of work. And even if all technical difficulties 
could be fixed - I'll express myself mildly, but I cannot leave this unsaid - 
the social standards here are not really my thing.

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


[U-Boot] [PATCH V3 3/5] i.mx: mxc_gpio: add the i.mx6q support

2011-11-25 Thread Jason Liu
Signed-off-by: Jason Liu 
Cc: Stefano Babic 
Acked-by: Stefano Babic 
---
V2: add Stefano's ack
---
 drivers/gpio/mxc_gpio.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index a7f36b2..908808d 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -40,10 +40,10 @@ static unsigned long gpio_ports[] = {
[0] = GPIO1_BASE_ADDR,
[1] = GPIO2_BASE_ADDR,
[2] = GPIO3_BASE_ADDR,
-#if defined(CONFIG_MX51) || defined(CONFIG_MX53)
+#if defined(CONFIG_MX51) || defined(CONFIG_MX53) || defined(CONFIG_MX6Q)
[3] = GPIO4_BASE_ADDR,
 #endif
-#if defined(CONFIG_MX53)
+#if defined(CONFIG_MX53) || defined(CONFIG_MX6Q)
[4] = GPIO5_BASE_ADDR,
[5] = GPIO6_BASE_ADDR,
[6] = GPIO7_BASE_ADDR,
-- 
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] post: fix compile issue for post tests on kirkwood

2011-11-25 Thread Marek Vasut
> > -Original Message-
> > From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de]
> > On Behalf Of Marek Vasut
> > Sent: 25 November 2011 14:22
> > To: u-boot@lists.denx.de
> > Cc: valen...@theia.denx.de; Longchamp; Heiko Schocher; Holger Brunck
> > Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests on
> > kirkwood
> > 
> > > commit f31a911fe (arm, post: add missing post_time_ms for arm)
> > > enables get_ticks and get_tbclk for all arm based boards,
> > > but kirkwood has currently no implementation for this. So
> > > undefine this for kirkwood boards.
> > 
> > So this means the kirkwood timer doesn't conform to current timer api?
> > Why work
> > it around and not fix it then?
> 
> I think this is better approach
> 
Right? :) So now the question is ... who's gonna do it ? ;-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] post: fix compile issue for post tests on kirkwood

2011-11-25 Thread Prafulla Wadaskar


> -Original Message-
> From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de]
> On Behalf Of Marek Vasut
> Sent: 25 November 2011 14:22
> To: u-boot@lists.denx.de
> Cc: valen...@theia.denx.de; Longchamp; Heiko Schocher; Holger Brunck
> Subject: Re: [U-Boot] [PATCH] post: fix compile issue for post tests on
> kirkwood
> 
> > commit f31a911fe (arm, post: add missing post_time_ms for arm)
> > enables get_ticks and get_tbclk for all arm based boards,
> > but kirkwood has currently no implementation for this. So
> > undefine this for kirkwood boards.
> 
> So this means the kirkwood timer doesn't conform to current timer api? Why
> work
> it around and not fix it then?

I think this is better approach

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


Re: [U-Boot] [PATCH] post: fix compile issue for post tests on kirkwood

2011-11-25 Thread Marek Vasut
> commit f31a911fe (arm, post: add missing post_time_ms for arm)
> enables get_ticks and get_tbclk for all arm based boards,
> but kirkwood has currently no implementation for this. So
> undefine this for kirkwood boards.

So this means the kirkwood timer doesn't conform to current timer api? Why work 
it around and not fix it then?

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


Re: [U-Boot] what to do when the uboot can not mark the phisical bad block of nand flash?

2011-11-25 Thread Marek Vasut
> Hi, guysI got a problem. I move a part of source code of
> linux/driver/mtd/nand to the u-boot. But I found that the u-boot can not
> mark the phsical bad block . when I run nand_erase() or nand_scrub(), it
> return error num as below: linux/driver/mtd/nand/nand_base.c
> 2589chip->erase_cmd(mtd, page & chip->pagemask); 2590  
>   status = chip->waitfunc(mtd, chip); 2592 /*
> 2593 * See if operation failed and additional status
> checks are 2594 * available
> 2595 */
> 2596 if ((status & NAND_STATUS_FAIL) &&
> (chip->errstat)) 2597 status = chip->errstat(mtd,
> chip, FL_ERASING, 2598   
> status, page); 2600 /* See if block erase succeeded */
> 2601 if (status & NAND_STATUS_FAIL) {
> 2602 DEBUG(MTD_DEBUG_LEVEL0, "%s: Failed erase,
> " 2603 "page 0x%08x\n", __func__,
> page); 2604 instr->state = MTD_ERASE_FAILED;
> 2605 instr->fail_addr =
> 2606 ((loff_t)page <<
> chip->page_shift); 2607 goto erase_exit;
> 2608 }
> you can find that if block erase is failed(status==-1), it only
> mark the instr(we will not use the instr later), and go to the erase_exit.
> So there is no code to mark the oob of the phisical bad block, neither add
> it to the bad block table. so ,I add the code of writing oob of the
> phisical bad block when it is erased failed, such as below:
> chip->erase_cmd(mtd, page & chip->pagemask);2589
> 
> - Ignored:
> 2590 status = chip->waitfunc(mtd, chip);
> 2592 /*
> 2593 * See if operation failed and additional status
> checks are 2594 * available
> 2595 */
> 2596 if ((status & NAND_STATUS_FAIL) &&
> (chip->errstat)) 2597 status = chip->errstat(mtd,
> chip, FL_ERASING, 2598   
> status, page); 2600 /* See if block erase succeeded */
> 2601 if (status & NAND_STATUS_FAIL) {
> 2602 DEBUG(MTD_DEBUG_LEVEL0, "%s: Failed erase,
> " 2603 "page 0x%08x\n", __func__,
> page); 2604 instr->state = MTD_ERASE_FAILED;
> 2605 instr->fail_addr =
> 2606 ((loff_t)page <<
> chip->page_shift); nand_write_oob(addr);
> 2607 goto erase_exit;
> 2608 }
> 
>Guys, what do you think of it , and what would you to if you  got
> this problem.

Can you please fix your mailer and send this stuff again? It's really hard to 
decode what you're asking please.

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


Re: [U-Boot] [PATCH v2] S5PC2XX: Rename S5pc2XX to exynos4

2011-11-25 Thread Kyungmin Park
Hi,

New Cortex-A15 also uses the armv7. So it's better to use the exynos itself.
Just remove the number 4.

Thank you,
Kyungmin Park

On 11/25/11, Chander Kashyap  wrote:
> As per new conventions Samsung SoC's are named as Exynos.
> Cortex-A9 based Soc's are named as exynos4. s5pc2xx is cortex-A9
> based, hence renamed to exynos4. This is done as per kernel
> naming convetions.
>
> Similerly s5pc210 is now exynos4210. Hence S5PC210/s5pc210
> suffix/prefix has been renamed to exynos4210/EXYNOS4210
>
> Signed-off-by: Chander Kashyap 
> ---
> Changes for v2:
>   - Removed renaming of s5p-common to exynos4-common
>   - Renamed s5pc210 prefixes to exynos4210
>
> Rebased on following commit.
> 19cdfd3e84bff108febb127b598ac3f1634c768c
> "Ethernut 5 board support"
>
>  MAINTAINERS|6 +-
>  Makefile   |2 +-
>  arch/arm/cpu/armv7/{s5pc2xx => exynos4}/Makefile   |0
>  arch/arm/cpu/armv7/{s5pc2xx => exynos4}/clock.c|   50 
>  arch/arm/cpu/armv7/{s5pc2xx => exynos4}/soc.c  |0
>  .../asm/{arch-s5pc2xx => arch-exynos4}/adc.h   |0
>  .../asm/{arch-s5pc2xx => arch-exynos4}/clk.h   |0
>  .../asm/{arch-s5pc2xx => arch-exynos4}/clock.h |2 +-
>  .../asm/{arch-s5pc2xx => arch-exynos4}/cpu.h   |   62
> ++--
>  .../asm/{arch-s5pc2xx => arch-exynos4}/gpio.h  |   28 +-
>  .../asm/{arch-s5pc2xx => arch-exynos4}/mmc.h   |0
>  .../asm/{arch-s5pc2xx => arch-exynos4}/pwm.h   |0
>  .../asm/{arch-s5pc2xx => arch-exynos4}/sromc.h |0
>  .../asm/{arch-s5pc2xx => arch-exynos4}/sys_proto.h |0
>  .../asm/{arch-s5pc2xx => arch-exynos4}/uart.h  |0
>  board/samsung/origen/lowlevel_init.S   |   26 
>  board/samsung/origen/mem_setup.S   |   12 ++--
>  board/samsung/origen/origen.c  |8 +-
>  board/samsung/origen/origen_setup.h|8 +-
>  board/samsung/smdkv310/lowlevel_init.S |   22 
>  board/samsung/smdkv310/mem_setup.S |8 +-
>  board/samsung/smdkv310/smdkv310.c  |8 +-
>  board/samsung/universal_c210/lowlevel_init.S   |   24 
>  board/samsung/universal_c210/universal.c   |8 +-
>  boards.cfg |6 +-
>  include/configs/origen.h   |6 +-
>  include/configs/s5pc210_universal.h|   10 ++--
>  include/configs/smdkv310.h |6 +-
>  28 files changed, 151 insertions(+), 151 deletions(-)
>  rename arch/arm/cpu/armv7/{s5pc2xx => exynos4}/Makefile (100%)
>  rename arch/arm/cpu/armv7/{s5pc2xx => exynos4}/clock.c (80%)
>  rename arch/arm/cpu/armv7/{s5pc2xx => exynos4}/soc.c (100%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/adc.h (100%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/clk.h (100%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/clock.h (99%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/cpu.h (64%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/gpio.h (83%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/mmc.h (100%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/pwm.h (100%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/sromc.h (100%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/sys_proto.h
> (100%)
>  rename arch/arm/include/asm/{arch-s5pc2xx => arch-exynos4}/uart.h (100%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 37bbb34..d493e4e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -691,12 +691,12 @@ Minkyu Kang 
>
>   SMDKC100ARM ARMV7 (S5PC100 SoC)
>   s5p_goniARM ARMV7 (S5PC110 SoC)
> - s5pc210_universal   ARM ARMV7 (S5PC210 SoC)
> + s5pc210_universal   ARM ARMV7 (EXYNOS4210 SoC)
>
>  Chander Kashyap 
>
> - origen  ARM ARMV7 (S5PC210 SoC)
> - SMDKV310ARM ARMV7 (S5PC210 SoC)
> + origen  ARM ARMV7 (EXYNOS4210 SoC)
> + SMDKV310ARM ARMV7 (EXYNOS4210 SoC)
>
>  Torsten Koschorrek 
>   scb9328 ARM920T (i.MXL)
> diff --git a/Makefile b/Makefile
> index fb658f4..646b105 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -296,7 +296,7 @@ endif
>  ifeq ($(SOC),s5pc1xx)
>  LIBS += $(CPUDIR)/s5p-common/libs5p-common.o
>  endif
> -ifeq ($(SOC),s5pc2xx)
> +ifeq ($(SOC),exynos4)
>  LIBS += $(CPUDIR)/s5p-common/libs5p-common.o
>  endif
>
> diff --git a/arch/arm/cpu/armv7/s5pc2xx/Makefile
> b/arch/arm/cpu/armv7/exynos4/Makefile
> similarity index 100%
> rename from arch/arm/cpu/armv7/s5pc2xx/Makefile
> rename to arch/arm/cpu/armv7/exynos4/Makefile
> diff --git a/arch/arm/cpu/armv7/s5pc2xx/clock.c
> b/arch/arm/cpu/armv7/exynos4/clock.c
> similarity index 80%
> rename from arch/arm/cpu/armv7/s5p

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

2011-11-25 Thread Marek Vasut
> On Thursday 24 November 2011 08:57:56 Daniel Schwierzeck wrote:
> > Build dbau1550_el only in LIST_au1xx0_el and LIST_mips_el.
> > Also remove obsolete lists for mips5kc.
> 
> if possible, i'd really like to kill off all the specialized mips lists and
> do selection purely based on fields in boards.cfg.
> -mike

I have to agree here.
M
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 10/11] MIPS: add init hook for CPU specific initialization

2011-11-25 Thread Marek Vasut
> Signed-off-by: Daniel Schwierzeck 
> ---
>  arch/mips/lib/board.c |   11 +++
>  1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
> index bcf12c5..27c2cfe 100644
> --- a/arch/mips/lib/board.c
> +++ b/arch/mips/lib/board.c
> @@ -57,6 +57,16 @@ static char *failed = "*** failed ***\n";
>   */
>  unsigned long mips_io_port_base = -1;
> 
> +int __arch_cpu_init(void)
> +{
> + /*
> +  * Nothing to do in this dummy implementation
> +  */
> + return 0;
> +}
> +int arch_cpu_init(void)
> + __attribute__((weak, alias("__arch_cpu_init")));
> +
>  int __board_early_init_f(void)
>  {
>   /*
> @@ -130,6 +140,7 @@ static int init_baudrate(void)
>  typedef int (init_fnc_t) (void);
> 
>  init_fnc_t *init_sequence[] = {
> + arch_cpu_init,
>   board_early_init_f,
>   timer_init,
>   env_init,   /* initialize environment */

Maybe do it the same way it's done on ARM.

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


Re: [U-Boot] [PATCH 09/11] MIPS: add header file for generic GPIO API

2011-11-25 Thread Marek Vasut
> Signed-off-by: Daniel Schwierzeck 
> ---
>  arch/mips/include/asm/gpio.h |   13 +
>  1 files changed, 13 insertions(+), 0 deletions(-)
>  create mode 100644 arch/mips/include/asm/gpio.h
> 
> diff --git a/arch/mips/include/asm/gpio.h b/arch/mips/include/asm/gpio.h
> new file mode 100644
> index 000..04a98ad
> --- /dev/null
> +++ b/arch/mips/include/asm/gpio.h
> @@ -0,0 +1,13 @@
> +/*
> + * This file is released under the terms of GPL v2 and any later version.
> + * See the file COPYING in the root directory of the source tree for
> details. + *
> + * Copyright (C) 2011 Daniel Schwierzeck,
> daniel.schwierz...@googlemail.com + */
> +
> +#ifndef __ASM_MIPS_GPIO_H__
> +#define __ASM_MIPS_GPIO_H__
> +
> +#include 
> +
> +#endif /* __ASM_MIPS_GPIO_H__ */

I see why you need this:

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


Re: [U-Boot] [PATCH 08/11] MIPS: add additional reserved vectors for MIPS24K and MIPS34K cores

2011-11-25 Thread Marek Vasut
> Signed-off-by: Daniel Schwierzeck 
> ---
>  arch/mips/cpu/mips32/start.S |   21 +++--
>  1 files changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S
> index b6cb4be..03cfd5a 100644
> --- a/arch/mips/cpu/mips32/start.S
> +++ b/arch/mips/cpu/mips32/start.S
> @@ -206,11 +206,28 @@ _start:
>   RVECENT(romReserved,125)
>   RVECENT(romReserved,126)
>   RVECENT(romReserved,127)
> + XVECENT(romExcHandle,0x400);
> + RVECENT(romReserved,129);
> + RVECENT(romReserved,130);
> + RVECENT(romReserved,131);
> + RVECENT(romReserved,132);
> + RVECENT(romReserved,133);
> + RVECENT(romReserved,134);
> + RVECENT(romReserved,135);
> + RVECENT(romReserved,136);
> + RVECENT(romReserved,137);
> + RVECENT(romReserved,138);
> + RVECENT(romReserved,139);
> + RVECENT(romReserved,140);
> + RVECENT(romReserved,141);
> + RVECENT(romReserved,142);
> + RVECENT(romReserved,143);
> + XVECENT(romExcHandle,0x480);# bfc00480: EJTAG debug exception

Use .rept maybe to avoid this copy-paste?

> 
>   /*
>* We hope there are no more reserved vectors!
> -  * 128 * 8 == 1024 == 0x400
> -  * so this is address R_VEC+0x400 == 0xbfc00400
> +  * 144 * 8 == 1152 == 0x480
> +  * so this is address R_VEC+0x480 == 0xbfc00480
>*/
>   .align 4
>  reset:

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


  1   2   >