Lines Matching full:risc
299 static int cx25821_risc_decode(u32 risc) in cx25821_risc_decode() argument
331 risc, instr[risc >> 28] ? instr[risc >> 28] : "INVALID"); in cx25821_risc_decode()
333 if (risc & (1 << (i + 12))) in cx25821_risc_decode()
336 pr_cont(" count=%d ]\n", risc & 0xfff); in cx25821_risc_decode()
337 return incr[risc >> 28] ? incr[risc >> 28] : 1; in cx25821_risc_decode()
426 unsigned int bpl, u32 risc) in cx25821_sram_channel_setup() argument
468 cx_write(ch->cmds_start + 0, risc); in cx25821_sram_channel_setup()
494 unsigned int bpl, u32 risc) in cx25821_sram_channel_setup_audio() argument
532 cx_write(ch->cmds_start + 0, risc); in cx25821_sram_channel_setup_audio()
562 "init risc lo", in cx25821_sram_channel_dump()
563 "init risc hi", in cx25821_sram_channel_dump()
568 "risc pc lo", in cx25821_sram_channel_dump()
569 "risc pc hi", in cx25821_sram_channel_dump()
577 u32 risc; in cx25821_sram_channel_dump() local
587 risc = cx_read(ch->cmds_start + 4 * (i + 14)); in cx25821_sram_channel_dump()
588 pr_warn("cmds + 0x%2x: risc%d: ", j + i * 4, i); in cx25821_sram_channel_dump()
589 i += cx25821_risc_decode(risc); in cx25821_sram_channel_dump()
593 risc = cx_read(ch->ctrl_start + 4 * i); in cx25821_sram_channel_dump()
598 n = cx25821_risc_decode(risc); in cx25821_sram_channel_dump()
600 risc = cx_read(ch->ctrl_start + 4 * (i + j)); in cx25821_sram_channel_dump()
602 4 * (i + j), i + j, risc, j); in cx25821_sram_channel_dump()
624 "init risc lo", in cx25821_sram_channel_dump_audio()
625 "init risc hi", in cx25821_sram_channel_dump_audio()
630 "risc pc lo", in cx25821_sram_channel_dump_audio()
631 "risc pc hi", in cx25821_sram_channel_dump_audio()
640 u32 risc, value, tmp; in cx25821_sram_channel_dump_audio() local
653 risc = cx_read(ch->cmds_start + 4 * (i + 14)); in cx25821_sram_channel_dump_audio()
654 pr_warn("cmds + 0x%2x: risc%d: ", j + i * 4, i); in cx25821_sram_channel_dump_audio()
655 i += cx25821_risc_decode(risc); in cx25821_sram_channel_dump_audio()
659 risc = cx_read(ch->ctrl_start + 4 * i); in cx25821_sram_channel_dump_audio()
664 n = cx25821_risc_decode(risc); in cx25821_sram_channel_dump_audio()
667 risc = cx_read(ch->ctrl_start + 4 * (i + j)); in cx25821_sram_channel_dump_audio()
669 4 * (i + j), i + j, risc, j); in cx25821_sram_channel_dump_audio()
687 risc = cx_read(ch->cmds_start + 56 + (i * 4)); in cx25821_sram_channel_dump_audio()
688 pr_warn("instruction %d = 0x%x\n", i, risc); in cx25821_sram_channel_dump_audio()
692 risc = cx_read(AUD_A_CDT); in cx25821_sram_channel_dump_audio()
693 pr_warn("\nread cdt loc=0x%x\n", risc); in cx25821_sram_channel_dump_audio()
695 n = cx_read(risc + i * 4); in cx25821_sram_channel_dump_audio()
732 /* disable RISC controller */ in cx25821_shutdown()
973 struct cx25821_riscmem *risc, in cx25821_riscmem_alloc() argument
979 if (NULL != risc->cpu && risc->size < size) in cx25821_riscmem_alloc()
980 pci_free_consistent(pci, risc->size, risc->cpu, risc->dma); in cx25821_riscmem_alloc()
981 if (NULL == risc->cpu) { in cx25821_riscmem_alloc()
985 risc->cpu = cpu; in cx25821_riscmem_alloc()
986 risc->dma = dma; in cx25821_riscmem_alloc()
987 risc->size = size; in cx25821_riscmem_alloc()
1055 int cx25821_risc_buffer(struct pci_dev *pci, struct cx25821_riscmem *risc, in cx25821_risc_buffer() argument
1071 /* estimate risc mem: worst case is one write per page border + in cx25821_risc_buffer()
1079 rc = cx25821_riscmem_alloc(pci, risc, instructions * 12); in cx25821_risc_buffer()
1084 /* write risc instructions */ in cx25821_risc_buffer()
1085 rp = risc->cpu; in cx25821_risc_buffer()
1098 risc->jmp = rp; in cx25821_risc_buffer()
1099 BUG_ON((risc->jmp - risc->cpu + 3) * sizeof(*risc->cpu) > risc->size); in cx25821_risc_buffer()
1166 struct cx25821_riscmem *risc, in cx25821_risc_databuffer_audio() argument
1175 /* estimate risc mem: worst case is one write per page border + in cx25821_risc_databuffer_audio()
1183 rc = cx25821_riscmem_alloc(pci, risc, instructions * 12); in cx25821_risc_databuffer_audio()
1187 /* write risc instructions */ in cx25821_risc_databuffer_audio()
1188 rp = risc->cpu; in cx25821_risc_databuffer_audio()
1193 risc->jmp = rp; in cx25821_risc_databuffer_audio()
1194 BUG_ON((risc->jmp - risc->cpu + 2) * sizeof(*risc->cpu) > risc->size); in cx25821_risc_databuffer_audio()
1202 if (WARN_ON(buf->risc.size == 0)) in cx25821_free_buffer()
1205 buf->risc.size, buf->risc.cpu, buf->risc.dma); in cx25821_free_buffer()
1206 memset(&buf->risc, 0, sizeof(buf->risc)); in cx25821_free_buffer()