sound/soc/sof/imx/imx-common.h
Source file repositories/reference/linux-study-clean/sound/soc/sof/imx/imx-common.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sof/imx/imx-common.h- Extension
.h- Size
- 4572 bytes
- Lines
- 170
- Domain
- Driver Families
- Bucket
- sound/soc
- 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/clk.hlinux/of_platform.hsound/sof/xtensa.h../sof-of-dev.h../ops.h
Detected Declarations
struct imx_ipc_infostruct imx_chip_opsstruct imx_memory_infostruct imx_chip_infostruct imx_common_datafunction imx_chip_core_kickfunction imx_chip_core_shutdownfunction imx_chip_core_resetfunction imx_chip_probe
Annotated Snippet
struct imx_ipc_info {
/* true if core is able to write a panic code to the debug box */
bool has_panic_code;
/* offset to mailbox in which firmware initially writes FW_READY */
int boot_mbox_offset;
/* offset to region at which the mailboxes start */
int window_offset;
};
struct imx_chip_ops {
/* called after clocks and PDs are enabled */
int (*probe)(struct snd_sof_dev *sdev);
/* used directly by the SOF core */
int (*core_kick)(struct snd_sof_dev *sdev);
/* called during suspend()/remove() before clocks are disabled */
int (*core_shutdown)(struct snd_sof_dev *sdev);
/* used directly by the SOF core */
int (*core_reset)(struct snd_sof_dev *sdev);
};
struct imx_memory_info {
const char *name;
bool reserved;
};
struct imx_chip_info {
struct imx_ipc_info ipc_info;
/* does the chip have a reserved memory region for DMA? */
bool has_dma_reserved;
struct imx_memory_info *memory;
struct snd_soc_dai_driver *drv;
int num_drv;
/* optional */
const struct imx_chip_ops *ops;
};
struct imx_common_data {
struct platform_device *ipc_dev;
struct imx_dsp_ipc *ipc_handle;
/* core may have no clocks */
struct clk_bulk_data *clks;
int clk_num;
/* core may have no PDs */
struct dev_pm_domain_list *pd_list;
void *chip_pdata;
};
static inline int imx_chip_core_kick(struct snd_sof_dev *sdev)
{
const struct imx_chip_ops *ops = get_chip_info(sdev)->ops;
if (ops && ops->core_kick)
return ops->core_kick(sdev);
return 0;
}
static inline int imx_chip_core_shutdown(struct snd_sof_dev *sdev)
{
const struct imx_chip_ops *ops = get_chip_info(sdev)->ops;
if (ops && ops->core_shutdown)
return ops->core_shutdown(sdev);
return 0;
}
static inline int imx_chip_core_reset(struct snd_sof_dev *sdev)
{
const struct imx_chip_ops *ops = get_chip_info(sdev)->ops;
if (ops && ops->core_reset)
return ops->core_reset(sdev);
return 0;
}
static inline int imx_chip_probe(struct snd_sof_dev *sdev)
{
const struct imx_chip_ops *ops = get_chip_info(sdev)->ops;
if (ops && ops->probe)
return ops->probe(sdev);
return 0;
}
void imx8_get_registers(struct snd_sof_dev *sdev,
struct sof_ipc_dsp_oops_xtensa *xoops,
struct sof_ipc_panic_info *panic_info,
Annotation
- Immediate include surface: `linux/clk.h`, `linux/of_platform.h`, `sound/sof/xtensa.h`, `../sof-of-dev.h`, `../ops.h`.
- Detected declarations: `struct imx_ipc_info`, `struct imx_chip_ops`, `struct imx_memory_info`, `struct imx_chip_info`, `struct imx_common_data`, `function imx_chip_core_kick`, `function imx_chip_core_shutdown`, `function imx_chip_core_reset`, `function imx_chip_probe`.
- Atlas domain: Driver Families / sound/soc.
- 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.