From patchwork Fri Jan 15 22:38:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 8044871 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4FEA6BEEE5 for ; Fri, 15 Jan 2016 22:43:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3BCD2037E for ; Fri, 15 Jan 2016 22:43:02 +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 D65FF20380 for ; Fri, 15 Jan 2016 22:42:58 +0000 (UTC) Received: from localhost ([::1]:49239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKD58-00059Z-8U for patchwork-qemu-devel@patchwork.kernel.org; Fri, 15 Jan 2016 17:42:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKD3P-0002W8-Pb for qemu-devel@nongnu.org; Fri, 15 Jan 2016 17:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKD3M-0007Zp-K3 for qemu-devel@nongnu.org; Fri, 15 Jan 2016 17:41:11 -0500 Received: from mail-cys01nam02on0050.outbound.protection.outlook.com ([104.47.37.50]:47712 helo=NAM02-CY1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKD3M-0007ZO-Di for qemu-devel@nongnu.org; Fri, 15 Jan 2016 17:41:08 -0500 Received: from CY1NAM02FT015.eop-nam02.prod.protection.outlook.com (10.152.74.51) by CY1NAM02HT183.eop-nam02.prod.protection.outlook.com (10.152.74.139) with Microsoft SMTP Server (TLS) id 15.1.355.15; Fri, 15 Jan 2016 22:40:47 +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 CY1NAM02FT015.mail.protection.outlook.com (10.152.75.146) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Fri, 15 Jan 2016 22:40:46 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:55769 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1aKD2z-0006Q9-Om; Fri, 15 Jan 2016 14:40:45 -0800 Received: from [127.0.0.1] (port=34755 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1aKD2z-0007qD-JG; Fri, 15 Jan 2016 14:40:45 -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 u0FMZDVq031384; Fri, 15 Jan 2016 14:35:14 -0800 Received: from [172.19.74.182] (port=49656 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1aKD2y-0007qA-Vk; Fri, 15 Jan 2016 14:40:44 -0800 From: Alistair Francis To: Date: Fri, 15 Jan 2016 14:38:21 -0800 Message-ID: <5fd65a74582558b85d50f35f5593d9d3d45bea1f.1452896266.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--8.665-7.0-31-10 X-imss-scan-details: No--8.665-7.0-31-10 X-TMASE-MatchedRID: 0UHWSJo3Ffzq1YwE48CuW2NW0DAjL5p+MyouZnRyPDjfUZT83lbkEN6M yUV+2+DZWaRPxa0jBgl0JhkA9J6KtZ7oe7OF0U2WkDpLRKO9xhSxZOddVMlEZzk+lvlzfsWngo4 eB1LnWgiE97yr4g+GPoAy6p60ZV62fJ5/bZ6npdg7AFczfjr/7LMaxzFPQQsNNS9cJ1YP8kEcsV nNYPwTLc6Vcmdz7qncnaHJVAYfvmA= 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)(71366001)(50986999)(2906002)(2950100001)(5003940100001)(106466001)(5001960100002)(189998001)(1096002)(118296001)(47776003)(229853001)(50466002)(81156007)(76176999)(105606002)(97736004)(11100500001)(50226001)(92566002)(1220700001)(110136002)(33646002)(48376002)(19580395003)(5003600100002)(5008740100001)(19580405001)(64026002)(87936001)(2351001)(77096005)(6806005)(85426001)(86362001)(586003)(4326007)(36756003)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1NAM02HT183; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; PTR:ErrorRetry; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 8a61e58c-752b-41d2-1b7b-08d31dfce8e0 X-Exchange-Antispam-Report-Test: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:CY1NAM02HT183; UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(13015025)(5005006)(13017025)(13018025)(10201501046)(3002001); SRVR:CY1NAM02HT183; BCL:0; PCL:0; RULEID:; SRVR:CY1NAM02HT183; X-Forefront-PRVS: 08220FA8D6 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2016 22:40:46.3305 (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: CY1NAM02HT183 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.37.50 Cc: peter.maydell@linaro.org, crosthwaitepeter@gmail.com, alistair.francis@xilinx.com Subject: [Qemu-devel] [PATCH v7 6/6] xlnx-ep108: Connect the SPI Flash 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 sst25wf080 SPI flash to the EP108 board. Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite Signed-off-by: Peter Crosthwaite --- hw/arm/xlnx-ep108.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/arm/xlnx-ep108.c b/hw/arm/xlnx-ep108.c index 9099025..4dc21c9 100644 --- a/hw/arm/xlnx-ep108.c +++ b/hw/arm/xlnx-ep108.c @@ -30,6 +30,7 @@ static struct arm_boot_info xlnx_ep108_binfo; static void xlnx_ep108_init(MachineState *machine) { XlnxEP108 *s = g_new0(XlnxEP108, 1); + int i; Error *err = NULL; uint64_t ram_size = machine->ram_size; @@ -62,6 +63,20 @@ static void xlnx_ep108_init(MachineState *machine) exit(1); } + for (i = 0; i < XLNX_ZYNQMP_NUM_SPIS; i++) { + SSIBus *spi_bus; + DeviceState *flash_dev; + qemu_irq cs_line; + gchar *bus_name = g_strdup_printf("spi%d", i); + + spi_bus = (SSIBus *)qdev_get_child_bus(DEVICE(&s->soc), bus_name); + + flash_dev = ssi_create_slave(spi_bus, "sst25wf080"); + cs_line = qdev_get_gpio_in_named(flash_dev, SSI_GPIO_CS, 0); + + sysbus_connect_irq(SYS_BUS_DEVICE(&s->soc.spi[i]), 1, cs_line); + } + xlnx_ep108_binfo.ram_size = ram_size; xlnx_ep108_binfo.kernel_filename = machine->kernel_filename; xlnx_ep108_binfo.kernel_cmdline = machine->kernel_cmdline;