blob: c8b5af501de2b1096fe46bf92d4fba79d9909728 [file] [log] [blame]
Neil Armstrong3bed4222018-07-24 17:45:28 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Common code for Amlogic SimpleFB with pipeline.
4 *
5 * (C) Copyright 2013-2014 Luc Verhaegen <libv@skynet.be>
6 * (C) Copyright 2014-2015 Hans de Goede <hdegoede@redhat.com>
7 * (C) Copyright 2017 Icenowy Zheng <icenowy@aosc.io>
8 */
9
Marek BehĂșn3058e282022-01-20 01:04:42 +010010#include <fdt_support.h>
Neil Armstrong3bed4222018-07-24 17:45:28 +020011
12int meson_simplefb_fdt_match(void *blob, const char *pipeline)
13{
14 int offset, ret;
15
16 /* Find a prefilled simpefb node, matching out pipeline config */
Marek BehĂșn3058e282022-01-20 01:04:42 +010017 fdt_for_each_node_by_compatible(offset, blob, -1,
18 "amlogic,simple-framebuffer") {
Neil Armstrong3bed4222018-07-24 17:45:28 +020019 ret = fdt_stringlist_search(blob, offset, "amlogic,pipeline",
20 pipeline);
21 if (ret == 0)
22 break;
Neil Armstrong3bed4222018-07-24 17:45:28 +020023 }
24
25 return offset;
26}