From 760e8a893a44db73cc958eb281403dadf893960e Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 30 Jan 2013 01:51:12 -0300 Subject: [PATCH] ubb-la/ubb-la.c (xfers): revert to "safe" end-of-command synchronization This seems to be the best compromise between stability and performance. --- ubb-la/ubb-la.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ubb-la/ubb-la.c b/ubb-la/ubb-la.c index 9c478c1..22b9e57 100644 --- a/ubb-la/ubb-la.c +++ b/ubb-la/ubb-la.c @@ -191,21 +191,12 @@ static void xfers(unsigned long *bufs, int n_bufs, int nibbles, dma_setup(bufs[0], nibbles); while (1) { - int j; - MSC_STRPCL = MSC_STRPCRL_START_OP; MSC_CLKRT = fast_clk->clkrt; MSCCDR = 0; - /* - * Experimental value for 12 MSa/s with speedup to 84 MSa/s: - * hangs often with 29 cycles, hangs never (so far) with 30. - */ - for (j = 0; j != 30; j++) asm volatile (""); - -// while (MSC_STAT & MSC_STAT_DATA_FIFO_EMPTY); -// while (!(MSC_STAT & MSC_STAT_END_CMD_RES)); + while (!(MSC_STAT & MSC_STAT_END_CMD_RES)); IN(UBB_CMD);