From patchwork Tue Dec 14 11:01:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12696063 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 5319BC433F5 for ; Tue, 14 Dec 2021 11:03:34 +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: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:In-Reply-To:References: List-Owner; bh=zAO3o/oV4y6KAeI2dYgs/GbhOZ8CYSc7MMKnxDpAQ0E=; b=WQFYKSh3q/2/xf XBK/ui5ukazoTg02L7kh08j6kvvimbDz4oN/cUoOGszXz18SRCutl/G03nx6QA8ro7OAJfdJrrMvD MV+g1FjQz7lvBsD5K1y2o4AdASM4S1XZrOCfVv8YGUmM6f4k9M/RrxyVrRptDTODV4SKg3f1JFGqe D6QgWUuSFMuBAjmY+G3YFpeNi5aExkUt9ZW/MHxcnUQLSUNSQCvQRRZO15GUz6gMowkcmTdENaH8d Coh0lqjD13+iBIzgnN3IoR9C5RYHg6QGArCQ88wmOVhpXVeTcUYQQCJdVhnLb4fqHnUPuj9bFTIF1 bPAxTLPyZVlO/G1KMTZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx5ZM-00Dc4S-9f; Tue, 14 Dec 2021 11:02:04 +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 1mx5ZH-00Dc1n-0U 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=1639479718; x=1671015718; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lDbdt0qppU9wkR9JXAW96NVTHS8jtIsFV54SHK4VGNA=; b=I4f4NN7OHPBRtbruNBFqlSpygf9Y/EZ85RLc9wBHAYZuJdKO7TSujbFa uQNQzNTFn3DK0KAyPOGYSjI6W8MYqmiroMSYa6vfVnxmKzkvSWy/+Pi8C Nr7AmbDvu4bpxWszNWFh+yeskAWnC6Zsj+WDyQ/0LQb+1ZLMmeZuiANxD 8ahg3DyZyC7wqgVMA2xFaCzzoKGI6QJVJgFgi2xrQWX8wd9SQv6cqLjV1 b3DNDf4GBCYIn3HWoyQXQFTDH6IkSIsWiRBRdgYpAbVE5O8TSKWYVGLwj OM6nHGHQob32IwpGG1r0fH9WGEjGJeYx3sO/tNBGeeLGzpdSnLWlzAjpp Q==; IronPort-SDR: o2YKEReHwzPyFz5QsrEnnujmBmVcUJLvqZlQoDOyLGM2S8C3xkwr65CiQOcTcoC+aN1UBpwFjA mxa5QWLAgDkgvjY+XZSmU1rwk/RsIf/9bO+NeZ5mkCTcITB4adSjdRu/Fg0h5BNlnfXt0IaXNa 5yajRD8dBWZ5oI41bCeBTiFS29JPmd17Z76Lg2N7BDgTX0iDZbdbOgKEEg7dre/6AobSDGoD0Y 5V8R59H3dUbs6AGn3A+xzCDsONx/T4dYfZPkvetWJjjZ17XA8Nfe7tHbj4tYQy6dAPgcA55IHm ty6GBVZMe0VybKrpbttpilVZ X-IronPort-AV: E=Sophos;i="5.88,205,1635231600"; d="scan'208";a="155413484" 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:56 -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:56 -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:54 -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:51 +0200 Message-ID: <20211214110152.48316-1-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211214_030159_158533_9C182761 X-CRM114-Status: UNSURE ( 7.63 ) 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 Reviewed-by: Quanyang Wang --- 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);