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