On Thu, Dec 20, 2001 at 10:40:36AM -0500, [EMAIL PROTECTED] wrote:
> > But again, I don't see why you have to allocate these large amounts of
> > memory.  If you already have the data in memory, just copy it in small
> > chunks, like the usb-serial drivers do.
> 
> Trust me, for now I need to do this. A short explanation attempt .... we
> have a hex/text format of DSP memory. However, the DSP obviously wants
> us to send him memory blocks in a binary format. So, the first thing we
> do is we create a virtual picture of the DSP's entire memory by
> allocating a large chunk of memory and creating the binary form from the
> hex form (the hex/text code is actually Motorolla S-record format). We
> then setup arrays of structures that define the various blocks of DSP
> memory in the big chunk. These represent our memory map of our copy of
> the DSP memory. That way when the DSP says "send me swap page 28", we
> know where it is in the big chunk, and how big it is.

Um, why not do all of that processing beforehand, and create a large
binary image in a .h file of your memory map.  Then you have a static
variable that is your memory map.  So when the DSP asks for "swap page
28" you just jump to that portion of your variable, and send it off.
Processing the image just once, on your single machine makes a lot more
sense than having every user of your driver do that same processing at
load time.

Unless you have to create your image based on run time information from
the DSP itself?

Or do everything in userspace (as this is where all of the firmware
download is going in the near future.)  Use usbdevfs (or libusb to make
things easier for you.)  The linux-hotplug project already has a EZUSB
firmware downloader in userspace for an example of how to do this.  I
think the Actel DSL modem driver is another example.

What's going to be the license for this driver?

thanks,

greg k-h

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to