aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/Makefile3
-rw-r--r--arch/arm/mach-omap2/display.c45
-rw-r--r--arch/arm/plat-omap/include/plat/display.h11
3 files changed, 59 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index ee72a9787bf1..1c3635d7f4cf 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -245,3 +245,6 @@ obj-y += $(smc91x-m) $(smc91x-y)
245smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o 245smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o
246obj-y += $(smsc911x-m) $(smsc911x-y) 246obj-y += $(smsc911x-m) $(smsc911x-y)
247obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o 247obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o
248
249disp-$(CONFIG_OMAP2_DSS) := display.o
250obj-y += $(disp-m) $(disp-y)
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
new file mode 100644
index 000000000000..b18db84b0349
--- /dev/null
+++ b/arch/arm/mach-omap2/display.c
@@ -0,0 +1,45 @@
1/*
2 * OMAP2plus display device setup / initialization.
3 *
4 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
5 * Senthilvadivu Guruswamy
6 * Sumit Semwal
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
13 * kind, whether express or implied; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/platform_device.h>
21#include <linux/io.h>
22#include <linux/clk.h>
23#include <linux/err.h>
24
25#include <plat/display.h>
26
27static struct platform_device omap_display_device = {
28 .name = "omapdss",
29 .id = -1,
30 .dev = {
31 .platform_data = NULL,
32 },
33};
34
35int __init omap_display_init(struct omap_dss_board_info *board_data)
36{
37 int r = 0;
38 omap_display_device.dev.platform_data = board_data;
39
40 r = platform_device_register(&omap_display_device);
41 if (r < 0)
42 printk(KERN_ERR "Unable to register OMAP-Display device\n");
43
44 return r;
45}
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h
index 537f4e449f50..0f140ecedb01 100644
--- a/arch/arm/plat-omap/include/plat/display.h
+++ b/arch/arm/plat-omap/include/plat/display.h
@@ -23,6 +23,7 @@
23#include <linux/list.h> 23#include <linux/list.h>
24#include <linux/kobject.h> 24#include <linux/kobject.h>
25#include <linux/device.h> 25#include <linux/device.h>
26#include <linux/platform_device.h>
26#include <asm/atomic.h> 27#include <asm/atomic.h>
27 28
28#define DISPC_IRQ_FRAMEDONE (1 << 0) 29#define DISPC_IRQ_FRAMEDONE (1 << 0)
@@ -226,6 +227,16 @@ struct omap_dss_board_info {
226 struct omap_dss_device *default_device; 227 struct omap_dss_device *default_device;
227}; 228};
228 229
230#if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS)
231/* Init with the board info */
232extern int omap_display_init(struct omap_dss_board_info *board_data);
233#else
234static inline int omap_display_init(struct omap_dss_board_info *board_data)
235{
236 return 0;
237}
238#endif
239
229struct omap_video_timings { 240struct omap_video_timings {
230 /* Unit: pixels */ 241 /* Unit: pixels */
231 u16 x_res; 242 u16 x_res;