2019-06-04 11:11:33 +03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2014-07-16 16:01:44 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 NVIDIA CORPORATION. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/of.h>
|
|
|
|
|
|
|
|
#include <soc/tegra/common.h>
|
|
|
|
|
|
|
|
static const struct of_device_id tegra_machine_match[] = {
|
|
|
|
{ .compatible = "nvidia,tegra20", },
|
|
|
|
{ .compatible = "nvidia,tegra30", },
|
|
|
|
{ .compatible = "nvidia,tegra114", },
|
|
|
|
{ .compatible = "nvidia,tegra124", },
|
2015-03-23 13:28:53 +03:00
|
|
|
{ .compatible = "nvidia,tegra132", },
|
2015-03-23 13:29:25 +03:00
|
|
|
{ .compatible = "nvidia,tegra210", },
|
2014-07-16 16:01:44 +04:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
bool soc_is_tegra(void)
|
|
|
|
{
|
2018-11-21 15:49:12 +03:00
|
|
|
const struct of_device_id *match;
|
2014-07-16 16:01:44 +04:00
|
|
|
struct device_node *root;
|
|
|
|
|
|
|
|
root = of_find_node_by_path("/");
|
|
|
|
if (!root)
|
|
|
|
return false;
|
|
|
|
|
2018-11-21 15:49:12 +03:00
|
|
|
match = of_match_node(tegra_machine_match, root);
|
|
|
|
of_node_put(root);
|
|
|
|
|
|
|
|
return match != NULL;
|
2014-07-16 16:01:44 +04:00
|
|
|
}
|