[U-Boot-Users] Atmel DataFlash hooks.

Grant Likely grant.likely at secretlab.ca
Wed Jan 31 17:50:14 CET 2007


On 1/29/07, Ulf Samuelsson <ulfs at 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.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195




More information about the U-Boot mailing list