blob: c262c029b1b835002a7b3aa0e63df182805960fc [file] [log] [blame]
Brian Norrisd52fad22015-06-18 17:11:32 -07001/*
2 * Copyright © 2014 NVIDIA Corporation
3 * Copyright © 2015 Broadcom Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#include <linux/of.h>
16
17#include <soc/brcmstb/common.h>
18
19static const struct of_device_id brcmstb_machine_match[] = {
20 { .compatible = "brcm,brcmstb", },
21 { }
22};
23
24bool soc_is_brcmstb(void)
25{
26 struct device_node *root;
27
28 root = of_find_node_by_path("/");
29 if (!root)
30 return false;
31
32 return of_match_node(brcmstb_machine_match, root) != NULL;
33}