Subversion Repositories Kolibri OS

Rev

Rev 7143 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7143 Rev 9078
Line 915... Line 915...
915
int pci_generic_config_write32(struct pci_bus *bus, unsigned int devfn,
915
int pci_generic_config_write32(struct pci_bus *bus, unsigned int devfn,
916
			       int where, int size, u32 val);
916
			       int where, int size, u32 val);
Line 917... Line 917...
917
 
917
 
Line -... Line 918...
-
 
918
struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops);
-
 
919
 
918
struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops);
920
 
919
 
921
#if 0
920
static inline int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val)
922
static inline int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val)
921
{
923
{
922
	*val = PciRead8(dev->busnr, dev->devfn, where);
924
	*val = PciRead8(dev->busnr, dev->devfn, where);
Line 947... Line 949...
947
					 u32 val)
949
					 u32 val)
948
{
950
{
949
	PciWrite32(dev->busnr, dev->devfn, where, val);
951
	PciWrite32(dev->busnr, dev->devfn, where, val);
950
	return 1;
952
	return 1;
951
}
953
}
-
 
954
#endif
-
 
955
 
-
 
956
static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val)
-
 
957
{
-
 
958
    *val = PciRead8(dev->busnr, dev->devfn, where);
-
 
959
    return 0;
-
 
960
}
-
 
961
 
-
 
962
static inline int pci_read_config_word(struct pci_dev *dev, int where, u16 *val)
-
 
963
{
-
 
964
 
-
 
965
    if ( where & 1)
-
 
966
        return PCIBIOS_BAD_REGISTER_NUMBER;
-
 
967
    *val = PciRead16(dev->busnr, dev->devfn, where);
-
 
968
    return 0;
-
 
969
}
-
 
970
 
-
 
971
static inline int pci_read_config_dword(struct pci_dev *dev, int where, u32 *val)
-
 
972
{
-
 
973
 
-
 
974
    if ( where & 3)
-
 
975
        return PCIBIOS_BAD_REGISTER_NUMBER;
-
 
976
    *val = PciRead32(dev->busnr, dev->devfn, where);
-
 
977
    return 0;
-
 
978
}
-
 
979
 
-
 
980
static inline int pci_write_config_byte(struct pci_dev *dev, int where, u8 val)
-
 
981
{
-
 
982
    PciWrite8(dev->busnr, dev->devfn, where, val);
-
 
983
    return 0;
-
 
984
};
-
 
985
 
-
 
986
static inline int pci_write_config_word(struct pci_dev *dev, int where, u16 val)
-
 
987
{
-
 
988
    if ( where & 1)
-
 
989
        return PCIBIOS_BAD_REGISTER_NUMBER;
-
 
990
    PciWrite16(dev->busnr, dev->devfn, where, val);
-
 
991
    return 0;
-
 
992
}
-
 
993
 
-
 
994
static inline int pci_write_config_dword(struct pci_dev *dev, int where,
-
 
995
                     u32 val)
-
 
996
{
-
 
997
    if ( where & 3)
-
 
998
        return PCIBIOS_BAD_REGISTER_NUMBER;
-
 
999
    PciWrite32(dev->busnr, dev->devfn, where, val);
-
 
1000
    return 0;
-
 
1001
}
-
 
1002
 
Line 952... Line 1003...
952
 
1003
 
953
int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val);
1004
int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val);
954
int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *val);
1005
int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *val);
955
int pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val);
1006
int pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val);
Line 1434... Line 1485...
1434
#define _PCI_NOP_ALL(o, x)	_PCI_NOP(o, byte, u8 x) \
1485
#define _PCI_NOP_ALL(o, x)	_PCI_NOP(o, byte, u8 x) \
1435
				_PCI_NOP(o, word, u16 x) \
1486
				_PCI_NOP(o, word, u16 x) \
1436
				_PCI_NOP(o, dword, u32 x)
1487
				_PCI_NOP(o, dword, u32 x)
1437
_PCI_NOP_ALL(read, *)
1488
_PCI_NOP_ALL(read, *)
1438
_PCI_NOP_ALL(write,)
1489
_PCI_NOP_ALL(write,)
1439
 
1490
/*
1440
static inline struct pci_dev *pci_get_device(unsigned int vendor,
1491
static inline struct pci_dev *pci_get_device(unsigned int vendor,
1441
					     unsigned int device,
1492
					     unsigned int device,
1442
					     struct pci_dev *from)
1493
					     struct pci_dev *from)
1443
{ return NULL; }
1494
{ return NULL; }*/
Line 1444... Line 1495...
1444
 
1495
 
1445
static inline struct pci_dev *pci_get_subsys(unsigned int vendor,
1496
static inline struct pci_dev *pci_get_subsys(unsigned int vendor,
1446
					     unsigned int device,
1497
					     unsigned int device,
1447
					     unsigned int ss_vendor,
1498
					     unsigned int ss_vendor,