2009-04-14 23:30:11 +07:00
|
|
|
/*
|
|
|
|
* TI DaVinci DM644x chip specific setup
|
|
|
|
*
|
|
|
|
* Author: Kevin Hilman, Deep Root Systems, LLC
|
|
|
|
*
|
|
|
|
* 2007 (c) Deep Root Systems, LLC. This file is licensed under
|
|
|
|
* the terms of the GNU General Public License version 2. This program
|
|
|
|
* is licensed "as is" without any warranty of any kind, whether express
|
|
|
|
* or implied.
|
|
|
|
*/
|
2018-05-18 23:48:11 +07:00
|
|
|
|
|
|
|
#include <linux/clk-provider.h>
|
|
|
|
#include <linux/clk/davinci.h>
|
|
|
|
#include <linux/clkdev.h>
|
2016-02-02 19:43:16 +07:00
|
|
|
#include <linux/dmaengine.h>
|
2018-05-18 23:48:11 +07:00
|
|
|
#include <linux/init.h>
|
2019-04-19 05:20:22 +07:00
|
|
|
#include <linux/io.h>
|
2019-02-14 21:52:10 +07:00
|
|
|
#include <linux/irqchip/irq-davinci-aintc.h>
|
2013-03-06 23:15:31 +07:00
|
|
|
#include <linux/platform_data/edma.h>
|
2013-08-18 12:19:00 +07:00
|
|
|
#include <linux/platform_data/gpio-davinci.h>
|
2018-05-18 23:48:11 +07:00
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <linux/serial_8250.h>
|
2009-04-14 23:30:11 +07:00
|
|
|
|
2009-04-16 02:38:58 +07:00
|
|
|
#include <asm/mach/map.h>
|
|
|
|
|
2018-05-18 23:48:11 +07:00
|
|
|
#include <mach/common.h>
|
2009-04-14 23:30:11 +07:00
|
|
|
#include <mach/cputype.h>
|
|
|
|
#include <mach/mux.h>
|
2009-03-19 00:36:08 +07:00
|
|
|
#include <mach/serial.h>
|
2018-05-18 23:48:11 +07:00
|
|
|
#include <mach/time.h>
|
2009-04-14 23:30:11 +07:00
|
|
|
|
2018-05-18 23:48:11 +07:00
|
|
|
#include "asp.h"
|
2011-12-21 20:43:35 +07:00
|
|
|
#include "davinci.h"
|
2019-02-14 21:52:03 +07:00
|
|
|
#include "irqs.h"
|
2009-04-14 23:30:11 +07:00
|
|
|
#include "mux.h"
|
2018-05-18 23:48:11 +07:00
|
|
|
|
2009-04-14 23:30:11 +07:00
|
|
|
/*
|
|
|
|
* Device specific clocks
|
|
|
|
*/
|
|
|
|
#define DM644X_REF_FREQ 27000000
|
|
|
|
|
2011-12-15 19:11:51 +07:00
|
|
|
#define DM644X_EMAC_BASE 0x01c80000
|
|
|
|
#define DM644X_EMAC_MDIO_BASE (DM644X_EMAC_BASE + 0x4000)
|
|
|
|
#define DM644X_EMAC_CNTRL_OFFSET 0x0000
|
|
|
|
#define DM644X_EMAC_CNTRL_MOD_OFFSET 0x1000
|
|
|
|
#define DM644X_EMAC_CNTRL_RAM_OFFSET 0x2000
|
|
|
|
#define DM644X_EMAC_CNTRL_RAM_SIZE 0x2000
|
|
|
|
|
2009-04-16 02:40:56 +07:00
|
|
|
static struct emac_platform_data dm644x_emac_pdata = {
|
|
|
|
.ctrl_reg_offset = DM644X_EMAC_CNTRL_OFFSET,
|
|
|
|
.ctrl_mod_reg_offset = DM644X_EMAC_CNTRL_MOD_OFFSET,
|
|
|
|
.ctrl_ram_offset = DM644X_EMAC_CNTRL_RAM_OFFSET,
|
|
|
|
.ctrl_ram_size = DM644X_EMAC_CNTRL_RAM_SIZE,
|
|
|
|
.version = EMAC_VERSION_1,
|
|
|
|
};
|
2009-04-14 23:30:11 +07:00
|
|
|
|
|
|
|
static struct resource dm644x_emac_resources[] = {
|
|
|
|
{
|
|
|
|
.start = DM644X_EMAC_BASE,
|
2010-09-15 21:11:22 +07:00
|
|
|
.end = DM644X_EMAC_BASE + SZ_16K - 1,
|
2009-04-14 23:30:11 +07:00
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
{
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_EMACINT),
|
|
|
|
.end = DAVINCI_INTC_IRQ(IRQ_EMACINT),
|
2009-04-14 23:30:11 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device dm644x_emac_device = {
|
|
|
|
.name = "davinci_emac",
|
|
|
|
.id = 1,
|
2009-04-16 02:40:56 +07:00
|
|
|
.dev = {
|
|
|
|
.platform_data = &dm644x_emac_pdata,
|
|
|
|
},
|
2009-04-14 23:30:11 +07:00
|
|
|
.num_resources = ARRAY_SIZE(dm644x_emac_resources),
|
|
|
|
.resource = dm644x_emac_resources,
|
|
|
|
};
|
|
|
|
|
2010-09-15 21:11:22 +07:00
|
|
|
static struct resource dm644x_mdio_resources[] = {
|
|
|
|
{
|
|
|
|
.start = DM644X_EMAC_MDIO_BASE,
|
|
|
|
.end = DM644X_EMAC_MDIO_BASE + SZ_4K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device dm644x_mdio_device = {
|
|
|
|
.name = "davinci_mdio",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = ARRAY_SIZE(dm644x_mdio_resources),
|
|
|
|
.resource = dm644x_mdio_resources,
|
|
|
|
};
|
|
|
|
|
2009-04-14 23:30:11 +07:00
|
|
|
/*
|
|
|
|
* Device specific mux setup
|
|
|
|
*
|
|
|
|
* soc description mux mode mode mux dbg
|
|
|
|
* reg offset mask mode
|
|
|
|
*/
|
|
|
|
static const struct mux_config dm644x_pins[] = {
|
2009-04-16 02:39:48 +07:00
|
|
|
#ifdef CONFIG_DAVINCI_MUX
|
2009-04-14 23:30:11 +07:00
|
|
|
MUX_CFG(DM644X, HDIREN, 0, 16, 1, 1, true)
|
|
|
|
MUX_CFG(DM644X, ATAEN, 0, 17, 1, 1, true)
|
|
|
|
MUX_CFG(DM644X, ATAEN_DISABLE, 0, 17, 1, 0, true)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, HPIEN_DISABLE, 0, 29, 1, 0, true)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, AEAW, 0, 0, 31, 31, true)
|
davinci: Initial support for Neuros OSD2 platform.
The Neuros OSD 2.0 is the hardware component of the Neuros Open
Internet Television Platform. Hardware is very close to Ti DM644X-EVM board.
It has: DM6446M02 module with 256MB NAND, 256MB RAM, TLV320AIC32 AIC,
USB, Ethernet, SD/MMC, UART, THS8200, TVP7000 for video.
Additionaly realtime clock, IR remote control receiver,
IR Blaster based on MSP430 (firmware although is different
from used in DM644X-EVM), internal ATA-6 3.5” HDD drive
with PATA interface, two muxed red-green leds.
For more information please refer to
http://wiki.neurostechnology.com/index.php/OSD_2.0_HD
Signed-off-by: Andrey Porodko <panda@chelcom.ru>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-11-13 21:16:51 +07:00
|
|
|
MUX_CFG(DM644X, AEAW0, 0, 0, 1, 0, true)
|
|
|
|
MUX_CFG(DM644X, AEAW1, 0, 1, 1, 0, true)
|
|
|
|
MUX_CFG(DM644X, AEAW2, 0, 2, 1, 0, true)
|
|
|
|
MUX_CFG(DM644X, AEAW3, 0, 3, 1, 0, true)
|
|
|
|
MUX_CFG(DM644X, AEAW4, 0, 4, 1, 0, true)
|
2009-04-14 23:30:11 +07:00
|
|
|
|
|
|
|
MUX_CFG(DM644X, MSTK, 1, 9, 1, 0, false)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, I2C, 1, 7, 1, 1, false)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, MCBSP, 1, 10, 1, 1, false)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, UART1, 1, 1, 1, 1, true)
|
|
|
|
MUX_CFG(DM644X, UART2, 1, 2, 1, 1, true)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, PWM0, 1, 4, 1, 1, false)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, PWM1, 1, 5, 1, 1, false)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, PWM2, 1, 6, 1, 1, false)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, VLYNQEN, 0, 15, 1, 1, false)
|
|
|
|
MUX_CFG(DM644X, VLSCREN, 0, 14, 1, 1, false)
|
|
|
|
MUX_CFG(DM644X, VLYNQWD, 0, 12, 3, 3, false)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, EMACEN, 0, 31, 1, 1, true)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, GPIO3V, 0, 31, 1, 0, true)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, GPIO0, 0, 24, 1, 0, true)
|
|
|
|
MUX_CFG(DM644X, GPIO3, 0, 25, 1, 0, false)
|
|
|
|
MUX_CFG(DM644X, GPIO43_44, 1, 7, 1, 0, false)
|
|
|
|
MUX_CFG(DM644X, GPIO46_47, 0, 22, 1, 0, true)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, RGB666, 0, 22, 1, 1, true)
|
|
|
|
|
|
|
|
MUX_CFG(DM644X, LOEEN, 0, 24, 1, 1, true)
|
|
|
|
MUX_CFG(DM644X, LFLDEN, 0, 25, 1, 1, false)
|
2009-04-16 02:39:48 +07:00
|
|
|
#endif
|
2009-04-14 23:30:11 +07:00
|
|
|
};
|
|
|
|
|
2009-04-16 02:40:00 +07:00
|
|
|
/* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */
|
|
|
|
static u8 dm644x_default_priorities[DAVINCI_N_AINTC_IRQ] = {
|
|
|
|
[IRQ_VDINT0] = 2,
|
|
|
|
[IRQ_VDINT1] = 6,
|
|
|
|
[IRQ_VDINT2] = 6,
|
|
|
|
[IRQ_HISTINT] = 6,
|
|
|
|
[IRQ_H3AINT] = 6,
|
|
|
|
[IRQ_PRVUINT] = 6,
|
|
|
|
[IRQ_RSZINT] = 6,
|
|
|
|
[7] = 7,
|
|
|
|
[IRQ_VENCINT] = 6,
|
|
|
|
[IRQ_ASQINT] = 6,
|
|
|
|
[IRQ_IMXINT] = 6,
|
|
|
|
[IRQ_VLCDINT] = 6,
|
|
|
|
[IRQ_USBINT] = 4,
|
|
|
|
[IRQ_EMACINT] = 4,
|
|
|
|
[14] = 7,
|
|
|
|
[15] = 7,
|
|
|
|
[IRQ_CCINT0] = 5, /* dma */
|
|
|
|
[IRQ_CCERRINT] = 5, /* dma */
|
|
|
|
[IRQ_TCERRINT0] = 5, /* dma */
|
|
|
|
[IRQ_TCERRINT] = 5, /* dma */
|
|
|
|
[IRQ_PSCIN] = 7,
|
|
|
|
[21] = 7,
|
|
|
|
[IRQ_IDE] = 4,
|
|
|
|
[23] = 7,
|
|
|
|
[IRQ_MBXINT] = 7,
|
|
|
|
[IRQ_MBRINT] = 7,
|
|
|
|
[IRQ_MMCINT] = 7,
|
|
|
|
[IRQ_SDIOINT] = 7,
|
|
|
|
[28] = 7,
|
|
|
|
[IRQ_DDRINT] = 7,
|
|
|
|
[IRQ_AEMIFINT] = 7,
|
|
|
|
[IRQ_VLQINT] = 4,
|
|
|
|
[IRQ_TINT0_TINT12] = 2, /* clockevent */
|
|
|
|
[IRQ_TINT0_TINT34] = 2, /* clocksource */
|
|
|
|
[IRQ_TINT1_TINT12] = 7, /* DSP timer */
|
|
|
|
[IRQ_TINT1_TINT34] = 7, /* system tick */
|
|
|
|
[IRQ_PWMINT0] = 7,
|
|
|
|
[IRQ_PWMINT1] = 7,
|
|
|
|
[IRQ_PWMINT2] = 7,
|
|
|
|
[IRQ_I2C] = 3,
|
|
|
|
[IRQ_UARTINT0] = 3,
|
|
|
|
[IRQ_UARTINT1] = 3,
|
|
|
|
[IRQ_UARTINT2] = 3,
|
|
|
|
[IRQ_SPINT0] = 3,
|
|
|
|
[IRQ_SPINT1] = 3,
|
|
|
|
[45] = 7,
|
|
|
|
[IRQ_DSP2ARM0] = 4,
|
|
|
|
[IRQ_DSP2ARM1] = 4,
|
|
|
|
[IRQ_GPIO0] = 7,
|
|
|
|
[IRQ_GPIO1] = 7,
|
|
|
|
[IRQ_GPIO2] = 7,
|
|
|
|
[IRQ_GPIO3] = 7,
|
|
|
|
[IRQ_GPIO4] = 7,
|
|
|
|
[IRQ_GPIO5] = 7,
|
|
|
|
[IRQ_GPIO6] = 7,
|
|
|
|
[IRQ_GPIO7] = 7,
|
|
|
|
[IRQ_GPIOBNK0] = 7,
|
|
|
|
[IRQ_GPIOBNK1] = 7,
|
|
|
|
[IRQ_GPIOBNK2] = 7,
|
|
|
|
[IRQ_GPIOBNK3] = 7,
|
|
|
|
[IRQ_GPIOBNK4] = 7,
|
|
|
|
[IRQ_COMMTX] = 7,
|
|
|
|
[IRQ_COMMRX] = 7,
|
|
|
|
[IRQ_EMUINT] = 7,
|
|
|
|
};
|
|
|
|
|
2009-04-14 23:30:11 +07:00
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
|
2015-10-14 18:42:46 +07:00
|
|
|
static s8 queue_priority_mapping[][2] = {
|
2009-05-21 18:41:35 +07:00
|
|
|
/* {event queue no, Priority} */
|
|
|
|
{0, 3},
|
|
|
|
{1, 7},
|
|
|
|
{-1, -1},
|
|
|
|
};
|
|
|
|
|
2016-02-02 19:43:16 +07:00
|
|
|
static const struct dma_slave_map dm644x_edma_map[] = {
|
|
|
|
{ "davinci-mcbsp", "tx", EDMA_FILTER_PARAM(0, 2) },
|
|
|
|
{ "davinci-mcbsp", "rx", EDMA_FILTER_PARAM(0, 3) },
|
|
|
|
{ "spi_davinci", "tx", EDMA_FILTER_PARAM(0, 16) },
|
|
|
|
{ "spi_davinci", "rx", EDMA_FILTER_PARAM(0, 17) },
|
|
|
|
{ "dm6441-mmc.0", "rx", EDMA_FILTER_PARAM(0, 26) },
|
|
|
|
{ "dm6441-mmc.0", "tx", EDMA_FILTER_PARAM(0, 27) },
|
|
|
|
};
|
|
|
|
|
2015-10-14 18:42:46 +07:00
|
|
|
static struct edma_soc_info dm644x_edma_pdata = {
|
2010-06-29 13:05:12 +07:00
|
|
|
.queue_priority_mapping = queue_priority_mapping,
|
2011-07-10 20:14:35 +07:00
|
|
|
.default_queue = EVENTQ_1,
|
2016-02-02 19:43:16 +07:00
|
|
|
.slave_map = dm644x_edma_map,
|
|
|
|
.slavecnt = ARRAY_SIZE(dm644x_edma_map),
|
2010-06-29 13:05:12 +07:00
|
|
|
};
|
|
|
|
|
2009-04-14 23:30:11 +07:00
|
|
|
static struct resource edma_resources[] = {
|
|
|
|
{
|
2015-10-14 18:42:46 +07:00
|
|
|
.name = "edma3_cc",
|
2009-04-14 23:30:11 +07:00
|
|
|
.start = 0x01c00000,
|
|
|
|
.end = 0x01c00000 + SZ_64K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
{
|
2015-10-14 18:42:46 +07:00
|
|
|
.name = "edma3_tc0",
|
2009-04-14 23:30:11 +07:00
|
|
|
.start = 0x01c10000,
|
|
|
|
.end = 0x01c10000 + SZ_1K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
{
|
2015-10-14 18:42:46 +07:00
|
|
|
.name = "edma3_tc1",
|
2009-04-14 23:30:11 +07:00
|
|
|
.start = 0x01c10400,
|
|
|
|
.end = 0x01c10400 + SZ_1K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
{
|
2015-10-14 18:42:46 +07:00
|
|
|
.name = "edma3_ccint",
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_CCINT0),
|
2009-04-14 23:30:11 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
{
|
2015-10-14 18:42:46 +07:00
|
|
|
.name = "edma3_ccerrint",
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_CCERRINT),
|
2009-04-14 23:30:11 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
/* not using TC*_ERR */
|
|
|
|
};
|
|
|
|
|
2015-10-14 18:42:51 +07:00
|
|
|
static const struct platform_device_info dm644x_edma_device __initconst = {
|
|
|
|
.name = "edma",
|
|
|
|
.id = 0,
|
2015-10-14 18:42:52 +07:00
|
|
|
.dma_mask = DMA_BIT_MASK(32),
|
2015-10-14 18:42:51 +07:00
|
|
|
.res = edma_resources,
|
|
|
|
.num_res = ARRAY_SIZE(edma_resources),
|
|
|
|
.data = &dm644x_edma_pdata,
|
|
|
|
.size_data = sizeof(dm644x_edma_pdata),
|
2009-04-14 23:30:11 +07:00
|
|
|
};
|
|
|
|
|
2009-06-05 17:28:08 +07:00
|
|
|
/* DM6446 EVM uses ASP0; line-out is a pair of RCA jacks */
|
|
|
|
static struct resource dm644x_asp_resources[] = {
|
|
|
|
{
|
2013-11-13 21:48:17 +07:00
|
|
|
.name = "mpu",
|
2009-06-05 17:28:08 +07:00
|
|
|
.start = DAVINCI_ASP0_BASE,
|
|
|
|
.end = DAVINCI_ASP0_BASE + SZ_8K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.start = DAVINCI_DMA_ASP0_TX,
|
|
|
|
.end = DAVINCI_DMA_ASP0_TX,
|
|
|
|
.flags = IORESOURCE_DMA,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.start = DAVINCI_DMA_ASP0_RX,
|
|
|
|
.end = DAVINCI_DMA_ASP0_RX,
|
|
|
|
.flags = IORESOURCE_DMA,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device dm644x_asp_device = {
|
ASoC: davinci: fixes for multi-component
Multi-component commit f0fba2ad broke a few things which this patch should
fix. Tested on the DM355 EVM. I've been as careful as I can, but it would be
good if those with access to other Davinci boards could test.
--
The multi-component commit put the initialisation of
snd_soc_dai.[capture|playback]_dma_data into snd_soc_dai_ops.hw_params of the
McBSP, McASP & VCIF drivers (davinci-i2s.c, davinci-mcasp.c & davinci-vcif.c).
The initialisation had to be moved from the probe function in these drivers
because davinci_*_dai changed from snd_soc_dai to snd_soc_dai_driver.
Unfortunately, the DMA params pointer is needed by davinci_pcm_open (in
davinci-pcm.c) before hw_params is called. I have moved the initialisation to
a new snd_soc_dai_ops.startup function in each of these drivers. This fix
indicates that all platforms that use davinci-pcm must have been broken and
need to test with this fix.
--
The multi-component commit also changed the McBSP driver name from
"davinci-asp" to "davinci-i2s" in davinci-i2s.c without updating the board
level references to the driver name. This change is understandable, as there
is a similarly named "davinci-mcasp" driver in davinci-mcasp.c.
There is probably no 'correct' name for this driver. The DM6446 datasheet
calls it the "ASP" and describes it as a "specialised McBSP". The DM355
datasheet calls it the "ASP" and describes it as a "specialised ASP". The
DM365 datasheet calls it the "McBSP". Rather than fix this problem by
reverting to "davinci-asp", I've elected to avoid future confusion with the
"davinci-mcasp" driver by changing it to "davinci-mcbsp", which is also
consistent with the names of the functions in the driver. There are other
fixes required, so it was never going to be as simple as a revert anyway.
--
The DM365 only has one McBSP port (of the McBSP platforms, only the DM355 has
2 ports), so I've changed the the id of the platform_device from 0 to -1.
--
In davinci-evm.c, the DM6446 EVM can no longer share a snd_soc_dai_link
structure with the DM355 EVM as they use different cpu DAI names (the DM355
has 2 ports and the EVM uses the second port, but the DM6446 only has 1 port).
This also means that the 2 boards need different snd_soc_card structures.
--
The codec_name entries in davinci-evm.c didn't match the i2c ids in the board
files. I have only checked and fixed the details of the names used for the
McBSP based platforms. Someone with a McASP based platform (eg DA8xx) should
check the others.
Signed-off-by: Chris Paulson-Ellis <chris@edesix.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-16 19:27:09 +07:00
|
|
|
.name = "davinci-mcbsp",
|
2009-06-05 17:28:08 +07:00
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(dm644x_asp_resources),
|
|
|
|
.resource = dm644x_asp_resources,
|
|
|
|
};
|
|
|
|
|
2011-12-21 20:43:37 +07:00
|
|
|
#define DM644X_VPSS_BASE 0x01c73400
|
|
|
|
|
2009-09-16 22:53:18 +07:00
|
|
|
static struct resource dm644x_vpss_resources[] = {
|
|
|
|
{
|
|
|
|
/* VPSS Base address */
|
|
|
|
.name = "vpss",
|
2011-12-21 20:43:37 +07:00
|
|
|
.start = DM644X_VPSS_BASE,
|
|
|
|
.end = DM644X_VPSS_BASE + 0xff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
2009-09-16 22:53:18 +07:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device dm644x_vpss_device = {
|
|
|
|
.name = "vpss",
|
|
|
|
.id = -1,
|
|
|
|
.dev.platform_data = "dm644x_vpss",
|
|
|
|
.num_resources = ARRAY_SIZE(dm644x_vpss_resources),
|
|
|
|
.resource = dm644x_vpss_resources,
|
|
|
|
};
|
|
|
|
|
2011-12-21 20:43:38 +07:00
|
|
|
static struct resource dm644x_vpfe_resources[] = {
|
2009-09-16 22:53:18 +07:00
|
|
|
{
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_VDINT0),
|
|
|
|
.end = DAVINCI_INTC_IRQ(IRQ_VDINT0),
|
2009-09-16 22:53:18 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
{
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_VDINT1),
|
|
|
|
.end = DAVINCI_INTC_IRQ(IRQ_VDINT1),
|
2009-09-16 22:53:18 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
2010-01-14 06:27:08 +07:00
|
|
|
};
|
|
|
|
|
2012-02-23 16:47:45 +07:00
|
|
|
static u64 dm644x_video_dma_mask = DMA_BIT_MASK(32);
|
2010-01-14 06:27:08 +07:00
|
|
|
static struct resource dm644x_ccdc_resource[] = {
|
|
|
|
/* CCDC Base address */
|
2009-09-16 22:53:18 +07:00
|
|
|
{
|
|
|
|
.start = 0x01c70400,
|
|
|
|
.end = 0x01c70400 + 0xff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2010-01-14 06:27:08 +07:00
|
|
|
static struct platform_device dm644x_ccdc_dev = {
|
|
|
|
.name = "dm644x_ccdc",
|
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(dm644x_ccdc_resource),
|
|
|
|
.resource = dm644x_ccdc_resource,
|
|
|
|
.dev = {
|
2012-02-23 16:47:45 +07:00
|
|
|
.dma_mask = &dm644x_video_dma_mask,
|
2010-01-14 06:27:08 +07:00
|
|
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2011-12-21 20:43:38 +07:00
|
|
|
static struct platform_device dm644x_vpfe_dev = {
|
2009-09-16 22:53:18 +07:00
|
|
|
.name = CAPTURE_DRV_NAME,
|
|
|
|
.id = -1,
|
2011-12-21 20:43:38 +07:00
|
|
|
.num_resources = ARRAY_SIZE(dm644x_vpfe_resources),
|
|
|
|
.resource = dm644x_vpfe_resources,
|
2009-09-16 22:53:18 +07:00
|
|
|
.dev = {
|
2012-02-23 16:47:45 +07:00
|
|
|
.dma_mask = &dm644x_video_dma_mask,
|
|
|
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
#define DM644X_OSD_BASE 0x01c72600
|
|
|
|
|
|
|
|
static struct resource dm644x_osd_resources[] = {
|
|
|
|
{
|
|
|
|
.start = DM644X_OSD_BASE,
|
|
|
|
.end = DM644X_OSD_BASE + 0x1ff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device dm644x_osd_dev = {
|
2012-11-20 17:30:36 +07:00
|
|
|
.name = DM644X_VPBE_OSD_SUBDEV_NAME,
|
2012-02-23 16:47:45 +07:00
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(dm644x_osd_resources),
|
|
|
|
.resource = dm644x_osd_resources,
|
|
|
|
.dev = {
|
|
|
|
.dma_mask = &dm644x_video_dma_mask,
|
|
|
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
#define DM644X_VENC_BASE 0x01c72400
|
|
|
|
|
|
|
|
static struct resource dm644x_venc_resources[] = {
|
|
|
|
{
|
|
|
|
.start = DM644X_VENC_BASE,
|
|
|
|
.end = DM644X_VENC_BASE + 0x17f,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
#define DM644X_VPSS_MUXSEL_PLL2_MODE BIT(0)
|
|
|
|
#define DM644X_VPSS_MUXSEL_VPBECLK_MODE BIT(1)
|
|
|
|
#define DM644X_VPSS_VENCLKEN BIT(3)
|
|
|
|
#define DM644X_VPSS_DACCLKEN BIT(4)
|
|
|
|
|
|
|
|
static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,
|
2012-10-01 21:39:46 +07:00
|
|
|
unsigned int pclock)
|
2012-02-23 16:47:45 +07:00
|
|
|
{
|
|
|
|
int ret = 0;
|
|
|
|
u32 v = DM644X_VPSS_VENCLKEN;
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case VPBE_ENC_STD:
|
|
|
|
v |= DM644X_VPSS_DACCLKEN;
|
|
|
|
writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
|
|
|
|
break;
|
2013-02-16 01:06:28 +07:00
|
|
|
case VPBE_ENC_DV_TIMINGS:
|
2012-10-01 21:39:46 +07:00
|
|
|
if (pclock <= 27000000) {
|
2012-10-03 13:35:00 +07:00
|
|
|
v |= DM644X_VPSS_DACCLKEN;
|
2012-02-23 16:47:45 +07:00
|
|
|
writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
|
2012-10-01 21:39:46 +07:00
|
|
|
} else {
|
2012-02-23 16:47:45 +07:00
|
|
|
/*
|
|
|
|
* For HD, use external clock source since
|
|
|
|
* HD requires higher clock rate
|
|
|
|
*/
|
|
|
|
v |= DM644X_VPSS_MUXSEL_VPBECLK_MODE;
|
|
|
|
writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ret = -EINVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct resource dm644x_v4l2_disp_resources[] = {
|
|
|
|
{
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_VENCINT),
|
|
|
|
.end = DAVINCI_INTC_IRQ(IRQ_VENCINT),
|
2012-02-23 16:47:45 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device dm644x_vpbe_display = {
|
|
|
|
.name = "vpbe-v4l2",
|
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(dm644x_v4l2_disp_resources),
|
|
|
|
.resource = dm644x_v4l2_disp_resources,
|
|
|
|
.dev = {
|
|
|
|
.dma_mask = &dm644x_video_dma_mask,
|
|
|
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct venc_platform_data dm644x_venc_pdata = {
|
|
|
|
.setup_clock = dm644x_venc_setup_clock,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device dm644x_venc_dev = {
|
2012-11-20 17:30:36 +07:00
|
|
|
.name = DM644X_VPBE_VENC_SUBDEV_NAME,
|
2012-02-23 16:47:45 +07:00
|
|
|
.id = -1,
|
|
|
|
.num_resources = ARRAY_SIZE(dm644x_venc_resources),
|
|
|
|
.resource = dm644x_venc_resources,
|
|
|
|
.dev = {
|
|
|
|
.dma_mask = &dm644x_video_dma_mask,
|
|
|
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
|
|
|
.platform_data = &dm644x_venc_pdata,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device dm644x_vpbe_dev = {
|
|
|
|
.name = "vpbe_controller",
|
|
|
|
.id = -1,
|
|
|
|
.dev = {
|
|
|
|
.dma_mask = &dm644x_video_dma_mask,
|
2009-09-16 22:53:18 +07:00
|
|
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2013-08-18 12:19:00 +07:00
|
|
|
static struct resource dm644_gpio_resources[] = {
|
|
|
|
{ /* registers */
|
|
|
|
.start = DAVINCI_GPIO_BASE,
|
|
|
|
.end = DAVINCI_GPIO_BASE + SZ_4K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
{ /* interrupt */
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_GPIOBNK0),
|
|
|
|
.end = DAVINCI_INTC_IRQ(IRQ_GPIOBNK0),
|
2018-11-21 16:35:16 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
{
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_GPIOBNK1),
|
|
|
|
.end = DAVINCI_INTC_IRQ(IRQ_GPIOBNK1),
|
2018-11-21 16:35:16 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
{
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_GPIOBNK2),
|
|
|
|
.end = DAVINCI_INTC_IRQ(IRQ_GPIOBNK2),
|
2018-11-21 16:35:16 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
{
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_GPIOBNK3),
|
|
|
|
.end = DAVINCI_INTC_IRQ(IRQ_GPIOBNK3),
|
2018-11-21 16:35:16 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
{
|
2019-02-14 21:52:01 +07:00
|
|
|
.start = DAVINCI_INTC_IRQ(IRQ_GPIOBNK4),
|
|
|
|
.end = DAVINCI_INTC_IRQ(IRQ_GPIOBNK4),
|
2013-08-18 12:19:00 +07:00
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct davinci_gpio_platform_data dm644_gpio_platform_data = {
|
2018-11-21 16:35:23 +07:00
|
|
|
.no_auto_base = true,
|
|
|
|
.base = 0,
|
2013-08-18 12:19:00 +07:00
|
|
|
.ngpio = 71,
|
|
|
|
};
|
|
|
|
|
|
|
|
int __init dm644x_gpio_register(void)
|
|
|
|
{
|
|
|
|
return davinci_gpio_register(dm644_gpio_resources,
|
2013-11-08 13:45:56 +07:00
|
|
|
ARRAY_SIZE(dm644_gpio_resources),
|
2013-08-18 12:19:00 +07:00
|
|
|
&dm644_gpio_platform_data);
|
|
|
|
}
|
2009-04-14 23:30:11 +07:00
|
|
|
/*----------------------------------------------------------------------*/
|
2009-05-07 20:19:40 +07:00
|
|
|
|
2009-04-16 02:38:58 +07:00
|
|
|
static struct map_desc dm644x_io_desc[] = {
|
|
|
|
{
|
|
|
|
.virtual = IO_VIRT,
|
|
|
|
.pfn = __phys_to_pfn(IO_PHYS),
|
|
|
|
.length = IO_SIZE,
|
|
|
|
.type = MT_DEVICE
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2009-04-16 02:39:09 +07:00
|
|
|
/* Contents of JTAG ID register used to identify exact cpu type */
|
|
|
|
static struct davinci_id dm644x_ids[] = {
|
|
|
|
{
|
|
|
|
.variant = 0x0,
|
|
|
|
.part_no = 0xb700,
|
|
|
|
.manufacturer = 0x017,
|
|
|
|
.cpu_id = DAVINCI_CPU_ID_DM6446,
|
|
|
|
.name = "dm6446",
|
|
|
|
},
|
2009-06-02 17:48:43 +07:00
|
|
|
{
|
|
|
|
.variant = 0x1,
|
|
|
|
.part_no = 0xb700,
|
|
|
|
.manufacturer = 0x017,
|
|
|
|
.cpu_id = DAVINCI_CPU_ID_DM6446,
|
|
|
|
.name = "dm6446a",
|
|
|
|
},
|
2009-04-16 02:39:09 +07:00
|
|
|
};
|
|
|
|
|
2009-04-16 02:40:11 +07:00
|
|
|
/*
|
|
|
|
* T0_BOT: Timer 0, bottom: clockevent source for hrtimers
|
|
|
|
* T0_TOP: Timer 0, top : clocksource for generic timekeeping
|
|
|
|
* T1_BOT: Timer 1, bottom: (used by DSP in TI DSPLink code)
|
|
|
|
* T1_TOP: Timer 1, top : <unused>
|
|
|
|
*/
|
2010-02-26 06:36:38 +07:00
|
|
|
static struct davinci_timer_info dm644x_timer_info = {
|
2009-04-16 02:40:11 +07:00
|
|
|
.timers = davinci_timer_instance,
|
|
|
|
.clockevent_id = T0_BOT,
|
|
|
|
.clocksource_id = T0_TOP,
|
|
|
|
};
|
|
|
|
|
2013-06-19 16:15:38 +07:00
|
|
|
static struct plat_serial8250_port dm644x_serial0_platform_data[] = {
|
2009-03-19 00:36:08 +07:00
|
|
|
{
|
|
|
|
.mapbase = DAVINCI_UART0_BASE,
|
2019-02-14 21:52:01 +07:00
|
|
|
.irq = DAVINCI_INTC_IRQ(IRQ_UARTINT0),
|
2009-03-19 00:36:08 +07:00
|
|
|
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
|
|
|
|
UPF_IOREMAP,
|
|
|
|
.iotype = UPIO_MEM,
|
|
|
|
.regshift = 2,
|
|
|
|
},
|
2013-06-19 16:15:38 +07:00
|
|
|
{
|
|
|
|
.flags = 0,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
static struct plat_serial8250_port dm644x_serial1_platform_data[] = {
|
2009-03-19 00:36:08 +07:00
|
|
|
{
|
|
|
|
.mapbase = DAVINCI_UART1_BASE,
|
2019-02-14 21:52:01 +07:00
|
|
|
.irq = DAVINCI_INTC_IRQ(IRQ_UARTINT1),
|
2009-03-19 00:36:08 +07:00
|
|
|
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
|
|
|
|
UPF_IOREMAP,
|
|
|
|
.iotype = UPIO_MEM,
|
|
|
|
.regshift = 2,
|
|
|
|
},
|
2013-06-19 16:15:38 +07:00
|
|
|
{
|
|
|
|
.flags = 0,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
static struct plat_serial8250_port dm644x_serial2_platform_data[] = {
|
2009-03-19 00:36:08 +07:00
|
|
|
{
|
|
|
|
.mapbase = DAVINCI_UART2_BASE,
|
2019-02-14 21:52:01 +07:00
|
|
|
.irq = DAVINCI_INTC_IRQ(IRQ_UARTINT2),
|
2009-03-19 00:36:08 +07:00
|
|
|
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
|
|
|
|
UPF_IOREMAP,
|
|
|
|
.iotype = UPIO_MEM,
|
|
|
|
.regshift = 2,
|
|
|
|
},
|
|
|
|
{
|
2013-06-19 16:15:38 +07:00
|
|
|
.flags = 0,
|
|
|
|
}
|
2009-03-19 00:36:08 +07:00
|
|
|
};
|
|
|
|
|
2013-06-19 16:15:42 +07:00
|
|
|
struct platform_device dm644x_serial_device[] = {
|
2013-06-19 16:15:38 +07:00
|
|
|
{
|
|
|
|
.name = "serial8250",
|
|
|
|
.id = PLAT8250_DEV_PLATFORM,
|
|
|
|
.dev = {
|
|
|
|
.platform_data = dm644x_serial0_platform_data,
|
|
|
|
}
|
2009-03-19 00:36:08 +07:00
|
|
|
},
|
2013-06-19 16:15:38 +07:00
|
|
|
{
|
|
|
|
.name = "serial8250",
|
|
|
|
.id = PLAT8250_DEV_PLATFORM1,
|
|
|
|
.dev = {
|
|
|
|
.platform_data = dm644x_serial1_platform_data,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.name = "serial8250",
|
|
|
|
.id = PLAT8250_DEV_PLATFORM2,
|
|
|
|
.dev = {
|
|
|
|
.platform_data = dm644x_serial2_platform_data,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
}
|
2009-03-19 00:36:08 +07:00
|
|
|
};
|
|
|
|
|
2017-10-16 17:08:24 +07:00
|
|
|
static const struct davinci_soc_info davinci_soc_info_dm644x = {
|
2009-04-16 02:38:58 +07:00
|
|
|
.io_desc = dm644x_io_desc,
|
|
|
|
.io_desc_num = ARRAY_SIZE(dm644x_io_desc),
|
2010-05-08 04:06:34 +07:00
|
|
|
.jtag_id_reg = 0x01c40028,
|
2009-04-16 02:39:09 +07:00
|
|
|
.ids = dm644x_ids,
|
|
|
|
.ids_num = ARRAY_SIZE(dm644x_ids),
|
2010-05-08 04:06:38 +07:00
|
|
|
.pinmux_base = DAVINCI_SYSTEM_MODULE_BASE,
|
2009-04-16 02:39:48 +07:00
|
|
|
.pinmux_pins = dm644x_pins,
|
|
|
|
.pinmux_pins_num = ARRAY_SIZE(dm644x_pins),
|
2009-04-16 02:40:11 +07:00
|
|
|
.timer_info = &dm644x_timer_info,
|
2009-04-16 02:40:56 +07:00
|
|
|
.emac_pdata = &dm644x_emac_pdata,
|
2009-05-01 07:35:48 +07:00
|
|
|
.sram_dma = 0x00008000,
|
|
|
|
.sram_len = SZ_16K,
|
2009-04-16 02:38:58 +07:00
|
|
|
};
|
|
|
|
|
2016-05-09 20:59:48 +07:00
|
|
|
void __init dm644x_init_asp(void)
|
2009-06-05 17:28:08 +07:00
|
|
|
{
|
|
|
|
davinci_cfg_reg(DM644X_MCBSP);
|
|
|
|
platform_device_register(&dm644x_asp_device);
|
|
|
|
}
|
|
|
|
|
2009-04-14 23:30:11 +07:00
|
|
|
void __init dm644x_init(void)
|
|
|
|
{
|
2009-04-16 02:38:58 +07:00
|
|
|
davinci_common_init(&davinci_soc_info_dm644x);
|
2011-12-21 20:43:36 +07:00
|
|
|
davinci_map_sysmod();
|
2018-01-20 10:20:22 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
void __init dm644x_init_time(void)
|
|
|
|
{
|
2018-05-18 23:48:11 +07:00
|
|
|
void __iomem *pll1, *psc;
|
|
|
|
struct clk *clk;
|
|
|
|
|
|
|
|
clk_register_fixed_rate(NULL, "ref_clk", NULL, 0, DM644X_REF_FREQ);
|
|
|
|
|
|
|
|
pll1 = ioremap(DAVINCI_PLL1_BASE, SZ_1K);
|
|
|
|
dm644x_pll1_init(NULL, pll1, NULL);
|
|
|
|
|
|
|
|
psc = ioremap(DAVINCI_PWR_SLEEP_CNTRL_BASE, SZ_4K);
|
|
|
|
dm644x_psc_init(NULL, psc);
|
|
|
|
|
|
|
|
clk = clk_get(NULL, "timer0");
|
|
|
|
|
|
|
|
davinci_timer_init(clk);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct resource dm644x_pll2_resources[] = {
|
|
|
|
{
|
|
|
|
.start = DAVINCI_PLL2_BASE,
|
|
|
|
.end = DAVINCI_PLL2_BASE + SZ_1K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device dm644x_pll2_device = {
|
|
|
|
.name = "dm644x-pll2",
|
|
|
|
.id = -1,
|
|
|
|
.resource = dm644x_pll2_resources,
|
|
|
|
.num_resources = ARRAY_SIZE(dm644x_pll2_resources),
|
|
|
|
};
|
|
|
|
|
|
|
|
void __init dm644x_register_clocks(void)
|
|
|
|
{
|
|
|
|
/* PLL1 and PSC are registered in dm644x_init_time() */
|
|
|
|
platform_device_register(&dm644x_pll2_device);
|
2009-04-14 23:30:11 +07:00
|
|
|
}
|
|
|
|
|
2012-02-23 16:47:45 +07:00
|
|
|
int __init dm644x_init_video(struct vpfe_config *vpfe_cfg,
|
|
|
|
struct vpbe_config *vpbe_cfg)
|
2009-04-14 23:30:11 +07:00
|
|
|
{
|
2012-02-23 16:47:45 +07:00
|
|
|
if (vpfe_cfg || vpbe_cfg)
|
|
|
|
platform_device_register(&dm644x_vpss_device);
|
|
|
|
|
|
|
|
if (vpfe_cfg) {
|
|
|
|
dm644x_vpfe_dev.dev.platform_data = vpfe_cfg;
|
|
|
|
platform_device_register(&dm644x_ccdc_dev);
|
|
|
|
platform_device_register(&dm644x_vpfe_dev);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (vpbe_cfg) {
|
|
|
|
dm644x_vpbe_dev.dev.platform_data = vpbe_cfg;
|
|
|
|
platform_device_register(&dm644x_osd_dev);
|
|
|
|
platform_device_register(&dm644x_venc_dev);
|
|
|
|
platform_device_register(&dm644x_vpbe_dev);
|
|
|
|
platform_device_register(&dm644x_vpbe_display);
|
|
|
|
}
|
2011-12-21 20:43:39 +07:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-02-14 21:52:10 +07:00
|
|
|
static const struct davinci_aintc_config dm644x_aintc_config = {
|
|
|
|
.reg = {
|
|
|
|
.start = DAVINCI_ARM_INTC_BASE,
|
|
|
|
.end = DAVINCI_ARM_INTC_BASE + SZ_4K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
.num_irqs = 64,
|
|
|
|
.prios = dm644x_default_priorities,
|
|
|
|
};
|
|
|
|
|
2019-02-14 21:52:05 +07:00
|
|
|
void __init dm644x_init_irq(void)
|
|
|
|
{
|
2019-02-14 21:52:11 +07:00
|
|
|
davinci_aintc_init(&dm644x_aintc_config);
|
2019-02-14 21:52:05 +07:00
|
|
|
}
|
|
|
|
|
2018-04-06 19:38:20 +07:00
|
|
|
void __init dm644x_init_devices(void)
|
2011-12-21 20:43:39 +07:00
|
|
|
{
|
2015-10-14 18:42:51 +07:00
|
|
|
struct platform_device *edma_pdev;
|
2018-04-06 19:38:20 +07:00
|
|
|
int ret;
|
2011-12-21 20:43:39 +07:00
|
|
|
|
2015-10-14 18:42:51 +07:00
|
|
|
edma_pdev = platform_device_register_full(&dm644x_edma_device);
|
2018-04-06 19:38:20 +07:00
|
|
|
if (IS_ERR(edma_pdev))
|
2015-10-14 18:42:51 +07:00
|
|
|
pr_warn("%s: Failed to register eDMA\n", __func__);
|
2010-09-15 21:11:22 +07:00
|
|
|
|
|
|
|
platform_device_register(&dm644x_mdio_device);
|
2009-04-16 02:40:56 +07:00
|
|
|
platform_device_register(&dm644x_emac_device);
|
2010-09-15 21:11:22 +07:00
|
|
|
|
2014-02-26 11:59:43 +07:00
|
|
|
ret = davinci_init_wdt();
|
|
|
|
if (ret)
|
|
|
|
pr_warn("%s: watchdog init failed: %d\n", __func__, ret);
|
|
|
|
|
2009-04-14 23:30:11 +07:00
|
|
|
}
|