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