From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 27 Aug 2008 06:51:42 +0200 Subject: [U-Boot] reinitialize peripherals In-Reply-To: References: <270570.68863.qm@web63404.mail.re1.yahoo.com> Message-ID: <200808270651.42940.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 27 August 2008, vb wrote: > > Do I need to reinitialize Peripheral Bank Configuration Registers > > (EBC0_B0CR-EBC0_B7CR) from the kernel ? I'm quite sure that we don't, but > > just want to make sure. Because the problem that i'm seeing strongly > > suggest that something isn't initializing. > > > > Here's the problem i'm getting a kernel "kernel access of bad > > area" when i erase flash region, surprisingly i can easily erase it from > > u-boot. which makes me ask the earlier question. > > The problem is that the kernel needs to ioremap the areas you are > trying to access (this includes flash, BTW). How it gets the > information about the address ranges is the tricky part: it comes from > the device tree, (unless you are building your kernel from arch/ppc). > There are a lot of examples in arch/powerpc/boot/dts. > > Also, keep in mind that on ppc460 (I am not sure if 440gx is the > same, but it might be) the addresses of the peripherals driven by CSs > have nonzero nibble in four MSBs of the 36 bit address, so phys_addr_t > is 64 bits in size. Yes. And the upper 4bits are usually non-zero for EBC space on 44x. The address used in U-Boot is a virtual 32bit address where the lower 32bits (when possible) match the lower 32bits of the 36bit physical address. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================