| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ |
|---|
| 3 | 4 | * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms of the GNU General Public License version 2 as published by |
|---|
| 7 | | - * the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 10 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 11 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 12 | | - * more details. |
|---|
| 13 | | - * |
|---|
| 14 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 15 | | - * this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 16 | 5 | */ |
|---|
| 17 | 6 | |
|---|
| 18 | 7 | /* |
|---|
| .. | .. |
|---|
| 184 | 173 | {}, |
|---|
| 185 | 174 | }; |
|---|
| 186 | 175 | |
|---|
| 176 | +static const struct of_device_id omapdss_of_fixups_whitelist[] __initconst = { |
|---|
| 177 | + { .compatible = "panel-dsi-cm" }, |
|---|
| 178 | + {}, |
|---|
| 179 | +}; |
|---|
| 180 | + |
|---|
| 181 | +static void __init omapdss_find_children(struct device_node *np) |
|---|
| 182 | +{ |
|---|
| 183 | + struct device_node *child; |
|---|
| 184 | + |
|---|
| 185 | + for_each_available_child_of_node(np, child) { |
|---|
| 186 | + if (!of_find_property(child, "compatible", NULL)) |
|---|
| 187 | + continue; |
|---|
| 188 | + |
|---|
| 189 | + omapdss_walk_device(child, true); |
|---|
| 190 | + |
|---|
| 191 | + if (of_device_is_compatible(child, "ti,sysc")) |
|---|
| 192 | + omapdss_find_children(child); |
|---|
| 193 | + } |
|---|
| 194 | +} |
|---|
| 195 | + |
|---|
| 187 | 196 | static int __init omapdss_boot_init(void) |
|---|
| 188 | 197 | { |
|---|
| 189 | | - struct device_node *dss, *child; |
|---|
| 198 | + struct device_node *dss; |
|---|
| 190 | 199 | |
|---|
| 191 | 200 | INIT_LIST_HEAD(&dss_conv_list); |
|---|
| 192 | 201 | |
|---|
| .. | .. |
|---|
| 196 | 205 | goto put_node; |
|---|
| 197 | 206 | |
|---|
| 198 | 207 | omapdss_walk_device(dss, true); |
|---|
| 199 | | - |
|---|
| 200 | | - for_each_available_child_of_node(dss, child) { |
|---|
| 201 | | - if (!of_find_property(child, "compatible", NULL)) |
|---|
| 202 | | - continue; |
|---|
| 203 | | - |
|---|
| 204 | | - omapdss_walk_device(child, true); |
|---|
| 205 | | - } |
|---|
| 208 | + omapdss_find_children(dss); |
|---|
| 206 | 209 | |
|---|
| 207 | 210 | while (!list_empty(&dss_conv_list)) { |
|---|
| 208 | 211 | struct dss_conv_node *n; |
|---|
| .. | .. |
|---|
| 210 | 213 | n = list_first_entry(&dss_conv_list, struct dss_conv_node, |
|---|
| 211 | 214 | list); |
|---|
| 212 | 215 | |
|---|
| 213 | | - if (!n->root) |
|---|
| 216 | + if (of_match_node(omapdss_of_fixups_whitelist, n->node)) |
|---|
| 214 | 217 | omapdss_omapify_node(n->node); |
|---|
| 215 | 218 | |
|---|
| 216 | 219 | list_del(&n->list); |
|---|