
29 May
2009
29 May
'09
8:22 a.m.
Dear Wolfgang,
2009/5/29 Wolfgang Denk wd@denx.de:
Dear Ilya Yanok,
In message 1242777361-6717-5-git-send-email-yanok@emcraft.com you wrote:
Driver for NFC NAND controller found on Freescale's MX2 and MX3 processors. Ported from Linux. Tested only with i.MX27 but should works with other MX2 and MX3 processors too.
...
+static void *mxc_nand_memcpy(void *dest, void *source, size_t size) +{
- uint32_t *s = source, *d = dest;
- size >>= 2;
- while (size--)
- *d++ = *s++;
- return dest;
+}
Why do we need this "special" function here? Why cannot we use plain standard memcpy() instead?
Because the nand flash controller can only handle 32 bit read/write operations, any other size will cause an abort (or something like that).
/Magnus