From: Peter Tyser Date: Thu, 13 Nov 2008 09:30:49 -0600 Subject: [U-Boot] [PATCH] 85xx: Fix relocation of CCSRBAR In-Reply-To: <1226579420-3603-1-git-send-email-galak@kernel.crashing.org> References: <1226579420-3603-1-git-send-email-galak@kernel.crashing.org> Message-ID: <1226590249.18428.1077.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2008-11-13 at 06:30 -0600, Kumar Gala wrote: > If the virtual address for CCSRBAR is the same after relocation but > the physical address is changing we'd end up having two TLB entries with > the same VA. Instead we new us the new CCSRBAR virt address + 4k as a > temp virt address to access the old CCSRBAR to relocate it. s/we new us the/we now use the/ > Signed-off-by: Kumar Gala > --- > cpu/mpc85xx/cpu_init.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/cpu/mpc85xx/cpu_init.c b/cpu/mpc85xx/cpu_init.c > index 3a8aef2..1cb9ed9 100644 > --- a/cpu/mpc85xx/cpu_init.c > +++ b/cpu/mpc85xx/cpu_init.c > @@ -140,14 +140,15 @@ void cpu_init_early_f(void) > #if (CONFIG_SYS_CCSRBAR_DEFAULT != CONFIG_SYS_CCSRBAR_PHYS) > { > u32 temp; > + volatile u32 *ccsr_virt = > + (volatile u32 *)(CONFIG_SYS_CCSRBAR + 0x1000); Is there any reason to use volatiles when you access the address using the proper io functions? Best, Peter