• Home
  • Raw
  • Download

Lines Matching +full:cpu +full:- +full:offset

1 // SPDX-License-Identifier: GPL-2.0-or-later
10 * acknowledged. Full credit goes to them - any problems within this code
25 * @sglist: pointer to "scatter-gather list" of buffer pointers
26 * @offset: offset to target memory buffer
27 * @sync_line: 0 -> no sync, 1 -> odd sync, 2 -> even sync
34 unsigned int offset, u32 sync_line, in tw68_risc_field() argument
57 while (offset && offset >= sg_dma_len(sg)) { in tw68_risc_field()
58 offset -= sg_dma_len(sg); in tw68_risc_field()
61 if (bpl <= sg_dma_len(sg) - offset) { in tw68_risc_field()
64 /* (offset<<12) |*/ bpl); in tw68_risc_field()
65 *(rp++) = cpu_to_le32(sg_dma_address(sg) + offset); in tw68_risc_field()
66 offset += bpl; in tw68_risc_field()
72 * given by the scatter-gather list. in tw68_risc_field()
76 done = (sg_dma_len(sg) - offset); in tw68_risc_field()
80 *(rp++) = cpu_to_le32(sg_dma_address(sg) + offset); in tw68_risc_field()
81 todo -= done; in tw68_risc_field()
83 /* succeeding fragments have no offset */ in tw68_risc_field()
89 todo -= sg_dma_len(sg); in tw68_risc_field()
94 /* final chunk - offset 0, count 'todo' */ in tw68_risc_field()
100 offset = todo; in tw68_risc_field()
102 offset += padding; in tw68_risc_field()
111 * This routine is called by tw68-video. It allocates
119 * @sglist: scatter-gather list entry
120 * @top_offset: offset within the risc program area for the
122 * @bottom_offset: offset within the risc program area for the
153 buf->size = instructions * 8; in tw68_risc_buffer()
154 buf->cpu = pci_alloc_consistent(pci, buf->size, &buf->dma); in tw68_risc_buffer()
155 if (buf->cpu == NULL) in tw68_risc_buffer()
156 return -ENOMEM; in tw68_risc_buffer()
159 rp = buf->cpu; in tw68_risc_buffer()
168 buf->jmp = rp; in tw68_risc_buffer()
169 buf->cpu[1] = cpu_to_le32(buf->dma + 8); in tw68_risc_buffer()
171 BUG_ON((buf->jmp - buf->cpu + 2) * sizeof(buf->cpu[0]) > buf->size); in tw68_risc_buffer()
176 /* ------------------------------------------------------------------ */
201 pr_debug("0x%08x %-9s IRQ=%d",
217 pr_debug("%s: risc_program_dump: risc=%p, buf->cpu=0x%p, buf->jmp=0x%p\n",
218 core->name, buf, buf->cpu, buf->jmp);
219 for (addr = buf->cpu; addr <= buf->jmp; addr += 2)