Nico Huber | b0f8326 | 2014-01-01 20:47:55 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 Nico Huber <nico.h@gmx.de> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; version 2 of the License. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
Nico Huber | b0f8326 | 2014-01-01 20:47:55 +0100 | [diff] [blame] | 12 | */ |
| 13 | |
| 14 | |
| 15 | #ifndef _DEVICE_DEVICE_H |
| 16 | #define _DEVICE_DEVICE_H |
| 17 | |
| 18 | #include <pci/pci.h> |
| 19 | |
| 20 | typedef struct pci_dev *pci_devfn_t; |
| 21 | |
| 22 | #define pci_read_config8 pci_read_byte |
| 23 | #define pci_read_config16 pci_read_word |
| 24 | #define pci_read_config32 pci_read_long |
| 25 | |
| 26 | #define PCI_CAP_ID_EHCI_DEBUG PCI_CAP_ID_DBG |
| 27 | |
| 28 | extern struct pci_access *pci_access; |
| 29 | #define PCI_DEV(b, d, f) pci_get_dev(pci_access, 0, b, d, f) |
| 30 | |
| 31 | #endif |