2019-05-27 13:55:01 +07:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2005-11-10 21:26:51 +07:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-omap2/devices.c
|
|
|
|
*
|
|
|
|
* OMAP2 platform device setup/initialization
|
|
|
|
*/
|
2018-02-13 08:32:43 +07:00
|
|
|
|
2005-11-10 21:26:51 +07:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/platform_device.h>
|
2008-09-06 18:10:45 +07:00
|
|
|
#include <linux/io.h>
|
2008-12-11 08:37:17 +07:00
|
|
|
#include <linux/clk.h>
|
2019-07-30 13:17:59 +07:00
|
|
|
#include <linux/dma-mapping.h>
|
2010-09-23 21:32:42 +07:00
|
|
|
#include <linux/err.h>
|
2011-02-02 19:22:14 +07:00
|
|
|
#include <linux/slab.h>
|
2011-08-12 18:48:47 +07:00
|
|
|
#include <linux/of.h>
|
2012-09-18 06:26:11 +07:00
|
|
|
#include <linux/pinctrl/machine.h>
|
2005-11-10 21:26:51 +07:00
|
|
|
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/map.h>
|
|
|
|
|
2012-11-30 23:41:50 +07:00
|
|
|
#include <linux/omap-dma.h>
|
2012-10-03 07:41:35 +07:00
|
|
|
|
2012-02-25 01:34:35 +07:00
|
|
|
#include "iomap.h"
|
2012-10-03 07:41:35 +07:00
|
|
|
#include "omap_hwmod.h"
|
2012-10-03 07:25:48 +07:00
|
|
|
#include "omap_device.h"
|
2005-11-10 21:26:51 +07:00
|
|
|
|
2012-08-28 07:43:01 +07:00
|
|
|
#include "soc.h"
|
|
|
|
#include "common.h"
|
2010-10-09 00:40:20 +07:00
|
|
|
#include "control.h"
|
2013-09-16 14:18:31 +07:00
|
|
|
#include "display.h"
|
2009-12-12 07:16:32 +07:00
|
|
|
|
2011-02-08 15:40:45 +07:00
|
|
|
#define L3_MODULES_MAX_LEN 12
|
2011-03-09 17:30:29 +07:00
|
|
|
#define L3_MODULES 3
|
2011-02-08 15:40:45 +07:00
|
|
|
|
2008-12-11 08:37:16 +07:00
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
|
2016-08-12 02:29:45 +07:00
|
|
|
#if IS_ENABLED(CONFIG_VIDEO_OMAP2_VOUT)
|
|
|
|
#if IS_ENABLED(CONFIG_FB_OMAP2)
|
2010-05-11 04:29:14 +07:00
|
|
|
static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
|
|
|
|
};
|
|
|
|
#else
|
|
|
|
static struct resource omap_vout_resource[2] = {
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2019-07-30 13:17:59 +07:00
|
|
|
static u64 omap_vout_dma_mask = DMA_BIT_MASK(32);
|
|
|
|
|
2010-05-11 04:29:14 +07:00
|
|
|
static struct platform_device omap_vout_device = {
|
|
|
|
.name = "omap_vout",
|
|
|
|
.num_resources = ARRAY_SIZE(omap_vout_resource),
|
|
|
|
.resource = &omap_vout_resource[0],
|
|
|
|
.id = -1,
|
2019-07-30 13:17:59 +07:00
|
|
|
.dev = {
|
|
|
|
.dma_mask = &omap_vout_dma_mask,
|
|
|
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
|
|
|
},
|
2010-05-11 04:29:14 +07:00
|
|
|
};
|
2013-09-16 14:18:31 +07:00
|
|
|
|
|
|
|
int __init omap_init_vout(void)
|
2010-05-11 04:29:14 +07:00
|
|
|
{
|
2013-09-16 14:18:31 +07:00
|
|
|
return platform_device_register(&omap_vout_device);
|
2010-05-11 04:29:14 +07:00
|
|
|
}
|
|
|
|
#else
|
2013-09-16 14:18:31 +07:00
|
|
|
int __init omap_init_vout(void) { return 0; }
|
2010-05-11 04:29:14 +07:00
|
|
|
#endif
|