[U-Boot] [PATCH 4/7] mxc_nand: add nand driver for MX2/MX3
Magnus Lilja
lilja.magnus at gmail.com
Fri May 29 08:22:20 CEST 2009
Dear Wolfgang,
2009/5/29 Wolfgang Denk <wd at denx.de>:
> Dear Ilya Yanok,
>
> In message <1242777361-6717-5-git-send-email-yanok at 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
More information about the U-Boot
mailing list