[U-Boot] [PATCH v4 1/2] fdt_support: Add a fdt_setup_simplefb_node helper function
Simon Glass
sjg at chromium.org
Mon Nov 17 19:32:31 CET 2014
Hi Hans,
On 17 November 2014 15:48, Hans de Goede <hdegoede at redhat.com> wrote:
> Add a generic helper to fill and enable simplefb nodes.
>
> The first user of this will be the sunxi display code.
>
> lcd_dt_simplefb_configure_node is also a good candidate to be converted
> to use this, but that requires someone to run some tests first, as
> lcd_dt_simplefb_configure_node does not honor #address-cells and #size-cells,
> but simply assumes 1 and 1 for both.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> common/fdt_support.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
> include/fdt_support.h | 3 +++
> 2 files changed, 68 insertions(+)
>
> diff --git a/common/fdt_support.c b/common/fdt_support.c
> index 3f64156..0ffa711 100644
> --- a/common/fdt_support.c
> +++ b/common/fdt_support.c
> @@ -1523,3 +1523,68 @@ int fdt_read_range(void *fdt, int node, int n, uint64_t *child_addr,
>
> return 0;
> }
> +
> +/**
> + * fdt_setup_simplefb_node - Fill and enable a simplefb node
> + *
> + * @fdt: ptr to device tree
> + * @node: offset of the simplefb node
> + * @base_address: framebuffer base address
> + * @width: width in pixels
> + * @height: height in pixels
> + * @stride: bytes per line
> + * @format: pixel format string
> + *
> + * Convenience function to fill and enable a simplefb node.
> + */
> +int fdt_setup_simplefb_node(void *fdt, int node, u64 base_address, u32 width,
> + u32 height, u32 stride, const char *format)
Please see lcd_dt_simplefb_configure_node() which seems similar.
Regards,
Simon
More information about the U-Boot
mailing list