[U-Boot-Users] [PATCH] NAND boot: Update large page support for current API.
Guennadi Liakhovetski
lg at denx.de
Tue Aug 5 18:55:35 CEST 2008
On Tue, 5 Aug 2008, Scott Wood wrote:
> Also, remove the ctrl variable in favor of passing the constants
> directly, and remove redundant (u8) casts.
>
> Signed-off-by: Scott Wood <scottwood at freescale.com>
> ---
> This patch is untested, as I don't have the hardware.
> Applied to u-boot-nand-flash/testing.
>
> nand_spl/nand_boot.c | 50 ++++++++++++++++++++------------------------------
> 1 files changed, 20 insertions(+), 30 deletions(-)
>
> diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
> index 0f56ba5..81b4dfc 100644
> --- a/nand_spl/nand_boot.c
> +++ b/nand_spl/nand_boot.c
> @@ -37,7 +37,6 @@ static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8
> {
> struct nand_chip *this = mtd->priv;
> int page_addr = page + block * CFG_NAND_PAGE_COUNT;
> - int ctrl = NAND_CTRL_CLE | NAND_CTRL_CHANGE;
>
> if (this->dev_ready)
> while (!this->dev_ready(mtd))
> @@ -46,18 +45,15 @@ static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8
> CFG_NAND_READ_DELAY;
>
> /* Begin command latch cycle */
> - this->cmd_ctrl(mtd, cmd, ctrl);
> + this->cmd_ctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE);
[snip]
See? you do the same! You replace short lowercase variable with long
uppercase macros:-) But I like this change, as well as mine - it makes it
easier to follow the sources. I'll test your patch later - as soon as I
get access to the hardware... Probably, tomorrow.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
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: office at denx.de
More information about the U-Boot
mailing list