From patchwork Wed Feb 28 22:32:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 10250051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D5CF160212 for ; Wed, 28 Feb 2018 22:38:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE7A728C1D for ; Wed, 28 Feb 2018 22:38:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1D0128E57; Wed, 28 Feb 2018 22:38:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 0EF1528C1D for ; Wed, 28 Feb 2018 22:38:32 +0000 (UTC) Received: from localhost ([::1]:47431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erAMp-00028v-Ma for patchwork-qemu-devel@patchwork.kernel.org; Wed, 28 Feb 2018 17:38:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erALL-0000rW-K7 for qemu-devel@nongnu.org; Wed, 28 Feb 2018 17:37:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erALH-0008Ob-CC for qemu-devel@nongnu.org; Wed, 28 Feb 2018 17:36:59 -0500 Received: from mail-sn1nam02on0078.outbound.protection.outlook.com ([104.47.36.78]:5664 helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erALG-0008Nb-U2 for qemu-devel@nongnu.org; Wed, 28 Feb 2018 17:36:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DIbZHJAeaX5JWqlyRrotDuS70zM6ElETHlwq5W1xQGA=; b=BV512XmcTzDkk960T2c06D1Gyj9/7voTatKKGpHcZxS5ze18f0QkaXIcRRIOPU2TPkFn5mHW8oFW92tAGH0ErjlAo3guOziAwXdy+BJv6JkGJCjfrRRdlhw/xtuVJ2JX7XFxrZqEgJgAFd1qMt2OYNVqY98iSZPx0PaLCtXkSZ4= Received: from BY2PR02CA0126.namprd02.prod.outlook.com (2a01:111:e400:5261::52) by DM2PR02MB1305.namprd02.prod.outlook.com (2a01:111:e400:50c8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Wed, 28 Feb 2018 22:36:51 +0000 Received: from CY1NAM02FT005.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::202) by BY2PR02CA0126.outlook.office365.com (2a01:111:e400:5261::52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.527.15 via Frontend Transport; Wed, 28 Feb 2018 22:36:50 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT005.mail.protection.outlook.com (10.152.74.117) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.527.18 via Frontend Transport; Wed, 28 Feb 2018 22:36:50 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:56051 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1erALB-0003OW-Nr; Wed, 28 Feb 2018 14:36:49 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1erALB-0005pS-LS; Wed, 28 Feb 2018 14:36:49 -0800 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w1SMadt4017667; Wed, 28 Feb 2018 14:36:39 -0800 Received: from [172.19.2.220] (helo=xsjalistai50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1erAL1-0005o9-NW; Wed, 28 Feb 2018 14:36:39 -0800 From: Alistair Francis To: , , Date: Wed, 28 Feb 2018 14:32:01 -0800 Message-ID: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(396003)(39380400002)(39860400002)(346002)(376002)(2980300002)(438002)(189003)(199004)(2906002)(8936002)(36386004)(316002)(2201001)(81166006)(81156014)(106002)(305945005)(50226002)(8676002)(6666003)(63266004)(2950100002)(106466001)(9786002)(36756003)(110136005)(356003)(16586007)(77096007)(54906003)(48376002)(118296001)(5660300001)(39060400002)(47776003)(4326008)(186003)(26005)(50466002)(336011)(51416003)(478600001)(76176011)(7696005)(107986001)(217873001)(5001870100001)(2101003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR02MB1305; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT005; 1:3EOI0nBPOPJoAcYe5NWbO2YKQNrr8gRw2zptaCp3L7Tr0alNt8ugq8vUK7SmksdqF/sTxBofZDS7Dzkj2SZXm6njVuEYCGoRET8nNhx1blTD183sgklYgPQpPBVx71BR MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7cdf468c-80a5-4acc-4a15-08d57efbc257 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:DM2PR02MB1305; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1305; 3:ips9+Xb4p4BstgoZqat17Fe494IO/v1ye+/3YNJe7ZkFSfHB3De93JrfnQ1oRZlNAME2G9pg00TveK+SMLczHAQmSqw1s26z1jZbCrRYgSyzSPcudMOtA6uomCSrbDBF+Ls/WkSSXW6pvzcMyEJptiPqIVzqJMucMgqbJGym9jv2z25cxMw6HP1ygZYvaZqHgbw7uUHjC/rLoTwWOVQKOVarvXxfO897Zl3iyUybMnsaWIgCh3U+mMm99K2wsjWb1XaufQZz8YOgcEEFviwcZGKwri2ybfimWB6M6rDTQs1oUyrHByMju1wVutB7FRFBTeCrC1d6TY2vK1W5jb+xIIMUedlVNFyID5JM37MDOwg=; 25:2UzlHG0OCZO8T/8CpqLvITvLMzg5ShsCNH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x3voO1/dJENOlHX9YRoYvN+0Gz1CkhhnDePiUMdIB0J X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(21532816269658); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(5005006)(8121501046)(10201501046)(3231220)(944501220)(52105095)(3002001)(93006095)(93004095)(6055026)(6041288)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:DM2PR02MB1305; BCL:0; PCL:0; RULEID:; SRVR:DM2PR02MB1305; X-Microsoft-Exchange-Diagnostics: 1; DM2PR02MB1305; 4:j3KmDaeNTodWR09SqZttoPzwFSLCL5XJpcWOVpfh49CbnF4W+QPRy/bFht2AzuUTUTbe17ozMzLDmsmQhd/QX1ucpSmnZGZlC0/buR7P7cnWpAUJY+MzPODTQ3uQd56XMT+2xB1EJS5DIVJlr0JGfwI4H79AfS7HkXMXln67C6O8AKBPkI0COtVnez8iSkuVdLbgxKLTytmxYum+n1rcJS15LJn7CkCzM5RDS376ZCcJCVOx5rd/oAFHUzyee3958IWnaYbNhb+IHxkG630s8uf+lJcpzaDu4ISp8qucAWYyWfz8oIlQI7Je37FlhvAyhcOB18vpPW/SJJ6SiYNLxyFLydoZ3LnnXBD9xEzBDbs= X-Forefront-PRVS: 0597911EE1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR02MB1305; 23:3Ust1sz0PUotgB+khmmHrd5C0FWjDwZ9akFtHmNof?= =?us-ascii?Q?+dMnzbFdF7t6McxzO8dcOmYQzoH1y9UxmnlhtnbDymVsQNK51B+zGPs6FaG0?= =?us-ascii?Q?1/DhfzFea/dR146kW9NPa7DP+KQyBONdvt2y0jYFuE9zFISF+iwzXcnO3SJ5?= =?us-ascii?Q?3gAg8RsIzk7I/Efdhhxh7azui+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9Il51sBkdZp3/W8TDOhvkzHcrzB+AFGu1+I/ARfza6agbwRCvbM4N0yI93LKoBbEMoMBYK1R+gKiZDk9Jih6OnYVNHefNq8zPIVvzu2q SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2018 22:36:50.2372 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7cdf468c-80a5-4acc-4a15-08d57efbc257 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.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR02MB1305 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.78 Subject: [Qemu-devel] [PATCH v2 2/5] xlnx-zynqmp-pmu: Connect the PMU IOMOD PIT devices X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé --- hw/microblaze/xlnx-zynqmp-pmu.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c index 999a5657cf..35a2314ffb 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -26,6 +26,7 @@ #include "hw/intc/xlnx-zynqmp-ipi.h" #include "hw/intc/xlnx-pmu-iomod-intc.h" +#include "hw/timer/xlnx-pmu-iomod-pit.h" /* Define the PMU device */ @@ -40,6 +41,7 @@ #define XLNX_ZYNQMP_PMU_INTC_ADDR 0xFFD40000 #define XLNX_ZYNQMP_PMU_NUM_IPIS 4 +#define XLNX_ZYNQMP_PMU_NUM_PITS 4 static const uint64_t ipi_addr[XLNX_ZYNQMP_PMU_NUM_IPIS] = { 0xFF340000, 0xFF350000, 0xFF360000, 0xFF370000, @@ -48,6 +50,13 @@ static const uint64_t ipi_irq[XLNX_ZYNQMP_PMU_NUM_IPIS] = { 19, 20, 21, 22, }; +static const uint64_t pit_addr[XLNX_ZYNQMP_PMU_NUM_PITS] = { + 0xFFD40040, 0xFFD40050, 0xFFD40060, 0xFFD40070, +}; +static const uint64_t pit_irq[XLNX_ZYNQMP_PMU_NUM_PITS] = { + 3, 4, 5, 6, +}; + typedef struct XlnxZynqMPPMUSoCState { /*< private >*/ DeviceState parent_obj; @@ -147,7 +156,9 @@ static void xlnx_zynqmp_pmu_init(MachineState *machine) MemoryRegion *pmu_rom = g_new(MemoryRegion, 1); MemoryRegion *pmu_ram = g_new(MemoryRegion, 1); XlnxZynqMPIPI *ipi[XLNX_ZYNQMP_PMU_NUM_IPIS]; + XlnxPMUPIT *pit[XLNX_ZYNQMP_PMU_NUM_PITS]; qemu_irq irq[32]; + qemu_irq tmp_irq; int i; /* Create the ROM */ @@ -186,6 +197,30 @@ static void xlnx_zynqmp_pmu_init(MachineState *machine) sysbus_connect_irq(SYS_BUS_DEVICE(ipi[i]), 0, irq[ipi_irq[i]]); } + /* Create and connect the IOMOD PIT devices */ + for (i = 0; i < XLNX_ZYNQMP_PMU_NUM_PITS; i++) { + pit[i] = g_new0(XlnxPMUPIT, 1); + object_initialize(pit[i], sizeof(XlnxPMUPIT), TYPE_XLNX_ZYNQMP_IOMODULE_PIT); + qdev_set_parent_bus(DEVICE(pit[i]), sysbus_get_default()); + } + + for (i = 0; i < XLNX_ZYNQMP_PMU_NUM_PITS; i++) { + object_property_set_bool(OBJECT(pit[i]), true, "realized", + &error_abort); + sysbus_mmio_map(SYS_BUS_DEVICE(pit[i]), 0, pit_addr[i]); + sysbus_connect_irq(SYS_BUS_DEVICE(pit[i]), 0, irq[pit_irq[i]]); + } + + /* PIT1 hits into PIT0 */ + tmp_irq = qdev_get_gpio_in_named(DEVICE(pit[0]), "ps_hit_in", 0); + qdev_connect_gpio_out_named(DEVICE(pit[1]), "ps_hit_out", 0, tmp_irq); + + /* PIT3 hits into PIT2 */ + tmp_irq = qdev_get_gpio_in_named(DEVICE(pit[2]), "ps_hit_in", 0); + qdev_connect_gpio_out_named(DEVICE(pit[3]), "ps_hit_out", 0, tmp_irq); + + /* TODO: PIT0 and PIT2 "ps_config" GPIO goes to The GPO1 device. */ + /* Load the kernel */ microblaze_load_kernel(&pmu->cpu, XLNX_ZYNQMP_PMU_RAM_ADDR, machine->ram_size,