patch for 64 bit wide flash
Adam Wozniak
adam.wozniak at comdev.cc
Thu Feb 14 11:16:20 EST 2002
in my physmap.c (I should probably check this in):
__u64 physmap_read64(struct map_info *map, unsigned long ofs)
{
#ifndef __raw_readll
#error Your architecture needs a __raw_readll in asm/io.h
#endif
return __raw_readll(map->map_priv_1 + ofs);
}
void physmap_write64(struct map_info *map, __u64 d, unsigned long adr)
{
#ifndef __raw_writell
#error Your architecture needs a __raw_writell in asm/io.h
#endif
__raw_writell(d, map->map_priv_1 + adr);
mb();
}
from my include/asm/io.h (this will vary from architecture to
architecture)
#define __raw_readll(addr) (*(volatile unsigned long long *)(addr))
#define __raw_writell(v, addr) (*(volatile unsigned long long *)(addr)
= (v))
(right next to __raw_writel and all those guys)
Allen Curtis wrote:
>
> I have another version of 64-bit bus support which does not change any of
> the variable types and only changes one function prototype. It probably is
> not as fast as this 64-bit version, assuming that it is really doing 64-bit
> bus accesses, but it is a very low impact solution.
Whether or not you really do 64 bit bus accesses is going to be compiler
dependant. If it does, then everything is good. If it doesn't, it most
likely won't be any worse than anything you come up with by hand. IMHO
it would be a shame to break this for people who have tools which really
do 64 bit accesses on architectures that can benefit from it.
--Adam
--
Adam Wozniak (KG6GZR) COM DEV Wireless - Digital and Software Systems
awozniak at comdev.cc 3450 Broad St. 107, San Luis Obispo, CA 93401
http://www.comdev.cc
Voice: (805) 544-1089 Fax: (805) 544-2055
More information about the linux-mtd
mailing list