Lines Matching full:packet

46  * struct mchp_otpc_packet - OTPC packet data structure
48 * @id: packet ID
49 * @offset: packet offset (in words) in OTP memory
60 struct mchp_otpc_packet *packet; in mchp_otpc_id_to_packet() local
65 list_for_each_entry(packet, &otpc->packets, list) { in mchp_otpc_id_to_packet()
66 if (packet->id == id) in mchp_otpc_id_to_packet()
67 return packet; in mchp_otpc_id_to_packet()
89 /* Wait for packet to be transferred into temporary buffers. */ in mchp_otpc_prepare_read()
99 * Memory offset Memory footprint Packet ID
102 * 0x0 +------------+ <-- packet 0
109 * offset1 +------------+ <-- packet 1
116 * offset2 +------------+ <-- packet 2
120 * offsetN +------------+ <-- packet N
132 * The access to memory is done on a per packet basis: the control registers
133 * need to be updated with an offset address (within a packet range) and the
135 * that packet. E.g. if control registers are updated with any address within
137 * with packet 1. Header data is accessible though MCHP_OTPC_HR register.
143 * packet. The user will have to be aware of the memory footprint before doing
150 struct mchp_otpc_packet *packet; in mchp_otpc_read() local
159 * unsigned integer numbers for packet id, thus devide off by 4 in mchp_otpc_read()
162 packet = mchp_otpc_id_to_packet(otpc, off / 4); in mchp_otpc_read()
163 if (!packet) in mchp_otpc_read()
165 offset = packet->offset; in mchp_otpc_read()
195 struct mchp_otpc_packet *packet; in mchp_otpc_init_packets_list() local
212 packet = devm_kzalloc(otpc->dev, sizeof(*packet), GFP_KERNEL); in mchp_otpc_init_packets_list()
213 if (!packet) in mchp_otpc_init_packets_list()
216 packet->id = id++; in mchp_otpc_init_packets_list()
217 packet->offset = word_pos; in mchp_otpc_init_packets_list()
218 INIT_LIST_HEAD(&packet->list); in mchp_otpc_init_packets_list()
219 list_add_tail(&packet->list, &otpc->packets); in mchp_otpc_init_packets_list()
223 /* Next word: this packet (header, payload) position + 1. */ in mchp_otpc_init_packets_list()