ARM:OMAP:AM33XX:pruss: Disable SRAM support in UIO_PRUSS
authorAmit Shah <amit.shah@ti.com>
Wed, 16 Nov 2011 12:11:08 +0000 (17:41 +0530)
committerVaibhav Hiremath <hvaibhav@ti.com>
Mon, 23 Jan 2012 19:14:36 +0000 (00:44 +0530)
Disable SRAM export in UIO till consolidated SRAM support available for AM33XX

Signed-off-by: Amit Shah <amit.shah@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
drivers/uio/uio_pruss.c

index d53957ac363ff43b02e841d4e1de201c41d0a2e2..42553d26c92af76423beccbe03b6e1c1ee736c54 100644 (file)
 #include <linux/clk.h>
 #include <linux/dma-mapping.h>
 #include <linux/slab.h>
+
+#ifdef ARCH_DAVINCI_DA850
+#define ENABLE_SRAM_SUPPORT
+#endif
+
+#ifdef ENABLE_SRAM_SUPPORT
 #include <mach/sram.h>
+#endif
 
 #define DRV_NAME "pruss_uio"
 #define DRV_VERSION "1.0"
@@ -105,9 +112,11 @@ static void pruss_cleanup(struct platform_device *dev,
                dma_free_coherent(&dev->dev, extram_pool_sz, gdev->ddr_vaddr,
                        gdev->ddr_paddr);
        }
+#ifdef ENABLE_SRAM_SUPPORT
        if (gdev->sram_vaddr)
                gen_pool_free(davinci_gen_pool,
                              (unsigned long)gdev->sram_vaddr, sram_pool_sz);
+#endif
        kfree(gdev->info);
        clk_put(gdev->pruss_clk);
        kfree(gdev);
@@ -153,6 +162,7 @@ static int __devinit pruss_probe(struct platform_device *dev)
                goto out_free;
        }
 
+#ifdef ENABLE_SRAM_SUPPORT
        gdev->sram_vaddr = (void *)gen_pool_alloc(davinci_gen_pool,
                                                  sram_pool_sz);
        if (!gdev->sram_vaddr) {
@@ -162,7 +172,7 @@ static int __devinit pruss_probe(struct platform_device *dev)
 
        gdev->sram_paddr = gen_pool_virt_to_phys(davinci_gen_pool,
                                        (unsigned long)gdev->sram_vaddr);
-
+#endif
        gdev->ddr_vaddr = dma_alloc_coherent(&dev->dev, extram_pool_sz,
                                &(gdev->ddr_paddr), GFP_KERNEL | GFP_DMA);
        if (!gdev->ddr_vaddr) {
@@ -184,8 +194,6 @@ static int __devinit pruss_probe(struct platform_device *dev)
                p->mem[0].addr = regs_prussio->start;
                p->mem[0].size = resource_size(regs_prussio);
                p->mem[0].memtype = UIO_MEM_PHYS;
-
-               p->mem[1].addr = gdev->sram_paddr;
                p->mem[1].size = sram_pool_sz;
                p->mem[1].memtype = UIO_MEM_PHYS;