From patchwork Tue Apr 17 14:18:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Pavan Boddu X-Patchwork-Id: 10345513 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 0B8AF60542 for ; Tue, 17 Apr 2018 15:56:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F30B128450 for ; Tue, 17 Apr 2018 15:56:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E75FD2845E; Tue, 17 Apr 2018 15:56:15 +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=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, 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 3F95A28484 for ; Tue, 17 Apr 2018 15:56:15 +0000 (UTC) Received: from localhost ([::1]:46941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8Sxq-0005Rt-98 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Apr 2018 11:56:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8SuJ-0002vQ-J3 for qemu-devel@nongnu.org; Tue, 17 Apr 2018 11:52:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8SuE-0004L5-O8 for qemu-devel@nongnu.org; Tue, 17 Apr 2018 11:52:35 -0400 Received: from mail-by2nam01on0074.outbound.protection.outlook.com ([104.47.34.74]:58464 helo=NAM01-BY2-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 1f8SuE-0004JZ-5c for qemu-devel@nongnu.org; Tue, 17 Apr 2018 11:52:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/2ZbXAb5F4Sq6sBI/IGgdJkaVbcZB1+oV/be8Bk5H3E=; b=eHCfbr43R8w2bsow3lxzsMtH7IGjWMa0lG4V8asIk2uSwq5p+WJGVowkmfDhly9CfVvVPrAM319DvLT8+Sr9JbC01PUtqeryucG9ao2u6aJqNvBuvczDPFr93t3OX58bDalDkEnwSMwnT0vG8Xo8hjYc0iK9UE7W9eWc3+tpZtw= Received: from BYAPR02CA0020.namprd02.prod.outlook.com (2603:10b6:a02:ee::33) by CY1PR02MB2011.namprd02.prod.outlook.com (2a01:111:e400:c5ab::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.14; Tue, 17 Apr 2018 14:18:28 +0000 Received: from CY1NAM02FT055.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::206) by BYAPR02CA0020.outlook.office365.com (2603:10b6:a02:ee::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.675.10 via Frontend Transport; Tue, 17 Apr 2018 14:18:27 +0000 Authentication-Results: spf=none (sender IP is 149.199.60.100) smtp.mailfrom=xhdsaipava40.localdomain; nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=xilinx.com; Received-SPF: None (protection.outlook.com: xhdsaipava40.localdomain does not designate permitted sender hosts) Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT055.mail.protection.outlook.com (10.152.74.80) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.675.14 via Frontend Transport; Tue, 17 Apr 2018 14:18:27 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:47499 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1f8RRC-0007kv-Pv; Tue, 17 Apr 2018 07:18:26 -0700 Received: from [127.0.0.1] (helo=xsj-smtp-dlp2.xlnx.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1f8RR7-0000d7-Hc; Tue, 17 Apr 2018 07:18:21 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w3HEIK5p011008; Tue, 17 Apr 2018 07:18:20 -0700 Received: from [172.23.37.96] (helo=xhdsaipava40.localdomain) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1f8RR5-0000cW-UB; Tue, 17 Apr 2018 07:18:20 -0700 Received: by xhdsaipava40.localdomain (Postfix, from userid 14131) id 154D94C10BF; Tue, 17 Apr 2018 19:48:19 +0530 (IST) From: Sai Pavan Boddu To: , , , , Date: Tue, 17 Apr 2018 19:48:16 +0530 Message-ID: <1523974696-1965-2-git-send-email-saipava@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523974696-1965-1-git-send-email-saipava@xilinx.com> References: <1523974696-1965-1-git-send-email-saipava@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-Result: No--1.605-7.0-31-1 X-imss-scan-details: No--1.605-7.0-31-1;No--1.605-5.0-31-1 X-TM-AS-User-Approved-Sender: No;No X-TM-AS-Result-Xfilter: Match text exemption rules:No 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)(396003)(346002)(376002)(39380400002)(39860400002)(2970300002)(428003)(249900001)(189003)(199004)(50226002)(50466002)(48376002)(4326008)(47776003)(356003)(90966002)(5660300001)(26005)(86372001)(16586007)(52956003)(8936002)(36756003)(81166006)(8676002)(81156014)(2201001)(42186006)(110136005)(6666003)(2616005)(316002)(498600001)(486006)(11346002)(476003)(126002)(446003)(336012)(105586002)(103686004)(51416003)(106466001)(76176011)(305945005)(2906002)(6266002)(42882007)(63266004)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR02MB2011; H:xsj-pvapsmtpgw02; FPR:; SPF:None; LANG:en; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; MX:0; A:0; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT055; 1:mYo69Q006c3rTDeaU/RgUAGJ2qCvhBsVCek8qxqeVwtnojnN8ElY3UdtVgwYdfhEH1MIF6fuYeOV7ZlQ4oM98eZ1kybkdFBpaK0Usb/c5Pfsb8myPPHeAt8C+Ep5WZbW MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(2017052603328)(7153060); SRVR:CY1PR02MB2011; X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB2011; 3:3mxzPlha/hexyE7yJTuHoCzYNS3RVtlOsoAcfWgePfKhafSo27fmLTjTRAA0tc3WPbIJPG7iLCyYeVJT155ssMabJPyxdZcZnj2+eyv0vSrFpe9l88Q71KOucVq9G4u8Z6ax9hYSksBJrcB5jHGNDFUOcfEk1gH+WVXyU7OmYX4L3BCD5etTrwJtHc+b3Ze0Nl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AOhJjpWZpiSzVGCFrEgXKj6vQFtgGp0pVC2oLUvqrJoX1W3nFJFwjmqpy+fPmKkKxLdQk5VaU1HY8htvlVf6Jrmg682JkmSYOBKAUefYnnE+wX+pDH6/UaZIVo0sFP8JPJD1n3D0t2Rmr6Mu8gjWInzhWaKPCAZ3Tlxp2JKmhQsbmT8t/resn4kV1oh7LapZsJcUu0qAgW7K2Ixvc4iTUJc1jStleHeTor0uxKWgQC4t6ggsWf7nSrWEmQg X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501327)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:CY1PR02MB2011; BCL:0; PCL:0; RULEID:; SRVR:CY1PR02MB2011; X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB2011; 4:g4y1eZP1XGLhr5k/4gUgJQy6940mPBBly/sZDWTJmhWH6vraCaknLB2Z5D/tFEFvX0+1N5tEjFQiwTfnB0qpvl9FMDZdQjAoxNF5oVuGThl5Jwb0zeiP4fH+kSDFOoSbFcSGiAXZc4AD0UyjZ/synYUISzXVGvRkN5AQH7XhozAuBaub+ccKRAqjIstBMK2MSbL8q2Df4UEm77pOu6bz/ogYLZuVXnafXWOGwUMPphkBzfRT5cIVruFPPU8dgl+SlEEdOqhaKkLeFio26Sv403P1+oiUSdtozi+ikwDnVSkhlOqNHzX320PK7VYhB/C+ X-Forefront-PRVS: 0645BEB7AA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR02MB2011; 23:h4L/xGXJgopqYLMt6we4FsN4N1PaHLyjBGaVfGPLn?= =?us-ascii?Q?t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fKZoCiovuuUL1+IMegJOkjwFTDMGrhm9Twyc8QqUaF8OlKfR7nfKfb3zkxDtRWAE6RXSr86iVxbIUyM69XiB2uk/3Ajip7reEJEDUFGN6vdi4tCRNXQLe5WLX4Cd22ec9qLWbzWve1BY0jk5TSBcbF6wlbpECYZUYeAmlOAbI=; 24:qpTVBhQjuxSPvrwurE2qF22JHV6L7x5eg1Xdtpx58Nv+W1e+r0HC1i8uqXAAAebz6l4MlJS93ujKlLpSmtFfiK6sz9mzxBNuyY0DlrGXI8o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB2011; 7:z57kAe7WKaZ1OXH6sxCopEaXWmfalj6op+0iZ+6WXcnFISST93KHhEBIeCa0HLmrLwY4ude0e57H6TAgyMUY47POa1WXZXVDliirdegjhPyk4gX5iBKQrQO/k/uMzCQ3LbCf8V+2W85X05Z6D1AmPylsiu/UNjHMwmgUFTDEdM+bFm58kA2jBtfVC9rqZU3wIFgv8WuSTYO8+g59XMgH3V9nAngerraCcmYzDCash6j/UOQxqGj9cO6FfvtN+ub7 X-MS-Office365-Filtering-Correlation-Id: 4b40027c-27ad-473d-88f0-08d5a46e1678 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2018 14:18:27.2211 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b40027c-27ad-473d-88f0-08d5a46e1678 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: CY1PR02MB2011 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.34.74 Subject: [Qemu-devel] [PATCH v1 1/1] xilinx_spips: send dummy only if cmd requires it 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: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP For all the commands, which do not have an entry in xilinx_spips_num_dummies, present logic sends dummy byte when ever we are in SNOOP_NONE state, fix it to send only if cmd requires them. Only transmit max of 1 dummy byte(i.e 8 cycles) is a single snoop cycle. And also convert dummy bytes to cycles (required by m25p80). Signed-off-by: Sai Pavan Boddu Signed-off-by: Sai Pavan Boddu --- hw/ssi/xilinx_spips.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index 426f971..8278930 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -627,10 +627,17 @@ static void xilinx_spips_flush_txfifo(XilinxSPIPS *s) tx_rx[i] = tx; } } else { - /* Extract a dummy byte and generate dummy cycles according to the - * link state */ tx = fifo8_pop(&s->tx_fifo); - dummy_cycles = 8 / s->link_state; + if (s->cmd_dummies > 0) { + /* Extract a dummy byte and generate dummy cycles according to + * the link state */ + dummy_cycles = (s->cmd_dummies ? 1 : 0) * 8 / s->link_state; + s->cmd_dummies--; + } else { + for (i = 0; i < num_effective_busses(s); ++i) { + tx_rx[i] = tx; + } + } } for (i = 0; i < num_effective_busses(s); ++i) {