[linux-cirrus] Re: EP93xx patch against linux-2.6.12 is out!

  • From: Michael Burian <dynmail1@xxxxxxxxxxxxxxxxx>
  • To: linux-cirrus@xxxxxxxxxxxxx
  • Date: Mon, 04 Jul 2005 08:47:38 +0200

Jesse Off wrote:
> This is a major source of frustration on our particular board design. 
> We actually have a real memory-mapped ISA (PC104) bus, but few Linux ISA
> device drivers will work because in*() macros seems have already been
> overloaded to point to AHB/APB space.

RMK said:

" - inl/outl and friends should not be used unless you're emulating PCI
or ISA IO space.  Use readl/writel etc."

This has been fixed in my linux-2.6.12-ep93xx.diff patch

>  What we do to cope is map our ISA
> bus spaces in kernel virtual memory and use a high address such as
> inb(0x8dc003f8) in drivers. Our ISA bus is mapped physically between
> 0x10000000 and 0x20000000, so this 0x8dc00000 is really an arbitrary
> number that eventually gets massaged by IO_ADDRESS() to hit the right spot.
> 
> Of course, a lot of ISA drivers won't work anyway because they
> manipulate IO addresses as "signed int" for which a 0x8xxx_xxxx addr is
> somewhat bad.

i see ;)

> They also make assumptions about IRQ numbering that don't
> apply on ARM (e.g. IRQ2 == IRQ9), but thats another problem altogether. 
yes


> Preferably, in*() and out*() would be reserved for the ISA IO bus space
> and another mechanism would be used for accessing internal SoC
> peripheral space.

yes, that's how it should be done, as far as I understand RMK

> Also, it would be nice if request_irq() could be
> reserved for x86 style IRQ's and something like ep93xx_request_irq()
> could be used for the real VIC irqs.
> 
haven't thought about this yet ==> another problem, too.

> Maybe this is already present, I personally haven't looked a lot at the
> new 2.6 stuff yet.
> 

It isn't present, but good news are that since inl/outl abuse has been
removed you should be able to undo the "overload" and replace it with
a mechanism that allows you to use inl and outl for what they're
intended for and with addresses low enought to prevent problems with
"signed int".

I'd like to continue with this on linux-arm-kernel, would you mind
posting your problem there again?

Other related posts: