diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-26 21:40:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-26 21:40:19 -0400 |
commit | f35c69b736e4f910d7447346980145212c283570 (patch) | |
tree | 824b90cd870e6de07bbba19d761c1c74cf1fb4a7 /drivers/acpi/acpi_lpss.c | |
parent | cd4373984a5903276f52777a6003425e023eaa7e (diff) | |
parent | e4aa937ec75df0eea0bee03bffa3303ad36c986b (diff) |
Merge 3.10-rc3 into char-misc-next
We want the changes in here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/acpi/acpi_lpss.c')
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index b1c95422ce74..652fd5ce303c 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c | |||
@@ -35,11 +35,16 @@ ACPI_MODULE_NAME("acpi_lpss"); | |||
35 | 35 | ||
36 | struct lpss_device_desc { | 36 | struct lpss_device_desc { |
37 | bool clk_required; | 37 | bool clk_required; |
38 | const char *clk_parent; | 38 | const char *clkdev_name; |
39 | bool ltr_required; | 39 | bool ltr_required; |
40 | unsigned int prv_offset; | 40 | unsigned int prv_offset; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static struct lpss_device_desc lpss_dma_desc = { | ||
44 | .clk_required = true, | ||
45 | .clkdev_name = "hclk", | ||
46 | }; | ||
47 | |||
43 | struct lpss_private_data { | 48 | struct lpss_private_data { |
44 | void __iomem *mmio_base; | 49 | void __iomem *mmio_base; |
45 | resource_size_t mmio_size; | 50 | resource_size_t mmio_size; |
@@ -49,7 +54,6 @@ struct lpss_private_data { | |||
49 | 54 | ||
50 | static struct lpss_device_desc lpt_dev_desc = { | 55 | static struct lpss_device_desc lpt_dev_desc = { |
51 | .clk_required = true, | 56 | .clk_required = true, |
52 | .clk_parent = "lpss_clk", | ||
53 | .prv_offset = 0x800, | 57 | .prv_offset = 0x800, |
54 | .ltr_required = true, | 58 | .ltr_required = true, |
55 | }; | 59 | }; |
@@ -60,6 +64,9 @@ static struct lpss_device_desc lpt_sdio_dev_desc = { | |||
60 | }; | 64 | }; |
61 | 65 | ||
62 | static const struct acpi_device_id acpi_lpss_device_ids[] = { | 66 | static const struct acpi_device_id acpi_lpss_device_ids[] = { |
67 | /* Generic LPSS devices */ | ||
68 | { "INTL9C60", (unsigned long)&lpss_dma_desc }, | ||
69 | |||
63 | /* Lynxpoint LPSS devices */ | 70 | /* Lynxpoint LPSS devices */ |
64 | { "INT33C0", (unsigned long)&lpt_dev_desc }, | 71 | { "INT33C0", (unsigned long)&lpt_dev_desc }, |
65 | { "INT33C1", (unsigned long)&lpt_dev_desc }, | 72 | { "INT33C1", (unsigned long)&lpt_dev_desc }, |
@@ -91,16 +98,27 @@ static int register_device_clock(struct acpi_device *adev, | |||
91 | struct lpss_private_data *pdata) | 98 | struct lpss_private_data *pdata) |
92 | { | 99 | { |
93 | const struct lpss_device_desc *dev_desc = pdata->dev_desc; | 100 | const struct lpss_device_desc *dev_desc = pdata->dev_desc; |
101 | struct lpss_clk_data *clk_data; | ||
94 | 102 | ||
95 | if (!lpss_clk_dev) | 103 | if (!lpss_clk_dev) |
96 | lpt_register_clock_device(); | 104 | lpt_register_clock_device(); |
97 | 105 | ||
98 | if (!dev_desc->clk_parent || !pdata->mmio_base | 106 | clk_data = platform_get_drvdata(lpss_clk_dev); |
107 | if (!clk_data) | ||
108 | return -ENODEV; | ||
109 | |||
110 | if (dev_desc->clkdev_name) { | ||
111 | clk_register_clkdev(clk_data->clk, dev_desc->clkdev_name, | ||
112 | dev_name(&adev->dev)); | ||
113 | return 0; | ||
114 | } | ||
115 | |||
116 | if (!pdata->mmio_base | ||
99 | || pdata->mmio_size < dev_desc->prv_offset + LPSS_CLK_SIZE) | 117 | || pdata->mmio_size < dev_desc->prv_offset + LPSS_CLK_SIZE) |
100 | return -ENODATA; | 118 | return -ENODATA; |
101 | 119 | ||
102 | pdata->clk = clk_register_gate(NULL, dev_name(&adev->dev), | 120 | pdata->clk = clk_register_gate(NULL, dev_name(&adev->dev), |
103 | dev_desc->clk_parent, 0, | 121 | clk_data->name, 0, |
104 | pdata->mmio_base + dev_desc->prv_offset, | 122 | pdata->mmio_base + dev_desc->prv_offset, |
105 | 0, 0, NULL); | 123 | 0, 0, NULL); |
106 | if (IS_ERR(pdata->clk)) | 124 | if (IS_ERR(pdata->clk)) |