OMAP1510 and Flash mapping

OMAP1510 and Flash mapping

Post by frederic.go.. » Sat, 13 Jul 2002 00:14:05



Hello,

I use an ARM board (OMAP1510) with the DSPLinux distribution (kernel
2.4). I would like to write a driver that provides a mmap read access
to the flash memory as an extension to MTD. I've written a simple
driver that performs the mmap in 2 different ways:

        - by implementing the nopage function: all the methods I used
          to retreive the correct page did not work (immediate system
          freeze)

        - by calling remap_page_range:

          a simple userland program can correctly mmap the device, and
          access the page for reading (directly), flashing and
          rewriting (through the standard MTD API). After the first
          flash operation, the data reads 0x80, whereas after a reboot
          I can read 0xff values as expected...

Does this sound familiar to anyone ? If there is a way to solve the
problem with the remap_page_range method, I would be pleased. In any
case, if someone could tell me how to retreive the correct page for
the "nopage" method, this would in addition deliver me from a growing
frustration :-)

Thanks in advance,
Frdric