/* * The NOR flash is connected to the same external bus unit (EBU) as PCI. * To make PCI work we need to enable the endianness swapping for the address * written to the EBU. This endianness swapping works for PCI correctly but * fails for attached NOR devices. To workaround this we need to use a complex * map. The workaround involves swapping all addresses whilst probing the chip. * Once probing is complete we stop swapping the addresses but swizzle the * unlock addresses to ensure that access to the NOR device works correctly.
*/
/* * The following 2 functions copy data between iomem and a cached memory * section. As memcpy() makes use of pre-fetching we cannot use it here. * The normal alternative of using memcpy_{to,from}io also makes use of * memcpy() on MIPS so it is not applicable either. We are therefore stuck * with having to use our own loop.
*/ staticvoid
ltq_copy_from(struct map_info *map, void *to, unsignedlong from, ssize_t len)
{ unsignedchar *f = (unsignedchar *)map->virt + from; unsignedchar *t = (unsignedchar *)to; unsignedlong flags;
spin_lock_irqsave(&ebu_lock, flags); while (len--)
*t++ = *f++;
spin_unlock_irqrestore(&ebu_lock, flags);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.