URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 1698 to Rev 1699
- ↔ Reverse comparison
Rev 1698 → Rev 1699
/trunk/or1ksim/peripheral/atadevice_cmdi.c
47,18 → 47,15
|
called whenever a command needs to signal the device type (packet, non-packet) |
*/ |
void ata_set_device_signature(ata_device *device, int signature) |
static void ata_set_device_signature(ata_device *device, int packet) |
{ |
if (signature) |
{ |
if(packet) { |
/* place PACKET Command feature set signature in register block */ |
device->regs.sector_count = 0x01; |
device->regs.sector_number = 0x01; |
device->regs.cylinder_low = 0x14; |
device->regs.cylinder_high = 0xEB; |
} |
else |
{ |
} else { |
/* place NON_PACKET Command feature set signature in register block */ |
device->regs.sector_count = 0x01; |
device->regs.sector_number = 0x01; |
95,9 → 92,9
|
|
/* check if device implements packet protocol */ |
if (device->conf.packet) { |
if(device->conf.packet) { |
/* place PACKET command feature set signature in register block */ |
ata_set_device_signature(device, PACKET_SIGNATURE); |
ata_set_device_signature(device, 1); |
|
device->regs.status &= 0xf8; |
|
109,7 → 106,7
else |
{ |
/* place NON_PACKET Command feature set signature in register block */ |
ata_set_device_signature(device, !PACKET_SIGNATURE); |
ata_set_device_signature(device, 0); |
|
device->regs.status &= 0x82; |
} |
220,7 → 217,7
*/ |
TRACE("'identify_device' command: This is a PACKET device\n"); |
|
ata_set_device_signature(device, PACKET_SIGNATURE); |
ata_set_device_signature(device, 1); |
device->regs.status = ATA_SR_ERR; |
device->regs.error = ATA_ERR_ABT; |
} |
840,7 → 837,7
*/ |
TRACE("'identify_device' command: This is a PACKET device\n"); |
|
ata_set_device_signature(device, PACKET_SIGNATURE); |
ata_set_device_signature(device, 1); |
device->regs.status = ATA_SR_ERR; |
device->regs.error = ATA_ERR_ABT; |
} |
/trunk/or1ksim/peripheral/atadevice_cmdi.h
99,12 → 99,6
#define QUEUE_DEPTH 0 |
|
|
|
/**********************************************************************/ |
/* Internal defines */ |
#define PACKET_SIGNATURE 1 |
|
|
/* |
---------------- |
-- Prototypes -- |