Skip to content

Commit

Permalink
ACPI: APD: Add a fmw property is_raven
Browse files Browse the repository at this point in the history
Since there is slight difference in AMD RV based soc in misc
clk architecture. The fmw property will help in differentiating
the SoCs.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Akshu Agrawal authored and Rafael J. Wysocki committed Aug 7, 2020
1 parent d9b7736 commit 7f8802f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/acpi/acpi_apd.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ static int misc_check_res(struct acpi_resource *ares, void *data)
static int fch_misc_setup(struct apd_private_data *pdata)
{
struct acpi_device *adev = pdata->adev;
const union acpi_object *obj;
struct platform_device *clkdev;
struct fch_clk_data *clk_data;
struct resource_entry *rentry;
Expand All @@ -98,6 +99,9 @@ static int fch_misc_setup(struct apd_private_data *pdata)
if (ret < 0)
return -ENOENT;

acpi_dev_get_property(adev, "is-rv", ACPI_TYPE_INTEGER, &obj);
clk_data->is_rv = obj->integer.value;

list_for_each_entry(rentry, &resource_list, node) {
clk_data->base = devm_ioremap(&adev->dev, rentry->res->start,
resource_size(rentry->res));
Expand Down
1 change: 1 addition & 0 deletions include/linux/platform_data/clk-fch.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

struct fch_clk_data {
void __iomem *base;
u32 is_rv;
};

#endif /* __CLK_FCH_H */

0 comments on commit 7f8802f

Please sign in to comment.