From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDVSh-0008Ow-8Q for qemu-devel@nongnu.org; Fri, 30 Mar 2012 02:37:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDVSf-0003ze-JE for qemu-devel@nongnu.org; Fri, 30 Mar 2012 02:37:26 -0400 Received: from mail-iy0-f173.google.com ([209.85.210.173]:58765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDVSf-0003yv-F0 for qemu-devel@nongnu.org; Fri, 30 Mar 2012 02:37:25 -0400 Received: by iafj26 with SMTP id j26so695412iaf.4 for ; Thu, 29 Mar 2012 23:37:21 -0700 (PDT) MIME-Version: 1.0 From: "Peter A. G. Crosthwaite" Date: Fri, 30 Mar 2012 16:37:09 +1000 Message-Id: Subject: [Qemu-devel] [RFC PATCH v1 0/4] SPI bus support + Xilinx SPI controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, paul@codesourcery.com, edgar.iglesias@gmail.com Cc: peter.crosthwaite@petalogix.com, john.williams@petalogix.com Add support for Serial Peripheral interface (SPI) as a proper bus standard. Includes an example device (m25p80 SPI flash), an example controller (Xilinx XPS SPI) and adds it to all to a machine model (petalogix_ml605_mmu.c). Patch 1 adds the Serial Peripheral Interface (SPI) protocol as a bus and defines a QOM type for slave devices. The approach to doing this is based looseley on the existing I2C QOMification. Patch 2 is a device model for the m25p80 style SPI flash chip. Patch 3 is the Xilinx XPS SPI contoller. Its a sysbus device that instantiates a spi bus, and interfaces the two (as per the controllers functionality) Patch 4 instantiates the XPS SPI controller in the petalogix ML605 reference platform and connects one m25p80 to it. Peter A. G. Crosthwaite (4): SPI: initial support m25p80: initial verion xilinx_spi: initial version petalogix-ml605: added spi controller with m25p80 Makefile.target | 3 + hw/m25p80.c | 495 ++++++++++++++++++++++++++++++++++++++++++++++ hw/petalogix_ml605_mmu.c | 19 ++ hw/spi.c | 175 ++++++++++++++++ hw/spi.h | 86 ++++++++ hw/xilinx_spi.c | 477 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 1255 insertions(+), 0 deletions(-) create mode 100644 hw/m25p80.c create mode 100644 hw/spi.c create mode 100644 hw/spi.h create mode 100644 hw/xilinx_spi.c -- 1.7.3.2