Commit 1ac40451 authored by Kevin Brace's avatar Kevin Brace

Use unsigned long when performing PCI read / write

When thinking about 64-bit ISA environment, 32-bit PCI read / write
should be performed as a unsigned long type.
Signed-off-by: default avatarKevin Brace <kevinbrace@bracecomputerlab.com>
parent 866e109f
......@@ -807,7 +807,7 @@ typedef struct {
UShort ch70xx[64];
unsigned int sisMMIO85C0;
UChar sis6326tv[0x46];
unsigned int sisRegsPCI50, sisRegsPCIA0;
unsigned long sisRegsPCI50, sisRegsPCIA0;
UChar BIOSModeSave;
} SISRegRec, *SISRegPtr;
......@@ -1621,12 +1621,12 @@ extern int SiS_GetTVyscale(ScrnInfoPtr pScrn);
extern int SiS_GetSISCRT1SaturationGain(ScrnInfoPtr pScrn);
extern void SiS_SetSISCRT1SaturationGain(ScrnInfoPtr pScrn, int val);
extern unsigned int sis_pci_read_device_u32(int device, int offset);
extern unsigned long sis_pci_read_device_u32(int device, int offset);
extern unsigned char sis_pci_read_device_u8(int device, int offset);
extern unsigned int sis_pci_read_host_bridge_u32(int offset);
extern unsigned long sis_pci_read_host_bridge_u32(int offset);
extern unsigned char sis_pci_read_host_bridge_u8(int offset);
extern void sis_pci_write_host_bridge_u8(int offset, unsigned char value);
extern void sis_pci_write_host_bridge_u32(int offset, unsigned int value);
extern void sis_pci_write_host_bridge_u32(int offset, unsigned long value);
#endif /* _SIS_H_ */
......
......@@ -113,7 +113,7 @@ sis_get_device (int device)
return bridge;
}
unsigned int
unsigned long
sis_pci_read_device_u32(int device, int offset)
{
struct pci_device *host_bridge = sis_get_device(device);
......@@ -134,7 +134,7 @@ sis_pci_read_device_u8(int device, int offset)
}
void
sis_pci_write_host_bridge_u32(int offset, unsigned int value)
sis_pci_write_host_bridge_u32(int offset, unsigned long value)
{
struct pci_device *host_bridge = sis_get_device(0);
pci_device_cfg_write_u32(host_bridge, value, offset);
......@@ -148,7 +148,7 @@ sis_pci_write_host_bridge_u8(int offset, unsigned char value)
}
#else
unsigned int
unsigned long
sis_pci_read_device_u32(int device, int offset)
{
PCITAG tag = pciTag(0, device, 0);
......@@ -163,7 +163,7 @@ sis_pci_read_device_u8(int device, int offset)
}
void
sis_pci_write_host_bridge_u32(int offset, unsigned int value)
sis_pci_write_host_bridge_u32(int offset, unsigned long value)
{
pciWriteLong(0x00000000, offset, value);
}
......@@ -177,7 +177,7 @@ sis_pci_write_host_bridge_u8(int offset, unsigned char value)
#endif
unsigned int
unsigned long
sis_pci_read_host_bridge_u32(int offset)
{
return sis_pci_read_device_u32(0, offset);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment