]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
davinci: dm646x EVM: Specify reserved EDMA channel/slots
authorRajashekhara, Sudhakar <sudhakar.raj@ti.com>
Tue, 29 Jun 2010 06:05:15 +0000 (11:35 +0530)
committerKevin Hilman <khilman@deeprootsystems.com>
Thu, 5 Aug 2010 16:58:27 +0000 (09:58 -0700)
Not all the channels and slots available on the DM646x EVM
are used by the devices on the EVM. These resources can be
used by the DSP to speed up codec operations.

This patch reserves these channels 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-dm646x-evm.c
arch/arm/mach-davinci/dm646x.c
arch/arm/mach-davinci/include/mach/dm646x.h

index 6d8889342c9f8b978886bff64f5848b5f5fa7ce0..b8b1deca95e0d085a2ef20a1b4c90cf6207fb8ed 100644 (file)
@@ -721,6 +721,39 @@ static struct davinci_uart_config uart_config __initdata = {
 #define DM646X_EVM_PHY_MASK            (0x2)
 #define DM646X_EVM_MDIO_FREQUENCY      (2200000) /* PHY bus frequency */
 
+/*
+ * The following EDMA channels/slots are not being used by drivers (for
+ * example: Timer, GPIO, UART events etc) on dm646x, hence they are being
+ * reserved for codecs on the DSP side.
+ */
+static const s16 dm646x_dma_rsv_chans[][2] = {
+       /* (offset, number) */
+       { 0,  4},
+       {13,  3},
+       {24,  4},
+       {30,  2},
+       {54,  3},
+       {-1, -1}
+};
+
+static const s16 dm646x_dma_rsv_slots[][2] = {
+       /* (offset, number) */
+       { 0,  4},
+       {13,  3},
+       {24,  4},
+       {30,  2},
+       {54,  3},
+       {128, 384},
+       {-1, -1}
+};
+
+static struct edma_rsv_info dm646x_edma_rsv[] = {
+       {
+               .rsv_chans      = dm646x_dma_rsv_chans,
+               .rsv_slots      = dm646x_dma_rsv_slots,
+       },
+};
+
 static __init void evm_init(void)
 {
        struct davinci_soc_info *soc_info = &davinci_soc_info;
@@ -732,6 +765,8 @@ static __init void evm_init(void)
 
        platform_device_register(&davinci_nand_device);
 
+       dm646x_init_edma(dm646x_edma_rsv);
+
        if (HAS_ATA)
                davinci_init_ide();
 
index bfc887e9f11821b6e2a0fe4eb4979a1b50b3f6b5..e4a3df1872aca89404899034ebbe920d453e7f66 100644 (file)
@@ -879,6 +879,13 @@ void dm646x_setup_vpif(struct vpif_display_config *display_config,
        platform_device_register(&vpif_capture_dev);
 }
 
+int __init dm646x_init_edma(struct edma_rsv_info *rsv)
+{
+       edma_cc0_info.rsv = rsv;
+
+       return platform_device_register(&dm646x_edma_device);
+}
+
 void __init dm646x_init(void)
 {
        dm646x_board_setup_refclk(&ref_clk);
@@ -890,7 +897,6 @@ static int __init dm646x_init_devices(void)
        if (!cpu_is_davinci_dm646x())
                return 0;
 
-       platform_device_register(&dm646x_edma_device);
        platform_device_register(&dm646x_emac_device);
        return 0;
 }
index add6f794a362e4cdf84bba283f9befbc996f744c..0a27ee9a70e1de39448898da62090eb981096e11 100644 (file)
@@ -32,6 +32,7 @@ void __init dm646x_init(void);
 void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
 void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
 void __init dm646x_board_setup_refclk(struct clk *clk);
+int __init dm646x_init_edma(struct edma_rsv_info *rsv);
 
 void dm646x_video_init(void);