396 devc->dma_allocated = 0;
397 }
398 spin_unlock_irqrestore(&devc->lock,flags);
399 return;
400}
401
402static void sscape_coproc_reset(void *dev_info)
403{
404}
405
406static int sscape_download_boot(struct sscape_info *devc, unsigned char *block, int size, int flag)
407{
408 unsigned long flags;
409 unsigned char temp;
410 volatile int done, timeout_val;
411 static unsigned char codec_dma_bits;
412
413 if (flag & CPF_FIRST)
414 {
415
416
417
418
419
420 spin_lock_irqsave(&devc->lock,flags);
421 codec_dma_bits = sscape_read(devc, GA_CDCFG_REG);
422
423 if (devc->dma_allocated == 0)
424 devc->dma_allocated = 1;
425
426 spin_unlock_irqrestore(&devc->lock,flags);
427
428 sscape_write(devc, GA_HMCTL_REG,
429 (temp = sscape_read(devc, GA_HMCTL_REG)) & 0x3f);
430
431 for (timeout_val = 10000; timeout_val > 0; timeout_val--)
432 sscape_read(devc, GA_HMCTL_REG);
433
434
435 sscape_write(devc, GA_HMCTL_REG,
436 (temp = sscape_read(devc, GA_HMCTL_REG)) | 0x80);