arch/mips/include/asm/mach-generic/floppy.h
Source file repositories/reference/linux-study-clean/arch/mips/include/asm/mach-generic/floppy.h
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/include/asm/mach-generic/floppy.h- Extension
.h- Size
- 2503 bytes
- Lines
- 134
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
Dependency Surface
linux/delay.hlinux/ioport.hlinux/sched.hlinux/linkage.hlinux/types.hlinux/mm.hasm/bootinfo.hasm/cachectl.hasm/dma.hasm/floppy.hasm/io.hasm/irq.h
Detected Declarations
function Copyrightfunction fd_outbfunction fd_enable_dmafunction fd_disable_dmafunction fd_request_dmafunction fd_free_dmafunction fd_clear_dma_fffunction fd_set_dma_modefunction fd_set_dma_addrfunction fd_set_dma_countfunction fd_get_dma_residuefunction fd_enable_irqfunction fd_disable_irqfunction fd_request_irqfunction fd_free_irqfunction fd_getfdaddr1function fd_dma_mem_allocfunction fd_dma_mem_freefunction fd_drive_type
Annotated Snippet
#ifndef __ASM_MACH_GENERIC_FLOPPY_H
#define __ASM_MACH_GENERIC_FLOPPY_H
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/linkage.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <asm/bootinfo.h>
#include <asm/cachectl.h>
#include <asm/dma.h>
#include <asm/floppy.h>
#include <asm/io.h>
#include <asm/irq.h>
/*
* How to access the FDC's registers.
*/
static inline unsigned char fd_inb(unsigned int base, unsigned int reg)
{
return inb_p(base + reg);
}
static inline void fd_outb(unsigned char value, unsigned int base, unsigned int reg)
{
outb_p(value, base + reg);
}
/*
* How to access the floppy DMA functions.
*/
static inline void fd_enable_dma(void)
{
enable_dma(FLOPPY_DMA);
}
static inline void fd_disable_dma(void)
{
disable_dma(FLOPPY_DMA);
}
static inline int fd_request_dma(void)
{
return request_dma(FLOPPY_DMA, "floppy");
}
static inline void fd_free_dma(void)
{
free_dma(FLOPPY_DMA);
}
static inline void fd_clear_dma_ff(void)
{
clear_dma_ff(FLOPPY_DMA);
}
static inline void fd_set_dma_mode(char mode)
{
set_dma_mode(FLOPPY_DMA, mode);
}
static inline void fd_set_dma_addr(char *addr)
{
set_dma_addr(FLOPPY_DMA, (unsigned long) addr);
}
static inline void fd_set_dma_count(unsigned int count)
{
set_dma_count(FLOPPY_DMA, count);
}
static inline int fd_get_dma_residue(void)
{
return get_dma_residue(FLOPPY_DMA);
}
static inline void fd_enable_irq(void)
{
enable_irq(FLOPPY_IRQ);
}
static inline void fd_disable_irq(void)
{
disable_irq(FLOPPY_IRQ);
}
static inline int fd_request_irq(void)
{
Annotation
- Immediate include surface: `linux/delay.h`, `linux/ioport.h`, `linux/sched.h`, `linux/linkage.h`, `linux/types.h`, `linux/mm.h`, `asm/bootinfo.h`, `asm/cachectl.h`.
- Detected declarations: `function Copyright`, `function fd_outb`, `function fd_enable_dma`, `function fd_disable_dma`, `function fd_request_dma`, `function fd_free_dma`, `function fd_clear_dma_ff`, `function fd_set_dma_mode`, `function fd_set_dma_addr`, `function fd_set_dma_count`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source 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.