PPC to PowerPC Migration

Mike Timmons mike_timmons at trimble.com
Wed Jun 11 11:19:39 EST 2008

Great Idea Andrew. I am no long-serving expert, but over the past few
years I've had some ARM-linux and more recently mpc5200 Linux exposure.
For the mpc5200 we started as ppc under 2.6.16 a few months ago. I
recently migrated to 2.6.24 with ARCH=powerpc.

These were the conceptual difficulties I had at first:

1) Where the *%$# are the register address defines?
	-Ahhh, the register definition header file maps to HW via the
device tree. Cool. Now how the $%# do I interface to the tree from my
3) How do I request an IRQ?
  You need to create a "device" in the device tree. This is
non-intuitive because most of what you see in the tree when you start
represents actual, "devices": SOC peripherals and such. I looked and
looked for how to request
IRQ3. It was so easy when I created a, "device" and specified the
interrupt according to instructions in
4) How do I traverse the device tree from my code: my device drivers?
  -functions like mpc52xx_find_and_map("name_from_dev_tree") are used to
map peripheral registers to the relevant defined struct from your
register definition header file.
 - Also look for, "open firmware" (of) functions like
- basically, the "find_and_map", and "parse_and_map" means your driver
is traversing the device tree data. Grep on this sort of thing to find
Of how various drivers interface to the device tree info.

This is all very simple for so many of you, but I did wrestle with some
conceptual difficulties. Andrew, if this makes any sense to you perhaps
Can roll it into your HOWTO. Perhaps we can collaborate offline and
publish something more useful than what I just wrote above.


-----Original Message-----
From: linuxppc-embedded-bounces+mike_timmons=trimble.com at ozlabs.org
[mailto:linuxppc-embedded-bounces+mike_timmons=trimble.com at ozlabs.org]
On Behalf Of Andy Schmidt
Sent: Tuesday, June 10, 2008 12:49 PM
To: linuxppc-embedded at ozlabs.org
Subject: PPC to PowerPC Migration

I am wondering if anyone has seen any good documentation for migrating
from the arch/ppc to arch/powerpc.  Specifically, I am working with a
Xilinx board so I am more accustom to the xparamters.h vs. device
trees.  I am very willing to build a (or multiple) tutorials to help
others in my situation, I just need some initial help getting started.
 If anyone can point me in the right direction, I will be sure to keep
the group (or those interested) updated on the documentation.

Thank you,
Linuxppc-embedded mailing list
Linuxppc-embedded at ozlabs.org

More information about the Linuxppc-embedded mailing list