drivers/i3c/master/mipi-i3c-hci/hci_quirks.c
Source file repositories/reference/linux-study-clean/drivers/i3c/master/mipi-i3c-hci/hci_quirks.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/i3c/master/mipi-i3c-hci/hci_quirks.c- Extension
.c- Size
- 1152 bytes
- Lines
- 45
- Domain
- Driver Families
- Bucket
- drivers/i3c
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/i3c/master.hhci.h
Detected Declarations
function amd_set_od_pp_timingfunction amd_set_resp_buf_thld
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* I3C HCI Quirks
*
* Copyright 2024 Advanced Micro Devices, Inc.
*
* Authors: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
* Guruvendra Punugupati <Guruvendra.Punugupati@amd.com>
*/
#include <linux/i3c/master.h>
#include "hci.h"
/* Timing registers */
#define HCI_SCL_I3C_OD_TIMING 0x214
#define HCI_SCL_I3C_PP_TIMING 0x218
#define HCI_SDA_HOLD_SWITCH_DLY_TIMING 0x230
/* Timing values to configure 9MHz frequency */
#define AMD_SCL_I3C_OD_TIMING 0x00cf00cf
#define AMD_SCL_I3C_PP_TIMING 0x00160016
#define QUEUE_THLD_CTRL 0xD0
void amd_set_od_pp_timing(struct i3c_hci *hci)
{
u32 data;
reg_write(HCI_SCL_I3C_OD_TIMING, AMD_SCL_I3C_OD_TIMING);
reg_write(HCI_SCL_I3C_PP_TIMING, AMD_SCL_I3C_PP_TIMING);
data = reg_read(HCI_SDA_HOLD_SWITCH_DLY_TIMING);
/* Configure maximum TX hold time */
data |= W0_MASK(18, 16);
reg_write(HCI_SDA_HOLD_SWITCH_DLY_TIMING, data);
}
void amd_set_resp_buf_thld(struct i3c_hci *hci)
{
u32 data;
data = reg_read(QUEUE_THLD_CTRL);
data = data & ~W0_MASK(15, 8);
reg_write(QUEUE_THLD_CTRL, data);
}
Annotation
- Immediate include surface: `linux/i3c/master.h`, `hci.h`.
- Detected declarations: `function amd_set_od_pp_timing`, `function amd_set_resp_buf_thld`.
- Atlas domain: Driver Families / drivers/i3c.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.