configs: Add sam9x60ek_mmc_defconfig
[oweals/u-boot.git] / drivers / core / read_extra.c
index a6d2f342d9da8ff692e41ecfe4f359e110b8b28f..5138348827831f370cd23c45aaa388ec6fc9c760 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2017 Google, Inc
  * Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <dm/read.h>
 #include <linux/ioport.h>
 
-int dev_read_resource(struct udevice *dev, uint index, struct resource *res)
-{
-       ofnode node = dev_ofnode(dev);
-
-#ifdef CONFIG_OF_LIVE
-       if (ofnode_is_np(node)) {
-               return of_address_to_resource(ofnode_to_np(node), index, res);
-       } else
-#endif
-               {
-               struct fdt_resource fres;
-               int ret;
-
-               ret = fdt_get_resource(gd->fdt_blob, ofnode_to_offset(node),
-                                      "reg", index, &fres);
-               if (ret < 0)
-                       return -EINVAL;
-               memset(res, '\0', sizeof(*res));
-               res->start = fres.start;
-               res->end = fres.end;
-
-               return 0;
-       }
-}
+/* This file can hold non-inlined dev_read_...() functions */