summaryrefslogtreecommitdiff
path: root/drivers/soc/soc-uclass.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-24 15:42:06 +0300
committerTom Rini <trini@konsulko.com>2020-07-24 15:42:06 +0300
commit7208396bbf1df1c7a85d263b7ff054e6b45d8240 (patch)
tree41b20866e0a94e34ca76e54a2745ca7a5ba0889b /drivers/soc/soc-uclass.c
parent5d3a21df6694ebd66d5c34c9d62a26edc7456fc7 (diff)
downloadu-boot-7208396bbf1df1c7a85d263b7ff054e6b45d8240.tar.xz
Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/soc/soc-uclass.c')
-rw-r--r--drivers/soc/soc-uclass.c102
1 files changed, 0 insertions, 102 deletions
diff --git a/drivers/soc/soc-uclass.c b/drivers/soc/soc-uclass.c
deleted file mode 100644
index c32d647864..0000000000
--- a/drivers/soc/soc-uclass.c
+++ /dev/null
@@ -1,102 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2020 - Texas Instruments Incorporated - http://www.ti.com/
- * Dave Gerlach <d-gerlach@ti.com>
- */
-
-#include <common.h>
-#include <soc.h>
-#include <dm.h>
-#include <errno.h>
-#include <dm/lists.h>
-#include <dm/root.h>
-
-int soc_get(struct udevice **devp)
-{
- return uclass_first_device_err(UCLASS_SOC, devp);
-}
-
-int soc_get_machine(struct udevice *dev, char *buf, int size)
-{
- struct soc_ops *ops = soc_get_ops(dev);
-
- if (!ops->get_machine)
- return -ENOSYS;
-
- return ops->get_machine(dev, buf, size);
-}
-
-int soc_get_family(struct udevice *dev, char *buf, int size)
-{
- struct soc_ops *ops = soc_get_ops(dev);
-
- if (!ops->get_family)
- return -ENOSYS;
-
- return ops->get_family(dev, buf, size);
-}
-
-int soc_get_revision(struct udevice *dev, char *buf, int size)
-{
- struct soc_ops *ops = soc_get_ops(dev);
-
- if (!ops->get_revision)
- return -ENOSYS;
-
- return ops->get_revision(dev, buf, size);
-}
-
-const struct soc_attr *
-soc_device_match(const struct soc_attr *matches)
-{
- bool match;
- struct udevice *soc;
- char str[SOC_MAX_STR_SIZE];
-
- if (!matches)
- return NULL;
-
- if (soc_get(&soc))
- return NULL;
-
- while (1) {
- if (!(matches->machine || matches->family ||
- matches->revision))
- break;
-
- match = true;
-
- if (matches->machine) {
- if (!soc_get_machine(soc, str, SOC_MAX_STR_SIZE)) {
- if (strcmp(matches->machine, str))
- match = false;
- }
- }
-
- if (matches->family) {
- if (!soc_get_family(soc, str, SOC_MAX_STR_SIZE)) {
- if (strcmp(matches->family, str))
- match = false;
- }
- }
-
- if (matches->revision) {
- if (!soc_get_revision(soc, str, SOC_MAX_STR_SIZE)) {
- if (strcmp(matches->revision, str))
- match = false;
- }
- }
-
- if (match)
- return matches;
-
- matches++;
- }
-
- return NULL;
-}
-
-UCLASS_DRIVER(soc) = {
- .id = UCLASS_SOC,
- .name = "soc",
-};