2005-11-10 22:26:51 +08:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-omap2/devices.c
|
|
|
|
*
|
|
|
|
* OMAP2 platform device setup/initialization
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
2018-02-13 09:32:43 +08:00
|
|
|
|
2005-11-10 22:26:51 +08:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/platform_device.h>
|
2008-09-06 19:10:45 +08:00
|
|
|
#include <linux/io.h>
|
2008-12-11 09:37:17 +08:00
|
|
|
#include <linux/clk.h>
|
2010-09-23 22:32:42 +08:00
|
|
|
#include <linux/err.h>
|
2011-02-02 20:22:14 +08:00
|
|
|
#include <linux/slab.h>
|
2011-08-12 19:48:47 +08:00
|
|
|
#include <linux/of.h>
|
2012-09-18 07:26:11 +08:00
|
|
|
#include <linux/pinctrl/machine.h>
|
2005-11-10 22:26:51 +08:00
|
|
|
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/map.h>
|
|
|
|
|
2012-12-01 00:41:50 +08:00
|
|
|
#include <linux/omap-dma.h>
|
2012-10-03 08:41:35 +08:00
|
|
|
|
2012-02-25 02:34:35 +08:00
|
|
|
#include "iomap.h"
|
2012-10-03 08:41:35 +08:00
|
|
|
#include "omap_hwmod.h"
|
2012-10-03 08:25:48 +08:00
|
|
|
#include "omap_device.h"
|
2005-11-10 22:26:51 +08:00
|
|
|
|
2012-08-28 08:43:01 +08:00
|
|
|
#include "soc.h"
|
|
|
|
#include "common.h"
|
2010-10-09 01:40:20 +08:00
|
|
|
#include "control.h"
|
2013-09-16 15:18:31 +08:00
|
|
|
#include "display.h"
|
2009-12-12 08:16:32 +08:00
|
|
|
|
2011-02-08 16:40:45 +08:00
|
|
|
#define L3_MODULES_MAX_LEN 12
|
2011-03-09 18:30:29 +08:00
|
|
|
#define L3_MODULES 3
|
2011-02-08 16:40:45 +08:00
|
|
|
|
2008-12-11 09:37:16 +08:00
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
|
2016-08-12 03:29:45 +08:00
|
|
|
#if IS_ENABLED(CONFIG_VIDEO_OMAP2_VOUT)
|
|
|
|
#if IS_ENABLED(CONFIG_FB_OMAP2)
|
2010-05-11 05:29:14 +08: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 15:18:31 +08:00
|
|
|
|
|
|
|
int __init omap_init_vout(void)
|
2010-05-11 05:29:14 +08:00
|
|
|
{
|
2013-09-16 15:18:31 +08:00
|
|
|
return platform_device_register(&omap_vout_device);
|
2010-05-11 05:29:14 +08:00
|
|
|
}
|
|
|
|
#else
|
2013-09-16 15:18:31 +08:00
|
|
|
int __init omap_init_vout(void) { return 0; }
|
2010-05-11 05:29:14 +08:00
|
|
|
#endif
|