aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c32
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c52
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c21
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h3
4 files changed, 96 insertions, 12 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 212d97084bd7..b61e87250b3b 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -494,12 +494,42 @@ static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = {
494 .bus_delay = 0, /* usec */ 494 .bus_delay = 0, /* usec */
495}; 495};
496 496
497/*
498 * The following EDMA channels/slots are not being used by drivers (for
499 * example: Timer, GPIO, UART events etc) on da830/omap-l137 EVM, hence
500 * they are being reserved for codecs on the DSP side.
501 */
502static const s16 da830_dma_rsv_chans[][2] = {
503 /* (offset, number) */
504 { 8, 2},
505 {12, 2},
506 {24, 4},
507 {30, 2},
508 {-1, -1}
509};
510
511static const s16 da830_dma_rsv_slots[][2] = {
512 /* (offset, number) */
513 { 8, 2},
514 {12, 2},
515 {24, 4},
516 {30, 26},
517 {-1, -1}
518};
519
520static struct edma_rsv_info da830_edma_rsv[] = {
521 {
522 .rsv_chans = da830_dma_rsv_chans,
523 .rsv_slots = da830_dma_rsv_slots,
524 },
525};
526
497static __init void da830_evm_init(void) 527static __init void da830_evm_init(void)
498{ 528{
499 struct davinci_soc_info *soc_info = &davinci_soc_info; 529 struct davinci_soc_info *soc_info = &davinci_soc_info;
500 int ret; 530 int ret;
501 531
502 ret = da8xx_register_edma(); 532 ret = da830_register_edma(da830_edma_rsv);
503 if (ret) 533 if (ret)
504 pr_warning("da830_evm_init: edma registration failed: %d\n", 534 pr_warning("da830_evm_init: edma registration failed: %d\n",
505 ret); 535 ret);
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 2ec3095ffb7b..ef7d9de4db29 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -629,6 +629,56 @@ static int __init da850_evm_config_emac(void)
629} 629}
630device_initcall(da850_evm_config_emac); 630device_initcall(da850_evm_config_emac);
631 631
632/*
633 * The following EDMA channels/slots are not being used by drivers (for
634 * example: Timer, GPIO, UART events etc) on da850/omap-l138 EVM, hence
635 * they are being reserved for codecs on the DSP side.
636 */
637static const s16 da850_dma0_rsv_chans[][2] = {
638 /* (offset, number) */
639 { 8, 6},
640 {24, 4},
641 {30, 2},
642 {-1, -1}
643};
644
645static const s16 da850_dma0_rsv_slots[][2] = {
646 /* (offset, number) */
647 { 8, 6},
648 {24, 4},
649 {30, 50},
650 {-1, -1}
651};
652
653static const s16 da850_dma1_rsv_chans[][2] = {
654 /* (offset, number) */
655 { 0, 28},
656 {30, 2},
657 {-1, -1}
658};
659
660static const s16 da850_dma1_rsv_slots[][2] = {
661 /* (offset, number) */
662 { 0, 28},
663 {30, 90},
664 {-1, -1}
665};
666
667static struct edma_rsv_info da850_edma_cc0_rsv = {
668 .rsv_chans = da850_dma0_rsv_chans,
669 .rsv_slots = da850_dma0_rsv_slots,
670};
671
672static struct edma_rsv_info da850_edma_cc1_rsv = {
673 .rsv_chans = da850_dma1_rsv_chans,
674 .rsv_slots = da850_dma1_rsv_slots,
675};
676
677static struct edma_rsv_info *da850_edma_rsv[2] = {
678 &da850_edma_cc0_rsv,
679 &da850_edma_cc1_rsv,
680};
681
632static __init void da850_evm_init(void) 682static __init void da850_evm_init(void)
633{ 683{
634 int ret; 684 int ret;
@@ -638,7 +688,7 @@ static __init void da850_evm_init(void)
638 pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n", 688 pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n",
639 ret); 689 ret);
640 690
641 ret = da8xx_register_edma(); 691 ret = da850_register_edma(da850_edma_rsv);
642 if (ret) 692 if (ret)
643 pr_warning("da850_evm_init: edma registration failed: %d\n", 693 pr_warning("da850_evm_init: edma registration failed: %d\n",
644 ret); 694 ret);
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 1d956bfa9cf0..52bc7b1c6ca3 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -255,18 +255,21 @@ static struct platform_device da850_edma_device = {
255 .resource = da850_edma_resources, 255 .resource = da850_edma_resources,
256}; 256};
257 257
258int __init da8xx_register_edma(void) 258int __init da830_register_edma(struct edma_rsv_info *rsv)
259{ 259{
260 struct platform_device *pdev; 260 da830_edma_cc0_info.rsv = rsv;
261 261
262 if (cpu_is_davinci_da830()) 262 return platform_device_register(&da830_edma_device);
263 pdev = &da830_edma_device; 263}
264 else if (cpu_is_davinci_da850())
265 pdev = &da850_edma_device;
266 else
267 return -ENODEV;
268 264
269 return platform_device_register(pdev); 265int __init da850_register_edma(struct edma_rsv_info *rsv[2])
266{
267 if (rsv) {
268 da850_edma_cc_info[0].rsv = rsv[0];
269 da850_edma_cc_info[1].rsv = rsv[1];
270 }
271
272 return platform_device_register(&da850_edma_device);
270} 273}
271 274
272static struct resource da8xx_i2c_resources0[] = { 275static struct resource da8xx_i2c_resources0[] = {
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index 1b31a9aa8fba..3c07059f526e 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -67,7 +67,8 @@ extern void __iomem *da8xx_syscfg1_base;
67void __init da830_init(void); 67void __init da830_init(void);
68void __init da850_init(void); 68void __init da850_init(void);
69 69
70int da8xx_register_edma(void); 70int da830_register_edma(struct edma_rsv_info *rsv);
71int da850_register_edma(struct edma_rsv_info *rsv[2]);
71int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata); 72int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata);
72int da8xx_register_watchdog(void); 73int da8xx_register_watchdog(void);
73int da8xx_register_usb20(unsigned mA, unsigned potpgt); 74int da8xx_register_usb20(unsigned mA, unsigned potpgt);