1 // SPDX-License-Identifier: GPL-2.0+
3 * Marvell Armada AP and CP110 helper
5 * Copyright (C) 2018 Marvell
7 * Gregory Clement <gregory.clement@bootlin.com>
11 #include "armada_ap_cp_helper.h"
12 #include <linux/device.h>
14 #include <linux/of_address.h>
16 char *ap_cp_unique_name(struct device
*dev
, struct device_node
*np
,
22 /* Do not create a name if there is no clock */
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
);