From: Adrian Hunter <adrian.hunter@intel.com>
To: alexandre.belloni@bootlin.com
Cc: Frank.Li@nxp.com, linux-i3c@lists.infradead.org
Subject: [PATCH V2 11/13] i3c: mipi-i3c-hci-pci: Allocate a structure for Intel controller information
Date: Fri, 14 Nov 2025 20:13:54 +0200 [thread overview]
Message-ID: <20251114181356.66515-12-adrian.hunter@intel.com> (raw)
In-Reply-To: <20251114181356.66515-1-adrian.hunter@intel.com>
Allocate a structure for Intel controller information, in preparation
additional changes that need to store Intel device-specific information.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
Changes in V2:
Re-based
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c b/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
index b962d3c2d510..3f391b0854ae 100644
--- a/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
+++ b/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
@@ -18,6 +18,7 @@ struct mipi_i3c_hci_pci {
struct pci_dev *pci;
struct platform_device *pdev;
const struct mipi_i3c_hci_pci_info *info;
+ void *private;
};
struct mipi_i3c_hci_pci_info {
@@ -34,6 +35,10 @@ static DEFINE_IDA(mipi_i3c_hci_pci_ida);
#define INTEL_RESETS_RESET_DONE BIT(1)
#define INTEL_RESETS_TIMEOUT_US (10 * USEC_PER_MSEC)
+struct intel_host {
+ void __iomem *priv;
+};
+
static void intel_reset(void __iomem *priv)
{
u32 reg;
@@ -55,13 +60,17 @@ static void __iomem *intel_priv(struct pci_dev *pci)
static int intel_i3c_init(struct mipi_i3c_hci_pci *hci)
{
+ struct intel_host *host = devm_kzalloc(&hci->pci->dev, sizeof(*host), GFP_KERNEL);
void __iomem *priv = intel_priv(hci->pci);
- if (!priv)
+ if (!host || !priv)
return -ENOMEM;
dma_set_mask_and_coherent(&hci->pci->dev, DMA_BIT_MASK(64));
+ hci->private = host;
+ host->priv = priv;
+
intel_reset(priv);
return 0;
--
2.51.0
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2025-11-14 18:14 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 18:13 [PATCH V2 00/13] i3c: mipi-i3c-hci-pci: Add LTR support for Intel controllers Adrian Hunter
2025-11-14 18:13 ` [PATCH V2 01/13] i3c: mipi-i3c-hci-pci: Set 64-bit DMA mask " Adrian Hunter
2025-11-14 19:43 ` Frank Li
2025-11-14 18:13 ` [PATCH V2 02/13] i3c: mipi-i3c-hci-pci: Move all Intel-related definitions together Adrian Hunter
2025-11-14 18:13 ` [PATCH V2 03/13] i3c: mipi-i3c-hci-pci: Rename some Intel-related identifiers Adrian Hunter
2025-11-14 19:44 ` Frank Li
2025-11-14 18:13 ` [PATCH V2 04/13] i3c: mipi-i3c-hci-pci: Use readl_poll_timeout() Adrian Hunter
2025-11-14 19:44 ` Frank Li
2025-11-14 18:13 ` [PATCH V2 05/13] i3c: mipi-i3c-hci-pci: Constify driver data Adrian Hunter
2025-11-14 18:13 ` [PATCH V2 06/13] i3c: mipi-i3c-hci-pci: Factor out private registers ioremapping Adrian Hunter
2025-11-14 18:13 ` [PATCH V2 07/13] i3c: mipi-i3c-hci-pci: Factor out intel_reset() Adrian Hunter
2025-11-14 19:46 ` Frank Li
2025-11-14 18:13 ` [PATCH V2 08/13] i3c: mipi-i3c-hci-pci: Allocate a structure for mipi_i3c_hci_pci device information Adrian Hunter
2025-11-14 18:13 ` [PATCH V2 09/13] i3c: mipi-i3c-hci-pci: Change callback parameter Adrian Hunter
2025-11-14 19:49 ` Frank Li
2025-11-14 18:13 ` [PATCH V2 10/13] i3c: mipi-i3c-hci-pci: Add exit callback Adrian Hunter
2025-11-14 19:52 ` Frank Li
2025-11-14 19:59 ` Adrian Hunter
2025-11-17 15:33 ` Frank Li
2025-11-14 18:13 ` Adrian Hunter [this message]
2025-11-14 20:11 ` [PATCH V2 11/13] i3c: mipi-i3c-hci-pci: Allocate a structure for Intel controller information Frank Li
2025-11-14 18:13 ` [PATCH V2 12/13] i3c: mipi-i3c-hci-pci: Add LTR support for Intel controllers Adrian Hunter
2025-11-14 20:09 ` Frank Li
2025-11-17 11:36 ` Adrian Hunter
2025-11-17 15:59 ` Frank Li
2025-11-17 17:47 ` Adrian Hunter
2025-11-17 17:54 ` Frank Li
2025-11-17 18:09 ` Adrian Hunter
2025-11-17 18:56 ` Frank Li
2025-11-17 19:07 ` Adrian Hunter
2025-11-17 19:35 ` Frank Li
2025-11-14 18:13 ` [PATCH V2 13/13] i3c: mipi-i3c-hci-pci: Set d3cold_delay to 0 " Adrian Hunter
2025-11-14 20:10 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251114181356.66515-12-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=Frank.Li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.