Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183216
b: refs/heads/master
c: 3f995f2
h: refs/heads/master
v: v3
  • Loading branch information
Sudhakar Rajashekhara authored and Kevin Hilman committed Feb 4, 2010
1 parent 0e22828 commit bd06050
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f900d552f95a009e4c4910aff7acbd45f952aa2e
refs/heads/master: 3f995f2fd7e0814630f55be37c650a5983e4077e
121 changes: 114 additions & 7 deletions trunk/arch/arm/mach-davinci/devices-da8xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
#include "clock.h"

#define DA8XX_TPCC_BASE 0x01c00000
#define DA850_TPCC1_BASE 0x01e30000
#define DA8XX_TPTC0_BASE 0x01c08000
#define DA8XX_TPTC1_BASE 0x01c08400
#define DA850_TPTC2_BASE 0x01e38000
#define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */
#define DA8XX_I2C0_BASE 0x01c22000
#define DA8XX_RTC_BASE 0x01C23000
Expand Down Expand Up @@ -97,7 +99,31 @@ static const s8 da8xx_queue_priority_mapping[][2] = {
{-1, -1}
};

static struct edma_soc_info da8xx_edma_info[] = {
static const s8 da850_queue_tc_mapping[][2] = {
/* {event queue no, TC no} */
{0, 0},
{-1, -1}
};

static const s8 da850_queue_priority_mapping[][2] = {
/* {event queue no, Priority} */
{0, 3},
{-1, -1}
};

static struct edma_soc_info da830_edma_info[] = {
{
.n_channel = 32,
.n_region = 4,
.n_slot = 128,
.n_tc = 2,
.n_cc = 1,
.queue_tc_mapping = da8xx_queue_tc_mapping,
.queue_priority_mapping = da8xx_queue_priority_mapping,
},
};

static struct edma_soc_info da850_edma_info[] = {
{
.n_channel = 32,
.n_region = 4,
Expand All @@ -107,9 +133,49 @@ static struct edma_soc_info da8xx_edma_info[] = {
.queue_tc_mapping = da8xx_queue_tc_mapping,
.queue_priority_mapping = da8xx_queue_priority_mapping,
},
{
.n_channel = 32,
.n_region = 4,
.n_slot = 128,
.n_tc = 1,
.n_cc = 1,
.queue_tc_mapping = da850_queue_tc_mapping,
.queue_priority_mapping = da850_queue_priority_mapping,
},
};

static struct resource da830_edma_resources[] = {
{
.name = "edma_cc0",
.start = DA8XX_TPCC_BASE,
.end = DA8XX_TPCC_BASE + SZ_32K - 1,
.flags = IORESOURCE_MEM,
},
{
.name = "edma_tc0",
.start = DA8XX_TPTC0_BASE,
.end = DA8XX_TPTC0_BASE + SZ_1K - 1,
.flags = IORESOURCE_MEM,
},
{
.name = "edma_tc1",
.start = DA8XX_TPTC1_BASE,
.end = DA8XX_TPTC1_BASE + SZ_1K - 1,
.flags = IORESOURCE_MEM,
},
{
.name = "edma0",
.start = IRQ_DA8XX_CCINT0,
.flags = IORESOURCE_IRQ,
},
{
.name = "edma0_err",
.start = IRQ_DA8XX_CCERRINT,
.flags = IORESOURCE_IRQ,
},
};

static struct resource da8xx_edma_resources[] = {
static struct resource da850_edma_resources[] = {
{
.name = "edma_cc0",
.start = DA8XX_TPCC_BASE,
Expand All @@ -128,6 +194,18 @@ static struct resource da8xx_edma_resources[] = {
.end = DA8XX_TPTC1_BASE + SZ_1K - 1,
.flags = IORESOURCE_MEM,
},
{
.name = "edma_cc1",
.start = DA850_TPCC1_BASE,
.end = DA850_TPCC1_BASE + SZ_32K - 1,
.flags = IORESOURCE_MEM,
},
{
.name = "edma_tc2",
.start = DA850_TPTC2_BASE,
.end = DA850_TPTC2_BASE + SZ_1K - 1,
.flags = IORESOURCE_MEM,
},
{
.name = "edma0",
.start = IRQ_DA8XX_CCINT0,
Expand All @@ -138,21 +216,50 @@ static struct resource da8xx_edma_resources[] = {
.start = IRQ_DA8XX_CCERRINT,
.flags = IORESOURCE_IRQ,
},
{
.name = "edma1",
.start = IRQ_DA850_CCINT1,
.flags = IORESOURCE_IRQ,
},
{
.name = "edma1_err",
.start = IRQ_DA850_CCERRINT1,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device da830_edma_device = {
.name = "edma",
.id = -1,
.dev = {
.platform_data = da830_edma_info,
},
.num_resources = ARRAY_SIZE(da830_edma_resources),
.resource = da830_edma_resources,
};

static struct platform_device da8xx_edma_device = {
static struct platform_device da850_edma_device = {
.name = "edma",
.id = -1,
.dev = {
.platform_data = da8xx_edma_info,
.platform_data = da850_edma_info,
},
.num_resources = ARRAY_SIZE(da8xx_edma_resources),
.resource = da8xx_edma_resources,
.num_resources = ARRAY_SIZE(da850_edma_resources),
.resource = da850_edma_resources,
};

int __init da8xx_register_edma(void)
{
return platform_device_register(&da8xx_edma_device);
struct platform_device *pdev;

if (cpu_is_davinci_da830())
pdev = &da830_edma_device;
else if (cpu_is_davinci_da850())
pdev = &da850_edma_device;
else
return -ENODEV;

return platform_device_register(pdev);
}

static struct resource da8xx_i2c_resources0[] = {
Expand Down

0 comments on commit bd06050

Please sign in to comment.