/* * Copyright © 2009 Jerome Glisse * * This file is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef RADEON_PCI_H #define RADEON_PCI_H #include #include #include #define PERR(fmt, args...) \ fprintf(stderr, "EE %s:%d %s - "fmt, __FILE__, __LINE__, __func__, ##args) struct radeon_pci { struct pci_device *dev; unsigned char * volatile mmio; pciaddr_t mmio_base; pciaddr_t mmio_size; }; int radeon_pci_init(struct radeon_pci *pradeon); void radeon_pci_fini(struct radeon_pci *pradeon); uint32_t radeon_mmio_rd32(struct radeon_pci *pradeon, uint32_t offset); void radeon_mmio_wr32(struct radeon_pci *pradeon, uint32_t offset, uint32_t value); #endif