From patchwork Tue Dec 14 11:01:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12696064 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E76E7C433F5 for ; Tue, 14 Dec 2021 11:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zAO3o/oV4y6KAeI2dYgs/GbhOZ8CYSc7MMKnxDpAQ0E=; b=Imo5DESBRTn4CN qhu7VDPFuWoGp/Iw6TqkAdTMIbQn3e+wguBOT+6X070D6BFCeCyyLVFM7gbPlCyKR/7/vSYM3tL2M YvzImdWpPaSGYfBgapdSADbvmSPGdUIMPCyROFr84OGAobgd+EWQONTaI8nMs5FCnN1Ly2+hWGKWf 5E7CvPgGqbaMo3gqsO+6npn9MRWYFnvDRKRgYi7EIe2uyLKKynTOdvMHiTzrzhO9e438a8IdqsjaP REy3jbwXU7TCQS5B6UPTGG/LEmXAaBF0cSsgeBFFs4dLvhbMe8UZM7JAqUl6oZx1QHHrQZGmmvCvl ncMUPYda8ga+7uLbw1/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx5Za-00Dc8s-8j; Tue, 14 Dec 2021 11:02:18 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx5ZI-00Dc2Z-17 for linux-arm-kernel@lists.infradead.org; Tue, 14 Dec 2021 11:02:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639479719; x=1671015719; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lDbdt0qppU9wkR9JXAW96NVTHS8jtIsFV54SHK4VGNA=; b=FXN55r4FiuytVnljFcBsjf4TO66fKmgzoyZgCSr+9sxuGoZBkS1eisOQ RwGWHtmWhJ6OtQTOpxmJlOz+Je1zIIAkn6RT+dIHTDmYX2vcGS+95kQS7 8+FpREHpfGB9Ft0hUHjUrpclUFf5obRgMLhBV8Wqfqq0dIfNea5h/dLzW ssRI2WmdsVJJGrSOqam4UEvgXv9qD+MkEg8TMNNlNknrwSQgkWnP3WBmC WWM/0uuJeiPr3txFx8ZffxuQc9fgbv3Hvdr39x2uc4GJe/tGCzuaIeONN dVbqsAcnInh+t+nDx88yxbJHWNmfYH7Gq0ckwkpYdkVXyikvTOIwgY/e3 A==; IronPort-SDR: na9vk+T6vMPwaRIF0TaHjTbid5V+jm7SnUvvLGkVSeET5HFRjTA5au+2yq5n1kF4UHGbRAGCVN o5zVHni4p6BuoRGUgnctXG4f6kt8LtQP6xiqFmEDMeAZndDzRqa5VwB8qQlfGblqMp0GctUFxd FmbdD4k4RlmyFf0OzkdqVbqW2O690gZ1sQOcEV1GjnftEmxaaO1uVqi5XHHCiK52GN40i8EffT Ba1K6HgyyqbbEP/iSLTVHmBFV76oTnkzygDUhlovEJ9A9Lp4kQkSID5upaHupUHytls7QnQBKw SZz67F+ZWYnLmaUyCCCp7XvE X-IronPort-AV: E=Sophos;i="5.88,205,1635231600"; d="scan'208";a="155413491" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Dec 2021 04:01:59 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 14 Dec 2021 04:01:59 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 14 Dec 2021 04:01:56 -0700 From: Tudor Ambarus To: , , CC: , , , , "Tudor Ambarus" Subject: [PATCH] Revert "spi: spi-zynqmp-gqspi: add mutex locking for exec_op" Date: Tue, 14 Dec 2021 13:01:52 +0200 Message-ID: <20211214110152.48316-2-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211214110152.48316-1-tudor.ambarus@microchip.com> References: <20211214110152.48316-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211214_030200_103921_6218DCD5 X-CRM114-Status: UNSURE ( 8.10 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This reverts commit a0f65be6e880a14d3445b75e7dc03d7d015fc922. SPIMEM uses ctlr->bus_lock_mutex to prevent concurrency on ctlr->mem_ops->exec_op(). Signed-off-by: Tudor Ambarus --- drivers/spi/spi-zynqmp-gqspi.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c index 328b6559bb19..189fe4eb59ad 100644 --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -174,7 +174,6 @@ struct zynqmp_qspi { u32 genfifoentry; enum mode_type mode; struct completion data_completion; - struct mutex op_lock; }; /** @@ -946,7 +945,6 @@ static int zynqmp_qspi_exec_op(struct spi_mem *mem, op->cmd.opcode, op->cmd.buswidth, op->addr.buswidth, op->dummy.buswidth, op->data.buswidth); - mutex_lock(&xqspi->op_lock); zynqmp_qspi_config_op(xqspi, mem->spi); zynqmp_qspi_chipselect(mem->spi, false); genfifoentry |= xqspi->genfifocs; @@ -1069,7 +1067,6 @@ static int zynqmp_qspi_exec_op(struct spi_mem *mem, return_err: zynqmp_qspi_chipselect(mem->spi, true); - mutex_unlock(&xqspi->op_lock); return err; } @@ -1143,8 +1140,6 @@ static int zynqmp_qspi_probe(struct platform_device *pdev) init_completion(&xqspi->data_completion); - mutex_init(&xqspi->op_lock); - pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT); pm_runtime_set_active(&pdev->dev);