aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
diff options
context:
space:
mode:
authorBenoit Cousson <b-cousson@ti.com>2010-12-20 21:27:19 -0500
committerTony Lindgren <tony@atomide.com>2010-12-20 21:38:30 -0500
commit531ce0d57caf7e49073608873de6976558fd7e4f (patch)
treef3aa0bbc012182a115cbd33778ed6aef209496e8 /arch/arm/mach-omap2/omap_hwmod_44xx_data.c
parent01438ab6a49b63ef02b2eb44b63345a09792f982 (diff)
OMAP4: hwmod data: add system DMA
Add OMAP4 DMA hwmod data. In addition to original dma hwmod data, the following changes are added. 1. DMA device attributes structure is introduced for diffenrenciating OMAP cpu's based on DMA features. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com> Tested-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_44xx_data.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c102
1 files changed, 102 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index d258936410fb..f9778fba8322 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -23,6 +23,7 @@
23#include <plat/omap_hwmod.h> 23#include <plat/omap_hwmod.h>
24#include <plat/cpu.h> 24#include <plat/cpu.h>
25#include <plat/gpio.h> 25#include <plat/gpio.h>
26#include <plat/dma.h>
26 27
27#include "omap_hwmod_common_data.h" 28#include "omap_hwmod_common_data.h"
28 29
@@ -36,6 +37,7 @@
36#define OMAP44XX_DMA_REQ_START 1 37#define OMAP44XX_DMA_REQ_START 1
37 38
38/* Backward references (IPs with Bus Master capability) */ 39/* Backward references (IPs with Bus Master capability) */
40static struct omap_hwmod omap44xx_dma_system_hwmod;
39static struct omap_hwmod omap44xx_dmm_hwmod; 41static struct omap_hwmod omap44xx_dmm_hwmod;
40static struct omap_hwmod omap44xx_emif_fw_hwmod; 42static struct omap_hwmod omap44xx_emif_fw_hwmod;
41static struct omap_hwmod omap44xx_l3_instr_hwmod; 43static struct omap_hwmod omap44xx_l3_instr_hwmod;
@@ -216,6 +218,14 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
216 .user = OCP_USER_MPU | OCP_USER_SDMA, 218 .user = OCP_USER_MPU | OCP_USER_SDMA,
217}; 219};
218 220
221/* dma_system -> l3_main_2 */
222static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
223 .master = &omap44xx_dma_system_hwmod,
224 .slave = &omap44xx_l3_main_2_hwmod,
225 .clk = "l3_div_ck",
226 .user = OCP_USER_MPU | OCP_USER_SDMA,
227};
228
219/* l4_cfg -> l3_main_2 */ 229/* l4_cfg -> l3_main_2 */
220static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = { 230static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
221 .master = &omap44xx_l4_cfg_hwmod, 231 .master = &omap44xx_l4_cfg_hwmod,
@@ -226,6 +236,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
226 236
227/* l3_main_2 slave ports */ 237/* l3_main_2 slave ports */
228static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { 238static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
239 &omap44xx_dma_system__l3_main_2,
229 &omap44xx_l3_main_1__l3_main_2, 240 &omap44xx_l3_main_1__l3_main_2,
230 &omap44xx_l4_cfg__l3_main_2, 241 &omap44xx_l4_cfg__l3_main_2,
231}; 242};
@@ -1376,6 +1387,93 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = {
1376 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves), 1387 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
1377 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 1388 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1378}; 1389};
1390
1391/*
1392 * 'dma' class
1393 * dma controller for data exchange between memory to memory (i.e. internal or
1394 * external memory) and gp peripherals to memory or memory to gp peripherals
1395 */
1396
1397static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
1398 .rev_offs = 0x0000,
1399 .sysc_offs = 0x002c,
1400 .syss_offs = 0x0028,
1401 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1402 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
1403 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1404 SYSS_HAS_RESET_STATUS),
1405 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1406 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1407 .sysc_fields = &omap_hwmod_sysc_type1,
1408};
1409
1410/* dma attributes */
1411static struct omap_dma_dev_attr dma_dev_attr = {
1412 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1413 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1414 .lch_count = 32,
1415};
1416
1417static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
1418 .name = "dma",
1419 .sysc = &omap44xx_dma_sysc,
1420};
1421
1422/* dma_system */
1423static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
1424 { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
1425 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
1426 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
1427 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
1428};
1429
1430/* dma_system master ports */
1431static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
1432 &omap44xx_dma_system__l3_main_2,
1433};
1434
1435static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
1436 {
1437 .pa_start = 0x4a056000,
1438 .pa_end = 0x4a0560ff,
1439 .flags = ADDR_TYPE_RT
1440 },
1441};
1442
1443/* l4_cfg -> dma_system */
1444static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
1445 .master = &omap44xx_l4_cfg_hwmod,
1446 .slave = &omap44xx_dma_system_hwmod,
1447 .clk = "l4_div_ck",
1448 .addr = omap44xx_dma_system_addrs,
1449 .addr_cnt = ARRAY_SIZE(omap44xx_dma_system_addrs),
1450 .user = OCP_USER_MPU | OCP_USER_SDMA,
1451};
1452
1453/* dma_system slave ports */
1454static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
1455 &omap44xx_l4_cfg__dma_system,
1456};
1457
1458static struct omap_hwmod omap44xx_dma_system_hwmod = {
1459 .name = "dma_system",
1460 .class = &omap44xx_dma_hwmod_class,
1461 .mpu_irqs = omap44xx_dma_system_irqs,
1462 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dma_system_irqs),
1463 .main_clk = "l3_div_ck",
1464 .prcm = {
1465 .omap4 = {
1466 .clkctrl_reg = OMAP4430_CM_SDMA_SDMA_CLKCTRL,
1467 },
1468 },
1469 .slaves = omap44xx_dma_system_slaves,
1470 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
1471 .masters = omap44xx_dma_system_masters,
1472 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
1473 .dev_attr = &dma_dev_attr,
1474 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1475};
1476
1379static __initdata struct omap_hwmod *omap44xx_hwmods[] = { 1477static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
1380 /* dmm class */ 1478 /* dmm class */
1381 &omap44xx_dmm_hwmod, 1479 &omap44xx_dmm_hwmod,
@@ -1391,6 +1489,10 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
1391 &omap44xx_l4_cfg_hwmod, 1489 &omap44xx_l4_cfg_hwmod,
1392 &omap44xx_l4_per_hwmod, 1490 &omap44xx_l4_per_hwmod,
1393 &omap44xx_l4_wkup_hwmod, 1491 &omap44xx_l4_wkup_hwmod,
1492
1493 /* dma class */
1494 &omap44xx_dma_system_hwmod,
1495
1394 /* i2c class */ 1496 /* i2c class */
1395 &omap44xx_i2c1_hwmod, 1497 &omap44xx_i2c1_hwmod,
1396 &omap44xx_i2c2_hwmod, 1498 &omap44xx_i2c2_hwmod,