aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/omap24xx/patches-2.6.35/700-video-omap.patch
blob: c1a5e2a08d5f354776ef664d3dabf2ae1d548021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
Index: linux-2.6.35/drivers/video/omap/dispc.c
===================================================================
--- linux-2.6.35.orig/drivers/video/omap/dispc.c	2010-08-08 12:56:09.000000000 +0200
+++ linux-2.6.35/drivers/video/omap/dispc.c	2010-08-08 12:57:42.000000000 +0200
@@ -190,6 +190,11 @@ static struct {
 	struct omapfb_color_key	color_key;
 } dispc;
 
+struct platform_device omapdss_device = {
+	.name		= "omapdss",
+	.id		= -1,
+};
+
 static void enable_lcd_clocks(int enable);
 
 static void inline dispc_write_reg(int idx, u32 val)
@@ -916,20 +921,20 @@ static irqreturn_t omap_dispc_irq_handle
 
 static int get_dss_clocks(void)
 {
-	dispc.dss_ick = clk_get(&dispc.fbdev->dssdev->dev, "ick");
+	dispc.dss_ick = clk_get(&omapdss_device.dev, "ick");
 	if (IS_ERR(dispc.dss_ick)) {
 		dev_err(dispc.fbdev->dev, "can't get ick\n");
 		return PTR_ERR(dispc.dss_ick);
 	}
 
-	dispc.dss1_fck = clk_get(&dispc.fbdev->dssdev->dev, "dss1_fck");
+	dispc.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck");
 	if (IS_ERR(dispc.dss1_fck)) {
 		dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
 		clk_put(dispc.dss_ick);
 		return PTR_ERR(dispc.dss1_fck);
 	}
 
-	dispc.dss_54m_fck = clk_get(&dispc.fbdev->dssdev->dev, "tv_fck");
+	dispc.dss_54m_fck = clk_get(&omapdss_device.dev, "tv_fck");
 	if (IS_ERR(dispc.dss_54m_fck)) {
 		dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
 		clk_put(dispc.dss_ick);
@@ -1381,6 +1386,12 @@ static int omap_dispc_init(struct omapfb
 	int skip_init = 0;
 	int i;
 
+	r = platform_device_register(&omapdss_device);
+	if (r) {
+		dev_err(fbdev->dev, "can't register omapdss device\n");
+		return r;
+	}
+
 	memset(&dispc, 0, sizeof(dispc));
 
 	dispc.base = ioremap(DISPC_BASE, SZ_1K);
@@ -1524,6 +1535,7 @@ static void omap_dispc_cleanup(void)
 	free_irq(INT_24XX_DSS_IRQ, dispc.fbdev);
 	put_dss_clocks();
 	iounmap(dispc.base);
+	platform_device_unregister(&omapdss_device);
 }
 
 const struct lcd_ctrl omap2_int_ctrl = {
Index: linux-2.6.35/drivers/video/omap/lcd_htcherald.c
===================================================================
--- linux-2.6.35.orig/drivers/video/omap/lcd_htcherald.c	2010-08-08 12:56:09.000000000 +0200
+++ linux-2.6.35/drivers/video/omap/lcd_htcherald.c	2010-08-08 12:57:43.000000000 +0200
@@ -115,12 +115,12 @@ struct platform_driver htcherald_panel_d
 	},
 };
 
-static int __init htcherald_panel_drv_init(void)
+static int htcherald_panel_drv_init(void)
 {
 	return platform_driver_register(&htcherald_panel_driver);
 }
 
-static void __exit htcherald_panel_drv_cleanup(void)
+static void htcherald_panel_drv_cleanup(void)
 {
 	platform_driver_unregister(&htcherald_panel_driver);
 }
Index: linux-2.6.35/drivers/video/omap/lcd_mipid.c
===================================================================
--- linux-2.6.35.orig/drivers/video/omap/lcd_mipid.c	2010-08-08 12:56:09.000000000 +0200
+++ linux-2.6.35/drivers/video/omap/lcd_mipid.c	2010-08-08 12:57:44.000000000 +0200
@@ -551,9 +551,9 @@ static int mipid_detect(struct mipid_dev
 		md->esd_check = ls041y3_esd_check;
 		break;
 	default:
-		md->panel.name = "unknown";
-		dev_err(&md->spi->dev, "invalid display ID\n");
-		return -ENODEV;
+		dev_err(&md->spi->dev, "FIXME: LCD panel detection failed! ID: %02x%02x%02x\n", display_id[0], display_id[1], display_id[2]);
+		md->panel.name = "ls041y3";
+		md->esd_check = ls041y3_esd_check;
 	}
 
 	md->revision = display_id[1];
Index: linux-2.6.35/drivers/video/omap/omapfb.h
===================================================================
--- linux-2.6.35.orig/drivers/video/omap/omapfb.h	2010-08-08 12:56:09.000000000 +0200
+++ linux-2.6.35/drivers/video/omap/omapfb.h	2010-08-08 12:57:45.000000000 +0200
@@ -203,8 +203,6 @@ struct omapfb_device {
 
 	struct omapfb_mem_desc		mem_desc;
 	struct fb_info			*fb_info[OMAPFB_PLANE_NUM];
-
-	struct platform_device	*dssdev;	/* dummy dev for clocks */
 };
 
 #ifdef CONFIG_ARCH_OMAP1
@@ -226,4 +224,6 @@ extern int  omapfb_update_window_async(s
 				       void (*callback)(void *),
 				       void *callback_data);
 
+extern struct platform_device omapdss_device;
+
 #endif /* __OMAPFB_H */
Index: linux-2.6.35/drivers/video/omap/omapfb_main.c
===================================================================
--- linux-2.6.35.orig/drivers/video/omap/omapfb_main.c	2010-08-08 12:56:09.000000000 +0200
+++ linux-2.6.35/drivers/video/omap/omapfb_main.c	2010-08-08 12:57:46.000000000 +0200
@@ -84,19 +84,6 @@ static struct caps_table_struct color_ca
 	{ 1 << OMAPFB_COLOR_YUY422,	"YUY422", },
 };
 
