2 * Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Axel Dörfler, axeld@pinc-software.de
12 #include <KernelExport.h>
16 #include <kernel/lock.h>
19 #include "radeon_hd.h"
20 #include "radeon_hd_private.h"
25 #define read8(address) (*((volatile uint8*)(address)))
26 #define read16(address) (*((volatile uint16*)(address)))
27 #define read32(address) (*((volatile uint32*)(address)))
28 #define write8(address, data) (*((volatile uint8*)(address)) = (data))
29 #define write16(address, data) (*((volatile uint16*)(address)) = (data))
30 #define write32(address, data) (*((volatile uint32*)(address)) = (data))
33 extern char* gDeviceNames
[];
34 extern radeon_info
* gDeviceInfo
[];
35 extern pci_module_info
* gPCI
;
40 get_pci_config(pci_info
* info
, uint8 offset
, uint8 size
)
42 return gPCI
->read_pci_config(info
->bus
, info
->device
, info
->function
,
48 set_pci_config(pci_info
* info
, uint8 offset
, uint8 size
, uint32 value
)
50 gPCI
->write_pci_config(info
->bus
, info
->device
, info
->function
, offset
,