Re: [PATCH 1/2] OLPC: Add support for calling into Open Firmware

From: Andres Salomon
Date: Mon Apr 21 2008 - 15:43:57 EST


On Mon, 21 Apr 2008 20:18:11 +0100
David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:

> On Mon, 2008-04-21 at 13:03 -0400, Andres Salomon wrote:
> > Quite simply, it's a lot more work (*and* we have to play nice w/
> > sparc and ppc).
>
> It's only more work because we did it the wrong way in the first place.
> If only someone had pointed it out at the time... :)
>

Yes, and if only we had an infinite number of kernel hackers who had time
to work on such things, then we could've done things differently.


> For interaction with device-tree properties in generic code, you should
> be using the functions defined in <linux/of.h>.
>

At the time [the OFW interface] was written, linux/of.h didn't *exist*.


> Creating the static device-tree before we quiesce OpenFirmware surely
> shouldn't be so hard? Can't we cut and paste most of that code anyway?
>

We're not adding a device tree right now, we're adding a method for
querying OFW for information. Eventually that information should be
obtained from a device tree. However, that's going to take additional time,
and I'd like to get rid of some of these patches that we've been carrying
around.


> > I had intended to eventually do it, but first I wanted
> > to get this stuff in for 2.6.26 so that we could at least boot upstream
> > kernels on XOs.
>
> Is it only the things in your second patch which need to be made to
> work? One of them was already working, by grubbing around in the BIOS
> directly -- so all we need is the board revision, isn't it? Can we get
> that from the EC for now?
>


Well, no, it wasn't already working; that's the reason this whole
thread started. It was crashing someone's machine. That's why the OFW
interface, as imperfect as it is, is an _improvement_.



--
Need a kernel or Debian developer? Contact me, I'm looking for contracts.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/