diff options
author | Adam Jackson <ajax@redhat.com> | 2009-11-18 13:53:49 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-12-09 12:19:10 -0500 |
commit | 5e8d4c19b4f618e22b6e8e1ad3294d8708067474 (patch) | |
tree | 1d4b4cba80c3f31cbeb71a8727e4647ce223f916 /include | |
parent | b2fbe63bdf3522c5d3df5eda2ca3c3b8770c02c9 (diff) |
I/O port access routines
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/pciaccess.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/pciaccess.h b/include/pciaccess.h index 8128656..88515e2 100644 --- a/include/pciaccess.h +++ b/include/pciaccess.h @@ -1,5 +1,6 @@ /* * (C) Copyright IBM Corporation 2006 + * Copyright 2009 Red Hat, Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -507,4 +508,22 @@ int pci_device_vgaarb_unlock (void); /* return the current device count + resource decodes for the device */ int pci_device_vgaarb_get_info (struct pci_device *dev, int *vga_count, int *rsrc_decodes); +/* + * I/O space access. + */ + +struct pci_io_handle; + +struct pci_io_handle *pci_device_open_io(struct pci_device *dev, pciaddr_t base, + pciaddr_t size); +struct pci_io_handle *pci_legacy_open_io(struct pci_device *dev, pciaddr_t base, + pciaddr_t size); +void pci_device_close_io(struct pci_device *dev, struct pci_io_handle *handle); +uint32_t pci_io_read32(struct pci_io_handle *handle, uint32_t reg); +uint16_t pci_io_read16(struct pci_io_handle *handle, uint32_t reg); +uint8_t pci_io_read8(struct pci_io_handle *handle, uint32_t reg); +void pci_io_write32(struct pci_io_handle *handle, uint32_t reg, uint32_t data); +void pci_io_write16(struct pci_io_handle *handle, uint32_t reg, uint16_t data); +void pci_io_write8(struct pci_io_handle *handle, uint32_t reg, uint8_t data); + #endif /* PCIACCESS_H */ |