aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 13:58:20 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 13:58:20 -0500
commita11da7df6543b5f71a150b47c0d08ecf0799a0f3 (patch)
tree77eaac99426f64a0a8dc3b5d62c86138a8c72d43 /drivers
parentb8edf848e9119bab9d999b9ca80d8520641810f2 (diff)
parent9c7466b217af784280d9fc841bbd559ef3bf33e9 (diff)
Merge tag 'pm-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC power management and clock changes from Olof Johansson: "This branch contains a largeish set of updates of power management and clock setup. The bulk of it is for OMAP/AM33xx platforms, but also a few around hotplug/suspend/resume on Exynos. It includes a split-up of some of the OMAP clock data into separate files which adds to the diffstat, but gross delta is fairly reasonable." * tag 'pm-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits) ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h ASoC: OMAP: mcbsp fixes for enabling ARM multiplatform support watchdog: OMAP: fixup for ARM multiplatform support ARM: EXYNOS: Add flush_cache_all in suspend finisher ARM: EXYNOS: Remove scu_enable from cpuidle ARM: EXYNOS: Fix soft reboot hang after suspend/resume ARM: EXYNOS: Add support for rtc wakeup ARM: EXYNOS: fix the hotplug for Cortex-A15 ARM: OMAP2+: omap_device: Correct resource handling for DT boot ARM: OMAP2+: hwmod: Add possibility to count hwmod resources based on type ARM: OMAP2+: hwmod: Add support for per hwmod/module context lost count ARM: OMAP2+: PRM: initialize some PRM functions early ARM: OMAP2+: voltage: fixup oscillator handling when CONFIG_PM=n ARM: OMAP4: USB: power down MUSB PHY during boot ARM: OMAP2+: clock: Cleanup !CONFIG_COMMON_CLK parts ARM: OMAP2xxx: clock: drop obsolete clock data ARM: OMAP2: clock: Cleanup !CONFIG_COMMON_CLK parts ARM: OMAP3+: DPLL: drop !CONFIG_COMMON_CLK sections ARM: AM33xx: clock: drop obsolete clock data ARM: OMAP3xxx: clk: drop obsolete clock data ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/omap-aes.c2
-rw-r--r--drivers/crypto/omap-sham.c2
-rw-r--r--drivers/dma/omap-dma.c2
-rw-r--r--drivers/media/platform/omap/omap_vout.c2
-rw-r--r--drivers/media/platform/omap/omap_vout_vrfb.c2
-rw-r--r--drivers/media/platform/omap3isp/ispstat.h2
-rw-r--r--drivers/media/platform/soc_camera/omap1_camera.c2
-rw-r--r--drivers/mtd/nand/omap2.c1
-rw-r--r--drivers/mtd/onenand/omap2.c2
-rw-r--r--drivers/power/avs/smartreflex.c54
-rw-r--r--drivers/usb/gadget/omap_udc.c2
-rw-r--r--drivers/usb/musb/tusb6010_omap.c2
-rw-r--r--drivers/video/omap/lcdc.c2
-rw-r--r--drivers/video/omap/omapfb_main.c2
-rw-r--r--drivers/video/omap/sossi.c2
-rw-r--r--drivers/watchdog/omap_wdt.c2
16 files changed, 29 insertions, 54 deletions
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index 649a146e1382..e66e8ee5a9af 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -29,7 +29,7 @@
29#include <crypto/scatterwalk.h> 29#include <crypto/scatterwalk.h>
30#include <crypto/aes.h> 30#include <crypto/aes.h>
31 31
32#include <plat-omap/dma-omap.h> 32#include <linux/omap-dma.h>
33 33
34/* OMAP TRM gives bitfields as start:end, where start is the higher bit 34/* OMAP TRM gives bitfields as start:end, where start is the higher bit
35 number. For example 7:0 */ 35 number. For example 7:0 */
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index d76fe06b9417..1d75e6f95a58 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -37,7 +37,7 @@
37#include <crypto/hash.h> 37#include <crypto/hash.h>
38#include <crypto/internal/hash.h> 38#include <crypto/internal/hash.h>
39 39
40#include <plat-omap/dma-omap.h> 40#include <linux/omap-dma.h>
41#include <mach/irqs.h> 41#include <mach/irqs.h>
42 42
43#define SHA_REG_DIGEST(x) (0x00 + ((x) * 0x04)) 43#define SHA_REG_DIGEST(x) (0x00 + ((x) * 0x04))
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
index 7d35c237fbf1..5a31264f2bd1 100644
--- a/drivers/dma/omap-dma.c
+++ b/drivers/dma/omap-dma.c
@@ -19,8 +19,6 @@
19 19
20#include "virt-dma.h" 20#include "virt-dma.h"
21 21
22#include <plat-omap/dma-omap.h>
23
24struct omap_dmadev { 22struct omap_dmadev {
25 struct dma_device ddev; 23 struct dma_device ddev;
26 spinlock_t lock; 24 spinlock_t lock;
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
index 4b1becc86e54..993504015963 100644
--- a/drivers/media/platform/omap/omap_vout.c
+++ b/drivers/media/platform/omap/omap_vout.c
@@ -45,7 +45,7 @@
45#include <media/v4l2-ioctl.h> 45#include <media/v4l2-ioctl.h>
46 46
47#include <plat/cpu.h> 47#include <plat/cpu.h>
48#include <plat-omap/dma-omap.h> 48#include <linux/omap-dma.h>
49#include <video/omapvrfb.h> 49#include <video/omapvrfb.h>
50#include <video/omapdss.h> 50#include <video/omapdss.h>
51 51
diff --git a/drivers/media/platform/omap/omap_vout_vrfb.c b/drivers/media/platform/omap/omap_vout_vrfb.c
index 8340445a0ee5..cf1c437a8687 100644
--- a/drivers/media/platform/omap/omap_vout_vrfb.c
+++ b/drivers/media/platform/omap/omap_vout_vrfb.c
@@ -16,7 +16,7 @@
16#include <media/videobuf-dma-contig.h> 16#include <media/videobuf-dma-contig.h>
17#include <media/v4l2-device.h> 17#include <media/v4l2-device.h>
18 18
19#include <plat-omap/dma-omap.h> 19#include <linux/omap-dma.h>
20#include <video/omapvrfb.h> 20#include <video/omapvrfb.h>
21 21
22#include "omap_voutdef.h" 22#include "omap_voutdef.h"
diff --git a/drivers/media/platform/omap3isp/ispstat.h b/drivers/media/platform/omap3isp/ispstat.h
index 99cf10449cf5..fd15094de34a 100644
--- a/drivers/media/platform/omap3isp/ispstat.h
+++ b/drivers/media/platform/omap3isp/ispstat.h
@@ -30,7 +30,7 @@
30 30
31#include <linux/types.h> 31#include <linux/types.h>
32#include <linux/omap3isp.h> 32#include <linux/omap3isp.h>
33#include <plat-omap/dma-omap.h> 33#include <linux/omap-dma.h>
34#include <media/v4l2-event.h> 34#include <media/v4l2-event.h>
35 35
36#include "isp.h" 36#include "isp.h"
diff --git a/drivers/media/platform/soc_camera/omap1_camera.c b/drivers/media/platform/soc_camera/omap1_camera.c
index d3cfe65c0494..39a77f0b8860 100644
--- a/drivers/media/platform/soc_camera/omap1_camera.c
+++ b/drivers/media/platform/soc_camera/omap1_camera.c
@@ -34,7 +34,7 @@
34#include <media/videobuf-dma-contig.h> 34#include <media/videobuf-dma-contig.h>
35#include <media/videobuf-dma-sg.h> 35#include <media/videobuf-dma-sg.h>
36 36
37#include <plat-omap/dma-omap.h> 37#include <linux/omap-dma.h>
38 38
39 39
40#define DRIVER_NAME "omap1-camera" 40#define DRIVER_NAME "omap1-camera"
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 5c8978e90240..1f34ba104ef4 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -27,7 +27,6 @@
27#include <linux/bch.h> 27#include <linux/bch.h>
28#endif 28#endif
29 29
30#include <plat-omap/dma-omap.h>
31#include <linux/platform_data/mtd-nand-omap2.h> 30#include <linux/platform_data/mtd-nand-omap2.h>
32 31
33#define DRIVER_NAME "omap2-nand" 32#define DRIVER_NAME "omap2-nand"
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 99f96e19ebea..00cd3da29435 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -41,7 +41,7 @@
41#include <linux/platform_data/mtd-onenand-omap2.h> 41#include <linux/platform_data/mtd-onenand-omap2.h>
42#include <asm/gpio.h> 42#include <asm/gpio.h>
43 43
44#include <plat-omap/dma-omap.h> 44#include <linux/omap-dma.h>
45 45
46#define DRIVER_NAME "omap2-onenand" 46#define DRIVER_NAME "omap2-onenand"
47 47
diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
index d0fed2c5cf2c..a17d08411723 100644
--- a/drivers/power/avs/smartreflex.c
+++ b/drivers/power/avs/smartreflex.c
@@ -130,24 +130,21 @@ static irqreturn_t sr_interrupt(int irq, void *data)
130 130
131static void sr_set_clk_length(struct omap_sr *sr) 131static void sr_set_clk_length(struct omap_sr *sr)
132{ 132{
133 struct clk *sys_ck; 133 struct clk *fck;
134 u32 sys_clk_speed; 134 u32 fclk_speed;
135 135
136 if (cpu_is_omap34xx()) 136 fck = clk_get(&sr->pdev->dev, "fck");
137 sys_ck = clk_get(NULL, "sys_ck");
138 else
139 sys_ck = clk_get(NULL, "sys_clkin_ck");
140 137
141 if (IS_ERR(sys_ck)) { 138 if (IS_ERR(fck)) {
142 dev_err(&sr->pdev->dev, "%s: unable to get sys clk\n", 139 dev_err(&sr->pdev->dev, "%s: unable to get fck for device %s\n",
143 __func__); 140 __func__, dev_name(&sr->pdev->dev));
144 return; 141 return;
145 } 142 }
146 143
147 sys_clk_speed = clk_get_rate(sys_ck); 144 fclk_speed = clk_get_rate(fck);
148 clk_put(sys_ck); 145 clk_put(fck);
149 146
150 switch (sys_clk_speed) { 147 switch (fclk_speed) {
151 case 12000000: 148 case 12000000:
152 sr->clk_length = SRCLKLENGTH_12MHZ_SYSCLK; 149 sr->clk_length = SRCLKLENGTH_12MHZ_SYSCLK;
153 break; 150 break;
@@ -164,34 +161,12 @@ static void sr_set_clk_length(struct omap_sr *sr)
164 sr->clk_length = SRCLKLENGTH_38MHZ_SYSCLK; 161 sr->clk_length = SRCLKLENGTH_38MHZ_SYSCLK;
165 break; 162 break;
166 default: 163 default:
167 dev_err(&sr->pdev->dev, "%s: Invalid sysclk value: %d\n", 164 dev_err(&sr->pdev->dev, "%s: Invalid fclk rate: %d\n",
168 __func__, sys_clk_speed); 165 __func__, fclk_speed);
169 break; 166 break;
170 } 167 }
171} 168}
172 169
173static void sr_set_regfields(struct omap_sr *sr)
174{
175 /*
176 * For time being these values are defined in smartreflex.h
177 * and populated during init. May be they can be moved to board
178 * file or pmic specific data structure. In that case these structure
179 * fields will have to be populated using the pdata or pmic structure.
180 */
181 if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
182 sr->err_weight = OMAP3430_SR_ERRWEIGHT;
183 sr->err_maxlimit = OMAP3430_SR_ERRMAXLIMIT;
184 sr->accum_data = OMAP3430_SR_ACCUMDATA;
185 if (!(strcmp(sr->name, "smartreflex_mpu_iva"))) {
186 sr->senn_avgweight = OMAP3430_SR1_SENNAVGWEIGHT;
187 sr->senp_avgweight = OMAP3430_SR1_SENPAVGWEIGHT;
188 } else {
189 sr->senn_avgweight = OMAP3430_SR2_SENNAVGWEIGHT;
190 sr->senp_avgweight = OMAP3430_SR2_SENPAVGWEIGHT;
191 }
192 }
193}
194
195static void sr_start_vddautocomp(struct omap_sr *sr) 170static void sr_start_vddautocomp(struct omap_sr *sr)
196{ 171{
197 if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) { 172 if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) {
@@ -924,8 +899,14 @@ static int __init omap_sr_probe(struct platform_device *pdev)
924 sr_info->nvalue_count = pdata->nvalue_count; 899 sr_info->nvalue_count = pdata->nvalue_count;
925 sr_info->senn_mod = pdata->senn_mod; 900 sr_info->senn_mod = pdata->senn_mod;
926 sr_info->senp_mod = pdata->senp_mod; 901 sr_info->senp_mod = pdata->senp_mod;
902 sr_info->err_weight = pdata->err_weight;
903 sr_info->err_maxlimit = pdata->err_maxlimit;
904 sr_info->accum_data = pdata->accum_data;
905 sr_info->senn_avgweight = pdata->senn_avgweight;
906 sr_info->senp_avgweight = pdata->senp_avgweight;
927 sr_info->autocomp_active = false; 907 sr_info->autocomp_active = false;
928 sr_info->ip_type = pdata->ip_type; 908 sr_info->ip_type = pdata->ip_type;
909
929 sr_info->base = ioremap(mem->start, resource_size(mem)); 910 sr_info->base = ioremap(mem->start, resource_size(mem));
930 if (!sr_info->base) { 911 if (!sr_info->base) {
931 dev_err(&pdev->dev, "%s: ioremap fail\n", __func__); 912 dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
@@ -937,7 +918,6 @@ static int __init omap_sr_probe(struct platform_device *pdev)
937 sr_info->irq = irq->start; 918 sr_info->irq = irq->start;
938 919
939 sr_set_clk_length(sr_info); 920 sr_set_clk_length(sr_info);
940 sr_set_regfields(sr_info);
941 921
942 list_add(&sr_info->node, &sr_list); 922 list_add(&sr_info->node, &sr_list);
943 923
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index 09699f6e87f8..8bfe990caf1a 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -44,7 +44,7 @@
44#include <asm/unaligned.h> 44#include <asm/unaligned.h>
45#include <asm/mach-types.h> 45#include <asm/mach-types.h>
46 46
47#include <plat-omap/dma-omap.h> 47#include <linux/omap-dma.h>
48 48
49#include <mach/usb.h> 49#include <mach/usb.h>
50 50
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c
index 9716850a4309..98df17c984a8 100644
--- a/drivers/usb/musb/tusb6010_omap.c
+++ b/drivers/usb/musb/tusb6010_omap.c
@@ -16,7 +16,7 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <plat-omap/dma-omap.h> 19#include <linux/omap-dma.h>
20 20
21#include "musb_core.h" 21#include "musb_core.h"
22#include "tusb6010.h" 22#include "tusb6010.h"
diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c
index c39d6e46f8c5..b52f62595f65 100644
--- a/drivers/video/omap/lcdc.c
+++ b/drivers/video/omap/lcdc.c
@@ -31,7 +31,7 @@
31#include <linux/gfp.h> 31#include <linux/gfp.h>
32 32
33#include <mach/lcdc.h> 33#include <mach/lcdc.h>
34#include <plat-omap/dma-omap.h> 34#include <linux/omap-dma.h>
35 35
36#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37 37
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 1b5ee8ec192a..e31f5b33b501 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -30,7 +30,7 @@
30#include <linux/uaccess.h> 30#include <linux/uaccess.h>
31#include <linux/module.h> 31#include <linux/module.h>
32 32
33#include <plat-omap/dma-omap.h> 33#include <linux/omap-dma.h>
34 34
35#include "omapfb.h" 35#include "omapfb.h"
36#include "lcdc.h" 36#include "lcdc.h"
diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c
index c510a4457398..d4e7684e7045 100644
--- a/drivers/video/omap/sossi.c
+++ b/drivers/video/omap/sossi.c
@@ -25,7 +25,7 @@
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27 27
28#include <plat-omap/dma-omap.h> 28#include <linux/omap-dma.h>
29 29
30#include "omapfb.h" 30#include "omapfb.h"
31#include "lcdc.h" 31#include "lcdc.h"
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 43cc1a1e25d4..3e3ebbc83faf 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -45,8 +45,6 @@
45#include <linux/uaccess.h> 45#include <linux/uaccess.h>
46#include <linux/slab.h> 46#include <linux/slab.h>
47#include <linux/pm_runtime.h> 47#include <linux/pm_runtime.h>
48#include <mach/hardware.h>
49
50#include <linux/platform_data/omap-wd-timer.h> 48#include <linux/platform_data/omap-wd-timer.h>
51 49
52#include "omap_wdt.h" 50#include "omap_wdt.h"