]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - drivers/soc/tegra/common.c
UBUNTU: Ubuntu-5.4.0-117.132
[mirror_ubuntu-focal-kernel.git] / drivers / soc / tegra / common.c
CommitLineData
d2912cb1 1// SPDX-License-Identifier: GPL-2.0-only
a2686766
TR
2/*
3 * Copyright (C) 2014 NVIDIA CORPORATION. All rights reserved.
a2686766
TR
4 */
5
6#include <linux/of.h>
7
8#include <soc/tegra/common.h>
9
10static const struct of_device_id tegra_machine_match[] = {
11 { .compatible = "nvidia,tegra20", },
12 { .compatible = "nvidia,tegra30", },
13 { .compatible = "nvidia,tegra114", },
14 { .compatible = "nvidia,tegra124", },
ad09c8c2 15 { .compatible = "nvidia,tegra132", },
3a369982 16 { .compatible = "nvidia,tegra210", },
a2686766
TR
17 { }
18};
19
20bool soc_is_tegra(void)
21{
9eb40fa2 22 const struct of_device_id *match;
a2686766
TR
23 struct device_node *root;
24
25 root = of_find_node_by_path("/");
26 if (!root)
27 return false;
28
9eb40fa2
YL
29 match = of_match_node(tegra_machine_match, root);
30 of_node_put(root);
31
32 return match != NULL;
a2686766 33}