diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2006-11-21 11:37:37 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 20:39:34 +1100 |
commit | 35af89eb491a0741005e474626053266e6e635b7 (patch) | |
tree | 6813c0457dedacd221a2014bda37d0c892c328cd /arch/powerpc/boot/ops.h | |
parent | f79e083c2fab601a1c382282344f5a251557dbac (diff) |
[POWERPC] Cleanup zImage handling of kernel entry with flat device tree
This makes 2 changes to clean up the flat device tree handling
logic in the zImage wrapper.
First, there were two callbacks from the dt_ops structure used for
producing a final flat tree to pass to the kerne: dt_ops.ft_pack()
which packed the flat tree (possibly a no-op) and dt_ops.ft_addr()
which retreived the address of the final blob. Since they were only
ever called together, this patch combines the two into a single new
callback, dt_ops.finalize(). This new callback does whatever
platform-dependent things are necessary to produce a final flat device
tree blob, and returns the blob's addres.
Second, the current logic calls the kernel with a flat device tree if
one is build into the zImage wrapper, otherwise it boots the kernel
with a PROM pointer, expecting the kernel to copy the OF device tree
itself. This approach precludes the possibility of the platform
wrapper code building a flat device tree from whatever
platform-specific information firmware provides. Thus, this patch
takes the more sensible approach of invoking the kernel with a flat
tree if the dt_ops.finalize callback provides one (by whatever means).
So, the dt_ops.finalize callback can be NULL, or can be a function
which returns NULL. In either case, the zImage wrapper logic assumes
that this is a platform with OF and invokes the kernel accordingly.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r-- | arch/powerpc/boot/ops.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 59832fb0f276..8abb6516bb7c 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h @@ -35,8 +35,7 @@ struct dt_ops { const int buflen); int (*setprop)(const void *phandle, const char *name, const void *buf, const int buflen); - void (*ft_pack)(void); - unsigned long (*ft_addr)(void); + unsigned long (*finalize)(void); }; extern struct dt_ops dt_ops; |