Neil Armstrong | 3bed422 | 2018-07-24 17:45:28 +0200 | [diff] [blame] | 1 | // 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Ășn | 3058e28 | 2022-01-20 01:04:42 +0100 | [diff] [blame] | 10 | #include <fdt_support.h> |
Neil Armstrong | 3bed422 | 2018-07-24 17:45:28 +0200 | [diff] [blame] | 11 | |
| 12 | int 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Ășn | 3058e28 | 2022-01-20 01:04:42 +0100 | [diff] [blame] | 17 | fdt_for_each_node_by_compatible(offset, blob, -1, |
| 18 | "amlogic,simple-framebuffer") { |
Neil Armstrong | 3bed422 | 2018-07-24 17:45:28 +0200 | [diff] [blame] | 19 | ret = fdt_stringlist_search(blob, offset, "amlogic,pipeline", |
| 20 | pipeline); |
| 21 | if (ret == 0) |
| 22 | break; |
Neil Armstrong | 3bed422 | 2018-07-24 17:45:28 +0200 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | return offset; |
| 26 | } |