Re: DMA problem with dataflash on at91sam9260

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Thank you very much for fast reply.
It seems I've forgot to set CONFIG_BSE_TWEAKS with this patch.
Now it works!


> --- mtdblock.c  13 Aug 2007 04:25:24 -0000      1.1
> +++ mtdblock.c  14 Nov 2007 17:36:35 -0000      1.2
> @@ -253,7 +253,11 @@
> {
>        struct mtdblk_dev *mtdblk = mtdblks[dev->devnum];
>        if (unlikely(!mtdblk->cache_data && mtdblk->cache_size)) {
> +#ifdef CONFIG_BSE_TWEAKS // BSE fix for dataflash/spi DMA mapping
> +               mtdblk->cache_data = kmalloc(mtdblk->mtd->erasesize,
> GFP_KERNEL);
> +#else
>                mtdblk->cache_data = vmalloc(mtdblk->mtd->erasesize);
> +#endif
>                if (!mtdblk->cache_data)
>                        return -EINTR;
>                /* -EINTR is not really correct, but it is the best match
> @@ -315,7 +319,11 @@
>                mtdblks[dev] = NULL;
>                if (mtdblk->mtd->sync)
>                        mtdblk->mtd->sync(mtdblk->mtd);
> +#ifdef CONFIG_BSE_TWEAKS // BSE fix for dataflash/spi DMA mapping
> +               kfree(mtdblk->cache_data);
> +#else
>                vfree(mtdblk->cache_data);
> +#endif
>                kfree(mtdblk);
>        }
>        DEBUG(MTD_DEBUG_LEVEL1, "ok\n");
>
>


Best regards.


-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter