OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 1696 to Rev 1697
    Reverse comparison

Rev 1696 → Rev 1697

/trunk/or1ksim/peripheral/atadevice_cmdi.c
34,41 → 34,7
 
DEFAULT_DEBUG_CHANNEL(ata);
 
int ata_device_execute_cmd(ata_device *device)
{
/*display debug information */
TRACE("ata_device_execute_command called with command = 0x%02X\n",
device->regs.command);
 
/* execute the commands */
switch (device->regs.command) {
case DEVICE_RESET :
ata_device_reset_cmd(device);
return 0;
 
case EXECUTE_DEVICE_DIAGNOSTICS :
ata_execute_device_diagnostics_cmd(device);
return 0;
 
case IDENTIFY_DEVICE :
ata_identify_device_cmd(device);
return 0;
 
case INITIALIZE_DEVICE_PARAMETERS :
ata_initialize_device_parameters_cmd(device);
return 0;
 
case READ_SECTORS :
ata_read_sectors_cmd(device);
 
default :
return -1;
}
}
 
 
 
/*
A T A _ S E T _ D E V I C E _ S I G N A T U R E
 
97,21 → 63,6
 
 
/*
A T A _ D E V I C E _ R E S E T
*/
void ata_device_reset_cmd(ata_device *device)
{
/* print debug information */
TRACE("executing command 'device reset'\n");
 
if (!device->conf.packet)
WARN("executing DEVICE_RESET on non-packet device.");
 
ata_execute_device_diagnostics_cmd(device);
}
 
 
/*
A T A _ E X E C U T E _ D E V I C E _ D I A G N O S T I C S
*/
void ata_execute_device_diagnostics_cmd(ata_device *device)
162,11 → 113,25
}
 
 
/*
A T A _ D E V I C E _ R E S E T
*/
static void ata_device_reset_cmd(ata_device *device)
{
/* print debug information */
TRACE("executing command 'device reset'\n");
 
if(!device->conf.packet)
WARN("executing DEVICE_RESET on non-packet device.");
 
ata_execute_device_diagnostics_cmd(device);
}
 
 
/*
A T A _ I D E N T I F Y _ D E V I C E
*/
void ata_identify_device_cmd(ata_device *device)
static void ata_identify_device_cmd(ata_device *device)
{
unsigned char *chksum_buf, chksum;
unsigned short *buf;
835,7 → 800,7
/*
A T A _ I N I T I A L I Z E _ D E V I C E _ P A R A M E T E R S
*/
void ata_initialize_device_parameters_cmd(ata_device *device)
static void ata_initialize_device_parameters_cmd(ata_device *device)
{
/* print debug information */
TRACE("executing command 'initialize device parameters'\n");
851,7 → 816,7
/*
A T A _ R E A D _ S E C T O R S
*/
void ata_read_sectors_cmd(ata_device *device)
static void ata_read_sectors_cmd(ata_device *device)
{
size_t sector_count;
unsigned long lba;
925,3 → 890,36
}
 
 
int ata_device_execute_cmd(ata_device *device)
{
/*display debug information */
TRACE("ata_device_execute_command called with command = 0x%02X\n",
device->regs.command);
 
/* execute the commands */
switch (device->regs.command) {
case DEVICE_RESET :
ata_device_reset_cmd(device);
return 0;
 
case EXECUTE_DEVICE_DIAGNOSTICS :
ata_execute_device_diagnostics_cmd(device);
return 0;
 
case IDENTIFY_DEVICE :
ata_identify_device_cmd(device);
return 0;
 
case INITIALIZE_DEVICE_PARAMETERS :
ata_initialize_device_parameters_cmd(device);
return 0;
 
case READ_SECTORS :
ata_read_sectors_cmd(device);
 
default :
return -1;
}
}
 
 
/trunk/or1ksim/peripheral/atadevice_cmdi.h
112,8 → 112,4
*/
int ata_device_execute_cmd(ata_device *device);
 
void ata_device_reset_cmd(ata_device *device);
void ata_execute_device_diagnostics_cmd(ata_device *device);
void ata_identify_device_cmd(ata_device *device);
void ata_initialize_device_parameters_cmd(ata_device *device);
void ata_read_sectors_cmd(ata_device *device);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.