mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 13:34:10 +08:00
ACPI: APD: Add a fmw property clk-name
Add a new device property to fetch clk-name from firmware. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com> Link: https://lore.kernel.org/r/20211212180527.1641362-4-AjitKumar.Pandey@amd.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
3663f26b38
commit
7fdb98e8a7
@ -87,6 +87,16 @@ static int fch_misc_setup(struct apd_private_data *pdata)
|
||||
if (ret < 0)
|
||||
return -ENOENT;
|
||||
|
||||
if (!acpi_dev_get_property(adev, "clk-name", ACPI_TYPE_STRING, &obj)) {
|
||||
clk_data->name = devm_kzalloc(&adev->dev, obj->string.length,
|
||||
GFP_KERNEL);
|
||||
|
||||
strcpy(clk_data->name, obj->string.pointer);
|
||||
} else {
|
||||
/* Set default name to mclk if entry missing in firmware */
|
||||
clk_data->name = "mclk";
|
||||
}
|
||||
|
||||
list_for_each_entry(rentry, &resource_list, node) {
|
||||
clk_data->base = devm_ioremap(&adev->dev, rentry->res->start,
|
||||
resource_size(rentry->res));
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
struct fch_clk_data {
|
||||
void __iomem *base;
|
||||
char *name;
|
||||
};
|
||||
|
||||
#endif /* __CLK_FCH_H */
|
||||
|
Loading…
Reference in New Issue
Block a user