j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: Sat Sep 11 18:39:32 2010 New Revision: 862 URL: http://tracker.coreboot.org/trac/openbios/changeset/862
Log: Set DMA controller enable bit
DMA should be enabled before using it.
Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/drivers/esp.c
Modified: trunk/openbios-devel/drivers/esp.c ============================================================================== --- trunk/openbios-devel/drivers/esp.c Mon Sep 6 22:56:54 2010 (r861) +++ trunk/openbios-devel/drivers/esp.c Sat Sep 11 18:39:32 2010 (r862) @@ -95,8 +95,8 @@ // 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 @@ 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