Hello.

Mark A. Greer wrote:

The base address for the DMA's Third Party Channel Controller is currently
hardcoded.  Instead, use the base address that is already in the resource
data for the controller.

Signed-off-by: Mark A. Greer <[email protected]>

[...]

diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index a7acd4c..f9076fc 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/mach-davinci/dma.c
@@ -102,9 +102,6 @@
#define PARM_OFFSET(param_no) (EDMA_PARM + ((param_no) << 5)) -#define edmacc_regs_base IO_ADDRESS(DAVINCI_DMA_3PCC_BASE)
-
-
 #define EDMA_MAX_DMACH           64
 #define EDMA_MAX_PARAMENTRY     512
 #define EDMA_MAX_EVQUE            2    /* FIXME too small */
@@ -112,6 +109,8 @@
/*****************************************************************************/ +static __iomem void *edmacc_regs_base;
+
 static inline unsigned int edma_read(int offset)
 {
        return (unsigned int)__raw_readl(edmacc_regs_base + offset);
@@ -997,10 +996,28 @@ static int __init edma_probe(struct platform_device *pdev)
        int                     status;
        const s8                *noevent;
        int                     irq = 0, err_irq = 0;
+       struct resource         *r;
+       resource_size_t         len;
if (!info)
                return -ENODEV;
+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "edma_cc");
+       if (!r)
+               return -ENODEV;
+
+       len = r->end - r->start + 1;
+
+       r = request_mem_region(r->start, len, r->name);
+       if (!r)
+               return -EBUSY;
+
+       edmacc_regs_base = ioremap(r->start, len);
+       if (!edmacc_regs_base) {
+               status = -EBUSY;

 Not ENOMEM? That's quite minor tho...

+               goto fail1;

  Not very telling label...

WBR, Sergei



_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to