Linux Audio

Check our new training course

In-person Linux kernel drivers training

Jun 16-20, 2025
Register
Loading...
v6.13.7
 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/dma-mapping.h>
14#include <linux/err.h>
15#include <linux/slab.h>
16#include <linux/of.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)
39static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
40};
41#else
42static struct resource omap_vout_resource[2] = {
43};
44#endif
45
46static u64 omap_vout_dma_mask = DMA_BIT_MASK(32);
47
48static struct platform_device omap_vout_device = {
49	.name		= "omap_vout",
50	.num_resources	= ARRAY_SIZE(omap_vout_resource),
51	.resource 	= &omap_vout_resource[0],
52	.id		= -1,
53	.dev		= {
54		.dma_mask		= &omap_vout_dma_mask,
55		.coherent_dma_mask	= DMA_BIT_MASK(32),
56	},
57};
58
59int __init omap_init_vout(void)
60{
61	return platform_device_register(&omap_vout_device);
62}
63#else
64int __init omap_init_vout(void) { return 0; }
65#endif
v4.17
 
 1/*
 2 * linux/arch/arm/mach-omap2/devices.c
 3 *
 4 * OMAP2 platform device setup/initialization
 5 *
 6 * This program is free software; you can redistribute it and/or modify
 7 * it under the terms of the GNU General Public License as published by
 8 * the Free Software Foundation; either version 2 of the License, or
 9 * (at your option) any later version.
10 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/io.h>
16#include <linux/clk.h>
 
17#include <linux/err.h>
18#include <linux/slab.h>
19#include <linux/of.h>
20#include <linux/pinctrl/machine.h>
21
22#include <asm/mach-types.h>
23#include <asm/mach/map.h>
24
25#include <linux/omap-dma.h>
26
27#include "iomap.h"
28#include "omap_hwmod.h"
29#include "omap_device.h"
30
31#include "soc.h"
32#include "common.h"
33#include "control.h"
34#include "display.h"
35
36#define L3_MODULES_MAX_LEN 12
37#define L3_MODULES 3
38
39/*-------------------------------------------------------------------------*/
40
41#if IS_ENABLED(CONFIG_VIDEO_OMAP2_VOUT)
42#if IS_ENABLED(CONFIG_FB_OMAP2)
43static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
44};
45#else
46static struct resource omap_vout_resource[2] = {
47};
48#endif
49
 
 
50static struct platform_device omap_vout_device = {
51	.name		= "omap_vout",
52	.num_resources	= ARRAY_SIZE(omap_vout_resource),
53	.resource 	= &omap_vout_resource[0],
54	.id		= -1,
 
 
 
 
55};
56
57int __init omap_init_vout(void)
58{
59	return platform_device_register(&omap_vout_device);
60}
61#else
62int __init omap_init_vout(void) { return 0; }
63#endif