U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Jackson <mpfj-list@newflow.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] am33xx: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device bus-width
Date: Tue, 01 Oct 2013 09:31:28 +0100	[thread overview]
Message-ID: <524A8860.7070304@newflow.co.uk> (raw)
In-Reply-To: <1380086638-17597-1-git-send-email-pekon@ti.com>

On 25/09/13 06:23, Pekon Gupta wrote:
> NAND driver needs to know bus-width of the connected NAND device, in order to
> perform proper I/O and initialize itself. Currently there is no CONFIG option
> to provide this information to NAND driver.
> - SPL NAND driver does not have framework to parse ONFI parameter page.
> - NAND drivers which cannot self initialize !defined(CONFIG_SYS_NAND_SELF_INIT)
>   do not have any information about device bus-width during board_nand_init(),
>   So, any device-width specific configurations are not possible there.
> - There should be some mechanism to pass device bus-width information for
>   non-ONFI compliant devices.
> 
> This patch
> (1) adds CONFIG_SYS_NAND_DEVICE_WIDTH which can take following value
> 	16: NAND device with x16 bus-width
> 	8:  NAND device with x8 bus-width
> (2) removes GPMC_NAND_ECC_LP_x16_LAYOUT, as NAND layout is determined based on
> 	ecc-scheme and oobsize during initialization in board_nand_init(). Thus
> 	this config is redundant.
> 
> Signed-off-by: Pekon Gupta <pekon@ti.com>

<snip>

> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> index 978bca7..c92cb2f 100644
> --- a/include/configs/am335x_evm.h
> +++ b/include/configs/am335x_evm.h
> @@ -216,6 +216,7 @@
>  
>  #ifdef CONFIG_NAND
>  #define CONFIG_SYS_NAND_5_ADDR_CYCLE
> +#define CONFIG_SYS_NAND_DEVICE_WIDTH	8

This new setting ...

>  #define CONFIG_SYS_NAND_BLOCK_SIZE	131072
>  #define CONFIG_SYS_NAND_PAGE_SIZE	2048
>  #define CONFIG_SYS_NAND_OOBSIZE		64
> @@ -366,7 +367,6 @@
>  /* NAND support */
>  #ifdef CONFIG_NAND
>  #define CONFIG_CMD_NAND
> -#define GPMC_NAND_ECC_LP_x16_LAYOUT	1

... does *not* match with what you're taking out here !!

>  #if !defined(CONFIG_SPI_BOOT) && !defined(CONFIG_NOR_BOOT)
>  #define MTDIDS_DEFAULT			"nand0=omap2-nand.0"
>  #define MTDPARTS_DEFAULT		"mtdparts=omap2-nand.0:128k(SPL)," \
> diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
> index 1fd2508..0985221 100644
> --- a/include/configs/am3517_crane.h
> +++ b/include/configs/am3517_crane.h
> @@ -269,7 +269,6 @@
>  #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
>  
>  #define CONFIG_NAND_OMAP_GPMC
> -#define GPMC_NAND_ECC_LP_x16_LAYOUT	1

Same here ...

>  #define CONFIG_ENV_IS_IN_NAND		1
>  #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
>  
> @@ -332,6 +331,7 @@
>  
>  /* NAND boot config */
>  #define CONFIG_SYS_NAND_5_ADDR_CYCLE
> +#define CONFIG_SYS_NAND_DEVICE_WIDTH	8

... !!

>  #define CONFIG_SYS_NAND_PAGE_COUNT	64
>  #define CONFIG_SYS_NAND_PAGE_SIZE	2048
>  #define CONFIG_SYS_NAND_OOBSIZE		64
> diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
> index 6500878..8593d44 100644
> --- a/include/configs/am3517_evm.h
> +++ b/include/configs/am3517_evm.h
> @@ -263,7 +263,6 @@
>  #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
>  
>  #define CONFIG_NAND_OMAP_GPMC
> -#define GPMC_NAND_ECC_LP_x16_LAYOUT	1

Again ...

>  #define CONFIG_ENV_IS_IN_NAND		1
>  #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
>  
> @@ -326,6 +325,7 @@
>  
>  /* NAND boot config */
>  #define CONFIG_SYS_NAND_5_ADDR_CYCLE
> +#define CONFIG_SYS_NAND_DEVICE_WIDTH	8

... !!

>  #define CONFIG_SYS_NAND_PAGE_COUNT	64
>  #define CONFIG_SYS_NAND_PAGE_SIZE	2048
>  #define CONFIG_SYS_NAND_OOBSIZE		64
> diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
> index bc5b66c..1e3dd0d 100644
> --- a/include/configs/cm_t35.h
> +++ b/include/configs/cm_t35.h
> @@ -164,8 +164,6 @@
>  #define CONFIG_SYS_NAND_BASE		NAND_BASE	/* physical address */
>  							/* to access nand at */
>  							/* CS0 */
> -#define GPMC_NAND_ECC_LP_x8_LAYOUT
> -

And here you don't specify the new setting at all.

>  #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of NAND */
>  							/* devices */
>  /* Environment information */

<snip>

There's several other instances of the same issue through the whole patch.

Mark J.

  reply	other threads:[~2013-10-01  8:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25  5:23 [U-Boot] [PATCH 1/1] am33xx: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device bus-width Pekon Gupta
2013-10-01  8:31 ` Mark Jackson [this message]
2013-10-01 10:26   ` Gupta, Pekon
  -- strict thread matches above, loose matches on Subject: below --
2013-09-28  6:27 Gupta, Pekon
2013-09-27  4:22 Gupta, Pekon
2013-09-26 13:17 Gupta, Pekon
2013-09-26 13:21 ` Gupta, Pekon
2013-09-25  5:18 Pekon Gupta
2013-09-25 22:08 ` Woodruff, Richard
2013-09-25 22:16   ` Scott Wood
     [not found]     ` <20980858CB6D3A4BAE95CA194937D5E73EA16E87@DBDE04.ent.ti.com>
2013-09-26 19:29       ` Scott Wood
     [not found]         ` <20980858CB6D3A4BAE95CA194937D5E73EA1726A@DBDE04.ent.ti.com>
2013-09-27 21:08           ` Scott Wood
     [not found]             ` <20980858CB6D3A4BAE95CA194937D5E73EA17A1E@DBDE04.ent.ti.com>
2013-10-01 19:42               ` Scott Wood
2013-10-02 14:49                 ` Gupta, Pekon
     [not found]                 ` <20980858CB6D3A4BAE95CA194937D5E73EA1901F@DBDE04.ent.ti.com>
2013-10-02 22:03                   ` Scott Wood

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=524A8860.7070304@newflow.co.uk \
    --to=mpfj-list@newflow.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox