[PATCH 3/6] bootwrapper: Add device tree ops for flattened device tree
Tom Rini
trini at kernel.crashing.org
Thu Aug 3 02:10:54 EST 2006
On Wed, Jul 19, 2006 at 04:05:44PM -0700, Mark A. Greer wrote:
> This patch adds the device tree operations (dt_ops) for a flattened
> device tree (fdt).
[snip]
> +/* Definitions used by the flattened device tree */
[snip]
...
> +struct fdt_bus {
> + u64 (*map)(u32 *addr, u32 *range, int na, int ns, int pna);
> + int (*translate)(u32 *addr, u64 offset, int na);
> +};
All of that should live in an fdt.h.
> +
> +static inline struct boot_param_header *
> +fdt_get_bph(void *dt_blob)
> +{
> + return (struct boot_param_header *)dt_blob;
> +}
Er, can't we just do this in the few places directly?
> + if (!(new_dtb_start = malloc(new_total_size))) {
> + printf("Can't alloc space for new fdt\n\r");
> + exit();
> + }
Wasn't there a panic("Message") or so, for bootwrapper stuff? If not,
maybe there should be..
--
Tom Rini
More information about the Linuxppc-dev
mailing list