What is subpage_sft??

Kyungmin Park kyungmin.park at samsung.com
Tue Jul 3 01:34:27 EDT 2007


Hi,

> I tried searching on net to understand what subpage_sft means, but
> aint find any relevant information.
> 
> What does subpage_sft means?? Where it is used?? Is it related with
> NAND or NOR flash?
> Can anybody provide this little information to me. Any relevant
> document or link is welcome.

It is used at UBI. It means it can program sector(s) with (mtd->writesize >> mtd->subpage_sft) instead of page (2KB).

	switch (mtd->oobsize) {
        case 64:
                this->ecclayout = &onenand_oob_64;
                mtd->subpage_sft = 2;
                break;

        case 32:
                this->ecclayout = &onenand_oob_32;
                mtd->subpage_sft = 1;
                break;

        default:
                printk(KERN_WARNING "No OOB scheme defined for oobsize %d\n",
                        mtd->oobsize);
                mtd->subpage_sft = 0;
                /* To prevent kernel oops */
                this->ecclayout = &onenand_oob_32;
                break;
        }

        this->subpagesize = mtd->writesize >> mtd->subpage_sft;

E.g., OneNAND (SLC) can program 4 times with 512

Thank you,
Kyungmin Park




More information about the linux-mtd mailing list