blob: 5a2e198e7db103843b3fc159f14f7a1b160b587d [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001// SPDX-License-Identifier: GPL-2.0-or-later
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * linux/arch/arm/mach-omap2/devices.c
4 *
5 * OMAP2 platform device setup/initialization
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00006 */
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>
David Brazdil0f672f62019-12-10 10:32:29 +000013#include <linux/dma-mapping.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000014#include <linux/err.h>
15#include <linux/slab.h>
16#include <linux/of.h>
17#include <linux/pinctrl/machine.h>
18
19#include <asm/mach-types.h>
20#include <asm/mach/map.h>
21
22#include <linux/omap-dma.h>
23
24#include "iomap.h"
25#include "omap_hwmod.h"
26#include "omap_device.h"
27
28#include "soc.h"
29#include "common.h"
30#include "control.h"
31#include "display.h"
32
33#define L3_MODULES_MAX_LEN 12
34#define L3_MODULES 3
35
36/*-------------------------------------------------------------------------*/
37
38#if IS_ENABLED(CONFIG_VIDEO_OMAP2_VOUT)
39#if IS_ENABLED(CONFIG_FB_OMAP2)
40static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
41};
42#else
43static struct resource omap_vout_resource[2] = {
44};
45#endif
46
David Brazdil0f672f62019-12-10 10:32:29 +000047static u64 omap_vout_dma_mask = DMA_BIT_MASK(32);
48
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000049static 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,
David Brazdil0f672f62019-12-10 10:32:29 +000054 .dev = {
55 .dma_mask = &omap_vout_dma_mask,
56 .coherent_dma_mask = DMA_BIT_MASK(32),
57 },
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000058};
59
60int __init omap_init_vout(void)
61{
62 return platform_device_register(&omap_vout_device);
63}
64#else
65int __init omap_init_vout(void) { return 0; }
66#endif