Lines Matching refs:cgx_dev
137 struct cgx *cgx_dev; in cgx_get_cgxcnt_max() local
140 list_for_each_entry(cgx_dev, &cgx_list, cgx_list) in cgx_get_cgxcnt_max()
141 if (cgx_dev->cgx_id > idmax) in cgx_get_cgxcnt_max()
142 idmax = cgx_dev->cgx_id; in cgx_get_cgxcnt_max()
162 struct cgx *cgx_dev; in cgx_get_pdata() local
164 list_for_each_entry(cgx_dev, &cgx_list, cgx_list) { in cgx_get_pdata()
165 if (cgx_dev->cgx_id == cgx_id) in cgx_get_pdata()
166 return cgx_dev; in cgx_get_pdata()
173 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_write() local
176 if (!is_lmac_valid(cgx_dev, lmac_id)) in cgx_lmac_write()
178 cgx_write(cgx_dev, lmac_id, offset, val); in cgx_lmac_write()
183 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_read() local
186 if (!is_lmac_valid(cgx_dev, lmac_id)) in cgx_lmac_read()
189 return cgx_read(cgx_dev, lmac_id, offset); in cgx_lmac_read()
204 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_get_p2x() local
207 cfg = cgx_read(cgx_dev, lmac_id, CGXX_CMRX_CFG); in cgx_lmac_get_p2x()
231 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_addr_set() local
232 struct lmac *lmac = lmac_pdata(lmac_id, cgx_dev); in cgx_lmac_addr_set()
241 mac_ops = cgx_dev->mac_ops; in cgx_lmac_addr_set()
248 id = get_sequence_id_of_lmac(cgx_dev, lmac_id); in cgx_lmac_addr_set()
252 cgx_write(cgx_dev, 0, (CGXX_CMRX_RX_DMAC_CAM0 + (index * 0x8)), in cgx_lmac_addr_set()
255 cfg = cgx_read(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0); in cgx_lmac_addr_set()
258 cgx_write(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0, cfg); in cgx_lmac_addr_set()
293 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_addr_add() local
294 struct lmac *lmac = lmac_pdata(lmac_id, cgx_dev); in cgx_lmac_addr_add()
303 mac_ops = cgx_dev->mac_ops; in cgx_lmac_addr_add()
309 id = get_sequence_id_of_lmac(cgx_dev, lmac_id); in cgx_lmac_addr_add()
316 cgx_write(cgx_dev, 0, (CGXX_CMRX_RX_DMAC_CAM0 + (index * 0x8)), cfg); in cgx_lmac_addr_add()
318 cfg = cgx_read(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0); in cgx_lmac_addr_add()
329 cgx_write(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0, cfg); in cgx_lmac_addr_add()
336 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_addr_reset() local
337 struct lmac *lmac = lmac_pdata(lmac_id, cgx_dev); in cgx_lmac_addr_reset()
345 mac_ops = cgx_dev->mac_ops; in cgx_lmac_addr_reset()
351 id = get_sequence_id_of_lmac(cgx_dev, lmac_id); in cgx_lmac_addr_reset()
354 cgx_write(cgx_dev, 0, (CGXX_CMRX_RX_DMAC_CAM0 + (index * 0x8)), 0); in cgx_lmac_addr_reset()
357 cfg = cgx_read(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0); in cgx_lmac_addr_reset()
360 cgx_write(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0, cfg); in cgx_lmac_addr_reset()
371 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_addr_update() local
377 lmac = lmac_pdata(lmac_id, cgx_dev); in cgx_lmac_addr_update()
381 mac_ops = cgx_dev->mac_ops; in cgx_lmac_addr_update()
390 id = get_sequence_id_of_lmac(cgx_dev, lmac_id); in cgx_lmac_addr_update()
394 cfg = cgx_read(cgx_dev, 0, (CGXX_CMRX_RX_DMAC_CAM0 + (index * 0x8))); in cgx_lmac_addr_update()
398 cgx_write(cgx_dev, 0, (CGXX_CMRX_RX_DMAC_CAM0 + (index * 0x8)), cfg); in cgx_lmac_addr_update()
404 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_addr_del() local
405 struct lmac *lmac = lmac_pdata(lmac_id, cgx_dev); in cgx_lmac_addr_del()
414 mac_ops = cgx_dev->mac_ops; in cgx_lmac_addr_del()
425 id = get_sequence_id_of_lmac(cgx_dev, lmac_id); in cgx_lmac_addr_del()
430 cfg = cgx_read(cgx_dev, 0, (CGXX_CMRX_RX_DMAC_CAM0 + (index * 0x8))); in cgx_lmac_addr_del()
437 cfg = cgx_read(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0); in cgx_lmac_addr_del()
440 cgx_write(cgx_dev, lmac_id, CGXX_CMRX_RX_DMAC_CTL0, cfg); in cgx_lmac_addr_del()
443 cgx_write(cgx_dev, 0, (CGXX_CMRX_RX_DMAC_CAM0 + (index * 0x8)), 0); in cgx_lmac_addr_del()
450 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_addr_max_entries_get() local
451 struct lmac *lmac = lmac_pdata(lmac_id, cgx_dev); in cgx_lmac_addr_max_entries_get()
461 struct cgx *cgx_dev = cgx_get_pdata(cgx_id); in cgx_lmac_addr_get() local
462 struct lmac *lmac = lmac_pdata(lmac_id, cgx_dev); in cgx_lmac_addr_get()
468 mac_ops = cgx_dev->mac_ops; in cgx_lmac_addr_get()
470 id = get_sequence_id_of_lmac(cgx_dev, lmac_id); in cgx_lmac_addr_get()
474 cfg = cgx_read(cgx_dev, 0, CGXX_CMRX_RX_DMAC_CAM0 + index * 0x8); in cgx_lmac_addr_get()