From: Sascha Hauer <s.hauer@pengutronix.de>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: barebox@lists.infradead.org,
Oleksij Rempel <bug-track@fisher-privat.net>
Subject: Re: [PATCH 1/3] cfi_flash: add shift option for some cfi memory chips
Date: Mon, 22 Apr 2013 18:10:22 +0200 [thread overview]
Message-ID: <20130422161022.GI32299@pengutronix.de> (raw)
In-Reply-To: <1366620830-8574-1-git-send-email-linux@rempel-privat.de>
On Mon, Apr 22, 2013 at 10:53:50AM +0200, Oleksij Rempel wrote:
> 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?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-04-22 16:10 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 [this message]
2013-04-22 16:18 ` Re[2]: " Alexander Shiyan
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=20130422161022.GI32299@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=bug-track@fisher-privat.net \
--cc=linux@rempel-privat.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