Hi again,
Is there a possibility to force g_file_storage to transfer captured data
directly from device's RAM instead of using file as a backing storage?
This should be used only for downloading data to host (but writing to id
will be good). Data in the device's RAM is stored in raw format (no file
system). Maximum amount of data will be 256MB. It can be transfered as a one
file if necessary.
Should I make MTD driver for this part od memory?
Your question isn't very clear. You wouldn't want your data to overwrite the Linux kernel running in the device, for instance. Remember that Linux is using the device's RAM in order to operate; how do you expect to find a region that's available for your backing file?
Like David said, you can use a ramdisk. Or an MTD device file. Either one should work okay as backing storage.
Sorry about unclear question. I'll try to clear out the problem .
I'm using XScale pxa255 based board with 64 MB RAM running Linux 2.6.7. The device I was talking about is consisted of FPGA, CMOS senzor and 256 MB SDRAM memory. FPGA's role is to drive CMOS senzor, and it is attached to PXA255 via SRAM interface. Captured images from CMOS senzor are stored in SDRAM (also attached to FPGA; this memory is not visible to Linux). FPGA's SDRAM is accessible to user through PXA's SRAM address space. Accessing this memory is enbled through FPGA driver which I wrote, and that is working fine.
Now, when user app tells FPGA module to capture images from CMOS senzor, images will be stored in raw format in FPGA's SDRAM (not boards RAM which Linux is using). When storing is finished, user app can read through FPGA driver FPGA's registers which tells how much images are stored, size of one image, and starting address of the first image (images are stored one after another). After that it is easy to read images data from FPGA's SDRAM (this memory is mapped to user space through FPGA driver) and to copy them to files via NFS on the host machine.
Transfer should be done via USB directly from FPGA's SDRAM to host machine (Linux/Win). I think that copyng data from FPGA's SDRAM to board's RAM (ramdisk or backing storage file) is not acceptible because there is not enough memory to copy all data (256MB -> 64 MB) and partial copying will take some time.
I don't know how to approach to this problem. At least, is something like this possible?
Any suggestions, where to look, what to read?
Thanks, Manja
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
