[U-Boot] [PATCH] p1022ds: use weak CFI flash accessors when DIU is enabled

Wolfgang Denk wd at denx.de
Thu Sep 16 23:13:38 CEST 2010


Dear Timur Tabi,

In message <1284667695-10887-1-git-send-email-timur at 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


More information about the U-Boot mailing list