Rev 3031 | Rev 5078 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3031 | Rev 3764 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include |
1 | #include |
- | 2 | #include |
|
2 | #include |
3 | #include |
3 | #include |
4 | #include |
4 | #include |
5 | #include |
5 | #include |
6 | #include |
6 | #include |
7 | #include |
Line 633... | Line 634... | ||
633 | 634 | ||
Line 634... | Line 635... | ||
634 | /* Create a virtual mapping cookie for an IO port range */ |
635 | /* Create a virtual mapping cookie for an IO port range */ |
635 | void __iomem *ioport_map(unsigned long port, unsigned int nr) |
636 | void __iomem *ioport_map(unsigned long port, unsigned int nr) |
636 | { |
637 | { |
- | 638 | if (port > PIO_MASK) |
|
- | 639 | return NULL; |
|
637 | return (void __iomem *) port; |
640 | return (void __iomem *) (unsigned long) (port + PIO_OFFSET); |
638 | } |
641 | } |
Line 639... | Line 642... | ||
639 | 642 | ||
640 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
643 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) |
641 | { |
644 | { |
Line 784... | Line 787... | ||
784 | /* primary video rom always starts here */ |
787 | /* primary video rom always starts here */ |
785 | start = (loff_t)0xC0000; |
788 | start = (loff_t)0xC0000; |
786 | *size = 0x20000; /* cover C000:0 through E000:0 */ |
789 | *size = 0x20000; /* cover C000:0 through E000:0 */ |
787 | } else { |
790 | } else { |
788 | if (res->flags & (IORESOURCE_ROM_COPY | IORESOURCE_ROM_BIOS_COPY)) { |
791 | if (res->flags & |
- | 792 | (IORESOURCE_ROM_COPY | IORESOURCE_ROM_BIOS_COPY)) { |
|
789 | *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); |
793 | *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); |
790 | return (void __iomem *)(unsigned long) |
794 | return (void __iomem *)(unsigned long) |
791 | pci_resource_start(pdev, PCI_ROM_RESOURCE); |
795 | pci_resource_start(pdev, PCI_ROM_RESOURCE); |
792 | } else { |
796 | } else { |
793 | /* assign the ROM an address if it doesn't have one */ |
797 | /* assign the ROM an address if it doesn't have one */ |
794 | // if (res->parent == NULL && |
798 | // if (res->parent == NULL && |
Line 839... | Line 843... | ||
839 | if (!(res->flags & (IORESOURCE_ROM_ENABLE | IORESOURCE_ROM_SHADOW))) |
843 | if (!(res->flags & (IORESOURCE_ROM_ENABLE | IORESOURCE_ROM_SHADOW))) |
840 | pci_disable_rom(pdev); |
844 | pci_disable_rom(pdev); |
841 | } |
845 | } |
842 | 846 | ||
Line 843... | Line -... | ||
843 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask) |
- | |
844 | { |
- | |
845 | dev->dma_mask = mask; |
- | |
846 | - | ||
847 | return 0; |
- | |
848 | } |
- | |
849 | - | ||
850 | - | ||
851 | - | ||
852 | static void __pci_set_master(struct pci_dev *dev, bool enable) |
847 | static void __pci_set_master(struct pci_dev *dev, bool enable) |
853 | { |
848 | { |
854 | u16 old_cmd, cmd; |
849 | u16 old_cmd, cmd; |
Line 855... | Line 850... | ||
855 | 850 |