From mboxrd@z Thu Jan 1 00:00:00 1970 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 2DB7BC88E72 for ; Thu, 17 Sep 2026 19:14:29 +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=I2k8DIVMQphqHt3/Btqi7RwtKRnBPeTSgEzMHwv3zcc=; b=pPohDUxYo2a8qS X/bfBNexaOaW/mRYgNMumfCZM3HsGzpad94dgKlszdgHBItlJWSWXljrxOPYbfNKp3J8IdcvVDenm 7aQ/Y1OXk+vud1J5eqRpEfm1Vm+9X6yq4V7zRtxxC3K9A/bbWhQvn85LvO/wH57G1s59d1/rcwdZs a4tfsJNQBp3oIFDuF3aWu1psv0bQuHY1GqNdO87z5jR0DRaOnJY9CEiyekq0wI11XvNYlcsPf7nrP d3VjVlhAYdVys7JwPhtEFxn/OANDUcONlPMimTVu0LqGWS0froLfYMOTtuGEPywdpfvPYoJqJSW9V mcVSldhFo0ovlfa9/j1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7HYz-0000000CJRU-1ZMF; Thu, 17 Sep 2026 19:14:29 +0000 Received: from mgamail.intel.com ([192.198.163.4]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7HYw-0000000CJFz-1fgU for linux-i3c@lists.infradead.org; Thu, 17 Sep 2026 19:14:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1789672466; x=1821208466; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ndUTy+p4P/3v17/WTTG+6wSK8dPeO8hrUFYYv8YPkbE=; b=Din+gaT2vG6V3EyJRp+4hgPOCRkWokhj2zvnwJ5TIytMSZIeAGNxWpLx jSkEboOovQ/uP+tDrdE2p1rXNwAUJsCmj1DCP6EbhVtRdeP+T5IR5nAMM Czk/2exhhJ6R8bqkKTqIEzZnVUe7qTFpkQGz1GyeWj0a/PFkd8FUVlaFC MoxCi0t07TE6eaBW65XliyRjJ9ebMHCQv9Zlm7M7tnjahHsqOwN2BTlYX lJvjYZGYPR6USpBXvkx0cv26NhMqiXJEfQuKQZtX3Y/WbrAmRiyAlube8 1X3tgcAkBiLHEKf+TdUB5Tpy//NlaEXxcqCxI8ArzGdgxRS8mt829AqkX Q==; X-CSE-ConnectionGUID: jFUbVY04Th2Y2K6d/D10+A== X-CSE-MsgGUID: FWjkj26DRQi3enRUU6OEDg== X-IronPort-AV: E=McAfee;i="6800,10657,11905"; a="639942" X-IronPort-AV: E=Sophos;i="6.27,103,1787036400"; d="scan'208";a="639942" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa114.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2026 12:14:26 -0700 X-CSE-ConnectionGUID: XHJNnCG6SSycz2wksgzDnQ== X-CSE-MsgGUID: X7qKkmUlQoKji7vrOeSlfA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,103,1787036400"; d="scan'208";a="270271988" Received: from fpallare-mobl4.ger.corp.intel.com (HELO ahunter6-desk) ([10.245.245.5]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2026 12:14:24 -0700 From: Adrian Hunter To: alexandre.belloni@bootlin.com Cc: Frank.Li@nxp.com, billy_tsai@aspeedtech.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 10/17] i3c: mipi-i3c-hci: Move DMA suspend/resume callbacks Date: Thu, 17 Sep 2026 22:13:49 +0300 Message-ID: <20260917191356.133242-11-adrian.hunter@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260917191356.133242-1-adrian.hunter@intel.com> References: <20260917191356.133242-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260917_121426_446150_5C5FE494 X-CRM114-Status: UNSURE ( 9.68 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org Relocate hci_dma_suspend() and hci_dma_resume() closer to the DMA IO operations table in preparation for upcoming changes. No functional change. Signed-off-by: Adrian Hunter Reviewed-by: Frank Li --- Changes in V2: Added Frank Li's Reviewed-by tag. drivers/i3c/master/mipi-i3c-hci/dma.c | 46 +++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/dma.c b/drivers/i3c/master/mipi-i3c-hci/dma.c index a798b0648922..ec4b469abd33 100644 --- a/drivers/i3c/master/mipi-i3c-hci/dma.c +++ b/drivers/i3c/master/mipi-i3c-hci/dma.c @@ -273,29 +273,6 @@ static void hci_dma_init_rings(struct i3c_hci *hci) hci_dma_init_rh(hci, &rings->headers[i], i); } -static void hci_dma_suspend(struct i3c_hci *hci) -{ - struct hci_rings_data *rings = hci->io_data; - int n = rings ? rings->total : 0; - - for (int i = 0; i < n; i++) { - struct hci_rh_data *rh = &rings->headers[i]; - - rh_reg_write(INTR_SIGNAL_ENABLE, 0); - rh_reg_write(RING_CONTROL, 0); - } - - i3c_hci_sync_irq_inactive(hci); -} - -static void hci_dma_resume(struct i3c_hci *hci) -{ - struct hci_rings_data *rings = hci->io_data; - - if (rings) - hci_dma_init_rings(hci); -} - static int hci_dma_init(struct i3c_hci *hci) { struct hci_rings_data *rings; @@ -1075,6 +1052,29 @@ static bool hci_dma_irq_handler(struct i3c_hci *hci) return handled; } +static void hci_dma_suspend(struct i3c_hci *hci) +{ + struct hci_rings_data *rings = hci->io_data; + int n = rings ? rings->total : 0; + + for (int i = 0; i < n; i++) { + struct hci_rh_data *rh = &rings->headers[i]; + + rh_reg_write(INTR_SIGNAL_ENABLE, 0); + rh_reg_write(RING_CONTROL, 0); + } + + i3c_hci_sync_irq_inactive(hci); +} + +static void hci_dma_resume(struct i3c_hci *hci) +{ + struct hci_rings_data *rings = hci->io_data; + + if (rings) + hci_dma_init_rings(hci); +} + const struct hci_io_ops mipi_i3c_hci_dma = { .init = hci_dma_init, .cleanup = hci_dma_cleanup, -- 2.53.0 -- linux-i3c mailing list linux-i3c@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-i3c