Re[2]: [PATCH 1/3] cfi_flash: add shift option for some cfi memory chips

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Oleksij Rempel <bug-track@xxxxxxxxxxxxxxxxx>
> > 
> > diff --git a/drivers/nor/cfi_flash.h b/drivers/nor/cfi_flash.h
> > index 8f818ba..6c7cac4 100644
> > --- a/drivers/nor/cfi_flash.h
> > +++ b/drivers/nor/cfi_flash.h
> > @@ -295,7 +295,11 @@ static inline u64 flash_read64(void *addr)
> >   */
> >  static inline uchar *flash_make_addr (struct flash_info *info, flash_sect_t sect, uint offset)
> >  {
> > +#ifdef CONFIG_DRIVER_CFI_BANK_SHIFT_1
> > +	return ((uchar *) (info->start[sect] + (offset * info->portwidth << 1)));
> > +#else
> >  	return ((uchar *) (info->start[sect] + (offset * info->portwidth)));
> > +#endif
> >  }
> 
> Please make this a runtime option configurable via platform data. Making
> this a compile time option is not so nice.
> Or could this be automatically detected?

Do not treat my opinion as solution but I think better if we
make this option as integer as make it available always.
In this case we can avoid using #ifdef.

---
_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux