Lines Matching +full:scu +full:- +full:index
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
20 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
26 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
62 struct sci_unsolicited_frame_control *uf_control = &ihost->uf_control; in sci_unsolicited_frame_control_construct()
64 dma_addr_t dma = ihost->ufi_dma; in sci_unsolicited_frame_control_construct()
65 void *virt = ihost->ufi_buf; in sci_unsolicited_frame_control_construct()
75 * Program the location of the UF header table into the SCU. in sci_unsolicited_frame_control_construct()
77 * - The address must align on a 64-byte boundary. Guaranteed to be in sci_unsolicited_frame_control_construct()
78 * on 64-byte boundary already 1KB boundary for unsolicited frames. in sci_unsolicited_frame_control_construct()
79 * - Program unused header entries to overlap with the last in sci_unsolicited_frame_control_construct()
84 uf_control->headers.physical_address = dma + SCI_UFI_BUF_SIZE; in sci_unsolicited_frame_control_construct()
85 uf_control->headers.array = virt + SCI_UFI_BUF_SIZE; in sci_unsolicited_frame_control_construct()
88 * Program the location of the UF address table into the SCU. in sci_unsolicited_frame_control_construct()
90 * - The address must align on a 64-bit boundary. Guaranteed to be on 64 in sci_unsolicited_frame_control_construct()
92 * 64-bit boundary and headers are on a 64-bytes in size. in sci_unsolicited_frame_control_construct()
94 uf_control->address_table.physical_address = dma + SCI_UFI_BUF_SIZE + SCI_UFI_HDR_SIZE; in sci_unsolicited_frame_control_construct()
95 uf_control->address_table.array = virt + SCI_UFI_BUF_SIZE + SCI_UFI_HDR_SIZE; in sci_unsolicited_frame_control_construct()
96 uf_control->get = 0; in sci_unsolicited_frame_control_construct()
100 * - The last entry in the UF queue is not NULL. in sci_unsolicited_frame_control_construct()
101 * - There is a power of 2 number of entries (NULL or not-NULL) in sci_unsolicited_frame_control_construct()
103 * - Aligned on a 1KB boundary. */ in sci_unsolicited_frame_control_construct()
110 uf = &uf_control->buffers.array[i]; in sci_unsolicited_frame_control_construct()
112 uf_control->address_table.array[i] = dma; in sci_unsolicited_frame_control_construct()
114 uf->buffer = virt; in sci_unsolicited_frame_control_construct()
115 uf->header = &uf_control->headers.array[i]; in sci_unsolicited_frame_control_construct()
116 uf->state = UNSOLICITED_FRAME_EMPTY; in sci_unsolicited_frame_control_construct()
136 *frame_header = &uf_control->buffers.array[frame_index].header->data; in sci_unsolicited_frame_control_get_header()
149 *frame_buffer = uf_control->buffers.array[frame_index].buffer; in sci_unsolicited_frame_control_get_buffer()
163 frame_get = uf_control->get & (SCU_MAX_UNSOLICITED_FRAMES - 1); in sci_unsolicited_frame_control_release_frame()
164 frame_cycle = uf_control->get & SCU_MAX_UNSOLICITED_FRAMES; in sci_unsolicited_frame_control_release_frame()
171 while (lower_32_bits(uf_control->address_table.array[frame_get]) == 0 && in sci_unsolicited_frame_control_release_frame()
172 upper_32_bits(uf_control->address_table.array[frame_get]) == 0 && in sci_unsolicited_frame_control_release_frame()
184 uf_control->buffers.array[frame_index].state = UNSOLICITED_FRAME_RELEASED; in sci_unsolicited_frame_control_release_frame()
195 * The frame index is equal to the current get pointer so we in sci_unsolicited_frame_control_release_frame()
198 while (uf_control->buffers.array[frame_get].state == UNSOLICITED_FRAME_RELEASED) { in sci_unsolicited_frame_control_release_frame()
199 uf_control->buffers.array[frame_get].state = UNSOLICITED_FRAME_EMPTY; in sci_unsolicited_frame_control_release_frame()
201 if (frame_get+1 == SCU_MAX_UNSOLICITED_FRAMES-1) { in sci_unsolicited_frame_control_release_frame()
208 uf_control->get = SCU_UFQGP_GEN_BIT(ENABLE_BIT) | frame_cycle | frame_get; in sci_unsolicited_frame_control_release_frame()