]> www.infradead.org Git - mtd-utils.git/commit
flash_unlock: enhancing for unlocking of specified number of blocks
authorVimal Singh <vimal.newwork@gmail.com>
Wed, 2 Dec 2009 14:30:14 +0000 (20:00 +0530)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 9 Dec 2009 10:32:50 +0000 (12:32 +0200)
commit2426f4b7219c77b3d33b40c01f6d97d0ca0adc5f
tree5de0948909769a33c74a7f4b62cd056ef35fa462
parent43feb39f35a9ee0ed318df80433243c0bfe263ea
flash_unlock: enhancing for unlocking of specified number of blocks

This patch enhances the flash_unlock utility to be able to do
unlocking for specified blocks range.
This patch also fixes calculation of 'length' as in previous patch.

Say there are 240 blocks present in the device. Then:
offset starts from: 0x0
and full size of device: 0x1E00000

doing: 240 * 0x20000 gives -> 0x1E00000
But last block address should be 0x1DE0000 (which spans for 0x20000
bytes, adding up to size of 0x1E00000)

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
flash_unlock.c