blob: cd8f41351addfdd69432d4d6e7d5136be4b28e68 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/*
2 * Copyright (C) 2014 NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#include <linux/of.h>
10
11#include <soc/tegra/common.h>
12
13static const struct of_device_id tegra_machine_match[] = {
14 { .compatible = "nvidia,tegra20", },
15 { .compatible = "nvidia,tegra30", },
16 { .compatible = "nvidia,tegra114", },
17 { .compatible = "nvidia,tegra124", },
18 { .compatible = "nvidia,tegra132", },
19 { .compatible = "nvidia,tegra210", },
20 { }
21};
22
23bool soc_is_tegra(void)
24{
25 struct device_node *root;
26
27 root = of_find_node_by_path("/");
28 if (!root)
29 return false;
30
31 return of_match_node(tegra_machine_match, root) != NULL;
32}