1
0
Fork 0

wbsd: remove block crc test

Block completion interrupts occur faster than we can process
them, so just ignore them competely.

Commit also fixes up some incorrect register defines.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
hifive-unleashed-5.1
Pierre Ossman 2007-04-13 23:25:59 +02:00
parent 976d9276c8
commit 5721dbf217
2 changed files with 3 additions and 34 deletions

View File

@ -178,9 +178,8 @@ static void wbsd_init_device(struct wbsd_host *host)
ier = 0;
ier |= WBSD_EINT_CARD;
ier |= WBSD_EINT_FIFO_THRE;
ier |= WBSD_EINT_CCRC;
ier |= WBSD_EINT_TIMEOUT;
ier |= WBSD_EINT_CRC;
ier |= WBSD_EINT_TIMEOUT;
ier |= WBSD_EINT_TC;
outb(ier, host->base + WBSD_EIR);
@ -1166,30 +1165,6 @@ end:
spin_unlock(&host->lock);
}
static void wbsd_tasklet_block(unsigned long param)
{
struct wbsd_host *host = (struct wbsd_host *)param;
struct mmc_data *data;
spin_lock(&host->lock);
if ((wbsd_read_index(host, WBSD_IDX_CRCSTATUS) & WBSD_CRC_MASK) !=
WBSD_CRC_OK) {
data = wbsd_get_data(host);
if (!data)
goto end;
DBGF("CRC error\n");
data->error = MMC_ERR_BADCRC;
tasklet_schedule(&host->finish_tasklet);
}
end:
spin_unlock(&host->lock);
}
/*
* Interrupt handling
*/
@ -1220,8 +1195,6 @@ static irqreturn_t wbsd_irq(int irq, void *dev_id)
tasklet_hi_schedule(&host->crc_tasklet);
if (isr & WBSD_INT_TIMEOUT)
tasklet_hi_schedule(&host->timeout_tasklet);
if (isr & WBSD_INT_BUSYEND)
tasklet_hi_schedule(&host->block_tasklet);
if (isr & WBSD_INT_TC)
tasklet_schedule(&host->finish_tasklet);
@ -1522,8 +1495,6 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
(unsigned long)host);
tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish,
(unsigned long)host);
tasklet_init(&host->block_tasklet, wbsd_tasklet_block,
(unsigned long)host);
return 0;
}
@ -1542,7 +1513,6 @@ static void __devexit wbsd_release_irq(struct wbsd_host *host)
tasklet_kill(&host->crc_tasklet);
tasklet_kill(&host->timeout_tasklet);
tasklet_kill(&host->finish_tasklet);
tasklet_kill(&host->block_tasklet);
}
/*

View File

@ -46,10 +46,10 @@
#define WBSD_EINT_CARD 0x40
#define WBSD_EINT_FIFO_THRE 0x20
#define WBSD_EINT_CCRC 0x10
#define WBSD_EINT_CRC 0x10
#define WBSD_EINT_TIMEOUT 0x08
#define WBSD_EINT_PROGEND 0x04
#define WBSD_EINT_CRC 0x02
#define WBSD_EINT_BUSYEND 0x02
#define WBSD_EINT_TC 0x01
#define WBSD_INT_PENDING 0x80
@ -180,7 +180,6 @@ struct wbsd_host
struct tasklet_struct crc_tasklet;
struct tasklet_struct timeout_tasklet;
struct tasklet_struct finish_tasklet;
struct tasklet_struct block_tasklet;
struct timer_list ignore_timer; /* Ignore detection timer */
};