[PATCH v3 1/3] omap3 gpmc: functionality enhancement

Vimal Singh vimal.newwork at gmail.com
Tue May 25 11:34:37 EDT 2010


On Tue, May 25, 2010 at 8:07 PM, Ghorai, Sukumar <s-ghorai at ti.com> wrote:
[...]
>> > c. And how to know that ECC engine is in used other driver should not
>> use it? Any bit to know that ecc engine is busy, as we check for prefetch?
>> Do not really remember config registers. Perhaps there is no way.
>> But I guess you should check into register GPMC_ECC_CONFIG at bit 1.
>> This is the bit we are setting to enable ECC calculation, IIRC.
> [Ghorai] there are two functions -
>       info->nand.ecc.calculate        = omap_calculate_ecc;
>       info->nand.ecc.hwctl            = omap_enable_hwecc;
> And GPMC_ECC_CONFIG register..
>        3:1 ECCCS Selects the CS where ECC is computed
>        0 ECCENABLE Enables the ECC feature
> Now we enable omap_enable_hwecc (with GPMC_ECC_CONFIG[ECCENABLE]=1); and its get disabled (automatically) when ecc_size data transfer over.
> But say still it did not read the ecc value yet (omap_calculate_ecc).
> So how to protect following omap_enable_hwecc() before omap_calculate_ecc()  without additional flag? Any input is welcome.

Oh yes, that's is a problem. Perhaps in that case you have to protect
it in very much same way you already did.

-- 
Regards,
Vimal Singh



More information about the linux-mtd mailing list