> > How so? See the memory map I just sent in my other mail. Should I be
> > adding isa_slot_offset to calls to check/request/release_mem_region?
> > Or should I make a isa_{check,request,release}_mem_region that adds
> > this in? In which case, doesn't that turn /proc/iomem into a general
> > memory map rather than an I/O memory map?
>
> It's a general memory map. Basically you have an memory address space
> and an I/O space. The latter should be treated as an entirely independant
> thing just like on x86 where special instructions (in / out) are necessary
> to access it. On MIPS the difference is more blurry as this I/O port
> addres space is accessible through normal load / store instructions.
The ports are dealt with by /proc/ioports. What about /proc/iomem?
The ISA ports and ISA memory are seperate, and the ports work fine and
just as I would expect them to. But for memory, where should the
PCMCIA driver be reserving space? Should I
1) make /proc/iomem contain addresses relative to the start of I/O memory,
just as /proc/ioports contains addresses relative to the start of
I/O port space? This will only work if I stop letting the kernel
reserve the iomem resource for system memory.
2) make the i82365 driver use absolute addresses in /proc/iomem, by
adding (isa_slot_offset - KSEG1) to all *_mem_resource calls?
(breaks i82365 for other arches)
3) Invent a new resource "isamem", reserve the correct absolute
addresses in "iomem", and the modify the i82365 driver to use
"isamem" instead? (again breaks i82365 for other arches)
> Well, calling ioremap anyway is ok.
How is calling ioremap anyway ok? If I
1) call ioremap and then use read[bwl], then isa_slot_offset never
comes into play and nothing works
2) call ioremap and then use isa_read[bwl], then KSEG1 gets included
twice and nothing works
> The whole isa_* thing was invented to
> make keeping the large number of antique ISA drivers that don't have any
> maintainers alive.
I'm willing to take the "maintainer" role here and rewrite the driver
properly, but I'm still not understanding what the proper way is.
Given the current way the I/O memory is handled on MIPS, the only way
I can get the i82365 driver working breaks it for every other arch.
-jim
|