intel p30, unlocking before loading driver, again

Josh Boyer jwboyer at
Tue Dec 12 20:31:12 EST 2006

On Tue, 2006-12-12 at 15:01 -0800, Daniel Robinson wrote:
> I have a board with a P30 part on it and here are the knowns:
> 1) the P30 powers up with all blocks locked.


> 2) if the driver gets loaded with the blocks locked, mode is 0660
> (rw-rw----), which allows me to open the device in O_RDWR mode, will
> let me do ioctl() calls to unlock blocks, but won't let me write to
> the device.  The ioctl() returns without error, but writing fails
> because it is a read only file system.
> 3) In an attempt to increase robustness for a system that will be
> embedded, I want to limit the amount of the part that is unlocked and
> available for writing.  Ideally, I would like to control that
> parametrically.
> I can't find the place in the flash device is checked for being
> unlocked and the bits are set that indicate that it is a read-only
> device.

There are commands you can send to the chip to query this status.  See
the datasheet for the flash chip.

You can partition up your device and unlock partitions as needed.  Or
you can do it from within a board driver if you need it at boot time for
things like a root filesystem.


More information about the linux-mtd mailing list