[PATCH] [MTD-UTILS] Add support for 4KB page flash devices

Kyungmin Park kmpark at infradead.org
Thu Sep 25 20:28:22 EDT 2008


>     I find not much issue with that, but still as a fair practice , I'll
> absorb your comment in the patch. Have done the memory allocation later in
> the function to avoid unnecessary freeing code.
>     And malloced with mtdInfo.writesize instead of constants , let us know
> your comments.
>
> We can now use these utilities on 4KB devices.
>
> Signed-off-by: Rohit Hagargundgi <h.rohit at samsung.com>
> ---

Acked-by: Kyungmin Park <kyungmin.park at samsung.com>

>  }
> --- a/include/mtd/mtd-abi.h     2008-09-23 15:36:26.000000000 +0530
> +++ b/include/mtd/mtd-abi.h     2008-09-23 15:48:48.000000000 +0530
> @@ -104,7 +104,7 @@ struct nand_oobinfo {
>        uint32_t useecc;
>        uint32_t eccbytes;
>        uint32_t oobfree[8][2];
> -       uint32_t eccpos[32];
> +       uint32_t eccpos[128];
>  };
>
>  struct nand_oobfree {
> @@ -119,7 +119,7 @@ struct nand_oobfree {
>  */
>  struct nand_ecclayout {
>        uint32_t eccbytes;
> -       uint32_t eccpos[64];
> +       uint32_t eccpos[128];
>        uint32_t oobavail;
>        struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
>  };
>
>
>
>
>
> -----Original Message-----
> From: kyungmin78 at gmail.com [mailto:kyungmin78 at gmail.com] On Behalf Of
> Kyungmin Park
> Sent: Monday, September 22, 2008 11:53 AM
> To: moorthy.apg at samsung.com
> Cc: linux-mtd at lists.infradead.org; David.Woodhouse at intel.com
> Subject: Re: [PATCH] [MTD-UTILS] Add support for 4KB page flash devices
>
> Hi,
>
> On Fri, Sep 19, 2008 at 9:41 PM, AYYANARPONNUSAMY GANGHEYAMOORTHY
> <moorthy.apg at samsung.com> wrote:
>> We can now use these utilities on 4KB devices.
>>
>> Signed-off-by: Rohit Hagargundgi <h.rohit at samsung.com>
>> ---
>> --- a/flash_otp_write.c 2008-06-27 21:51:28.000000000 +0530
>> +++ b/flash_otp_write.c 2008-07-01 16:04:12.000000000 +0530
>> @@ -18,7 +18,7 @@ int main(int argc,char *argv[])
>>        int fd, val, ret, size, wrote, len;
>>        mtd_info_t mtdInfo;
>>        off_t offset;
>> -       char *p, buf[2048];
>> +       char *p, buf[4096];
>>
>
> Is it no problem the stack overflow in application?
> How about to use malloc & free?
>
> Thank you,
> Kyungmin Park
>
>



More information about the linux-mtd mailing list