xref: /openbmc/linux/arch/arm/mach-omap2/devices.c (revision 8dde5715)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * linux/arch/arm/mach-omap2/devices.c
4  *
5  * OMAP2 platform device setup/initialization
6  */
7 
8 #include <linux/kernel.h>
9 #include <linux/init.h>
10 #include <linux/platform_device.h>
11 #include <linux/io.h>
12 #include <linux/clk.h>
13 #include <linux/err.h>
14 #include <linux/slab.h>
15 #include <linux/of.h>
16 #include <linux/pinctrl/machine.h>
17 
18 #include <asm/mach-types.h>
19 #include <asm/mach/map.h>
20 
21 #include <linux/omap-dma.h>
22 
23 #include "iomap.h"
24 #include "omap_hwmod.h"
25 #include "omap_device.h"
26 
27 #include "soc.h"
28 #include "common.h"
29 #include "control.h"
30 #include "display.h"
31 
32 #define L3_MODULES_MAX_LEN 12
33 #define L3_MODULES 3
34 
35 /*-------------------------------------------------------------------------*/
36 
37 #if IS_ENABLED(CONFIG_VIDEO_OMAP2_VOUT)
38 #if IS_ENABLED(CONFIG_FB_OMAP2)
39 static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
40 };
41 #else
42 static struct resource omap_vout_resource[2] = {
43 };
44 #endif
45 
46 static struct platform_device omap_vout_device = {
47 	.name		= "omap_vout",
48 	.num_resources	= ARRAY_SIZE(omap_vout_resource),
49 	.resource 	= &omap_vout_resource[0],
50 	.id		= -1,
51 };
52 
53 int __init omap_init_vout(void)
54 {
55 	return platform_device_register(&omap_vout_device);
56 }
57 #else
58 int __init omap_init_vout(void) { return 0; }
59 #endif
60