From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] p1022ds: use weak CFI flash accessors when DIU is enabled
Date: Thu, 16 Sep 2010 23:13:38 +0200 [thread overview]
Message-ID: <20100916211338.39FF015242D@gemini.denx.de> (raw)
In-Reply-To: <1284667695-10887-1-git-send-email-timur@freescale.com>
Dear Timur Tabi,
In message <1284667695-10887-1-git-send-email-timur@freescale.com> you wrote:
> On the Freescale P1022, the DIU and the LBC share address pins, which means
> that when the DIU is active (e.g. the console is on the DVI display), NOR flash
> cannot be accessed. So we use the weak accessor function feature of the CFI
> flash code to temporarily switch the pin mux from LBC to DIU whenever we want
> to read or write flash. This has a significant performance penalty, but it's
I think the description is wrong - don't you switch from DIU to LBC
for flash access?
> +/* Variables used by the DIU/LBC switching code. It's safe to makes these
> + * global, because the DIU requires DDR, so we'll only run this code after
> + * relocation.
> + */
Incorrect multiline comment format.
> +/**
> + * set_mux_to_lbc - disable the DIU so that we can read/write to elbc
Incorrect multiline comment format. Please check and fix globally.
> + /* Switch the muxes only if they're currently set to DIU mode */
> + if ((in_be32(&gur->pmuxcr) & PMUXCR_ELBCDIU_MASK) == PMUXCR_ELBCDIU_NOR16) {
Line too long. Please check and fix globally.
> diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
> index d518c69..a4910a6 100644
> --- a/include/configs/P1022DS.h
> +++ b/include/configs/P1022DS.h
> @@ -190,6 +190,12 @@
> #define CONFIG_VGA_AS_SINGLE_DEVICE
> #define CONFIG_VIDEO_LOGO
> #define CONFIG_VIDEO_BMP_LOGO
> +#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
> +/*
> + * With CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS, flash I/O is really slow, so
> + * disable empty flash sector detection, which is I/O-intensive.
> + */
> +#undef CONFIG_SYS_FLASH_EMPTY_INFO
"#ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS" / "#endif" arount the
#undef ?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You go slow, be gentle. It's no one-way street -- you know how you
feel and that's all. It's how the girl feels too. Don't press. If the
girl feels anything for you at all, you'll know.
-- Kirk, "Charlie X", stardate 1535.8
next prev parent reply other threads:[~2010-09-16 21:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 20:08 [U-Boot] [PATCH] p1022ds: use weak CFI flash accessors when DIU is enabled Timur Tabi
2010-09-16 21:13 ` Wolfgang Denk [this message]
2010-09-16 21:18 ` Timur Tabi
2010-09-16 21:29 ` Wolfgang Denk
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=20100916211338.39FF015242D@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.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