Set DMA controller enable bit

DMA should be enabled before using it.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@862 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2010-09-11 16:39:32 +00:00
parent e00c8ab982
commit d3e7688833

View File

@@ -95,8 +95,8 @@ do_command(esp_private_t *esp, sd_private_t *sd, int cmdlen, int replylen)
// Set DMA length
esp->ll->regs[ESP_TCLOW] = cmdlen & 0xff;
esp->ll->regs[ESP_TCMED] = (cmdlen >> 8) & 0xff;
// Set DMA direction
esp->espdma.regs->cond_reg = 0;
// Set DMA direction and enable DMA
esp->espdma.regs->cond_reg = DMA_ENABLE;
// Set ATN, issue command
esp->ll->regs[ESP_CMD] = ESP_CMD_SELA | ESP_CMD_DMA;
// Wait for DMA to complete. Can this fail?
@@ -121,7 +121,7 @@ do_command(esp_private_t *esp, sd_private_t *sd, int cmdlen, int replylen)
esp->ll->regs[ESP_TCLOW] = replylen & 0xff;
esp->ll->regs[ESP_TCMED] = (replylen >> 8) & 0xff;
// Set DMA direction
esp->espdma.regs->cond_reg = DMA_ST_WRITE;
esp->espdma.regs->cond_reg = DMA_ST_WRITE | DMA_ENABLE;
// Transfer
esp->ll->regs[ESP_CMD] = ESP_CMD_TI | ESP_CMD_DMA;
// Wait for DMA to complete