From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXLP9-0000kw-Cn for qemu-devel@nongnu.org; Mon, 07 Apr 2014 22:04:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXLP1-0002NN-1i for qemu-devel@nongnu.org; Mon, 07 Apr 2014 22:04:50 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:37466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXLP0-0002NB-SE for qemu-devel@nongnu.org; Mon, 07 Apr 2014 22:04:42 -0400 Received: by mail-pa0-f50.google.com with SMTP id kq14so306729pab.23 for ; Mon, 07 Apr 2014 19:04:41 -0700 (PDT) Sender: Peter Crosthwaite From: Peter Crosthwaite Date: Mon, 7 Apr 2014 19:04:08 -0700 Message-Id: Subject: [Qemu-devel] [PATCH for-2.1 v2 0/2] Generalise FIFO to more integer types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: b.galvani@gmail.com, dslutz@verizon.com There is a utility helper for dealing with 8 bit fifos. This should be applicable to other integer widths as well. These two patches generalise this FIFO to work for 16, 32 and 64 bit ints. CC some recent contributors around this code. changed since v1: Rebased to include fifo buffer functionality. Peter Crosthwaite (2): util/fifo: s/fifo8/fifo globally util/fifo: Generalise for common integer widths hw/char/serial.c | 30 +++--- hw/net/allwinner_emac.c | 72 +++++++------- hw/ssi/xilinx_spi.c | 42 ++++----- hw/ssi/xilinx_spips.c | 70 +++++++------- include/hw/char/serial.h | 6 +- include/hw/net/allwinner_emac.h | 6 +- include/qemu/fifo.h | 166 ++++++++++++++++++++++++++++++++ include/qemu/fifo8.h | 160 ------------------------------- util/Makefile.objs | 2 +- util/fifo.c | 203 ++++++++++++++++++++++++++++++++++++++++ util/fifo8.c | 126 ------------------------- 11 files changed, 483 insertions(+), 400 deletions(-) create mode 100644 include/qemu/fifo.h delete mode 100644 include/qemu/fifo8.h create mode 100644 util/fifo.c delete mode 100644 util/fifo8.c -- 1.9.1.1.gbb9f595