Commit | Line | Data |
---|---|---|
2874c5fd | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
1dbae815 TL |
2 | /* |
3 | * linux/arch/arm/mach-omap2/devices.c | |
4 | * | |
5 | * OMAP2 platform device setup/initialization | |
1dbae815 | 6 | */ |
1ff4cb67 | 7 | |
1dbae815 TL |
8 | #include <linux/kernel.h> |
9 | #include <linux/init.h> | |
10 | #include <linux/platform_device.h> | |
fced80c7 | 11 | #include <linux/io.h> |
917fa280 | 12 | #include <linux/clk.h> |
0bf63e2c | 13 | #include <linux/dma-mapping.h> |
f2ce6231 | 14 | #include <linux/err.h> |
1a5d8190 | 15 | #include <linux/slab.h> |
ad8dfac6 | 16 | #include <linux/of.h> |
484202f4 | 17 | #include <linux/pinctrl/machine.h> |
1dbae815 | 18 | |
1dbae815 TL |
19 | #include <asm/mach-types.h> |
20 | #include <asm/mach/map.h> | |
21 | ||
45c3eb7d | 22 | #include <linux/omap-dma.h> |
2a296c8f | 23 | |
ee0839c2 | 24 | #include "iomap.h" |
2a296c8f | 25 | #include "omap_hwmod.h" |
25c7d49e | 26 | #include "omap_device.h" |
1dbae815 | 27 | |
7d7e1eba TL |
28 | #include "soc.h" |
29 | #include "common.h" | |
4814ced5 | 30 | #include "control.h" |
576e5bda | 31 | #include "display.h" |
4896e394 | 32 | |
0abcf618 | 33 | #define L3_MODULES_MAX_LEN 12 |
a4dc616a | 34 | #define L3_MODULES 3 |
0abcf618 | 35 | |
d8874665 TL |
36 | /*-------------------------------------------------------------------------*/ |
37 | ||
502ad2a6 JMC |
38 | #if IS_ENABLED(CONFIG_VIDEO_OMAP2_VOUT) |
39 | #if IS_ENABLED(CONFIG_FB_OMAP2) | |
b227358d VH |
40 | static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = { |
41 | }; | |
42 | #else | |
43 | static struct resource omap_vout_resource[2] = { | |
44 | }; | |
45 | #endif | |
46 | ||
0bf63e2c HV |
47 | static u64 omap_vout_dma_mask = DMA_BIT_MASK(32); |
48 | ||
b227358d VH |
49 | static struct platform_device omap_vout_device = { |
50 | .name = "omap_vout", | |
51 | .num_resources = ARRAY_SIZE(omap_vout_resource), | |
52 | .resource = &omap_vout_resource[0], | |
53 | .id = -1, | |
0bf63e2c HV |
54 | .dev = { |
55 | .dma_mask = &omap_vout_dma_mask, | |
56 | .coherent_dma_mask = DMA_BIT_MASK(32), | |
57 | }, | |
b227358d | 58 | }; |
576e5bda AT |
59 | |
60 | int __init omap_init_vout(void) | |
b227358d | 61 | { |
576e5bda | 62 | return platform_device_register(&omap_vout_device); |
b227358d VH |
63 | } |
64 | #else | |
576e5bda | 65 | int __init omap_init_vout(void) { return 0; } |
b227358d | 66 | #endif |