How to erase flash memory in a module

992 Views Asked by At

On my Linux system I can erase flash memory from the command line by using the flash_erase program from the mtd library. But I need to erase an mtd partition in a module. In the kernel include files I found linux/mtd/mtd.h, but that defines structures, not functions to call. Is there someone out there who can point me in the right direction to do this? Thanks, Han

1

There are 1 best solutions below

2
On

You don't want to do this from a kernel module. Just start a user mode helper process and do it the way it is supposed to work.