From patchwork Tue Sep 29 23:03:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 524656 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 5CD661402B6 for ; Thu, 1 Oct 2015 07:54:47 +1000 (AEST) Received: from localhost ([::1]:34013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhPKn-00073N-FL for incoming@patchwork.ozlabs.org; Wed, 30 Sep 2015 17:54:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zh3x4-0005wP-Lv for qemu-devel@nongnu.org; Tue, 29 Sep 2015 19:04:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zh3wz-0006HF-PL for qemu-devel@nongnu.org; Tue, 29 Sep 2015 19:04:50 -0400 Received: from mail-bl2on0066.outbound.protection.outlook.com ([65.55.169.66]:19748 helo=na01-bl2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zh3wz-0006HA-IF for qemu-devel@nongnu.org; Tue, 29 Sep 2015 19:04:45 -0400 Received: from BY2FFO11FD009.protection.gbl (10.1.14.32) by BY2FFO11HUB054.protection.gbl (10.1.14.243) with Microsoft SMTP Server (TLS) id 15.1.274.4; Tue, 29 Sep 2015 23:04:43 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; nongnu.org; dkim=none (message not signed) header.d=none; nongnu.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 BY2FFO11FD009.mail.protection.outlook.com (10.1.14.73) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Tue, 29 Sep 2015 23:04:43 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:45683 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1Zh3ww-0008CT-Tu; Tue, 29 Sep 2015 16:04:42 -0700 Received: from [127.0.0.1] (port=35098 helo=xsj-tvapsmtp02) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1Zh3ww-0004zG-Ng; Tue, 29 Sep 2015 16:04:42 -0700 Received: from [172.19.74.182] (port=47648 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1Zh3ww-0004zD-Ev; Tue, 29 Sep 2015 16:04:42 -0700 From: Alistair Francis To: Date: Tue, 29 Sep 2015 16:03:09 -0700 Message-ID: <8862894b24798ae4c3ddca7dd5078c38129cb355.1443567485.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-21844.005 X-TM-AS-Result: No--14.973-7.0-31-10 X-imss-scan-details: No--14.973-7.0-31-10 X-TMASE-MatchedRID: n0foQC14Wj9F/TNFimjSuAPZZctd3P4B4PMS+dvkPNsHCU4zl4m4yCff ntq9wfT7n/um/a7Thqy58HlNpgw+4hdAkyS/8v/XhMGTNuQTHbPzWEMQjooUzdqCxkzSpW/XFTR 6HUv57ZDSLOpOrd/macrNzODBtfHPBrU1duOq6zTcWo5Vvs8MQrj/fn0FC9moOT6W+XN+xafCb9 ZjqJMAXGtnXAUmNvMBo0L8t/QbaZFj5V+yyEyArZEbNXwHGDRxKx5ICGp/WtHxxaAXDrCns2EVh kwoV8rdMQuumJL0/vY+hgPoRSqMf+33LBlZStT0+cKX6yCQ13tt3qsaFY4DBBS11FlOYRoh1axL mK1JZgpcjQTdjbh4Q3cnb9/qx3phNyl1nd9CIt0URSScn+QSXt0H8LFZNFG7bkV4e2xSge5TAV3 lwjiEmDIkT+Q5qFX/lvXJ5LS60mImwS+oyNMuDj6Qrn3xh/cy X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD009; 1:8RRjl99+l2dU7AwRCKSL4K+2S84v813DBUubFVxRviuqsCW10QOO628cqM2SmTyZa3y5h2rwkTjdQ230srnWKnW0/o03Lnp94CfTfy9ygCrqcnhpDOhk8AIveVM3ZssyyKjuq/Fg27Hzz3SuqMIDc8jiyobIvuZGzIirtUJVTXMGng8lkfRz+djNYsuP/xjbcM3I6XaCKzaCtVbRqJcwDXKqO4MiHMT8TYu+dvvtlrQa6VMry4EDuy355y823xrUbKDHYPNf1CDTiirskgC7AWtn5NPvQYd1OU1cQxsl00CM2rzP/fudOqVA6gTKlbSW1NC+SzKipbahUnRbj2O5KA== 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)(81156007)(5007970100001)(2351001)(76176999)(50986999)(229853001)(110136002)(105606002)(71366001)(33646002)(85426001)(5008740100001)(5001960100002)(64706001)(47776003)(106466001)(46102003)(36756003)(189998001)(64026002)(575784001)(50466002)(19580395003)(86362001)(87936001)(4001540100001)(16796002)(77156002)(19580405001)(11100500001)(77096005)(48376002)(6806005)(2950100001)(50226001)(5001860100001)(5003940100001)(62966003)(5003600100002)(92566002)(118296001)(5001830100001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2FFO11HUB054; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; PTR:unknown-60-96.xilinx.com; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11HUB054; 2:UzbBHKXurjv6eVEALGxoeFLlCbrJ6p6WSZ7J47Edhpnc5nB3p6GvMiZeSmnhgvNjxz43h8dUANmr0H1Y06I+AfYhC/6esx/XuLM2XO2HQZwqP8H4si1zyJ3oYA0xHTA0L/+ELkQut+vl+5P0OWE69gP0aa56M8cK33ywHrc4ccQ=; 3:dprBQT80an0z8QRjsrExQHDc2Ne4fh4ZVb4sNQP9Bi6BDUYclLVvVEIE9kDxEYxPrBwGt08yTCL1jpE9yyl4LBZiqEAn4lt7V0kLKuoDORcLdMC1mYpQbZwxpCsyMoKiJkGsChZdRe0F7ZSQUVzyjhBWinkX4/tdEzDfIK1bkP/ADedDkKW8IZ0yfJuKPOqTY3oQg1DsFjh3HH9ue+Ih6eCxSPky6j08Hic5rAoQ51c=; 25:D65UBEwSxT6Zv8wPknoTrOZAD2bQNMgdRK6C+dI3xdFKo9MUiIS997kdYFWRUgbIDVpT5w42jh2MZ2tqFyUEnpBFPBqiJGsUEh2TgBeFDNqEmSPCsld84eyT279PswzQs/anyuRCs9GP4+Du04IseMj+8fMCD8sEJfy0Ol8SNGoljQh+Gp80qpy/prqUyynJSLEiH0WHF4pqzzkNWp0qX7hUu9UWrX0qmY/UQo5xNyxowHkMC99Wrc2n949W4IuE2A26Fug8lAI0T5O2eZX2MQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB054; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11HUB054; 20:Kb7n+lJmPk8AufMeBwcZoXvY/brYiYb56t0SXYXPVZYpP3m5Xq2JZGiuKOrdWS7UaIOGAPRSOa7dMgFxs/HfM1M8n1zjjWg1OZ17qWVGy4rdBeGnT8T8JX4shrErzjlzYU7n9g1jpIK01czip7E/hSqox+8FTHVEXKAdp9+GvZYAohV1hmwePtYqhsveWuP3rLlNU3eW5xM0xuTSAdcyddad18X1SnO6Lpn/U6RV2jVOIgsZ5stzG+YDAnRVBu1zEOW+kFHOAUM46m09rGldci7GampYvQZbN1X1ZT/BJBlYquDDl3JyD6Z0eKDBaHLYwu7aN9gwIFCu/e/ReRnp1hebTMlghZqvSNOdFYSWw4SALryVupjvjelmc/UI5EP0PVIseoZ+Urg0oF4P86tnTsn1iyAYb0svd91a32ZEYt5QZuiMsFyC0QLsQKxn9U+70JKxCUw7MVrk9EnQBFbefStQIN2F8xLOT9L9fLeYNs6AdV9IGzYM4xk6rXsAAQWo; 4:zg/lmDMkv7swkauHWOTVKN1BTkGJEA3pXLg0JIsJ5+5abDYVIEM4rRLTGVJdWotM2aBhd6awFiSeEpSB4/O92OcZoVfie60oqRfWJMpaGVEztAYCEdoCSNfqV8a1RZaWU781taQHRDPvDxCaw4VU0aaBBrNGxb77ZQ1AycwO602kyQCe9gl+MHbsAlBjKrz6slT0UFxxdbbQNBJKI5aHes73VjZot7My1D1dCCEUlJ5r5Js545AB6d3eC84dec77E5/NoePXyPpyb+UwlL+hOt7k3gEHZMEAlhSRzkbY7lYhAqGgVXWskW5MTLrgKjDE0pfZE5Kffp8VhljkdYmc1ZtH3XnJ012deatS9sjvh54= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001); SRVR:BY2FFO11HUB054; BCL:0; PCL:0; RULEID:; SRVR:BY2FFO11HUB054; X-Forefront-PRVS: 0714841678 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2FFO11HUB054; 23:bxDTawTEa5Fzkwms54q1Nozlm92YVaiJ+Mv1ShPi?= =?us-ascii?Q?yJQc90epDfDo2urJEnjt9h8q4W/Pdags4micvYsv3QVX3DhHb4imQV0LVL2C?= =?us-ascii?Q?e3/iCCX/3puA4WoyTByEJ4ht4hCmpeWh9eVrAnAvWLQJC+ODtnnIw10MRXwg?= =?us-ascii?Q?IhOgdt0tguXdFUrN+LzhWA+rUV+ymyT+gfxGOm4+OoJHot7J9mrQvtJqDCAa?= =?us-ascii?Q?qiO5tN5M3K+9mp0IvFddRGbO+9fX2C3KFlnEtpuaBcEeY5WLWQVU/AmbP8jP?= =?us-ascii?Q?0/l1cRv5cmrCTy+xU1umZiHGiXMajBW6aXQ0COFrEYI3cK0mosn/d3RkNX0e?= =?us-ascii?Q?1jUPJkaZb8A9TqyNlvcrELveZP/X6nxZPylBmy6nT1+IVg7q/iZgMNHsw7yl?= =?us-ascii?Q?+Sdjf6GESktUselF/zjfTo7sOHwhPBV1nXG3SLCqvX6othrVeSxUwh+FiM6E?= =?us-ascii?Q?E1F8XzPbmBx3J7zVQb1hAYKUMPoy/ZOZOdKr8o8UPx0cBbN/XLvaYLbBkpnR?= =?us-ascii?Q?X877fLKMs7kAK4Yb0dt4w3htL+9iJEpV7A8z2kCmaCH0r++aCM6apBkni3qI?= =?us-ascii?Q?8B8tkRF7/Uf9Iuq/qUiCg1qw2st2XfQvHB5/1okkHLupQEgpCXfKnZVUMVH4?= =?us-ascii?Q?Lag8gsqHgcrYAXegtd3L4ek5suHyJ731bcH8/77sYOuXdRkgp7EkwQrptv0q?= =?us-ascii?Q?krfP0QkVhIeAG65vokc+CZrcUn9xudip4BF6voiWTnRTEnrr0OHYldrRKXUs?= =?us-ascii?Q?5V2feNGQh1iIvFo0OHp7cM/X/XI0Q3QxFphsaR4mnieK26dqNH6dOQKrOgqP?= =?us-ascii?Q?DoDgPbu2roKwsl38NQdmxoygKjDJ8iFDren7h15f2n/CVp9yuXlMPHW5ZHsa?= =?us-ascii?Q?gsiYqLggRphZ1VHT342CK99X+zJiXOwdgGh+6Z8YveSViddZJFhyYdcgxwiy?= =?us-ascii?Q?Q2EC3/qjcGpJHRvTog+/DS5P/GC3lvfyEwYORk2M+YRgbsZcZnDXNfHNDg11?= =?us-ascii?Q?CB/rxQ2OhYOsFw2DtNDWc/dbDa1RXtlgRQ3HiOrjSmY+EsT4MC/Ib4bLpNaB?= =?us-ascii?Q?d8N0hOrJF8HC9JLQqyl/EtWZTTMV9xykqSguZ1XQLzjtML6EwbfUcYfTFRxo?= =?us-ascii?Q?mDb4WwaT7UJl5TWXvpCuqTk5t1nUYAj6wgXs76sL6ttATlrGRo5WU4ZGG+ZR?= =?us-ascii?Q?UmKbBgFzWSlyEvhhpMgNVn0UCASWSpGtHtjxmNJSKzmE/C5rTFtEI5o48bvn?= =?us-ascii?Q?1I9yz0xZz3cQTbkSw7Ln+2otbBqUX+aroJ3H+EBaoK8f3UOjzKGteZJ8Glpu?= =?us-ascii?Q?TBGvwGNymFrrKoZr84SBSWGCSbKcSbYs1g3zmmYcNG8Y?= X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11HUB054; 5:CXkdmwu80Uf2RTjGMCjQi6ivgwNrIsNRxhnZJNpyRaasna+bBt/dNz3Y3y9R55ov3rEKph4iHwkAzSIi02Q4Ksd8u67n1QgiFECHr/LuDtRlPyrnFiTz5BTmZInYqkCmJADd2xfpx+R+T/ukz5P4vA==; 24:NZR0RRVzUXUJsK8SLzOgxKoq/2126ZeaWGeR6Jl/KFSPtnx4PFaKwncf/umKvQZvJLysHJEKn4fhHGt5tRgu89WVcfl/G7ijT0iu9m1+808= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2015 23:04:43.0235 (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: BY2FFO11HUB054 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 65.55.169.66 Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, crosthwaitepeter@gmail.com, edgar.iglesias@gmail.com, alistair.francis@xilinx.com Subject: [Qemu-devel] [PATCH v1 1/3] ssi: Move ssi.h into a seperate 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. Signed-off-by: Alistair Francis --- 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.h | 94 ------------------------------------ include/hw/ssi/ssi.h | 96 +++++++++++++++++++++++++++++++++++++ 19 files changed, 113 insertions(+), 111 deletions(-) delete mode 100644 include/hw/ssi.h create mode 100644 include/hw/ssi/ssi.h diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 164260a..534c06f 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 2af03be..c9405af 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 3d6486f..c785e90 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 51d0b89..6b210a6 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 9f89483..9db9602 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -24,7 +24,7 @@ #include "hw/block/flash.h" #include "sysemu/block-backend.h" #include "hw/loader.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 efc43dd..44830c7 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 e4b2d4f..4fe00fd 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.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.h deleted file mode 100644 index df0f838..0000000 --- a/include/hw/ssi.h +++ /dev/null @@ -1,94 +0,0 @@ -/* QEMU Synchronous Serial Interface support. */ - -/* In principle SSI is a point-point interface. As such the qemu - implementation has a single slave device on a "bus". - However it is fairly common for boards to have multiple slaves - connected to a single master, and select devices with an external - chip select. This is implemented in qemu by having an explicit mux device. - It is assumed that master and slave are both using the same transfer width. - */ - -#ifndef QEMU_SSI_H -#define QEMU_SSI_H - -#include "hw/qdev.h" - -typedef struct SSISlave SSISlave; - -#define TYPE_SSI_SLAVE "ssi-slave" -#define SSI_SLAVE(obj) \ - OBJECT_CHECK(SSISlave, (obj), TYPE_SSI_SLAVE) -#define SSI_SLAVE_CLASS(klass) \ - OBJECT_CLASS_CHECK(SSISlaveClass, (klass), TYPE_SSI_SLAVE) -#define SSI_SLAVE_GET_CLASS(obj) \ - OBJECT_GET_CLASS(SSISlaveClass, (obj), TYPE_SSI_SLAVE) - -#define SSI_GPIO_CS "ssi-gpio-cs" - -typedef enum { - SSI_CS_NONE = 0, - SSI_CS_LOW, - SSI_CS_HIGH, -} SSICSMode; - -/* Slave devices. */ -typedef struct SSISlaveClass { - DeviceClass parent_class; - - int (*init)(SSISlave *dev); - - /* if you have standard or no CS behaviour, just override transfer. - * This is called when the device cs is active (true by default). - */ - uint32_t (*transfer)(SSISlave *dev, uint32_t val); - /* called when the CS line changes. Optional, devices only need to implement - * this if they have side effects associated with the cs line (beyond - * tristating the txrx lines). - */ - int (*set_cs)(SSISlave *dev, bool select); - /* define whether or not CS exists and is active low/high */ - SSICSMode cs_polarity; - - /* if you have non-standard CS behaviour override this to take control - * of the CS behaviour at the device level. transfer, set_cs, and - * cs_polarity are unused if this is overwritten. Transfer_raw will - * 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; - - /* Chip select state */ - bool cs; -}; - -#define FROM_SSI_SLAVE(type, dev) DO_UPCAST(type, ssidev, dev) - -extern const VMStateDescription vmstate_ssi_slave; - -#define VMSTATE_SSI_SLAVE(_field, _state) { \ - .name = (stringify(_field)), \ - .size = sizeof(SSISlave), \ - .vmsd = &vmstate_ssi_slave, \ - .flags = VMS_STRUCT, \ - .offset = vmstate_offset_value(_state, _field, SSISlave), \ -} - -DeviceState *ssi_create_slave(SSIBus *bus, const char *name); -DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name); - -/* Master interface. */ -SSIBus *ssi_create_bus(DeviceState *parent, const char *name); - -uint32_t ssi_transfer(SSIBus *bus, uint32_t val); - -/* Automatically connect all children nodes a spi controller as slaves */ -void ssi_auto_connect_slaves(DeviceState *parent, qemu_irq *cs_lines, - SSIBus *bus); - -/* max111x.c */ -void max111x_set_input(DeviceState *dev, int line, uint8_t value); - -#endif diff --git a/include/hw/ssi/ssi.h b/include/hw/ssi/ssi.h new file mode 100644 index 0000000..4a0a539 --- /dev/null +++ b/include/hw/ssi/ssi.h @@ -0,0 +1,96 @@ +/* QEMU Synchronous Serial Interface support. */ + +/* In principle SSI is a point-point interface. As such the qemu + implementation has a single slave device on a "bus". + However it is fairly common for boards to have multiple slaves + connected to a single master, and select devices with an external + chip select. This is implemented in qemu by having an explicit mux device. + It is assumed that master and slave are both using the same transfer width. + */ + +#ifndef QEMU_SSI_H +#define QEMU_SSI_H + +#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) \ + OBJECT_CHECK(SSISlave, (obj), TYPE_SSI_SLAVE) +#define SSI_SLAVE_CLASS(klass) \ + OBJECT_CLASS_CHECK(SSISlaveClass, (klass), TYPE_SSI_SLAVE) +#define SSI_SLAVE_GET_CLASS(obj) \ + OBJECT_GET_CLASS(SSISlaveClass, (obj), TYPE_SSI_SLAVE) + +#define SSI_GPIO_CS "ssi-gpio-cs" + +enum SSICSMode { + SSI_CS_NONE = 0, + SSI_CS_LOW, + SSI_CS_HIGH, +}; + +/* Slave devices. */ +struct SSISlaveClass { + DeviceClass parent_class; + + int (*init)(SSISlave *dev); + + /* if you have standard or no CS behaviour, just override transfer. + * This is called when the device cs is active (true by default). + */ + uint32_t (*transfer)(SSISlave *dev, uint32_t val); + /* called when the CS line changes. Optional, devices only need to implement + * this if they have side effects associated with the cs line (beyond + * tristating the txrx lines). + */ + int (*set_cs)(SSISlave *dev, bool select); + /* define whether or not CS exists and is active low/high */ + SSICSMode cs_polarity; + + /* if you have non-standard CS behaviour override this to take control + * of the CS behaviour at the device level. transfer, set_cs, and + * cs_polarity are unused if this is overwritten. Transfer_raw will + * always be called for the device for every txrx access to the parent bus + */ + uint32_t (*transfer_raw)(SSISlave *dev, uint32_t val); +}; + +struct SSISlave { + DeviceState parent_obj; + + /* Chip select state */ + bool cs; +}; + +#define FROM_SSI_SLAVE(type, dev) DO_UPCAST(type, ssidev, dev) + +extern const VMStateDescription vmstate_ssi_slave; + +#define VMSTATE_SSI_SLAVE(_field, _state) { \ + .name = (stringify(_field)), \ + .size = sizeof(SSISlave), \ + .vmsd = &vmstate_ssi_slave, \ + .flags = VMS_STRUCT, \ + .offset = vmstate_offset_value(_state, _field, SSISlave), \ +} + +DeviceState *ssi_create_slave(SSIBus *bus, const char *name); +DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name); + +/* Master interface. */ +SSIBus *ssi_create_bus(DeviceState *parent, const char *name); + +uint32_t ssi_transfer(SSIBus *bus, uint32_t val); + +/* Automatically connect all children nodes a spi controller as slaves */ +void ssi_auto_connect_slaves(DeviceState *parent, qemu_irq *cs_lines, + SSIBus *bus); + +/* max111x.c */ +void max111x_set_input(DeviceState *dev, int line, uint8_t value); + +#endif