diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-05-08 04:55:49 -0400 |
|---|---|---|
| committer | Vinod Koul <vinod.koul@intel.com> | 2013-05-14 00:53:58 -0400 |
| commit | b59cc200ac025aca597fb21862c1c9e667f2eff2 (patch) | |
| tree | fabada02fb402faffe5ec3582df3806b4c27d97c /drivers/clk/x86 | |
| parent | ee8209fd026b074bb8eb75bece516a338a281b1b (diff) | |
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>
Diffstat (limited to 'drivers/clk/x86')
| -rw-r--r-- | drivers/clk/x86/clk-lpt.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/clk/x86/clk-lpt.c b/drivers/clk/x86/clk-lpt.c index 5cf4f4686406..4f45eee9e33b 100644 --- a/drivers/clk/x86/clk-lpt.c +++ b/drivers/clk/x86/clk-lpt.c | |||
| @@ -15,22 +15,29 @@ | |||
| 15 | #include <linux/clk-provider.h> | 15 | #include <linux/clk-provider.h> |
| 16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
| 17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 18 | #include <linux/platform_data/clk-lpss.h> | ||
| 18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
| 19 | 20 | ||
| 20 | #define PRV_CLOCK_PARAMS 0x800 | 21 | #define PRV_CLOCK_PARAMS 0x800 |
| 21 | 22 | ||
| 22 | static int lpt_clk_probe(struct platform_device *pdev) | 23 | static int lpt_clk_probe(struct platform_device *pdev) |
| 23 | { | 24 | { |
| 25 | struct lpss_clk_data *drvdata; | ||
| 24 | struct clk *clk; | 26 | struct clk *clk; |
| 25 | 27 | ||
| 28 | drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL); | ||
| 29 | if (!drvdata) | ||
| 30 | return -ENOMEM; | ||
| 31 | |||
| 26 | /* LPSS free running clock */ | 32 | /* LPSS free running clock */ |
| 27 | clk = clk_register_fixed_rate(&pdev->dev, "lpss_clk", NULL, CLK_IS_ROOT, | 33 | drvdata->name = "lpss_clk"; |
| 28 | 100000000); | 34 | clk = clk_register_fixed_rate(&pdev->dev, drvdata->name, NULL, |
| 35 | CLK_IS_ROOT, 100000000); | ||
| 29 | if (IS_ERR(clk)) | 36 | if (IS_ERR(clk)) |
| 30 | return PTR_ERR(clk); | 37 | return PTR_ERR(clk); |
| 31 | 38 | ||
| 32 | /* Shared DMA clock */ | 39 | drvdata->clk = clk; |
| 33 | clk_register_clkdev(clk, "hclk", "INTL9C60.0.auto"); | 40 | platform_set_drvdata(pdev, drvdata); |
| 34 | return 0; | 41 | return 0; |
| 35 | } | 42 | } |
| 36 | 43 | ||
