ACPI / LPSS: register clock device for Lynxpoint DMA properly
The DMA controller in Lynxpoint is enumerated as a regular ACPI device now. To work properly it is using the LPSS root clock as a functional clock. That's why we have to register the clock device accordingly to the ACPI ID of the DMA controller. The acpi_lpss.c module is responsible to do the job. This patch also removes hardcoded name of the DMA device in clk-lpt.c and the name of the root clock in acpi_lpss.c. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Vinod Koul

vecāks
ee8209fd02
revīzija
b59cc200ac
@@ -15,22 +15,29 @@
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_data/clk-lpss.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#define PRV_CLOCK_PARAMS 0x800
|
||||
|
||||
static int lpt_clk_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct lpss_clk_data *drvdata;
|
||||
struct clk *clk;
|
||||
|
||||
drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
|
||||
if (!drvdata)
|
||||
return -ENOMEM;
|
||||
|
||||
/* LPSS free running clock */
|
||||
clk = clk_register_fixed_rate(&pdev->dev, "lpss_clk", NULL, CLK_IS_ROOT,
|
||||
100000000);
|
||||
drvdata->name = "lpss_clk";
|
||||
clk = clk_register_fixed_rate(&pdev->dev, drvdata->name, NULL,
|
||||
CLK_IS_ROOT, 100000000);
|
||||
if (IS_ERR(clk))
|
||||
return PTR_ERR(clk);
|
||||
|
||||
/* Shared DMA clock */
|
||||
clk_register_clkdev(clk, "hclk", "INTL9C60.0.auto");
|
||||
drvdata->clk = clk;
|
||||
platform_set_drvdata(pdev, drvdata);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user