This source file includes following definitions.
- ap_cp_unique_name
1
2
3
4
5
6
7
8
9
10
11 #include "armada_ap_cp_helper.h"
12 #include <linux/device.h>
13 #include <linux/of.h>
14 #include <linux/of_address.h>
15
16 char *ap_cp_unique_name(struct device *dev, struct device_node *np,
17 const char *name)
18 {
19 const __be32 *reg;
20 u64 addr;
21
22
23 if (!name)
24 return NULL;
25
26 reg = of_get_property(np, "reg", NULL);
27 addr = of_translate_address(np, reg);
28 return devm_kasprintf(dev, GFP_KERNEL, "%llx-%s",
29 (unsigned long long)addr, name);
30 }