This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Intel 28fxxxx flash: correct flash_program_buf prototype.


On Fri, Apr 22, 2005 at 02:55:41PM +0100, David Vrabel wrote:
> Hi,
> 
> This patch corrects the Intel 28fxxxx flash driver's flash_program_buf
> function prototype.  It's the same as the AMD 29xxxxx driver's one now.
>  I assume the API changed at some point and this driver didn't get updated.

packages/io/flash.c:285
        stat = (*_flash_program_buf)(addr, data, size, 
                                     flash_info.block_mask, flash_info.buffer_size);

So the 28fxxxx is correct.

The amd 29xxxx does not use the extra parameters (obviously). It will
work like it is so long as the caller is responsible for cleaning up
after the function call. Ie if parameters are passed on the stack it
needs to move the stack pointer back the correct number of times. If
the callee it responsible for this, then a crash is likely.

A quick grep of the repository suggests that most of the drivers only
have 3 parameters, not 5!

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]