arch/mips/include/asm/cdmm.h
Source file repositories/reference/linux-study-clean/arch/mips/include/asm/cdmm.h
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/include/asm/cdmm.h- Extension
.h- Size
- 3767 bytes
- Lines
- 110
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/mod_devicetable.h
Detected Declarations
struct mips_cdmm_devicestruct mips_cdmm_driverfunction setup_early_fdc_console
Annotated Snippet
struct device_driver drv;
int (*probe)(struct mips_cdmm_device *);
int (*remove)(struct mips_cdmm_device *);
void (*shutdown)(struct mips_cdmm_device *);
int (*cpu_down)(struct mips_cdmm_device *);
int (*cpu_up)(struct mips_cdmm_device *);
const struct mips_cdmm_device_id *id_table;
};
/**
* mips_cdmm_phys_base() - Choose a physical base address for CDMM region.
*
* Picking a suitable physical address at which to map the CDMM region is
* platform specific, so this function can be defined by platform code to
* pick a suitable value if none is configured by the bootloader.
*
* This address must be 32kB aligned, and the region occupies a maximum of 32kB
* of physical address space which must not be used for anything else.
*
* Returns: Physical base address for CDMM region, or 0 on failure.
*/
phys_addr_t mips_cdmm_phys_base(void);
extern const struct bus_type mips_cdmm_bustype;
void __iomem *mips_cdmm_early_probe(unsigned int dev_type);
#define to_mips_cdmm_device(d) container_of(d, struct mips_cdmm_device, dev)
#define mips_cdmm_get_drvdata(d) dev_get_drvdata(&d->dev)
#define mips_cdmm_set_drvdata(d, p) dev_set_drvdata(&d->dev, p)
int mips_cdmm_driver_register(struct mips_cdmm_driver *);
void mips_cdmm_driver_unregister(struct mips_cdmm_driver *);
/*
* module_mips_cdmm_driver() - Helper macro for drivers that don't do
* anything special in module init/exit. This eliminates a lot of
* boilerplate. Each module may only use this macro once, and
* calling it replaces module_init() and module_exit()
*/
#define module_mips_cdmm_driver(__mips_cdmm_driver) \
module_driver(__mips_cdmm_driver, mips_cdmm_driver_register, \
mips_cdmm_driver_unregister)
/*
* builtin_mips_cdmm_driver() - Helper macro for drivers that don't do anything
* special in init and have no exit. This eliminates some boilerplate. Each
* driver may only use this macro once, and calling it replaces device_initcall
* (or in some cases, the legacy __initcall). This is meant to be a direct
* parallel of module_mips_cdmm_driver() above but without the __exit stuff that
* is not used for builtin cases.
*/
#define builtin_mips_cdmm_driver(__mips_cdmm_driver) \
builtin_driver(__mips_cdmm_driver, mips_cdmm_driver_register)
/* drivers/tty/mips_ejtag_fdc.c */
#ifdef CONFIG_MIPS_EJTAG_FDC_EARLYCON
int setup_early_fdc_console(void);
#else
static inline int setup_early_fdc_console(void)
{
return -ENODEV;
}
#endif
#endif /* __ASM_CDMM_H */
Annotation
- Immediate include surface: `linux/device.h`, `linux/mod_devicetable.h`.
- Detected declarations: `struct mips_cdmm_device`, `struct mips_cdmm_driver`, `function setup_early_fdc_console`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: pattern 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.