aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2013-06-17 13:43:17 -0400
committerDavid Brown <davidb@codeaurora.org>2013-06-24 16:06:43 -0400
commit2dfd9c1f7722bcaa9d2d4af090af2050df85203b (patch)
treecf27832a02345c3863b3ad2224c288c6cd98ba47 /arch/arm/mach-msm
parent42a9ed5dbed44ee24c2775ad53904b7908f8ed2b (diff)
ARM: msm: Prepare clk_get() users in mach-msm for clock-pcom driver
In the near future we'll be moving clock-pcom to a platform driver, in which case these two users of clk_get() in mach-msm need to be updated. Have board-trout-panel.c make the proc_comm call directly so that we don't have to port this board specific code to the driver right now and reorder the initcall order of dma.c so that it initializes after the clock driver probes but before any drivers use dma APIs. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r--arch/arm/mach-msm/Makefile9
-rw-r--r--arch/arm/mach-msm/board-trout-panel.c19
-rw-r--r--arch/arm/mach-msm/dma.c5
3 files changed, 15 insertions, 18 deletions
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index 17519faf082f..3dbae7406e0f 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -5,12 +5,15 @@ obj-$(CONFIG_DEBUG_FS) += clock-debug.o
5obj-$(CONFIG_MSM_VIC) += irq-vic.o 5obj-$(CONFIG_MSM_VIC) += irq-vic.o
6obj-$(CONFIG_MSM_IOMMU) += devices-iommu.o 6obj-$(CONFIG_MSM_IOMMU) += devices-iommu.o
7 7
8obj-$(CONFIG_ARCH_MSM7X00A) += dma.o irq.o 8obj-$(CONFIG_ARCH_MSM7X00A) += irq.o
9obj-$(CONFIG_ARCH_MSM7X30) += dma.o 9obj-$(CONFIG_ARCH_QSD8X50) += sirc.o
10obj-$(CONFIG_ARCH_QSD8X50) += dma.o sirc.o
11 10
12obj-$(CONFIG_MSM_PROC_COMM) += proc_comm.o clock-pcom.o vreg.o 11obj-$(CONFIG_MSM_PROC_COMM) += proc_comm.o clock-pcom.o vreg.o
13 12
13obj-$(CONFIG_ARCH_MSM7X00A) += dma.o
14obj-$(CONFIG_ARCH_MSM7X30) += dma.o
15obj-$(CONFIG_ARCH_QSD8X50) += dma.o
16
14obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o 17obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o
15obj-$(CONFIG_MSM_SMD) += last_radio_log.o 18obj-$(CONFIG_MSM_SMD) += last_radio_log.o
16obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o 19obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
diff --git a/arch/arm/mach-msm/board-trout-panel.c b/arch/arm/mach-msm/board-trout-panel.c
index f9a5db6d2ced..77b0a26f897f 100644
--- a/arch/arm/mach-msm/board-trout-panel.c
+++ b/arch/arm/mach-msm/board-trout-panel.c
@@ -7,7 +7,6 @@
7#include <linux/platform_device.h> 7#include <linux/platform_device.h>
8#include <linux/delay.h> 8#include <linux/delay.h>
9#include <linux/leds.h> 9#include <linux/leds.h>
10#include <linux/clk.h>
11#include <linux/err.h> 10#include <linux/err.h>
12 11
13#include <asm/io.h> 12#include <asm/io.h>
@@ -19,6 +18,7 @@
19 18
20#include "board-trout.h" 19#include "board-trout.h"
21#include "proc_comm.h" 20#include "proc_comm.h"
21#include "clock-pcom.h"
22#include "devices.h" 22#include "devices.h"
23 23
24#define TROUT_DEFAULT_BACKLIGHT_BRIGHTNESS 255 24#define TROUT_DEFAULT_BACKLIGHT_BRIGHTNESS 255
@@ -170,7 +170,6 @@ static struct mddi_table mddi_toshiba_init_table[] = {
170#define INTMASK_VWAKEOUT (1U << 0) 170#define INTMASK_VWAKEOUT (1U << 0)
171 171
172 172
173static struct clk *gp_clk;
174static int trout_new_backlight = 1; 173static int trout_new_backlight = 1;
175static struct vreg *vreg_mddi_1v5; 174static struct vreg *vreg_mddi_1v5;
176static struct vreg *vreg_lcm_2v85; 175static struct vreg *vreg_lcm_2v85;
@@ -273,18 +272,14 @@ int __init trout_init_panel(void)
273 } else { 272 } else {
274 uint32_t config = PCOM_GPIO_CFG(27, 1, GPIO_OUTPUT, 273 uint32_t config = PCOM_GPIO_CFG(27, 1, GPIO_OUTPUT,
275 GPIO_NO_PULL, GPIO_8MA); 274 GPIO_NO_PULL, GPIO_8MA);
275 uint32_t id = P_GP_CLK;
276 uint32_t rate = 19200000;
277
276 msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0); 278 msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
277 279
278 gp_clk = clk_get(NULL, "gp_clk"); 280 msm_proc_comm(PCOM_CLKCTL_RPC_SET_RATE, &id, &rate);
279 if (IS_ERR(gp_clk)) { 281 if (id < 0)
280 printk(KERN_ERR "trout_init_panel: could not get gp" 282 pr_err("trout_init_panel: set clock rate failed\n");
281 "clock\n");
282 gp_clk = NULL;
283 }
284 rc = clk_set_rate(gp_clk, 19200000);
285 if (rc)
286 printk(KERN_ERR "trout_init_panel: set clock rate "
287 "failed\n");
288 } 283 }
289 284
290 rc = platform_device_register(&msm_device_mdp); 285 rc = platform_device_register(&msm_device_mdp);
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c
index b279fd8a31b1..f8f6adfa07c6 100644
--- a/arch/arm/mach-msm/dma.c
+++ b/arch/arm/mach-msm/dma.c
@@ -284,6 +284,7 @@ static int __init msm_init_datamover(void)
284 clk = clk_get(NULL, "adm_clk"); 284 clk = clk_get(NULL, "adm_clk");
285 if (IS_ERR(clk)) 285 if (IS_ERR(clk))
286 return PTR_ERR(clk); 286 return PTR_ERR(clk);
287 clk_prepare(clk);
287 msm_dmov_clk = clk; 288 msm_dmov_clk = clk;
288 ret = request_irq(INT_ADM_AARM, msm_datamover_irq_handler, 0, "msmdatamover", NULL); 289 ret = request_irq(INT_ADM_AARM, msm_datamover_irq_handler, 0, "msmdatamover", NULL);
289 if (ret) 290 if (ret)
@@ -291,6 +292,4 @@ static int __init msm_init_datamover(void)
291 disable_irq(INT_ADM_AARM); 292 disable_irq(INT_ADM_AARM);
292 return 0; 293 return 0;
293} 294}
294 295module_init(msm_init_datamover);
295arch_initcall(msm_init_datamover);
296