* [U-Boot] reinitialize peripherals
@ 2008-08-27 3:06 Fundu
2008-08-27 4:25 ` vb
0 siblings, 1 reply; 5+ messages in thread
From: Fundu @ 2008-08-27 3:06 UTC (permalink / raw)
To: u-boot
I have a PPC440GX based board.
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.
any insights welcome.
thanks !
^ permalink raw reply [flat|nested] 5+ messages in thread* [U-Boot] reinitialize peripherals
2008-08-27 3:06 [U-Boot] reinitialize peripherals Fundu
@ 2008-08-27 4:25 ` vb
2008-08-27 4:51 ` Stefan Roese
2008-08-27 5:53 ` Fundu
0 siblings, 2 replies; 5+ messages in thread
From: vb @ 2008-08-27 4:25 UTC (permalink / raw)
To: u-boot
On Tue, Aug 26, 2008 at 8:06 PM, Fundu <fundu_1999@yahoo.com> wrote:
> I have a PPC440GX based board.
>
> 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.
good luck.
/vb
> any insights welcome.
>
> thanks !
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] reinitialize peripherals
2008-08-27 4:25 ` vb
@ 2008-08-27 4:51 ` Stefan Roese
2008-08-27 5:53 ` Fundu
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Roese @ 2008-08-27 4:51 UTC (permalink / raw)
To: u-boot
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
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] reinitialize peripherals
2008-08-27 4:25 ` vb
2008-08-27 4:51 ` Stefan Roese
@ 2008-08-27 5:53 ` Fundu
2008-08-27 6:52 ` Fundu
1 sibling, 1 reply; 5+ messages in thread
From: Fundu @ 2008-08-27 5:53 UTC (permalink / raw)
To: u-boot
> The problem is that the kernel needs to ioremap the areas
> you are
i'm calling ioremap from linux/driver/mtd/maps/physmap.c and int __init init_physmap(void)
> 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.
>
forgot to mention i'm using u-boot-1.2.0 and kernel 2.4.20, and i think it doesn't use the device trees.
what's interesting is I can erase any of the first 64mb, its only while operating on the other 64mb that i get the error. And as mentioned earlier from u-boot i can easily erase the whole flash.
> 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.
yeah that right.
how do i figure what the four MSBs of the 36 bit address should be ?
I know from u-boot i can use CFG_FLASH_BASE.
what should it be from kernel ?
thanks vb your response was informative.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-27 6:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-27 3:06 [U-Boot] reinitialize peripherals Fundu
2008-08-27 4:25 ` vb
2008-08-27 4:51 ` Stefan Roese
2008-08-27 5:53 ` Fundu
2008-08-27 6:52 ` Fundu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.