* mpc744x, Marvell mv6446x kernel guidance please
@ 2008-07-11 3:46 Stephen Horton
2008-07-11 7:01 ` Marco Stornelli
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Stephen Horton @ 2008-07-11 3:46 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]
Hello folks,
In a current work project, I have inherited a compactPCI board that has
an mpc7447/7448 powerpc processor as well as a Marvell system
controller, model mv64462 (stripped down mv64460). The board has a
somewhat working Gentoo Linux port running on it from long ago and a
company far far away (kernel version 2.6.9 built using arch/ppc). To
prepare for an upcoming deployment, I would like to bring the OS
up-to-date on this board with a newer kernel (targeting Gentoo 2008),
but I am unsure of the approach to take. I am a software developer, but
normally do not work on kernel porting / board integration. I have
researched the arch/ppc to arch/powerpc migration, but I'm a bit
intimidated by the 'new' device tree symantics and other changes to the
stream. Here are some questions:
1. Is it possible with the 2.6.24 (Gentoo 2008) kernel to still use
arch/ppc for this platform architecture? I've tried to get this to
compile, but am having trouble with files from arch/powerpc getting
pulled in; then I read some comments (from I believe this forum) that
indicated that arch/ppc is not longer supposed to compile
2. Does anyone have example code for this platform architecture?
Any freebees I could use for creating my device tree?
3. Any advice of any kind?
Regards,
Stephen
[-- Attachment #2: Type: text/html, Size: 3731 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mpc744x, Marvell mv6446x kernel guidance please
2008-07-11 3:46 mpc744x, Marvell mv6446x kernel guidance please Stephen Horton
@ 2008-07-11 7:01 ` Marco Stornelli
2008-07-11 8:37 ` Welch, Martyn (GE EntSol, Intelligent Platforms)
2008-07-28 16:51 ` Mark A. Greer
2 siblings, 0 replies; 7+ messages in thread
From: Marco Stornelli @ 2008-07-11 7:01 UTC (permalink / raw)
To: Stephen Horton; +Cc: linuxppc-embedded
Stephen Horton ha scritto:
> Hello folks,
>
> In a current work project, I have inherited a compactPCI board that has
> an mpc7447/7448 powerpc processor as well as a Marvell system
> controller, model mv64462 (stripped down mv64460). The board has a
> somewhat working Gentoo Linux port running on it from long ago and a
> company far far away (kernel version 2.6.9 built using arch/ppc). To
> prepare for an upcoming deployment, I would like to bring the OS
> up-to-date on this board with a newer kernel (targeting Gentoo 2008),
> but I am unsure of the approach to take. I am a software developer, but
> normally do not work on kernel porting / board integration. I have
> researched the arch/ppc to arch/powerpc migration, but I'm a bit
> intimidated by the 'new' device tree symantics and other changes to the
> stream. Here are some questions:
>
> 1. Is it possible with the 2.6.24 (Gentoo 2008) kernel to still use
> arch/ppc for this platform architecture? I've tried to get this to
> compile, but am having trouble with files from arch/powerpc getting
> pulled in; then I read some comments (from I believe this forum) that
> indicated that arch/ppc is not longer supposed to compile
> 2. Does anyone have example code for this platform architecture?
> Any freebees I could use for creating my device tree?
> 3. Any advice of any kind?
>
> Regards,
>
> Stephen
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 1. Is it possible with the 2.6.24 (Gentoo 2008) kernel to still use
> arch/ppc for this platform architecture? I've tried to get this to
> compile, but am having trouble with files from arch/powerpc getting
> pulled in; then I read some comments (from I believe this forum) that
> indicated that arch/ppc is not longer supposed to compile
Good idea, I suggest you to use arch/powerpc, arch/ppc won't be
supported in the future and this folder there won't be anymore!
> 2. Does anyone have example code for this platform architecture?
> Any freebees I could use for creating my device tree?
I suggest you to use, as starting point, a dts file for a board similar
to your board, I don't know if your board is somehow derived from one
evaluation board.
> 3. Any advice of any kind?
First of all read the kernel documentation about dts in the powerpc
folder. You can find in that documentation even some reference to the
open-firmware standard (IEEE 1275).
Last suggestions, I wouldn't use Gentoo Linux but a specific embedded
distribution, for example ELDK.
Regards,
--
Marco Stornelli
Embedded Software Engineer
CoRiTeL - Consorzio di Ricerca sulle Telecomunicazioni
http://www.coritel.it
marco.stornelli@coritel.it
+39 06 72582838
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: mpc744x, Marvell mv6446x kernel guidance please
2008-07-11 3:46 mpc744x, Marvell mv6446x kernel guidance please Stephen Horton
2008-07-11 7:01 ` Marco Stornelli
@ 2008-07-11 8:37 ` Welch, Martyn (GE EntSol, Intelligent Platforms)
2008-07-28 16:51 ` Mark A. Greer
2 siblings, 0 replies; 7+ messages in thread
From: Welch, Martyn (GE EntSol, Intelligent Platforms) @ 2008-07-11 8:37 UTC (permalink / raw)
To: Stephen Horton, linuxppc-embedded
On Thu, 10 Jul 2008 22:46:49 -0500
"Stephen Horton" <SHorton@kodiaknetworks.com> wrote:
> Hello folks,
>=20
> In a current work project, I have inherited a compactPCI board that
has
> an mpc7447/7448 powerpc processor as well as a Marvell system
> controller, model mv64462 (stripped down mv64460). The board has a
> somewhat working Gentoo Linux port running on it from long ago and a
> company far far away (kernel version 2.6.9 built using arch/ppc). To
> prepare for an upcoming deployment, I would like to bring the OS
> up-to-date on this board with a newer kernel (targeting Gentoo 2008),
> but I am unsure of the approach to take. I am a software developer,
but
> normally do not work on kernel porting / board integration. I have
> researched the arch/ppc to arch/powerpc migration, but I'm a bit
> intimidated by the 'new' device tree symantics and other changes to
the
> stream. Here are some questions:
>=20
> 1. Is it possible with the 2.6.24 (Gentoo 2008) kernel to still use
> arch/ppc for this platform architecture? I've tried to get this to
> compile, but am having trouble with files from arch/powerpc getting
> pulled in; then I read some comments (from I believe this forum) that
> indicated that arch/ppc is not longer supposed to compile
I've had problems getting newer versions of the kernel compiling (using
the ppc arch) for some of our boards. It's going completely in the next
release cycle I believe, infact the powerpc git tree[1] no longer has a
"ppc" arch. Hence we are moving to powerpc.
> 2. Does anyone have example code for this platform architecture?
> Any freebees I could use for creating my device tree?
These patches may provide a reasonable starting point:
http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg18084.html
> 3. Any advice of any kind?
Stick at it? - I've not long started kernel development and only had ppc
examples (for our boards), like you on an old kernel version (2.6.9 and
2.6.12) and what was in the kernel source. It's taken a while getting
familiar with the powerpc arch, but I'm beginning to see the benefits.
I'd suggest looking at the powerpc specific git tree. I use "stacked
git"[2] on top of this git tree and have found this a reasonably
productive way to work. Whilst learning and porting I can keep the base
up to date with "stg pull" (which peels off my changes, updates the git
tree and re-applies my changes). It also helps with creating well
formatted emails for submitting patches.
Hope this helps,
Martyn
[1] git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git
[2] http://procode.org/stgit/
----
Martyn Welch MEng MPhil MIET
Principal Software Engineer
GE Fanuc Intelligent Platforms
Tove Valley Business Park, Towcester,
Northants, NN12 6PF, United Kingdom
Telephone: +44 (0) 1327 359444
Direct Dial: +44 (0) 1327 322748
Fax: +44 (0) 1327 322800
email: martyn.welch@gefanuc.com
web: www.gefanuc.com
GE Fanuc Intelligent Platforms Ltd, registered in England and Wales
(3828642) at 100 Barbirolli Square, Manchester, M2 3AB, VAT GB 729 849
476=20
GE Fanuc Intelligent Platforms Confidential and Proprietary. If you have
received this message in error please notify us immediately and
permanently remove it from your system and destroy any printed
hardcopies. =20
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mpc744x, Marvell mv6446x kernel guidance please
2008-07-11 3:46 mpc744x, Marvell mv6446x kernel guidance please Stephen Horton
2008-07-11 7:01 ` Marco Stornelli
2008-07-11 8:37 ` Welch, Martyn (GE EntSol, Intelligent Platforms)
@ 2008-07-28 16:51 ` Mark A. Greer
2008-07-30 13:56 ` Stephen Horton
2 siblings, 1 reply; 7+ messages in thread
From: Mark A. Greer @ 2008-07-28 16:51 UTC (permalink / raw)
To: Stephen Horton; +Cc: linuxppc-embedded
On Thu, Jul 10, 2008 at 10:46:49PM -0500, Stephen Horton wrote:
> Hello folks,
>
> In a current work project, I have inherited a compactPCI board that has
> an mpc7447/7448 powerpc processor as well as a Marvell system
> controller, model mv64462 (stripped down mv64460). The board has a
> somewhat working Gentoo Linux port running on it from long ago and a
> company far far away (kernel version 2.6.9 built using arch/ppc). To
> prepare for an upcoming deployment, I would like to bring the OS
> up-to-date on this board with a newer kernel (targeting Gentoo 2008),
> but I am unsure of the approach to take. I am a software developer, but
> normally do not work on kernel porting / board integration. I have
> researched the arch/ppc to arch/powerpc migration, but I'm a bit
> intimidated by the 'new' device tree symantics and other changes to the
> stream. Here are some questions:
>
> 1. Is it possible with the 2.6.24 (Gentoo 2008) kernel to still use
> arch/ppc for this platform architecture? I've tried to get this to
> compile, but am having trouble with files from arch/powerpc getting
> pulled in; then I read some comments (from I believe this forum) that
> indicated that arch/ppc is not longer supposed to compile
arch/ppc is gone now. You should spend you effort working in
arch/powerpc.
> 2. Does anyone have example code for this platform architecture?
> Any freebees I could use for creating my device tree?
You can use prpmc2800 as an example.
> 3. Any advice of any kind?
Its not as bad as it looks. Just dig into it and don't give up.
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: mpc744x, Marvell mv6446x kernel guidance please
2008-07-28 16:51 ` Mark A. Greer
@ 2008-07-30 13:56 ` Stephen Horton
2008-07-30 23:10 ` Dale Farnsworth
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Horton @ 2008-07-30 13:56 UTC (permalink / raw)
To: Mark A. Greer; +Cc: linuxppc-embedded
Hello Mark,
Thanks for your kind encouragement. I now have a mostly booting kernel.
I have just a few remaining issues to resolve; perhaps you (or others)
can give me some tips regarding these:
1. In your prpmc2800 .dts configuration, in the PCI bus configuration
section, you lay-out the IRQ mappings like this:
interrupt-map =3D <
/* IDSEL 0x0a */
5000 0 0 1 &/mv64x60/pic 50
5000 0 0 2 &/mv64x60/pic 51
I've read the Open Firmware document on Interrupt Mapping, but I still
don't really understand the first 3 columns (5000 0 0), especially where
the first column comes from. Is this just some arbitrarily selected
offset address for that device on the pci bus?
2. I've also grabbed some of the recent katana750i .dts examples that
you were working on from one of the git trees (as well as Remi Machet's
GEFanuc C2k board .dts code which is also based on your prpmc2800). Like
your katana750i example, my board also has 2 PMC sites. In your
cuboot-katana.c file, where you are setting up the PCI devices in
'katana750i_bridge_setup', I'm having trouble understanding how you
selected the bitmask values to Disable and Enable cpu->pci windows?
enables =3D in_le32((u32 *)(bridge_base +
MV64x60_CPU_BAR_ENABLE));
enables |=3D 0x0007fe00; /* Disable all cpu->pci windows */
out_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE),
enables);
and here:
enables &=3D ~0x0000c000; /* Enable cpu->pci1 i/o, cpu->pci1 mem0
*/
out_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE),
enables);
Can you point me in the right direction to understand this? I have
MPC7450 processor family docs for my processor as well as access to
Marvell docs.
3. My Marvell chip is a MV64462. Unlike the MV64460, it only has a
single Gig Ethernet interface, which on my board connects to an 8-port
Broadcom BCM5388 Ethernet Switch. This switch additionally has 2 Gig E
interfaces for each PMC site, 2 PICMG 2.16 connected interfaces, and 1
faceplate connected port. I am successful in getting the Marvell to
setup a Mac-to-Mac connection to the switch via its connected port, but
I'm unsure how to tell Linux about the other ports on the switch,
primarily the 2 PICMG 2.16 ports and the faceplate port. I have access
to the switch in my platform .c file, where I am configuring and
verifying that I have the mac-mac connection setup. Can you speculate
on how I can get the other interfaces to configure? Do I need to a
section in my .dts for the Broadcom switch? My .dts currently only has 1
ethernet and 1 PHY defined... Or, should I setup multiple Ethernet
sections all on the same PHY, or something like that? Or, should I just
do something in my platform file to get Linux to add the other
interfaces?
I appreciate any other addition thoughts you can give,
Regards,
Stephen
-----Original Message-----
From: Mark A. Greer [mailto:mgreer@mvista.com]=20
Sent: Monday, July 28, 2008 11:51 AM
To: Stephen Horton
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: mpc744x, Marvell mv6446x kernel guidance please
On Thu, Jul 10, 2008 at 10:46:49PM -0500, Stephen Horton wrote:
> Hello folks,
>=20
> In a current work project, I have inherited a compactPCI board that
has
> an mpc7447/7448 powerpc processor as well as a Marvell system
> controller, model mv64462 (stripped down mv64460). The board has a
> somewhat working Gentoo Linux port running on it from long ago and a
> company far far away (kernel version 2.6.9 built using arch/ppc). To
> prepare for an upcoming deployment, I would like to bring the OS
> up-to-date on this board with a newer kernel (targeting Gentoo 2008),
> but I am unsure of the approach to take. I am a software developer,
but
> normally do not work on kernel porting / board integration. I have
> researched the arch/ppc to arch/powerpc migration, but I'm a bit
> intimidated by the 'new' device tree symantics and other changes to
the
> stream. Here are some questions:
>=20
> 1. Is it possible with the 2.6.24 (Gentoo 2008) kernel to still use
> arch/ppc for this platform architecture? I've tried to get this to
> compile, but am having trouble with files from arch/powerpc getting
> pulled in; then I read some comments (from I believe this forum) that
> indicated that arch/ppc is not longer supposed to compile
arch/ppc is gone now. You should spend you effort working in
arch/powerpc.
> 2. Does anyone have example code for this platform architecture?
> Any freebees I could use for creating my device tree?
You can use prpmc2800 as an example.
> 3. Any advice of any kind?
Its not as bad as it looks. Just dig into it and don't give up.
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mpc744x, Marvell mv6446x kernel guidance please
2008-07-30 13:56 ` Stephen Horton
@ 2008-07-30 23:10 ` Dale Farnsworth
2008-08-01 1:38 ` Stephen Horton
0 siblings, 1 reply; 7+ messages in thread
From: Dale Farnsworth @ 2008-07-30 23:10 UTC (permalink / raw)
To: Stephen Horton; +Cc: linuxppc-embedded
On Wed, Jul 30, 2008 at 08:56:18AM -0500, Stephen Horton wrote:
> Thanks for your kind encouragement. I now have a mostly booting kernel.
> I have just a few remaining issues to resolve; perhaps you (or others)
> can give me some tips regarding these:
>
> 1. In your prpmc2800 .dts configuration, in the PCI bus configuration
> section, you lay-out the IRQ mappings like this:
> interrupt-map = <
> /* IDSEL 0x0a */
> 5000 0 0 1 &/mv64x60/pic 50
> 5000 0 0 2 &/mv64x60/pic 51
> I've read the Open Firmware document on Interrupt Mapping, but I still
> don't really understand the first 3 columns (5000 0 0), especially where
> the first column comes from. Is this just some arbitrarily selected
> offset address for that device on the pci bus?
An address on the PCI bus is represented by 3 cells (96 bits).
Take a look at page 4 of http://www.openbios.org/data/docs/bus.pci.pdf
You'll see that the PCI device is contained in bits 15-11, selected by
the 0xf800 in interrupt-map-mask. The 0x5000 corresponds to device 0xa.
-Dale
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: mpc744x, Marvell mv6446x kernel guidance please
2008-07-30 23:10 ` Dale Farnsworth
@ 2008-08-01 1:38 ` Stephen Horton
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Horton @ 2008-08-01 1:38 UTC (permalink / raw)
To: Dale Farnsworth; +Cc: linuxppc-embedded
Hi Dale,
Thanks for the info; it was very informative. To follow-up on my
previous email:
1. I now have a working interrupt-map section in my .dts. PCI bus
initialization works with no visible errors.
2. I've deciphered the magic numbers in the cpu->pci window
configuration. The required information for disabling and re-enabling
BARS is located in the Marvell User's manual, Rev C, page 365, Table
141.
3. I'm a little smarter on the Ethernet configuration. I understand now
that Linux should actually just know about eth0 the RGMII connection
from Marvell to the Broadcom switch. Its upto me to configure the
additional Broadcom ports with whatever configuration (to meet my PICMG
2.16 requirements). I have all the Ethernet stuff initializing properly
(including eth0) with no errors; unfortunately, when I configure for
bootp and nfs boot over the network, there are no bootp requests coming
out of my board (verified with a sniffer, but link is up according to
Broadcom status bits and remote switch). So, I still have something
wrong here in my kernel code...
Thanks, again,
Stephen
-----Original Message-----
From: Dale Farnsworth [mailto:dale@farnsworth.org]=20
Sent: Wednesday, July 30, 2008 6:11 PM
To: Stephen Horton
Cc: Mark A. Greer; linuxppc-embedded@ozlabs.org
Subject: Re: mpc744x, Marvell mv6446x kernel guidance please
On Wed, Jul 30, 2008 at 08:56:18AM -0500, Stephen Horton wrote:
> Thanks for your kind encouragement. I now have a mostly booting
kernel.
> I have just a few remaining issues to resolve; perhaps you (or others)
> can give me some tips regarding these:
>=20
> 1. In your prpmc2800 .dts configuration, in the PCI bus configuration
> section, you lay-out the IRQ mappings like this:
> interrupt-map =3D <
> /* IDSEL 0x0a */
> 5000 0 0 1 &/mv64x60/pic 50
> 5000 0 0 2 &/mv64x60/pic 51
> I've read the Open Firmware document on Interrupt Mapping, but I still
> don't really understand the first 3 columns (5000 0 0), especially
where
> the first column comes from. Is this just some arbitrarily selected
> offset address for that device on the pci bus?
An address on the PCI bus is represented by 3 cells (96 bits).
Take a look at page 4 of http://www.openbios.org/data/docs/bus.pci.pdf
You'll see that the PCI device is contained in bits 15-11, selected by
the 0xf800 in interrupt-map-mask. The 0x5000 corresponds to device 0xa.
-Dale
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-08-01 1:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-11 3:46 mpc744x, Marvell mv6446x kernel guidance please Stephen Horton
2008-07-11 7:01 ` Marco Stornelli
2008-07-11 8:37 ` Welch, Martyn (GE EntSol, Intelligent Platforms)
2008-07-28 16:51 ` Mark A. Greer
2008-07-30 13:56 ` Stephen Horton
2008-07-30 23:10 ` Dale Farnsworth
2008-08-01 1:38 ` Stephen Horton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).