Greetings !

I'm adding the settings for our hardware (CTI Xtreme series board with 12 
ports) 
into rt_16550A driver and have encountered some strange point in its design.

The card has XR16V794/798 UARTs,  MMIO address shift between its ports is 0x200 
and whole address space of the card (acquired with pci_resource_len) is 16K. 

The native driver from CTI executes ioremap for 16K bytes, starting at the 
physical 
base address of the board, and then calculates the address of every port by 
adding 0x200*N to the remapped card base address. It works fine. 

xeno_16550A driver does the things 'inside out' : first calculates the 
physical base address of each port (card base address + 0x200*N) and 
then ioremap's hardcoded 8 bytes, starting from the physical base of 
each port. 
It didn't work on CTI card (ocassionally read few bytes of garbage from), 
even after remapping 512 bytes (the whole address shift) for each port.

I've hacked xeno_16550A, such that it does ioremap and address calculations 
in rt_16550_pci_probe(...), stores the remapped addresses in io[] array, 
and then in rt_16550_init_io(...) swaps the contents of io[] and mapped_io[] 
arrays. 
The result seems to work, but it's obvious hack and also it might break Moxa 
boards compatibility (although I can eventually check it on some Moxa board).

Could you suggest any better solution ?

Thank you !

Eugene


Evgeny Zemskov, Transas Ltd
[email protected]
Office phone # +7 812 3253131 add. 274-03
Cell phone # +7 952 3943129
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to