On Wednesday, April 16, 2014 at 02:37:13 PM, Austin Boyle wrote:
> This patch generalises the calculation of block protect bits based on the
> number of sectors and implements the _is_locked function.
> 
> Existing calculation of block protect bits only works for devices with 64
> sectors or more. This new logic is applicable to the STmicro devices:
> m25p10, p20, p40, p80, p16, pe16, p32, p64, p128.
> Note devices with >64 sectors only allow the protected region to be
> specified to a resolution of 1/64th of the total size (such as m25p64).
> 
> New return codes for ioctl(MEMISLOCKED) have been added to
> uapi/mtd/mtd-abi.h because the _is_locked function can query a region
> which is partially unlocked.
> 
> Added flag to m25p_ids table to indicate if flash protection is supported.
> 
> Added n_sectors and sector_size to m25p flash structure so it can be used
> in block protect bit calculation.
> 
> From: Austin Boyle <[email protected]>
> Signed-off-by: Austin Boyle <[email protected]>

Acked-by: Marek Vasut <[email protected]>

Thanks!

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to