[PATCH V5 06/10] MIPS: lantiq: add NOR flash support
John Crispin
blogic at openwrt.org
Mon Apr 4 09:36:52 EDT 2011
Hi Artem
thanks for the feedback, comments inline
>
>> +ltq_copy_from(struct map_info *map, void *to,
>> + unsigned long from, ssize_t len)
>> +{
>> + unsigned char *f = (unsigned char *) (map->virt + from);
>> + unsigned char *t = (unsigned char *) to;
>> + unsigned long flags;
>> +
>> + spin_lock_irqsave(&ebu_lock, flags);
>> + while (len--)
>> + *t++ = *f++;
>> + spin_unlock_irqrestore(&ebu_lock, flags);
>>
> Can you use memcpy here instead?
>
>
as we are copying to/from iomem, we cannot use memcpy as the
pre-fetching breaks the copy process. the normal alternative is to use
memcpy_to/fromio, however on MIPS this breaks down to a normal memcpy.
i will fold your comments into the patch and resend it ASAP
thanks, John
More information about the linux-mtd
mailing list