[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IOREMAP ISSUE!!!!!



Hello,

 

I am having a strange problem....I have 2 unix systems with the same PCI board.  System A is working and yields the following PCI layout:

 

 

            BAR                 SIZE                             TYPE

            0                      0x200                           memory

            1                      0x100                           I/O

            2                      0x4000000                    memory

            3                      0x10                             I/O

 

I am writing a device driver (2.6 kernel) for system B, (which is not working) and I get the same PCI layout as above EXCEPT the contents of system A's BAR 1  I/O memory show up in system B's   BAR 0 memory space.   I think the BAR 2 memory contents match up OK  but system B's   BAR 3 region is messed up also.   For some reason I cant ioremap my I/O regions.   I check all the return values from "pci_resource_start()", "pci_resource_len()", and "ioremap()" and they look reasonable.

 

My setup code is as follows for all 4 BAR areas:

 

            start = pci_resource_start(pdev, BAR1);

            len = pci_resource_len(pdev, BAR1);

            bar1_addr = ioremap_nocache(start, len);

 

To write to BAR1 area I use:

 

            iowrite_32(value, bar1_addr);

 

To read from BAR1 area I use:

 

            ioread_32(value, bar1_addr);

 

Is there anything I am missing here I am pulling my hair out trying to access this board!!!

 

Thank you for your time.