[U-Boot] [PATCH 03/13 v5] ARM: OMAP3: Add ARM Cortex A8 common directory

Wolfgang Denk wd at denx.de
Sun Nov 2 20:17:49 CET 2008


Dear dirk.behme at googlemail.com,

In message <490df313.1358560a.73b4.222e at mx.google.com> you wrote:
> --===============1314021165==
> 
> From: Dirk Behme <dirk.behme at gmail.com>
> 
> Add ARM Cortex A8 common directory
> 
> Signed-off-by: Dirk Behme <dirk.behme at gmail.com>
...

> +static void cp_delay(void)
> +{
> +	volatile int i;
> +
> +	/* Many OMAP regs need at least 2 nops */
> +	for (i = 0; i < 100; i++) ;

There is not much reason for the compiler not to optimize  this  code
away.

> +void icache_disable(void)
> +{
> +	ulong reg;
> +
> +	reg = read_p15_c1();
> +	cp_delay();
> +	write_p15_c1(reg & ~C1_IC);
> +}
> +
> +void dcache_disable (void)
> +{
> +	ulong reg;
> +
> +	reg = read_p15_c1 ();
> +	cp_delay ();
> +	write_p15_c1 (reg & ~C1_DC);
> +}

Would it make sense to flush caches before disbling?

...
> +	/* someone ought to write a more effiction fiq_save_user_regs */

effiction ? 


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
When some people discover the truth, they just can't  understand  why
everybody isn't eager to hear it.


More information about the U-Boot mailing list