public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@logfs.org>
To: Kyungmin Park <kyungmin.park@samsung.com>
Cc: dwmw2@infradead.org, linux-mtd@lists.infradead.org
Subject: Re: [RFC][PATCH][JFFS2] JFFS2 support for NOP 1
Date: Tue, 27 Nov 2007 10:55:18 +0100	[thread overview]
Message-ID: <20071127095518.GA29456@lazybastard.org> (raw)
In-Reply-To: <20071127073616.GA22556@party>

On Tue, 27 November 2007 16:36:16 +0900, Kyungmin Park wrote:
> diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
> index bf64686..70881bc 100644
> --- a/fs/jffs2/os-linux.h
> +++ b/fs/jffs2/os-linux.h
> @@ -110,7 +110,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
>  #define jffs2_can_mark_obsolete(c) (c->mtd->flags & (MTD_BIT_WRITEABLE))
>  #endif
>  
> -#define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH)
> +#define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH && !(c->mtd->flags & MTD_MULTI_LEVEL_CHIP))
>  
>  #define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf))
>  #define jffs2_flash_read_oob(c, ofs, len, retlen, buf) ((c)->mtd->read_oob((c)->mtd, ofs, len, retlen, buf))
> diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
> diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
> diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
> index f71dac4..80334d7 100644
> --- a/include/mtd/mtd-abi.h
> +++ b/include/mtd/mtd-abi.h
> @@ -30,12 +30,14 @@ struct mtd_oob_buf {
>  #define MTD_BIT_WRITEABLE	0x800	/* Single bits can be flipped */
>  #define MTD_NO_ERASE		0x1000	/* No erase necessary */
>  #define MTD_STUPID_LOCK		0x2000	/* Always locked after reset */
> +#define MTD_MULTI_LEVEL_CHIP	0x4000	/* Multi Level Chip */
>  
>  // Some common devices / combinations of capabilities
>  #define MTD_CAP_ROM		0
>  #define MTD_CAP_RAM		(MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
>  #define MTD_CAP_NORFLASH	(MTD_WRITEABLE | MTD_BIT_WRITEABLE)
>  #define MTD_CAP_NANDFLASH	(MTD_WRITEABLE)
> +#define MTD_CAP_MLC_NANDFLASH	(MTD_WRITEABLE | MTD_MULTI_LEVEL_CHIP)

NAK.  This does not describe the limitations of your chip, but a random
name.  In fact, the limitations appear to be identical to
(MTD_NORFLASH & !MTD_BIT_WRITEABLE).

Maybe something like ALLOW_SEPERATE_OOB_WRITE with reversed logic?

Jörn

-- 
It does not require a majority to prevail, but rather an irate,
tireless minority keen to set brush fires in people's minds.
-- Samuel Adams

  reply	other threads:[~2007-11-27 10:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27  7:36 [RFC][PATCH][JFFS2] JFFS2 support for NOP 1 Kyungmin Park
2007-11-27  9:55 ` Jörn Engel [this message]
2007-11-27 11:48   ` Kyungmin Park
2007-11-27 11:59     ` Artem Bityutskiy
2007-11-27 23:28       ` Kyungmin Park
2007-11-27 23:31         ` Jörn Engel
2007-11-28  2:08           ` Kyungmin Park
2007-11-28  2:47             ` Jörn Engel
2007-12-03  4:33               ` Kyungmin Park
2007-11-27 13:03     ` Jörn Engel
2007-11-27 23:41       ` Kyungmin Park

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=20071127095518.GA29456@lazybastard.org \
    --to=joern@logfs.org \
    --cc=dwmw2@infradead.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-mtd@lists.infradead.org \
    /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