mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Sascha Hauer" <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org,
	"Oleksij Rempel" <bug-track@fisher-privat.net>
Subject: Re[2]: [PATCH 1/3] cfi_flash: add shift option for some cfi memory chips
Date: Mon, 22 Apr 2013 20:18:31 +0400	[thread overview]
Message-ID: <1366647511.938569164@f352.mail.ru> (raw)
In-Reply-To: <20130422161022.GI32299@pengutronix.de>

> From: Oleksij Rempel <bug-track@fisher-privat.net>
> > 
> > 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2013-04-22 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22  8:53 Oleksij Rempel
2013-04-22 16:10 ` Sascha Hauer
2013-04-22 16:18   ` Alexander Shiyan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366647511.938569164@f352.mail.ru \
    --to=shc_work@mail.ru \
    --cc=barebox@lists.infradead.org \
    --cc=bug-track@fisher-privat.net \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox