drivers/dma/ti/k3-udma-private.c
Source file repositories/reference/linux-study-clean/drivers/dma/ti/k3-udma-private.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/dma/ti/k3-udma-private.c- Extension
.c- Size
- 4590 bytes
- Lines
- 184
- Domain
- Driver Families
- Bucket
- drivers/dma
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/of.hlinux/of_platform.h
Detected Declarations
function Copyrightfunction xudma_navss_psil_unpairfunction xudma_dev_get_psil_basefunction xudma_alloc_gp_rflow_rangefunction xudma_free_gp_rflow_rangefunction xudma_rflow_is_gpfunction xudma_rflow_putfunction xudma_get_rflow_ring_offsetfunction xudma_is_pktdmafunction xudma_pktdma_tflow_get_irqfunction xudma_pktdma_rflow_get_irqexport xudma_navss_psil_pairexport xudma_navss_psil_unpairexport of_xudma_dev_getexport xudma_get_deviceexport xudma_get_ringaccexport xudma_dev_get_psil_baseexport xudma_dev_get_tisci_rmexport xudma_alloc_gp_rflow_rangeexport xudma_free_gp_rflow_rangeexport xudma_rflow_is_gpexport xudma_rflow_getexport xudma_rflow_putexport xudma_get_rflow_ring_offsetexport xudma_is_pktdmaexport xudma_pktdma_tflow_get_irqexport xudma_pktdma_rflow_get_irq
Annotated Snippet
if (!udma_node) {
pr_err("UDMA node is not found\n");
return ERR_PTR(-ENODEV);
}
}
pdev = of_find_device_by_node(udma_node);
if (np != udma_node)
of_node_put(udma_node);
if (!pdev) {
pr_debug("UDMA device not found\n");
return ERR_PTR(-EPROBE_DEFER);
}
ud = platform_get_drvdata(pdev);
put_device(&pdev->dev);
if (!ud) {
pr_debug("UDMA has not been probed\n");
return ERR_PTR(-EPROBE_DEFER);
}
return ud;
}
EXPORT_SYMBOL(of_xudma_dev_get);
struct device *xudma_get_device(struct udma_dev *ud)
{
return ud->dev;
}
EXPORT_SYMBOL(xudma_get_device);
struct k3_ringacc *xudma_get_ringacc(struct udma_dev *ud)
{
return ud->ringacc;
}
EXPORT_SYMBOL(xudma_get_ringacc);
u32 xudma_dev_get_psil_base(struct udma_dev *ud)
{
return ud->psil_base;
}
EXPORT_SYMBOL(xudma_dev_get_psil_base);
struct udma_tisci_rm *xudma_dev_get_tisci_rm(struct udma_dev *ud)
{
return &ud->tisci_rm;
}
EXPORT_SYMBOL(xudma_dev_get_tisci_rm);
int xudma_alloc_gp_rflow_range(struct udma_dev *ud, int from, int cnt)
{
return __udma_alloc_gp_rflow_range(ud, from, cnt);
}
EXPORT_SYMBOL(xudma_alloc_gp_rflow_range);
int xudma_free_gp_rflow_range(struct udma_dev *ud, int from, int cnt)
{
return __udma_free_gp_rflow_range(ud, from, cnt);
}
EXPORT_SYMBOL(xudma_free_gp_rflow_range);
bool xudma_rflow_is_gp(struct udma_dev *ud, int id)
{
if (!ud->rflow_gp_map)
return false;
return !test_bit(id, ud->rflow_gp_map);
}
EXPORT_SYMBOL(xudma_rflow_is_gp);
#define XUDMA_GET_PUT_RESOURCE(res) \
struct udma_##res *xudma_##res##_get(struct udma_dev *ud, int id) \
{ \
return __udma_reserve_##res(ud, UDMA_TP_NORMAL, id); \
} \
EXPORT_SYMBOL(xudma_##res##_get); \
\
void xudma_##res##_put(struct udma_dev *ud, struct udma_##res *p) \
{ \
clear_bit(p->id, ud->res##_map); \
} \
EXPORT_SYMBOL(xudma_##res##_put)
XUDMA_GET_PUT_RESOURCE(tchan);
XUDMA_GET_PUT_RESOURCE(rchan);
struct udma_rflow *xudma_rflow_get(struct udma_dev *ud, int id)
{
return __udma_get_rflow(ud, id);
}
Annotation
- Immediate include surface: `linux/of.h`, `linux/of_platform.h`.
- Detected declarations: `function Copyright`, `function xudma_navss_psil_unpair`, `function xudma_dev_get_psil_base`, `function xudma_alloc_gp_rflow_range`, `function xudma_free_gp_rflow_range`, `function xudma_rflow_is_gp`, `function xudma_rflow_put`, `function xudma_get_rflow_ring_offset`, `function xudma_is_pktdma`, `function xudma_pktdma_tflow_get_irq`.
- Atlas domain: Driver Families / drivers/dma.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.