Skip to contentSkip to conversation

msm: fb: initial framebuffer support

PATCH In review Daniel Walker 1 participant 6 messages Jul 13, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 msm: fb: initial framebuffer support

Initial framebuffer components. Add board-trout-panel.c as well as platform parts.

---
 arch/arm/mach-msm/Makefile            |    1 +
 arch/arm/mach-msm/board-trout-panel.c |  640 +++++++++++++++++++++++++++++++++
 arch/arm/mach-msm/devices-msm7x00.c   |   67 ++++
 arch/arm/mach-msm/devices.h           |    4 +
 4 files changed, 712 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-msm/board-trout-panel.c
arch/arm/mach-msm/Makefile +1 -0
index df7bf97..cdd1caf 100644
@@ -16,6 +16,7 @@ obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o
 obj-$(CONFIG_MSM_SMD) += last_radio_log.o
 
 obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
+obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o board-trout-panel.o devices-msm7x00.o
 obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o
 obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
 obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
arch/arm/mach-msm/board-trout-panel.c new file +640 -0

640 lines not on this page · raw message

arch/arm/mach-msm/devices-msm7x00.c +67 -0

73 lines not on this page · raw message

arch/arm/mach-msm/devices.h +4 -0
index fd71edc..7291e3e 100644
@@ -37,6 +37,10 @@ extern struct platform_device msm_device_smd;
 
 extern struct platform_device msm_device_nand;
 
+extern struct platform_device msm_device_mddi0;
+extern struct platform_device msm_device_mddi1;
+extern struct platform_device msm_device_mdp;
+
 extern struct clk msm_clocks_7x01a[];
 extern unsigned msm_num_clocks_7x01a;
 
Signature · 5 lines
1.7.0.4

-- 
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#1 lore raw

PATCH 2/5 msm: gpio support for trout.

This adds the tables required to enable gpiolib support in trout.

---
 arch/arm/mach-msm/board-trout.c     |   21 +++++++++++++++++++--
 arch/arm/mach-msm/devices-msm7x00.c |   18 ++++++++++++++++++
 2 files changed, 37 insertions(+), 2 deletions(-)
arch/arm/mach-msm/board-trout.c +19 -2
index 8f1b28f..bc0afa4 100644
@@ -32,7 +32,23 @@
 
 extern int trout_init_mmc(unsigned int);
 
-static struct platform_device *devices[] __initdata = {
+/*
+ * Early devices are those which provide a system service which will be
+ * required by one or more of the function calls in msm7x30_init.
+ * These devices must be probed and online first in order for
+ * the init routine to run successfully.
+ */
+static struct platform_device *early_devices[] __initdata = {
+	&msm_gpio_devices[0],
+	&msm_gpio_devices[1],
+	&msm_gpio_devices[2],
+	&msm_gpio_devices[3],
+	&msm_gpio_devices[4],
+	&msm_gpio_devices[5],
+};
+
+
+static struct platform_device *late_devices[] __initdata = {
 	&msm_device_uart3,
 	&msm_device_smd,
 	&msm_device_nand,
@@ -60,7 +76,8 @@ static void __init trout_init(void)
 {
 	int rc;
 
-	platform_add_devices(devices, ARRAY_SIZE(devices));
+	platform_add_devices(early_devices, ARRAY_SIZE(early_devices));
+	platform_add_devices(late_devices, ARRAY_SIZE(late_devices));
 
 #ifdef CONFIG_MMC
         rc = trout_init_mmc(system_rev);
arch/arm/mach-msm/devices-msm7x00.c +18 -0
index c782f72..a084d14 100644
@@ -413,6 +413,24 @@ struct platform_device msm_device_mdp = {
 	.resource = resources_mdp,
 };
 
+static struct msm7200a_gpio_platform_data gpio_platform_data[] = {
+	MSM7200A_GPIO_PLATFORM_DATA(0,   0,  15, INT_GPIO_GROUP1),
+	MSM7200A_GPIO_PLATFORM_DATA(1,  16,  42, INT_GPIO_GROUP2),
+	MSM7200A_GPIO_PLATFORM_DATA(2,  43,  67, INT_GPIO_GROUP1),
+	MSM7200A_GPIO_PLATFORM_DATA(3,  68,  94, INT_GPIO_GROUP1),
+	MSM7200A_GPIO_PLATFORM_DATA(4,  95, 106, INT_GPIO_GROUP1),
+	MSM7200A_GPIO_PLATFORM_DATA(5, 107, 121, INT_GPIO_GROUP1),
+};
+
+struct platform_device msm_gpio_devices[] = {
+	MSM7200A_GPIO_DEVICE(0, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(1, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(2, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(3, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(4, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(5, gpio_platform_data),
+};
+
 struct clk msm_clocks_7x01a[] = {
 	CLK_PCOM("adm_clk",	ADM_CLK,	NULL, 0),
 	CLK_PCOM("adsp_clk",	ADSP_CLK,	NULL, 0),
Signature · 5 lines
1.7.0.4

-- 
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#2 lore raw

PATCH 3/5 video: msm: change to min/max clock calls

In reply to Daniel Walker

The clocks used for mddi are MIN/MAX clocks. They can't be set to a specific clock value, only be given a min and max. We can fake it by make the min equal the max.

This is a hack, we really need to make the min/max different and set it in a acceptable way.

---
 drivers/video/msm/mddi.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/video/msm/mddi.c +6 -1
index 844eff3..fac58d6 100644
@@ -622,6 +622,8 @@ uint32_t mddi_remote_read(struct msm_mddi_client_data *cdata, uint32_t reg)
 }
 
 static struct mddi_info mddi_info[2];
+int clk_set_min_rate(struct clk *clk, unsigned long rate);
+int clk_set_max_rate(struct clk *clk, unsigned long rate);
 
 static int __init mddi_clk_setup(struct platform_device *pdev,
 				 struct mddi_info *mddi,
@@ -638,7 +640,10 @@ static int __init mddi_clk_setup(struct platform_device *pdev,
 	ret =  clk_enable(mddi->clk);
 	if (ret)
 		goto fail;
-	ret = clk_set_rate(mddi->clk, clk_rate);
+	ret = clk_set_max_rate(mddi->clk, clk_rate);
+	if (ret)
+		goto fail;
+	ret = clk_set_min_rate(mddi->clk, clk_rate);
 	if (ret)
 		goto fail;
 	return 0;
Signature · 5 lines
1.7.0.4

-- 
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#3 lore raw

PATCH 4/5 msm: fix up mddi clock

In reply to Daniel Walker

This adds in the CLK_MINMAX flag, renames the clocks to mddi_clk, and adds in the device pointer.

---
 arch/arm/mach-msm/devices-msm7x00.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-msm/devices-msm7x00.c +2 -2
index a084d14..f297415 100644
@@ -437,7 +437,7 @@ struct clk msm_clocks_7x01a[] = {
 	CLK_PCOM("ebi1_clk",	EBI1_CLK,	NULL, 0),
 	CLK_PCOM("ebi2_clk",	EBI2_CLK,	NULL, 0),
 	CLK_PCOM("ecodec_clk",	ECODEC_CLK,	NULL, 0),
-	CLK_PCOM("emdh_clk",	EMDH_CLK,	NULL, OFF),
+	CLK_PCOM("mddi_clk",	EMDH_CLK,	&msm_device_mddi1.dev, OFF),
 	CLK_PCOM("gp_clk",		GP_CLK,		NULL, 0),
 	CLK_PCOM("grp_clk",	GRP_3D_CLK,	NULL, OFF),
 	CLK_PCOM("i2c_clk",	I2C_CLK,	&msm_device_i2c.dev, 0),
@@ -448,7 +448,7 @@ struct clk msm_clocks_7x01a[] = {
 	CLK_PCOM("mdp_clk",	MDP_CLK,	NULL, OFF),
 	CLK_PCOM("pbus_clk",	PBUS_CLK,	NULL, 0),
 	CLK_PCOM("pcm_clk",	PCM_CLK,	NULL, 0),
-	CLK_PCOM("pmdh_clk",	PMDH_CLK,	NULL, OFF ),
+	CLK_PCOM("mddi_clk",	PMDH_CLK,	&msm_device_mddi0.dev, OFF | CLK_MINMAX),
 	CLK_PCOM("sdac_clk",	SDAC_CLK,	NULL, OFF),
 	CLK_PCOM("sdc_clk",	SDC1_CLK,	&msm_device_sdc1.dev, OFF),
 	CLK_PCOM("sdc_pclk",	SDC1_P_CLK,	&msm_device_sdc1.dev, OFF),
Signature · 5 lines
1.7.0.4

-- 
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#4 lore raw

PATCH 5/5 msm: mdp: fix for 2.6.32

In reply to Daniel Walker

From: Arve Hjønnevåg <[email protected]>

---
 drivers/video/msm/mdp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/video/msm/mdp.c +2 -1
index 3c28db0..c3636d5 100644
@@ -90,7 +90,7 @@ static int locked_disable_mdp_irq(struct mdp_info *mdp, uint32_t mask)
 	mdp_irq_mask &= ~(mask);
 	/* if no one is waiting on the interrupt, disable it */
 	if (!mdp_irq_mask) {
-		disable_irq(mdp->irq);
+		disable_irq_nosync(mdp->irq);
 		if (clk)
 			clk_disable(clk);
 	}
@@ -482,6 +482,7 @@ int mdp_probe(struct platform_device *pdev)
 	/* register mdp device */
 	mdp->mdp_dev.dev.parent = &pdev->dev;
 	mdp->mdp_dev.dev.class = mdp_class;
+	dev_set_name(&mdp->mdp_dev.dev, "mdp%d", pdev->id);
 
 	/* if you can remove the platform device you'd have to implement
 	 * this:
Signature · 5 lines
1.7.0.4

-- 
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#5 lore raw
In reply to Daniel Walker
Quoted 3 lines · Daniel Walker

Initial framebuffer components. Add board-trout-panel.c as well as platform parts.

These patches are pretty rough .. I just wanted to get it out there for anyone that might want to use the framebuffer. I'm still in the process of cleaning them up.

Daniel

--
Sent by an consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.