[U-Boot-Users] FIX: dataflash.c

trimarchi at gandalf.sssup.it trimarchi at gandalf.sssup.it
Mon Aug 20 01:56:18 CEST 2007


Quoting Wolfgang Denk <wd at denx.de>:

> In message   
> <1defaf580708191437p19e70b02t43f5bcb5dc986e5c at mail.gmail.com> you   
> wrote:
>> On 8/19/07, Wolfgang Denk <wd at denx.de> wrote:
>> > In message <20070818231206.GA4040 at gandalf.sssup.it> you wrote:
>> > > --- drivers/dataflash.c.orig  2007-08-18 17:36:08.000000000 +0200
>> > > +++ drivers/dataflash.c       2007-08-18 17:37:05.000000000 +0200
>> > > @@ -27,16 +27,16 @@ AT91S_DATAFLASH_INFO dataflash_info[CFG_
>> > >  static AT91S_DataFlash DataFlashInst;
>> > >
>> > >  #ifdef CONFIG_AT91SAM9260EK
>> > > -int cs[][CFG_MAX_DATAFLASH_BANKS] = {
>> > > +int cs[][2] = {
>> > >       {CFG_DATAFLASH_LOGIC_ADDR_CS0, 0},      /* Logical adress, CS */
>> > >       {CFG_DATAFLASH_LOGIC_ADDR_CS1, 1}
>> > >  };
>> > >  #elif defined(CONFIG_AT91SAM9263EK)
>> > > -int cs[][CFG_MAX_DATAFLASH_BANKS] = {
>> > > +int cs[][2] = {
>> > >       {CFG_DATAFLASH_LOGIC_ADDR_CS0, 0}       /* Logical adress, CS */
>> > >  };
>> > >  #else
>> > > -int cs[][CFG_MAX_DATAFLASH_BANKS] = {
>> > > +int cs[][2] = {
>> > >       {CFG_DATAFLASH_LOGIC_ADDR_CS0, 0},      /* Logical adress, CS */
>> > >       {CFG_DATAFLASH_LOGIC_ADDR_CS3, 3}
>> > >  };
>>
>> Why not call it dataflash_cs[] and move it into the board code? It
>> already pollutes the namespace, is already board-dependent (hence the
>> #ifdefs) and is apparently buggy?
>
> Excellent idea.
>
I think that the dataflash layer must be rewritten and he must conformed
to the flash layer.

Regards Michael


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the U-Boot mailing list