include/linux/pxa2xx_ssp.h
Source file repositories/reference/linux-study-clean/include/linux/pxa2xx_ssp.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/pxa2xx_ssp.h- Extension
.h- Size
- 11401 bytes
- Lines
- 310
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/compiler_types.hlinux/io.hlinux/kconfig.hlinux/list.hlinux/types.h
Detected Declarations
struct clkstruct devicestruct device_nodestruct ssp_deviceenum pxa_ssp_typefunction pxa_ssp_write_regfunction pxa_ssp_read_regfunction pxa_ssp_enablefunction pxa_ssp_disablefunction pxa_ssp_free
Annotated Snippet
struct ssp_device {
struct device *dev;
struct list_head node;
struct clk *clk;
void __iomem *mmio_base;
unsigned long phys_base;
const char *label;
int port_id;
enum pxa_ssp_type type;
int use_count;
int irq;
struct device_node *of_node;
};
/**
* pxa_ssp_write_reg - Write to a SSP register
*
* @dev: SSP device to access
* @reg: Register to write to
* @val: Value to be written.
*/
static inline void pxa_ssp_write_reg(struct ssp_device *dev, u32 reg, u32 val)
{
__raw_writel(val, dev->mmio_base + reg);
}
/**
* pxa_ssp_read_reg - Read from a SSP register
*
* @dev: SSP device to access
* @reg: Register to read from
*/
static inline u32 pxa_ssp_read_reg(struct ssp_device *dev, u32 reg)
{
return __raw_readl(dev->mmio_base + reg);
}
static inline void pxa_ssp_enable(struct ssp_device *ssp)
{
u32 sscr0;
sscr0 = pxa_ssp_read_reg(ssp, SSCR0) | SSCR0_SSE;
pxa_ssp_write_reg(ssp, SSCR0, sscr0);
}
static inline void pxa_ssp_disable(struct ssp_device *ssp)
{
u32 sscr0;
sscr0 = pxa_ssp_read_reg(ssp, SSCR0) & ~SSCR0_SSE;
pxa_ssp_write_reg(ssp, SSCR0, sscr0);
}
#if IS_ENABLED(CONFIG_PXA_SSP)
struct ssp_device *pxa_ssp_request(int port, const char *label);
void pxa_ssp_free(struct ssp_device *);
struct ssp_device *pxa_ssp_request_of(const struct device_node *of_node,
const char *label);
#else
static inline struct ssp_device *pxa_ssp_request(int port, const char *label)
{
return NULL;
}
static inline struct ssp_device *pxa_ssp_request_of(const struct device_node *n,
const char *name)
{
return NULL;
}
static inline void pxa_ssp_free(struct ssp_device *ssp) {}
#endif
#endif /* __LINUX_PXA2XX_SSP_H */
Annotation
- Immediate include surface: `linux/bits.h`, `linux/compiler_types.h`, `linux/io.h`, `linux/kconfig.h`, `linux/list.h`, `linux/types.h`.
- Detected declarations: `struct clk`, `struct device`, `struct device_node`, `struct ssp_device`, `enum pxa_ssp_type`, `function pxa_ssp_write_reg`, `function pxa_ssp_read_reg`, `function pxa_ssp_enable`, `function pxa_ssp_disable`, `function pxa_ssp_free`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.