summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/base.c54
-rw-r--r--drivers/of/of_reserved_mem.c9
-rw-r--r--drivers/of/unittest.c2
3 files changed, 4 insertions, 61 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index e7d92b67cb8a..d4f98c8469ed 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -16,7 +16,6 @@
#define pr_fmt(fmt) "OF: " fmt
-#include <linux/bitmap.h>
#include <linux/console.h>
#include <linux/ctype.h>
#include <linux/cpu.h>
@@ -1993,59 +1992,6 @@ int of_alias_get_id(struct device_node *np, const char *stem)
EXPORT_SYMBOL_GPL(of_alias_get_id);
/**
- * of_alias_get_alias_list - Get alias list for the given device driver
- * @matches: Array of OF device match structures to search in
- * @stem: Alias stem of the given device_node
- * @bitmap: Bitmap field pointer
- * @nbits: Maximum number of alias IDs which can be recorded in bitmap
- *
- * The function travels the lookup table to record alias ids for the given
- * device match structures and alias stem.
- *
- * Return: 0 or -ENOSYS when !CONFIG_OF or
- * -EOVERFLOW if alias ID is greater then allocated nbits
- */
-int of_alias_get_alias_list(const struct of_device_id *matches,
- const char *stem, unsigned long *bitmap,
- unsigned int nbits)
-{
- struct alias_prop *app;
- int ret = 0;
-
- /* Zero bitmap field to make sure that all the time it is clean */
- bitmap_zero(bitmap, nbits);
-
- mutex_lock(&of_mutex);
- pr_debug("%s: Looking for stem: %s\n", __func__, stem);
- list_for_each_entry(app, &aliases_lookup, link) {
- pr_debug("%s: stem: %s, id: %d\n",
- __func__, app->stem, app->id);
-
- if (strcmp(app->stem, stem) != 0) {
- pr_debug("%s: stem comparison didn't pass %s\n",
- __func__, app->stem);
- continue;
- }
-
- if (of_match_node(matches, app->np)) {
- pr_debug("%s: Allocated ID %d\n", __func__, app->id);
-
- if (app->id >= nbits) {
- pr_warn("%s: ID %d >= than bitmap field %d\n",
- __func__, app->id, nbits);
- ret = -EOVERFLOW;
- } else {
- set_bit(app->id, bitmap);
- }
- }
- }
- mutex_unlock(&of_mutex);
-
- return ret;
-}
-EXPORT_SYMBOL_GPL(of_alias_get_alias_list);
-
-/**
* of_alias_get_highest_id - Get highest alias id for the given stem
* @stem: Alias stem to be examined
*
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 9c0fb962c22b..75caa6f5d36f 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -22,6 +22,7 @@
#include <linux/slab.h>
#include <linux/memblock.h>
#include <linux/kmemleak.h>
+#include <linux/cma.h>
#include "of_private.h"
@@ -116,12 +117,8 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
if (IS_ENABLED(CONFIG_CMA)
&& of_flat_dt_is_compatible(node, "shared-dma-pool")
&& of_get_flat_dt_prop(node, "reusable", NULL)
- && !nomap) {
- unsigned long order =
- max_t(unsigned long, MAX_ORDER - 1, pageblock_order);
-
- align = max(align, (phys_addr_t)PAGE_SIZE << order);
- }
+ && !nomap)
+ align = max_t(phys_addr_t, align, CMA_MIN_ALIGNMENT_BYTES);
prop = of_get_flat_dt_prop(node, "alloc-ranges", &len);
if (prop) {
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 2c2fb161b572..c4106de9f137 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -44,7 +44,7 @@ static struct unittest_results {
pr_err("FAIL %s():%i " fmt, __func__, __LINE__, ##__VA_ARGS__); \
} else { \
unittest_results.passed++; \
- pr_debug("pass %s():%i\n", __func__, __LINE__); \
+ pr_info("pass %s():%i\n", __func__, __LINE__); \
} \
failed; \
})