arch/mips/include/asm/mach-jazz/floppy.h
Source file repositories/reference/linux-study-clean/arch/mips/include/asm/mach-jazz/floppy.h
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/include/asm/mach-jazz/floppy.h- Extension
.h- Size
- 2594 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/linkage.hlinux/types.hlinux/mm.hasm/addrspace.hasm/jazz.hasm/jazzdma.h
Detected Declarations
function Copyrightfunction fd_outbfunction fd_enable_dmafunction fd_disable_dmafunction fd_request_dmafunction fd_free_dmafunction fd_set_dma_addrfunction fd_set_dma_countfunction fd_get_dma_residuefunction fd_enable_irqfunction fd_free_irqfunction fd_getfdaddr1function fd_dma_mem_allocfunction fd_dma_mem_freefunction fd_drive_type
Annotated Snippet
#ifndef __ASM_MACH_JAZZ_FLOPPY_H
#define __ASM_MACH_JAZZ_FLOPPY_H
#include <linux/delay.h>
#include <linux/linkage.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <asm/addrspace.h>
#include <asm/jazz.h>
#include <asm/jazzdma.h>
static inline unsigned char fd_inb(unsigned int base, unsigned int reg)
{
unsigned char c;
c = *(volatile unsigned char *) (base + reg);
udelay(1);
return c;
}
static inline void fd_outb(unsigned char value, unsigned int base, unsigned int reg)
{
*(volatile unsigned char *) (base + reg) = value;
}
/*
* How to access the floppy DMA functions.
*/
static inline void fd_enable_dma(void)
{
vdma_enable(JAZZ_FLOPPY_DMA);
}
static inline void fd_disable_dma(void)
{
vdma_disable(JAZZ_FLOPPY_DMA);
}
static inline int fd_request_dma(void)
{
return 0;
}
static inline void fd_free_dma(void)
{
}
static inline void fd_clear_dma_ff(void)
{
}
static inline void fd_set_dma_mode(char mode)
{
vdma_set_mode(JAZZ_FLOPPY_DMA, mode);
}
static inline void fd_set_dma_addr(char *a)
{
vdma_set_addr(JAZZ_FLOPPY_DMA, vdma_phys2log(CPHYSADDR((unsigned long)a)));
}
static inline void fd_set_dma_count(unsigned int count)
{
vdma_set_count(JAZZ_FLOPPY_DMA, count);
}
static inline int fd_get_dma_residue(void)
{
return vdma_get_residue(JAZZ_FLOPPY_DMA);
}
static inline void fd_enable_irq(void)
{
}
static inline void fd_disable_irq(void)
{
}
static inline int fd_request_irq(void)
{
return request_irq(FLOPPY_IRQ, floppy_interrupt,
0, "floppy", NULL);
}
static inline void fd_free_irq(void)
{
free_irq(FLOPPY_IRQ, NULL);
}
Annotation
- Immediate include surface: `linux/delay.h`, `linux/linkage.h`, `linux/types.h`, `linux/mm.h`, `asm/addrspace.h`, `asm/jazz.h`, `asm/jazzdma.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_set_dma_addr`, `function fd_set_dma_count`, `function fd_get_dma_residue`, `function fd_enable_irq`.
- 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.