Removed excess logging in the PIIX code.
This commit is contained in:
@@ -159,7 +159,7 @@ void piix_write(int func, int addr, uint8_t val, void *priv)
|
|||||||
else
|
else
|
||||||
pci_set_mirq_routing(PCI_MIRQ0, val & 0xf);
|
pci_set_mirq_routing(PCI_MIRQ0, val & 0xf);
|
||||||
break;
|
break;
|
||||||
pclog("MIRQ0 is %s\n", (val & 0x20) ? "disabled" : "enabled");
|
/* pclog("MIRQ0 is %s\n", (val & 0x20) ? "disabled" : "enabled"); */
|
||||||
case 0x71:
|
case 0x71:
|
||||||
if (piix_type == 1)
|
if (piix_type == 1)
|
||||||
{
|
{
|
||||||
@@ -416,7 +416,9 @@ static void piix_bus_master_next_addr(int channel)
|
|||||||
{
|
{
|
||||||
DMAPageRead(piix_busmaster[channel].ptr_cur, (char *) &(piix_busmaster[channel].addr), 4);
|
DMAPageRead(piix_busmaster[channel].ptr_cur, (char *) &(piix_busmaster[channel].addr), 4);
|
||||||
DMAPageRead(piix_busmaster[channel].ptr_cur + 4, (char *) &(piix_busmaster[channel].count), 4);
|
DMAPageRead(piix_busmaster[channel].ptr_cur + 4, (char *) &(piix_busmaster[channel].count), 4);
|
||||||
|
#if 0
|
||||||
pclog("PIIX Bus master DWORDs: %08X %08X\n", piix_busmaster[channel].addr, piix_busmaster[channel].count);
|
pclog("PIIX Bus master DWORDs: %08X %08X\n", piix_busmaster[channel].addr, piix_busmaster[channel].count);
|
||||||
|
#endif
|
||||||
piix_busmaster[channel].eot = piix_busmaster[channel].count >> 31;
|
piix_busmaster[channel].eot = piix_busmaster[channel].count >> 31;
|
||||||
piix_busmaster[channel].count &= 0xfffe;
|
piix_busmaster[channel].count &= 0xfffe;
|
||||||
if (!piix_busmaster[channel].count)
|
if (!piix_busmaster[channel].count)
|
||||||
@@ -510,36 +512,50 @@ int piix_bus_master_dma_read(int channel, uint8_t *data, int transfer_length)
|
|||||||
if (!(piix_busmaster[channel].status & 1))
|
if (!(piix_busmaster[channel].status & 1))
|
||||||
return 1; /*DMA disabled*/
|
return 1; /*DMA disabled*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
pclog("PIIX Bus master read: %i bytes\n", transfer_length);
|
pclog("PIIX Bus master read: %i bytes\n", transfer_length);
|
||||||
|
#endif
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (piix_busmaster[channel].count <= transfer_length) {
|
if (piix_busmaster[channel].count <= transfer_length) {
|
||||||
|
#if 0
|
||||||
pclog("Writing %i bytes to %08X\n", piix_busmaster[channel].count, piix_busmaster[channel].addr);
|
pclog("Writing %i bytes to %08X\n", piix_busmaster[channel].count, piix_busmaster[channel].addr);
|
||||||
|
#endif
|
||||||
DMAPageWrite(piix_busmaster[channel].addr, (char *) (data + buffer_pos), piix_busmaster[channel].count);
|
DMAPageWrite(piix_busmaster[channel].addr, (char *) (data + buffer_pos), piix_busmaster[channel].count);
|
||||||
transfer_length -= piix_busmaster[channel].count;
|
transfer_length -= piix_busmaster[channel].count;
|
||||||
buffer_pos += piix_busmaster[channel].count;
|
buffer_pos += piix_busmaster[channel].count;
|
||||||
} else {
|
} else {
|
||||||
|
#if 0
|
||||||
pclog("Writing %i bytes to %08X\n", piix_busmaster[channel].count, piix_busmaster[channel].addr);
|
pclog("Writing %i bytes to %08X\n", piix_busmaster[channel].count, piix_busmaster[channel].addr);
|
||||||
|
#endif
|
||||||
DMAPageWrite(piix_busmaster[channel].addr, (char *) (data + buffer_pos), transfer_length);
|
DMAPageWrite(piix_busmaster[channel].addr, (char *) (data + buffer_pos), transfer_length);
|
||||||
transfer_length = 0;
|
transfer_length = 0;
|
||||||
force_end = 1;
|
force_end = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force_end) {
|
if (force_end) {
|
||||||
|
#if 0
|
||||||
pclog("Total transfer length smaller than sum of all blocks, partial block\n");
|
pclog("Total transfer length smaller than sum of all blocks, partial block\n");
|
||||||
|
#endif
|
||||||
piix_busmaster[channel].status &= ~2;
|
piix_busmaster[channel].status &= ~2;
|
||||||
return 0; /* This block has exhausted the data to transfer and it was smaller than the count, break. */
|
return 0; /* This block has exhausted the data to transfer and it was smaller than the count, break. */
|
||||||
} else {
|
} else {
|
||||||
if (!transfer_length && !piix_busmaster[channel].eot) {
|
if (!transfer_length && !piix_busmaster[channel].eot) {
|
||||||
|
#if 0
|
||||||
pclog("Total transfer length smaller than sum of all blocks, full block\n");
|
pclog("Total transfer length smaller than sum of all blocks, full block\n");
|
||||||
|
#endif
|
||||||
piix_busmaster[channel].status &= ~2;
|
piix_busmaster[channel].status &= ~2;
|
||||||
return 0; /* We have exhausted the data to transfer but there's more blocks left, break. */
|
return 0; /* We have exhausted the data to transfer but there's more blocks left, break. */
|
||||||
} else if (transfer_length && piix_busmaster[channel].eot) {
|
} else if (transfer_length && piix_busmaster[channel].eot) {
|
||||||
|
#if 0
|
||||||
pclog("Total transfer length greater than sum of all blocks\n");
|
pclog("Total transfer length greater than sum of all blocks\n");
|
||||||
|
#endif
|
||||||
piix_busmaster[channel].status |= 2;
|
piix_busmaster[channel].status |= 2;
|
||||||
return 1; /* There is data left to transfer but we have reached EOT - return with error. */
|
return 1; /* There is data left to transfer but we have reached EOT - return with error. */
|
||||||
} else if (piix_busmaster[channel].eot) {
|
} else if (piix_busmaster[channel].eot) {
|
||||||
|
#if 0
|
||||||
pclog("Regular EOT\n");
|
pclog("Regular EOT\n");
|
||||||
|
#endif
|
||||||
piix_busmaster[channel].status &= ~3;
|
piix_busmaster[channel].status &= ~3;
|
||||||
return 0; /* We have regularly reached EOT - clear status and break. */
|
return 0; /* We have regularly reached EOT - clear status and break. */
|
||||||
} else {
|
} else {
|
||||||
@@ -559,36 +575,50 @@ int piix_bus_master_dma_write(int channel, uint8_t *data, int transfer_length)
|
|||||||
if (!(piix_busmaster[channel].status & 1))
|
if (!(piix_busmaster[channel].status & 1))
|
||||||
return 1; /*DMA disabled*/
|
return 1; /*DMA disabled*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
pclog("PIIX Bus master write: %i bytes\n", transfer_length);
|
pclog("PIIX Bus master write: %i bytes\n", transfer_length);
|
||||||
|
#endif
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (piix_busmaster[channel].count <= transfer_length) {
|
if (piix_busmaster[channel].count <= transfer_length) {
|
||||||
|
#if 0
|
||||||
pclog("Reading %i bytes from %08X\n", piix_busmaster[channel].count, piix_busmaster[channel].addr);
|
pclog("Reading %i bytes from %08X\n", piix_busmaster[channel].count, piix_busmaster[channel].addr);
|
||||||
|
#endif
|
||||||
DMAPageRead(piix_busmaster[channel].addr, (char *) (data + buffer_pos), piix_busmaster[channel].count);
|
DMAPageRead(piix_busmaster[channel].addr, (char *) (data + buffer_pos), piix_busmaster[channel].count);
|
||||||
transfer_length -= piix_busmaster[channel].count;
|
transfer_length -= piix_busmaster[channel].count;
|
||||||
buffer_pos += piix_busmaster[channel].count;
|
buffer_pos += piix_busmaster[channel].count;
|
||||||
} else {
|
} else {
|
||||||
|
#if 0
|
||||||
pclog("Reading %i bytes from %08X\n", piix_busmaster[channel].count, piix_busmaster[channel].addr);
|
pclog("Reading %i bytes from %08X\n", piix_busmaster[channel].count, piix_busmaster[channel].addr);
|
||||||
|
#endif
|
||||||
DMAPageRead(piix_busmaster[channel].addr, (char *) (data + buffer_pos), transfer_length);
|
DMAPageRead(piix_busmaster[channel].addr, (char *) (data + buffer_pos), transfer_length);
|
||||||
transfer_length = 0;
|
transfer_length = 0;
|
||||||
force_end = 1;
|
force_end = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force_end) {
|
if (force_end) {
|
||||||
|
#if 0
|
||||||
pclog("Total transfer length smaller than sum of all blocks, partial block\n");
|
pclog("Total transfer length smaller than sum of all blocks, partial block\n");
|
||||||
|
#endif
|
||||||
piix_busmaster[channel].status &= ~2;
|
piix_busmaster[channel].status &= ~2;
|
||||||
return 0; /* This block has exhausted the data to transfer and it was smaller than the count, break. */
|
return 0; /* This block has exhausted the data to transfer and it was smaller than the count, break. */
|
||||||
} else {
|
} else {
|
||||||
if (!transfer_length && !piix_busmaster[channel].eot) {
|
if (!transfer_length && !piix_busmaster[channel].eot) {
|
||||||
|
#if 0
|
||||||
pclog("Total transfer length smaller than sum of all blocks, full block\n");
|
pclog("Total transfer length smaller than sum of all blocks, full block\n");
|
||||||
|
#endif
|
||||||
piix_busmaster[channel].status &= ~2;
|
piix_busmaster[channel].status &= ~2;
|
||||||
return 0; /* We have exhausted the data to transfer but there's more blocks left, break. */
|
return 0; /* We have exhausted the data to transfer but there's more blocks left, break. */
|
||||||
} else if (transfer_length && piix_busmaster[channel].eot) {
|
} else if (transfer_length && piix_busmaster[channel].eot) {
|
||||||
|
#if 0
|
||||||
pclog("Total transfer length greater than sum of all blocks\n");
|
pclog("Total transfer length greater than sum of all blocks\n");
|
||||||
|
#endif
|
||||||
piix_busmaster[channel].status |= 2;
|
piix_busmaster[channel].status |= 2;
|
||||||
return 1; /* There is data left to transfer but we have reached EOT - return with error. */
|
return 1; /* There is data left to transfer but we have reached EOT - return with error. */
|
||||||
} else if (piix_busmaster[channel].eot) {
|
} else if (piix_busmaster[channel].eot) {
|
||||||
|
#if 0
|
||||||
pclog("Regular EOT\n");
|
pclog("Regular EOT\n");
|
||||||
|
#endif
|
||||||
piix_busmaster[channel].status &= ~3;
|
piix_busmaster[channel].status &= ~3;
|
||||||
return 0; /* We have regularly reached EOT - clear status and break. */
|
return 0; /* We have regularly reached EOT - clear status and break. */
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user