This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21716 ) Change subject: icE1usb fw: Have e1_rx_need_data() optionally return FIFO position ...................................................................... icE1usb fw: Have e1_rx_need_data() optionally return FIFO position The position indicates where we are in terms of frame and multiframe. The related code was ported over from e1-tracer. Related: OS#4674 Change-Id: I9e59d86a2e8f4e85ca84c592438ad79966b49448 --- M firmware/ice40-riscv/icE1usb/e1.c M firmware/ice40-riscv/icE1usb/usb_e1.c 2 files changed, 9 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved tnt: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/firmware/ice40-riscv/icE1usb/e1.c b/firmware/ice40-riscv/icE1usb/e1.c index 5d4d3ee..0f1d89d 100644 --- a/firmware/ice40-riscv/icE1usb/e1.c +++ b/firmware/ice40-riscv/icE1usb/e1.c @@ -328,7 +328,7 @@ #include "dma.h" unsigned int -e1_rx_need_data(unsigned int usb_addr, unsigned int max_frames) +e1_rx_need_data(unsigned int usb_addr, unsigned int max_frames, unsigned int *pos) { unsigned int ofs; int tot_frames = 0; @@ -340,6 +340,12 @@ if (!n_frames) break; + /* Give pos */ + if (pos) { + *pos = ofs & g_e1.rx.fifo.mask; + pos = NULL; + } + /* Copy from FIFO to USB */ dma_exec(e1f_ofs_to_dma(ofs), usb_addr, n_frames * (32 / 4), false, NULL, NULL); diff --git a/firmware/ice40-riscv/icE1usb/usb_e1.c b/firmware/ice40-riscv/icE1usb/usb_e1.c index f724665..6bcb1b4 100644 --- a/firmware/ice40-riscv/icE1usb/usb_e1.c +++ b/firmware/ice40-riscv/icE1usb/usb_e1.c @@ -23,7 +23,7 @@ /* Hack */ -unsigned int e1_rx_need_data(unsigned int usb_addr, unsigned int max_len); +unsigned int e1_rx_need_data(unsigned int usb_addr, unsigned int max_len, unsigned int *pos); unsigned int e1_tx_feed_data(unsigned int usb_addr, unsigned int len); unsigned int e1_tx_level(void); unsigned int e1_rx_level(void); @@ -93,7 +93,7 @@ else if (!n) break; - n = e1_rx_need_data((ptr >> 2) + 1, n); + n = e1_rx_need_data((ptr >> 2) + 1, n, NULL); /* Write header */ hdr = 0x616b00b5; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21716 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I9e59d86a2e8f4e85ca84c592438ad79966b49448 Gerrit-Change-Number: 21716 Gerrit-PatchSet: 5 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-Reviewer: tnt <tnt at 246tNt.com> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201220/112fbf96/attachment.htm>