From patchwork Tue Feb 9 22:15:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 8266151 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6DEE79F38B for ; Tue, 9 Feb 2016 22:26:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE0B720263 for ; Tue, 9 Feb 2016 22:26:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D48C02022D for ; Tue, 9 Feb 2016 22:26:15 +0000 (UTC) Received: from localhost ([::1]:33022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTGjf-0000J6-5Y for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Feb 2016 17:26:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTGbe-0004PM-Pv for qemu-devel@nongnu.org; Tue, 09 Feb 2016 17:17:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTGbZ-0001EM-Vv for qemu-devel@nongnu.org; Tue, 09 Feb 2016 17:17:58 -0500 Received: from mail-sn1nam02on0048.outbound.protection.outlook.com ([104.47.36.48]:55760 helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTGbZ-0001Dx-Os for qemu-devel@nongnu.org; Tue, 09 Feb 2016 17:17:53 -0500 Received: from BL2NAM02FT038.eop-nam02.prod.protection.outlook.com (10.152.76.53) by BL2NAM02HT086.eop-nam02.prod.protection.outlook.com (10.152.77.24) with Microsoft SMTP Server (TLS) id 15.1.409.7; Tue, 9 Feb 2016 22:17:52 +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 BL2NAM02FT038.mail.protection.outlook.com (10.152.77.25) with Microsoft SMTP Server (TLS) id 15.1.409.7 via Frontend Transport; Tue, 9 Feb 2016 22:17:51 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:35472 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1aTGbX-0002n4-6P; Tue, 09 Feb 2016 14:17:51 -0800 Received: from [127.0.0.1] (port=42691 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1aTGbX-0007d1-0o; Tue, 09 Feb 2016 14:17:51 -0800 Received: from xsj-tvapsmtp02 (smtptest.xilinx.com [172.16.1.203]) by tsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u19MCAxf011657; Tue, 9 Feb 2016 14:12:10 -0800 Received: from [172.19.74.182] (port=49742 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1aTGbW-0007cy-6H; Tue, 09 Feb 2016 14:17:50 -0800 From: Alistair Francis To: , Date: Tue, 9 Feb 2016 14:15:15 -0800 Message-ID: <1379d26a566c79cd46ff6c1be6ae3aca774d2f18.1455055858.git.alistair.francis@xilinx.com> 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-22054.006 X-TM-AS-Result: No--7.495-7.0-31-10 X-imss-scan-details: No--7.495-7.0-31-10 X-TMASE-MatchedRID: FLM/XMu7PFkTM9W/O3MZkxWCVBr+Ay98PgfiGiot4kmd6MvqeSL/bKIE yyeXxq2IX63Z4CdGSRWMBuS4VWoNntqmPT8JRdq4A9lly13c/gFJxv2+zCdQ5vNhzIgXtFJV+1B ysa1PtqS/hGLQWurbj3xplYx1zCP9HYnnQdbx7N7N+qWlu2ZxaM1eA/uWJnkiG5pI8b6yQeGjxY yRBa/qJcFwgTvxipFajoczmuoPCq0PaW95I9MTD322tNjy6JH2n5XWjykByifSGcaulAAMkYDaD gFHA+Op X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.96; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(77096005)(33646002)(87936001)(48376002)(106466001)(118296001)(19580405001)(11100500001)(5003940100001)(19580395003)(575784001)(50466002)(6806005)(229853001)(2950100001)(5001960100002)(86362001)(36756003)(5008740100001)(5003600100002)(85426001)(4326007)(5890100001)(105606002)(50226001)(47776003)(5001770100001)(2906002)(189998001)(64026002)(1220700001)(1096002)(92566002)(586003)(76176999)(50986999)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2NAM02HT086; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: b77a0811-27c2-42ec-d8ad-08d3319ed9fb X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2NAM02HT086; X-Microsoft-Antispam-PRVS: <8b31e02607ea4f5ba3cd0ae8bd54945c@BL2NAM02HT086.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)(13017025)(5005006)(13015025)(13024025)(8121501046)(13023025)(13018025)(10201501046)(3002001); SRVR:BL2NAM02HT086; BCL:0; PCL:0; RULEID:; SRVR:BL2NAM02HT086; X-Forefront-PRVS: 08476BC6EF X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2016 22:17:51.8470 (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: BL2NAM02HT086 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.48 Cc: edgar.iglesias@xilinx.com, alistair.francis@xilinx.com, crosthwaitepeter@gmail.com, edgar.iglesias@gmail.com, alex.bennee@linaro.org, afaerber@suse.de, fred.konrad@greensocs.com Subject: [Qemu-devel] [PATCH v4 16/16] xlnx-zynqmp: Connect the ZynqMP IOU SLCR 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Connect the I/O Unit System Level Control Registers device to the ZynqMP model. Unfortunatly the GPIO links can not be connected yet as the SD device is not yet attached to the ZynqMP machine. Signed-off-by: Alistair Francis --- V2: - Fix up device connection hw/arm/xlnx-zynqmp.c | 13 +++++++++++++ include/hw/arm/xlnx-zynqmp.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 1508d08..6d1b797 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -33,6 +33,8 @@ #define SATA_ADDR 0xFD0C0000 #define SATA_NUM_PORTS 2 +#define IOU_SLCR_ADDR 0xFF180000 + static const uint64_t gem_addr[XLNX_ZYNQMP_NUM_GEMS] = { 0xFF0B0000, 0xFF0C0000, 0xFF0D0000, 0xFF0E0000, }; @@ -132,6 +134,10 @@ static void xlnx_zynqmp_init(Object *obj) TYPE_XILINX_SPIPS); qdev_set_parent_bus(DEVICE(&s->spi[i]), sysbus_get_default()); } + + object_initialize(&s->iou_slcr, sizeof(s->iou_slcr), + TYPE_XLNX_ZYNQMP_IOU_SLCR); + qdev_set_parent_bus(DEVICE(&s->iou_slcr), sysbus_get_default()); } static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) @@ -355,6 +361,13 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) &error_abort); g_free(bus_name); } + + object_property_set_bool(OBJECT(&s->iou_slcr), true, "realized", &err); + if (err) { + error_propagate(errp, err); + return; + } + sysbus_mmio_map(SYS_BUS_DEVICE(&s->iou_slcr), 0, IOU_SLCR_ADDR); } static Property xlnx_zynqmp_props[] = { diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h index 2332596..8fff0ae 100644 --- a/include/hw/arm/xlnx-zynqmp.h +++ b/include/hw/arm/xlnx-zynqmp.h @@ -22,6 +22,7 @@ #include "hw/intc/arm_gic.h" #include "hw/net/cadence_gem.h" #include "hw/char/cadence_uart.h" +#include "hw/misc/xlnx-zynqmp-iou-slcr.h" #include "hw/ide/pci.h" #include "hw/ide/ahci.h" #include "hw/sd/sdhci.h" @@ -81,6 +82,7 @@ typedef struct XlnxZynqMPState { SysbusAHCIState sata; SDHCIState sdhci[XLNX_ZYNQMP_NUM_SDHCI]; XilinxSPIPS spi[XLNX_ZYNQMP_NUM_SPIS]; + XlnxZynqMPIOUSLCR iou_slcr; char *boot_cpu; ARMCPU *boot_cpu_ptr;