All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Ruslan V. Sushko" <rsushko@ru.mvista.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATH] NAND Flash support for Intel IXP4xx platform
Date: Sat, 28 Apr 2007 14:35:36 +0200	[thread overview]
Message-ID: <1177763736.7646.149.camel@localhost.localdomain> (raw)
In-Reply-To: <463332F9.9040105@ru.mvista.com>

On Sat, 2007-04-28 at 15:41 +0400, Ruslan V. Sushko wrote:
> +static void ixp_write_buf(struct mtd_info *mtd, const u_char * buf, int 
> len)
> +{
> +       int i;
> +       struct nand_chip *this = mtd->priv;
> +
> +       for (i = 0; i < len; i++)
> +               writeb(buf[i], this->IO_ADDR_W);
> +}

How excatly is this functionally different from the generic write_buf
function in nand_base.c ?

static void nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
{
        int i;
        struct nand_chip *chip = mtd->priv;

        for (i = 0; i < len; i++)
                writeb(buf[i], chip->IO_ADDR_W);
}

> +static void ixp4xx_hwcontrol(struct mtd_info *mtd, int cmd, unsigned 
> int ctrl)
> +{
> +       struct nand_chip *this = mtd->priv;
> +       struct ixp4xx_faddr_info_t *addr_info = this->priv;

Newline between variables and code !

> +       if (ctrl & NAND_CTRL_CHANGE) {
> +               addr_info->offset = (ctrl & NAND_CLE) ? IXP4XX_NAND_CLE : 0;
> +               addr_info->offset |= (ctrl & NAND_ALE) ? IXP4XX_NAND_ALE 
> : 0;

Your patch is word wrapped !

> +               if (addr_info->chip_select)
> +                       addr_info->chip_select(ctrl);
> +       }
> +
> +       if (cmd != NAND_CMD_NONE)
> +               writeb(cmd, this->IO_ADDR_W + addr_info->offset);
> +}

Aside of that I agree with Lennert, that we really need to get around
and make this real platform code.

	tglx

  parent reply	other threads:[~2007-04-28 12:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-28 11:41 [PATH] NAND Flash support for Intel IXP4xx platform Ruslan V. Sushko
2007-04-28 12:33 ` David Woodhouse
2007-04-28 13:32   ` Ruslan V. Sushko
2007-04-28 12:35 ` Thomas Gleixner [this message]
2007-04-28 13:42   ` Ruslan V. Sushko
2007-04-28 21:02     ` Thomas Gleixner
2007-04-30  7:36       ` Ruslan V. Sushko
2007-04-30  8:17         ` Thomas Gleixner
2007-04-30  8:24           ` Vitaly Wool
2007-05-02 16:03         ` Deepak Saxena
2007-05-02 18:09           ` Vitaly Wool

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=1177763736.7646.149.camel@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rsushko@ru.mvista.com \
    /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.