All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 11/13] nand_spl_simple: store temp data at	CONFIG_SPL_NAND_WORKSPACE
Date: Wed, 30 Nov 2011 10:06:47 +0200	[thread overview]
Message-ID: <4ED5E417.5010002@compulab.co.il> (raw)
In-Reply-To: <1322498261-20645-12-git-send-email-yanok@emcraft.com>

Hi Ilya,

On 11/28/11 18:37, Ilya Yanok wrote:
> Currently nand_spl_simple puts it's temp data at 0x10000 offset in SDRAM
> which is likely to contain already loaded data. I can't see any way to
> determine some safe address automagically so make it up to board porter
> to provide the safe-to-use address via CONFIG_SPL_NAND_WORKSPACE value.
> 
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
>  drivers/mtd/nand/nand_spl_simple.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/nand/nand_spl_simple.c b/drivers/mtd/nand/nand_spl_simple.c
> index ed821f2..70f3cfe 100644
> --- a/drivers/mtd/nand/nand_spl_simple.c
> +++ b/drivers/mtd/nand/nand_spl_simple.c
> @@ -199,8 +199,13 @@ static int nand_read_page(int block, int page, void *dst)
>  
>  	/* No malloc available for now, just use some temporary locations
>  	 * in SDRAM
> +	 * Please provide some safe value for CONFIG_SPL_NAND_WORKSPACE in
> +	 * your board configuration, this is just a guess!!
>  	 */
> -	ecc_calc = (u_char *)(CONFIG_SYS_SDRAM_BASE + 0x10000);
> +#ifndef CONFIG_SPL_NAND_WORKSPACE
> +#define CONFIG_SPL_NAND_WORKSPACE	(CONFIG_SYS_SDRAM_BASE + 0x10000)
> +#endif
> +	ecc_calc = (u_char *)CONFIG_SPL_NAND_WORKSPACE;
>  	ecc_code = ecc_calc + 0x100;
>  	oob_data = ecc_calc + 0x200;

If you change this, you probably should change also
the second version of this function (CONFIG_SYS_NAND_HW_ECC_OOBFIRST)
or instead pass it as a parameter to the finction(s) from an upper layer.

Have you tried to use the stack as a buffer for those calculations?


-- 
Regards,
Igor.

  parent reply	other threads:[~2011-11-30  8:06 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28 16:37 [U-Boot] [PATCH V3 00/13] Support for HTKW mcx board Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 01/13] davinci_emac: move arch-independent defines to separate header Ilya Yanok
2011-11-29 18:57   ` Tom Rini
2011-11-30  7:35     ` Igor Grinberg
2011-11-30 14:21       ` Tom Rini
2011-11-30 15:16         ` Igor Grinberg
2011-11-30 15:27           ` Tom Rini
2011-11-30  7:42   ` Igor Grinberg
2011-12-07 23:48     ` Ilya Yanok
2011-12-08 14:33       ` Igor Grinberg
2011-12-08 14:42         ` Tom Rini
2011-12-08 15:13           ` Igor Grinberg
2011-11-28 16:37 ` [U-Boot] [PATCH 02/13] davinci_emac: use internal addresses in buffer descriptors Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 03/13] davinci_emac: conditionally compile specific PHY support Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 04/13] arm926ejs: add noop implementation for dcache ops Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 05/13] davinci_emac: fix for running with dcache enabled Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 06/13] davinci_emac: hardcode 100Mbps for AM35xx and RMII Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 07/13] AM35xx: add EMAC support Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 08/13] AM3517: move AM3517 specific mux defines to generic header Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 09/13] nand_spl_simple: add support for software ECC Ilya Yanok
2011-11-29 18:42   ` Scott Wood
2011-11-28 16:37 ` [U-Boot] [PATCH 10/13] omap_gpmc: use SOFTECC in SPL if it's enabled Ilya Yanok
2011-11-29 18:43   ` Scott Wood
2011-11-28 16:37 ` [U-Boot] [PATCH 11/13] nand_spl_simple: store temp data at CONFIG_SPL_NAND_WORKSPACE Ilya Yanok
2011-11-29 18:43   ` Scott Wood
2011-11-30  8:06   ` Igor Grinberg [this message]
2011-12-07  9:06   ` Stefano Babic
2011-12-07 17:46     ` Ilya Yanok
2011-12-07 18:18       ` Scott Wood
2011-12-07 18:45       ` Wolfgang Denk
2011-12-07 19:05         ` Ilya Yanok
2011-12-07 19:07         ` Stefano Babic
2011-11-28 16:37 ` [U-Boot] [PATCH 12/13] ehci-omap: driver for EHCI host on OMAP3 Ilya Yanok
2011-11-28 16:37 ` [U-Boot] [PATCH 13/13] mcx: support for HTKW mcx board Ilya Yanok
2011-11-29 18:54   ` Tom Rini
2011-11-30 13:49     ` Andy Fleming
2011-11-30 14:24       ` Tom Rini
2011-11-30 18:41       ` Wolfgang Denk
2011-11-30  8:21   ` Igor Grinberg
2011-12-12 15:39     ` Ilya Yanok
2011-12-12 16:22       ` Tom Rini
2011-12-13 19:18         ` Ilya Yanok
2011-12-14 22:40           ` Tom Rini
2011-11-29  7:29 ` [U-Boot] [PATCH V3 00/13] Support " Igor Grinberg
2011-11-29  7:39   ` Ilya Yanok
2011-11-29  7:54     ` Igor Grinberg
  -- strict thread matches above, loose matches on Subject: below --
2011-11-11  0:39 [U-Boot] [PATCH v2 " Ilya Yanok
2011-11-11  0:39 ` [U-Boot] [PATCH 11/13] nand_spl_simple: store temp data at CONFIG_SPL_NAND_WORKSPACE Ilya Yanok

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ED5E417.5010002@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.