make sure PCI command register is setup correctly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22321 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
44e2fd093c
commit
63f9ffef37
@ -80,6 +80,12 @@ AHCIController::Init()
|
||||
TRACE("satacr0 = 0x%08lx, satacr1 = 0x%08lx\n", satacr0, satacr1);
|
||||
}
|
||||
|
||||
uint16 pcicmd = gPCI->read_pci_config(fPCIDevice, PCI_command, 2);
|
||||
TRACE("pcicmd old 0x%04x\n", pcicmd);
|
||||
pcicmd = PCI_PCICMD_BME | PCI_PCICMD_MSE | (pcicmd & ~PCI_PCICMD_IOS);
|
||||
TRACE("pcicmd new 0x%04x\n", pcicmd);
|
||||
gPCI->write_pci_config(fPCIDevice, PCI_command, 2, pcicmd);
|
||||
|
||||
void *addr = (void *)pciInfo.u.h0.base_registers[5];
|
||||
size_t size = pciInfo.u.h0.base_register_sizes[5];
|
||||
|
||||
|
@ -219,6 +219,10 @@ extern scsi_for_sim_interface *gSCSI;
|
||||
#define HI32(val) (((uint64)(val)) >> 32)
|
||||
#define ASSERT(expr) if (expr) {} else panic(#expr)
|
||||
|
||||
#define PCI_PCICMD_IOS 0x01
|
||||
#define PCI_PCICMD_MSE 0x02
|
||||
#define PCI_PCICMD_BME 0x04
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
template <class T>
|
||||
|
Loading…
Reference in New Issue
Block a user