-static void omapdss_release(struct device *dev)
-{
-}
-
-/* dummy device for clocks */
-static struct platform_device omapdss_device = {
-	.name		= "omapdss",
-	.id		= -1,
-	.dev            = {
-		.release = omapdss_release,
-	},
-};
-
 /*
  * ---------------------------------------------------------------------------
  * LCD panel
@@ -1715,7 +1702,6 @@ static int omapfb_do_probe(struct platfo
 
 	fbdev->dev = &pdev->dev;
 	fbdev->panel = panel;
-	fbdev->dssdev = &omapdss_device;
 	platform_set_drvdata(pdev, fbdev);
 
 	mutex_init(&fbdev->rqueue_mutex);
@@ -1830,16 +1816,8 @@ cleanup:
 
 static int omapfb_probe(struct platform_device *pdev)
 {
-	int r;
-
 	BUG_ON(fbdev_pdev != NULL);
 
-	r = platform_device_register(&omapdss_device);
-	if (r) {
-		dev_err(&pdev->dev, "can't register omapdss device\n");
-		return r;
-	}
-
 	/* Delay actual initialization until the LCD is registered */
 	fbdev_pdev = pdev;
 	if (fbdev_panel != NULL)
@@ -1867,9 +1845,6 @@ static int omapfb_remove(struct platform
 	fbdev->state = OMAPFB_DISABLED;
 	omapfb_free_resources(fbdev, saved_state);
 
-	platform_device_unregister(&omapdss_device);
-	fbdev->dssdev = NULL;
-
 	return 0;
 }
 
---
 drivers/video/omap/rfbi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.35.orig/drivers/video/omap/rfbi.c
+++ linux-2.6.35/drivers/video/omap/rfbi.c
@@ -84,13 +84,13 @@ static inline u32 rfbi_read_reg(int idx)
 
 static int rfbi_get_clocks(void)
 {
-	rfbi.dss_ick = clk_get(&rfbi.fbdev->dssdev->dev, "ick");
+	rfbi.dss_ick = clk_get(&omapdss_device.dev, "ick");
 	if (IS_ERR(rfbi.dss_ick)) {
 		dev_err(rfbi.fbdev->dev, "can't get ick\n");
 		return PTR_ERR(rfbi.dss_ick);
 	}
 
-	rfbi.dss1_fck = clk_get(&rfbi.fbdev->dssdev->dev, "dss1_fck");
+	rfbi.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck");
 	if (IS_ERR(rfbi.dss1_fck)) {
 		dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n");
 		clk_put(rfbi.dss_ick);