Re: [U-Boot-Users] Atmel DataFlash hooks.

On 1/29/07, Ulf Samuelsson ulfs@atmel.com wrote:
Notes:
- assume device can only be opened once. ie. it's a bug to call
open() twice
I dont see why you should need to call any "open" routine since the dataflash is active before u-boot has even started and does not need any initialization sequence.
I'm thinking in terms of the open() routine providing a pointer to the device data structure; either by allocating a new one or just returning a preinitialized structure. The point being that the device driver can decide how to manage/map devices structures and the relevant command won't care. Open would most likely accept a string argument which identifies the desired device.
I'm also thinking that if a device can accept multiple read or write operations after a single setup command, then the setup command can be issued in the open() routine.
I'm going to do a trial implementation of that stuff discussed so far so I can post patches for review. At that point I'll be looking for feedback to decide if this is a direction worth pursuing further. If so, then I'll take a look at the protect/erase/etc features
I don't think anything trivial should be merged. It should be kept as a
I'm not going to push for anything to be merged until I'm sure of the approach, and until others agree.
g.
participants (1)
-
Grant Likely