MCPcopy Create free account
hub / github.com/F-Stack/f-stack / fman_finish

Function fman_finish

dpdk/drivers/bus/dpaa/base/fman/fman.c:730–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

728}
729
730void
731fman_finish(void)
732{
733 struct __fman_if *__if, *tmpif;
734
735 assert(fman_ccsr_map_fd != -1);
736
737 list_for_each_entry_safe(__if, tmpif, &__ifs, __if.node) {
738 int _errno;
739
740 /* disable Rx and Tx */
741 if ((__if->__if.mac_type == fman_mac_1g) &&
742 (!__if->__if.is_memac))
743 out_be32(__if->ccsr_map + 0x100,
744 in_be32(__if->ccsr_map + 0x100) & ~(u32)0x5);
745 else
746 out_be32(__if->ccsr_map + 8,
747 in_be32(__if->ccsr_map + 8) & ~(u32)3);
748 /* release the mapping */
749 _errno = munmap(__if->ccsr_map, __if->regs_size);
750 if (unlikely(_errno < 0))
751 fprintf(stderr, "%s:%d:%s(): munmap() = %d (%s)\n",
752 __FILE__, __LINE__, __func__,
753 -errno, strerror(errno));
754 printf("Tearing down %s\n", __if->node_path);
755 list_del(&__if->__if.node);
756 rte_free(__if);
757 }
758
759 close(fman_ccsr_map_fd);
760 fman_ccsr_map_fd = -1;
761}

Callers 1

fman_initFunction · 0.85

Calls 6

out_be32Function · 0.85
in_be32Function · 0.85
rte_freeFunction · 0.85
printfFunction · 0.50
list_delFunction · 0.50
closeFunction · 0.50

Tested by

no test coverage detected