]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
davinci: da8xx/omapl EVM: Specify reserved channels/slots
authorRajashekhara, Sudhakar <sudhakar.raj@ti.com>
Tue, 29 Jun 2010 06:05:14 +0000 (11:35 +0530)
committerKevin Hilman <khilman@deeprootsystems.com>
Thu, 5 Aug 2010 16:58:26 +0000 (09:58 -0700)
The drivers on da8xx/omapl EVMs do not utilize all the channels
and slots provided by EDMA. Some of these are better utilitzed by
the DSP on the SoC for speeding up codec operations.

Reserve these channels/slots for the DSP.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
arch/arm/mach-davinci/board-da830-evm.c
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/devices-da8xx.c
arch/arm/mach-davinci/include/mach/da8xx.h

index 212d97084bd71dc11bbda9308574f1c3cbc4ea3e..b61e87250b3b28960d7300079e1c0650de34cc8e 100644 (file)
@@ -494,12 +494,42 @@ static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = {
        .bus_delay      = 0,    /* usec */
 };
 
+/*
+ * The following EDMA channels/slots are not being used by drivers (for
+ * example: Timer, GPIO, UART events etc) on da830/omap-l137 EVM, hence
+ * they are being reserved for codecs on the DSP side.
+ */
+static const s16 da830_dma_rsv_chans[][2] = {
+       /* (offset, number) */
+       { 8,  2},
+       {12,  2},
+       {24,  4},
+       {30,  2},
+       {-1, -1}
+};
+
+static const s16 da830_dma_rsv_slots[][2] = {
+       /* (offset, number) */
+       { 8,  2},
+       {12,  2},
+       {24,  4},
+       {30, 26},
+       {-1, -1}
+};
+
+static struct edma_rsv_info da830_edma_rsv[] = {
+       {
+               .rsv_chans      = da830_dma_rsv_chans,
+               .rsv_slots      = da830_dma_rsv_slots,
+       },
+};
+
 static __init void da830_evm_init(void)
 {
        struct davinci_soc_info *soc_info = &davinci_soc_info;
        int ret;
 
-       ret = da8xx_register_edma();
+       ret = da830_register_edma(da830_edma_rsv);
        if (ret)
                pr_warning("da830_evm_init: edma registration failed: %d\n",
                                ret);
index 2ec3095ffb7b564e61a54bcc4e366f32b87e671c..ef7d9de4db29d740f22e3cde9623fe8464ac6fab 100644 (file)
@@ -629,6 +629,56 @@ static int __init da850_evm_config_emac(void)
 }
 device_initcall(da850_evm_config_emac);
 
+/*
+ * The following EDMA channels/slots are not being used by drivers (for
+ * example: Timer, GPIO, UART events etc) on da850/omap-l138 EVM, hence
+ * they are being reserved for codecs on the DSP side.
+ */
+static const s16 da850_dma0_rsv_chans[][2] = {
+       /* (offset, number) */
+       { 8,  6},
+       {24,  4},
+       {30,  2},
+       {-1, -1}
+};
+
+static const s16 da850_dma0_rsv_slots[][2] = {
+       /* (offset, number) */
+       { 8,  6},
+       {24,  4},
+       {30, 50},
+       {-1, -1}
+};
+
+static const s16 da850_dma1_rsv_chans[][2] = {
+       /* (offset, number) */
+       { 0, 28},
+       {30,  2},
+       {-1, -1}
+};
+
+static const s16 da850_dma1_rsv_slots[][2] = {
+       /* (offset, number) */
+       { 0, 28},
+       {30, 90},
+       {-1, -1}
+};
+
+static struct edma_rsv_info da850_edma_cc0_rsv = {
+       .rsv_chans      = da850_dma0_rsv_chans,
+       .rsv_slots      = da850_dma0_rsv_slots,
+};
+
+static struct edma_rsv_info da850_edma_cc1_rsv = {
+       .rsv_chans      = da850_dma1_rsv_chans,
+       .rsv_slots      = da850_dma1_rsv_slots,
+};
+
+static struct edma_rsv_info *da850_edma_rsv[2] = {
+       &da850_edma_cc0_rsv,
+       &da850_edma_cc1_rsv,
+};
+
 static __init void da850_evm_init(void)
 {
        int ret;
@@ -638,7 +688,7 @@ static __init void da850_evm_init(void)
                pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n",
                                ret);
 
-       ret = da8xx_register_edma();
+       ret = da850_register_edma(da850_edma_rsv);
        if (ret)
                pr_warning("da850_evm_init: edma registration failed: %d\n",
                                ret);
index 1d956bfa9cf08c7b87982d901d4ff491081891d5..52bc7b1c6ca3365309bd407254163f3811469031 100644 (file)
@@ -255,18 +255,21 @@ static struct platform_device da850_edma_device = {
        .resource       = da850_edma_resources,
 };
 
-int __init da8xx_register_edma(void)
+int __init da830_register_edma(struct edma_rsv_info *rsv)
 {
-       struct platform_device *pdev;
+       da830_edma_cc0_info.rsv = rsv;
 
-       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(&da830_edma_device);
+}
 
-       return platform_device_register(pdev);
+int __init da850_register_edma(struct edma_rsv_info *rsv[2])
+{
+       if (rsv) {
+               da850_edma_cc_info[0].rsv = rsv[0];
+               da850_edma_cc_info[1].rsv = rsv[1];
+       }
+
+       return platform_device_register(&da850_edma_device);
 }
 
 static struct resource da8xx_i2c_resources0[] = {
index 1b31a9aa8fba088827c56586befca0297f2e702a..3c07059f526e9605feddb0d8c5ef06f0b355977f 100644 (file)
@@ -67,7 +67,8 @@ extern void __iomem *da8xx_syscfg1_base;
 void __init da830_init(void);
 void __init da850_init(void);
 
-int da8xx_register_edma(void);
+int da830_register_edma(struct edma_rsv_info *rsv);
+int da850_register_edma(struct edma_rsv_info *rsv[2]);
 int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata);
 int da8xx_register_watchdog(void);
 int da8xx_register_usb20(unsigned mA, unsigned potpgt);