From patchwork Wed Dec 16 21:45:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 557774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id ABCCB1402D2 for ; Thu, 17 Dec 2015 08:49:31 +1100 (AEDT) Received: from localhost ([::1]:49520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9Jwv-0004Xw-HN for incoming@patchwork.ozlabs.org; Wed, 16 Dec 2015 16:49:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9Jv2-0001Eq-EE for qemu-devel@nongnu.org; Wed, 16 Dec 2015 16:47:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9Jux-0001HB-Ix for qemu-devel@nongnu.org; Wed, 16 Dec 2015 16:47:32 -0500 Received: from mail-cys01nam02on0061.outbound.protection.outlook.com ([104.47.37.61]:22528 helo=NAM02-CY1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9Jux-0001Gn-AS for qemu-devel@nongnu.org; Wed, 16 Dec 2015 16:47:27 -0500 Received: from SN1NAM02FT015.eop-nam02.prod.protection.outlook.com (10.152.72.52) by SN1NAM02HT161.eop-nam02.prod.protection.outlook.com (10.152.72.140) with Microsoft SMTP Server (TLS) id 15.1.346.13; Wed, 16 Dec 2015 21:47:25 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none; linaro.org; dmarc=none action=none header.from=xilinx.com; Received-SPF: Fail (protection.outlook.com: domain of xilinx.com does not designate 149.199.60.96 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.96; helo=xsj-tvapsmtpgw01; Received: from xsj-tvapsmtpgw01 (149.199.60.96) by SN1NAM02FT015.mail.protection.outlook.com (10.152.72.109) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Wed, 16 Dec 2015 21:47:24 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:47981 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1a9Jut-0001Go-Ni; Wed, 16 Dec 2015 13:47:23 -0800 Received: from [127.0.0.1] (port=54703 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1a9Jut-0000u0-K2; Wed, 16 Dec 2015 13:47:23 -0800 Received: from xsj-tvapsmtp02 (xsj-tvapsmtp02.xilinx.com [172.16.1.203]) by tsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id tBGLg1qf030030; Wed, 16 Dec 2015 13:42:02 -0800 Received: from [172.19.74.182] (port=60238 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1a9Jus-0000tx-V2; Wed, 16 Dec 2015 13:47:22 -0800 From: Alistair Francis To: Date: Wed, 16 Dec 2015 13:45:04 -0800 Message-ID: X-Mailer: git-send-email 2.5.0 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22004.006 X-TM-AS-Result: No--10.504-7.0-31-10 X-imss-scan-details: No--10.504-7.0-31-10 X-TMASE-MatchedRID: tnWMj07WQD1snhhcW66u5WNW0DAjL5p+2MmowBCx0sEY0A95tjAn+6YA Hz7/p72b5MJH+WktWBu+daZEFcM/u0O3mzCjrbhY/b/HF2B+pH5YuTsoeO+cJDb9TB28Ubkia8r Wuyth9le+8iIAljKEQ9opYQEBDHzdoYVBHnk8CBqZroPNdqiG873gm8md8Wse1dkWv/h1HSS/he W4eDfXP7mDEathwuYVLD+H50fx9Wgk6f2zPJ9BDfGBihrnFyBPXxT5cg8K/tdG6m/lgbKJUqPFj JEFr+olwXCBO/GKkVqOhzOa6g8Krbn7pz752LZlF+5+CLje+pXgP867kK8cW5GfIz113UlnYEPj J4Xus8Q= X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.96; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(5001960100002)(87936001)(118296001)(1096002)(36756003)(71366001)(110136002)(33646002)(48376002)(76176999)(19580395003)(50986999)(19580405001)(1220700001)(586003)(85426001)(64026002)(575784001)(11100500001)(6806005)(50466002)(50226001)(2950100001)(2351001)(92566002)(77096005)(81156007)(47776003)(86362001)(229853001)(5003940100001)(106466001)(105606002)(189998001)(5008740100001)(5003600100002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1NAM02HT161; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; PTR:unknown-60-96.xilinx.com; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1NAM02HT161; X-Microsoft-Antispam-PRVS: <7a645a802929499ab29f4d8813ba0d06@SN1NAM02HT161.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001)(10201501046); SRVR:SN1NAM02HT161; BCL:0; PCL:0; RULEID:; SRVR:SN1NAM02HT161; X-Forefront-PRVS: 0792DBEAD0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2015 21:47:24.3180 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.96]; Helo=[xsj-tvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM02HT161 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.37.61 Cc: peter.maydell@linaro.org, crosthwaitepeter@gmail.com, alistair.francis@xilinx.com Subject: [Qemu-devel] [PATCH v5 2/6] ssi: Move ssi.h into a separate directory X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Move the ssi.h include file into the ssi directory. While touching the code also fix the typdef lines as checkpatch complains. Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite --- V2: - Change git patch to indicate rename hw/arm/pxa2xx.c | 2 +- hw/arm/spitz.c | 2 +- hw/arm/stellaris.c | 2 +- hw/arm/strongarm.c | 2 +- hw/arm/tosa.c | 2 +- hw/arm/xilinx_zynq.c | 2 +- hw/arm/z2.c | 2 +- hw/block/m25p80.c | 2 +- hw/display/ads7846.c | 2 +- hw/display/ssd0323.c | 2 +- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/misc/max111x.c | 2 +- hw/sd/ssi-sd.c | 2 +- hw/ssi/pl022.c | 2 +- hw/ssi/ssi.c | 2 +- hw/ssi/xilinx_spi.c | 2 +- hw/ssi/xilinx_spips.c | 2 +- include/hw/{ => ssi}/ssi.h | 10 ++++++---- 18 files changed, 23 insertions(+), 21 deletions(-) rename include/hw/{ => ssi}/ssi.h (96%) diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 79d22d9..54bf152 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -12,7 +12,7 @@ #include "sysemu/sysemu.h" #include "hw/char/serial.h" #include "hw/i2c/i2c.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "sysemu/char.h" #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index 8d3cc0b..ee8f889 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -16,7 +16,7 @@ #include "sysemu/sysemu.h" #include "hw/pcmcia.h" #include "hw/i2c/i2c.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "hw/block/flash.h" #include "qemu/timer.h" #include "hw/devices.h" diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 0114e0a..4e5cfd1 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -8,7 +8,7 @@ */ #include "hw/sysbus.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "hw/arm/arm.h" #include "hw/devices.h" #include "qemu/timer.h" diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 9624ecb..4d2ba02 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -34,7 +34,7 @@ #include "hw/arm/arm.h" #include "sysemu/char.h" #include "sysemu/sysemu.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" //#define DEBUG diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c index 02814d7..68ad01e 100644 --- a/hw/arm/tosa.c +++ b/hw/arm/tosa.c @@ -19,7 +19,7 @@ #include "hw/pcmcia.h" #include "hw/boards.h" #include "hw/i2c/i2c.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "sysemu/block-backend.h" #include "hw/sysbus.h" #include "exec/address-spaces.h" diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 1c1a445..11a349b 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -25,7 +25,7 @@ #include "sysemu/block-backend.h" #include "hw/loader.h" #include "hw/misc/zynq-xadc.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "qemu/error-report.h" #define NUM_SPI_FLASHES 4 diff --git a/hw/arm/z2.c b/hw/arm/z2.c index b44eb76..c82fe2c 100644 --- a/hw/arm/z2.c +++ b/hw/arm/z2.c @@ -16,7 +16,7 @@ #include "hw/arm/arm.h" #include "hw/devices.h" #include "hw/i2c/i2c.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "hw/boards.h" #include "sysemu/sysemu.h" #include "hw/block/flash.h" diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 7b9f97c..addd907 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -24,7 +24,7 @@ #include "hw/hw.h" #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #ifndef M25P80_ERR_DEBUG #define M25P80_ERR_DEBUG 0 diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c index 3f35369..cb82317 100644 --- a/hw/display/ads7846.c +++ b/hw/display/ads7846.c @@ -10,7 +10,7 @@ * GNU GPL, version 2 or (at your option) any later version. */ -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "ui/console.h" typedef struct { diff --git a/hw/display/ssd0323.c b/hw/display/ssd0323.c index 9727007..7545da8 100644 --- a/hw/display/ssd0323.c +++ b/hw/display/ssd0323.c @@ -10,7 +10,7 @@ /* The controller can support a variety of different displays, but we only implement one. Most of the commends relating to brightness and geometry setup are ignored. */ -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "ui/console.h" //#define DEBUG_SSD0323 1 diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c index 462060f..5366cec 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -35,7 +35,7 @@ #include "sysemu/block-backend.h" #include "hw/char/serial.h" #include "exec/address-spaces.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "boot.h" diff --git a/hw/misc/max111x.c b/hw/misc/max111x.c index bef3651..d619d61 100644 --- a/hw/misc/max111x.c +++ b/hw/misc/max111x.c @@ -10,7 +10,7 @@ * GNU GPL, version 2 or (at your option) any later version. */ -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" typedef struct { SSISlave parent_obj; diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c index c49ff62..eeb96b9 100644 --- a/hw/sd/ssi-sd.c +++ b/hw/sd/ssi-sd.c @@ -12,7 +12,7 @@ #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "hw/sd/sd.h" //#define DEBUG_SSI_SD 1 diff --git a/hw/ssi/pl022.c b/hw/ssi/pl022.c index 61d568f..0bbf633 100644 --- a/hw/ssi/pl022.c +++ b/hw/ssi/pl022.c @@ -8,7 +8,7 @@ */ #include "hw/sysbus.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" //#define DEBUG_PL022 1 diff --git a/hw/ssi/ssi.c b/hw/ssi/ssi.c index 2aab79b..a0f57c0 100644 --- a/hw/ssi/ssi.c +++ b/hw/ssi/ssi.c @@ -12,7 +12,7 @@ * GNU GPL, version 2 or (at your option) any later version. */ -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" struct SSIBus { BusState parent_obj; diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c index 620573c..94bb2a7 100644 --- a/hw/ssi/xilinx_spi.c +++ b/hw/ssi/xilinx_spi.c @@ -29,7 +29,7 @@ #include "qemu/log.h" #include "qemu/fifo8.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #ifdef XILINX_SPI_ERR_DEBUG #define DB_PRINT(...) do { \ diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index 0910f54..e9471ff 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -27,7 +27,7 @@ #include "hw/ptimer.h" #include "qemu/log.h" #include "qemu/fifo8.h" -#include "hw/ssi.h" +#include "hw/ssi/ssi.h" #include "qemu/bitops.h" #ifndef XILINX_SPIPS_ERR_DEBUG diff --git a/include/hw/ssi.h b/include/hw/ssi/ssi.h similarity index 96% rename from include/hw/ssi.h rename to include/hw/ssi/ssi.h index df0f838..4a0a539 100644 --- a/include/hw/ssi.h +++ b/include/hw/ssi/ssi.h @@ -14,6 +14,8 @@ #include "hw/qdev.h" typedef struct SSISlave SSISlave; +typedef struct SSISlaveClass SSISlaveClass; +typedef enum SSICSMode SSICSMode; #define TYPE_SSI_SLAVE "ssi-slave" #define SSI_SLAVE(obj) \ @@ -25,14 +27,14 @@ typedef struct SSISlave SSISlave; #define SSI_GPIO_CS "ssi-gpio-cs" -typedef enum { +enum SSICSMode { SSI_CS_NONE = 0, SSI_CS_LOW, SSI_CS_HIGH, -} SSICSMode; +}; /* Slave devices. */ -typedef struct SSISlaveClass { +struct SSISlaveClass { DeviceClass parent_class; int (*init)(SSISlave *dev); @@ -55,7 +57,7 @@ typedef struct SSISlaveClass { * always be called for the device for every txrx access to the parent bus */ uint32_t (*transfer_raw)(SSISlave *dev, uint32_t val); -} SSISlaveClass; +}; struct SSISlave { DeviceState parent_obj;