include/soc/fsl/qe/qe.h
Source file repositories/reference/linux-study-clean/include/soc/fsl/qe/qe.h
File Facts
- System
- Linux kernel
- Corpus path
include/soc/fsl/qe/qe.h- Extension
.h- Size
- 28416 bytes
- Lines
- 834
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compiler.hlinux/genalloc.hlinux/spinlock.hlinux/errno.hlinux/err.hsoc/fsl/cpm.hsoc/fsl/qe/immap_qe.hlinux/of.hlinux/of_address.hlinux/types.h
Detected Declarations
struct devicestruct qe_pio_regsstruct qe_pinstruct qe_firmwarestruct qe_headerstruct qe_microcodestruct qe_firmware_infostruct qe_bdstruct qe_timer_tablesstruct qe_fltr_tadstruct ucc_slow_pramenum qe_clockenum qe_fltr_tbl_lookup_key_sizeenum qe_fltr_largest_external_tbl_lookup_key_sizeenum comm_dirfunction qe_clock_is_brgfunction qe_resetfunction cpm_muram_allocfunction devm_cpm_muram_allocfunction cpm_muram_freefunction devm_cpm_muram_alloc_fixedfunction cpm_muram_offsetfunction cpm_muram_dmafunction cpm_muram_free_addrfunction par_io_initfunction par_io_of_configfunction par_io_config_pinfunction par_io_data_setfunction qe_pin_freefunction qe_issue_cmdfunction qe_alive_during_sleepfunction qe_upload_firmware
Annotated Snippet
struct qe_pio_regs {
__be32 cpodr; /* Open drain register */
__be32 cpdata; /* Data register */
__be32 cpdir1; /* Direction register */
__be32 cpdir2; /* Direction register */
__be32 cppar1; /* Pin assignment register */
__be32 cppar2; /* Pin assignment register */
#ifdef CONFIG_PPC_85xx
u8 pad[8];
#endif
};
#define QE_PIO_DIR_IN 2
#define QE_PIO_DIR_OUT 1
extern void __par_io_config_pin(struct qe_pio_regs __iomem *par_io, u8 pin,
int dir, int open_drain, int assignment,
int has_irq);
#ifdef CONFIG_QUICC_ENGINE
extern int par_io_init(struct device_node *np);
extern int par_io_of_config(struct device_node *np);
extern int par_io_config_pin(u8 port, u8 pin, int dir, int open_drain,
int assignment, int has_irq);
extern int par_io_data_set(u8 port, u8 pin, u8 val);
#else
static inline int par_io_init(struct device_node *np) { return -ENOSYS; }
static inline int par_io_of_config(struct device_node *np) { return -ENOSYS; }
static inline int par_io_config_pin(u8 port, u8 pin, int dir, int open_drain,
int assignment, int has_irq) { return -ENOSYS; }
static inline int par_io_data_set(u8 port, u8 pin, u8 val) { return -ENOSYS; }
#endif /* CONFIG_QUICC_ENGINE */
/*
* Pin multiplexing functions.
*/
struct qe_pin;
#ifdef CONFIG_QE_GPIO
extern struct qe_pin *qe_pin_request(struct device *dev, int index);
extern void qe_pin_free(struct qe_pin *qe_pin);
extern void qe_pin_set_gpio(struct qe_pin *qe_pin);
extern void qe_pin_set_dedicated(struct qe_pin *pin);
#else
static inline struct qe_pin *qe_pin_request(struct device *dev, int index)
{
return ERR_PTR(-ENOSYS);
}
static inline void qe_pin_free(struct qe_pin *qe_pin) {}
static inline void qe_pin_set_gpio(struct qe_pin *qe_pin) {}
static inline void qe_pin_set_dedicated(struct qe_pin *pin) {}
#endif /* CONFIG_QE_GPIO */
#ifdef CONFIG_QUICC_ENGINE
int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input);
#else
static inline int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol,
u32 cmd_input)
{
return -ENOSYS;
}
#endif /* CONFIG_QUICC_ENGINE */
/* QE internal API */
enum qe_clock qe_clock_source(const char *source);
unsigned int qe_get_brg_clk(void);
int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier);
int qe_get_snum(void);
void qe_put_snum(u8 snum);
unsigned int qe_get_num_of_risc(void);
unsigned int qe_get_num_of_snums(void);
static inline int qe_alive_during_sleep(void)
{
/*
* MPC8568E reference manual says:
*
* "...power down sequence waits for all I/O interfaces to become idle.
* In some applications this may happen eventually without actively
* shutting down interfaces, but most likely, software will have to
* take steps to shut down the eTSEC, QUICC Engine Block, and PCI
* interfaces before issuing the command (either the write to the core
* MSR[WE] as described above or writing to POWMGTCSR) to put the
* device into sleep state."
*
* MPC8569E reference manual has a similar paragraph.
*/
#ifdef CONFIG_PPC_85xx
return 0;
#else
return 1;
#endif
}
Annotation
- Immediate include surface: `linux/compiler.h`, `linux/genalloc.h`, `linux/spinlock.h`, `linux/errno.h`, `linux/err.h`, `soc/fsl/cpm.h`, `soc/fsl/qe/immap_qe.h`, `linux/of.h`.
- Detected declarations: `struct device`, `struct qe_pio_regs`, `struct qe_pin`, `struct qe_firmware`, `struct qe_header`, `struct qe_microcode`, `struct qe_firmware_info`, `struct qe_bd`, `struct qe_timer_tables`, `struct qe_fltr_tad`.
- Atlas domain: Repository Root And Misc / include.
- 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.