cregit-Linux how code gets into the kernel

Release 4.14 arch/mips/include/asm/mach-jazz/floppy.h

/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 1998, 2003 by Ralf Baechle
 */
#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>
#include <asm/pgtable.h>


static inline unsigned char fd_inb(unsigned int port) { unsigned char c; c = *(volatile unsigned char *) port; udelay(1); return c; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)3394.29%150.00%
Andrew Morton25.71%150.00%
Total35100.00%2100.00%


static inline void fd_outb(unsigned char value, unsigned int port) { *(volatile unsigned char *) port = value; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)2492.31%150.00%
Andrew Morton27.69%150.00%
Total26100.00%2100.00%

/* * How to access the floppy DMA functions. */
static inline void fd_enable_dma(void) { vdma_enable(JAZZ_FLOPPY_DMA); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1178.57%150.00%
Andrew Morton321.43%150.00%
Total14100.00%2100.00%


static inline void fd_disable_dma(void) { vdma_disable(JAZZ_FLOPPY_DMA); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1178.57%150.00%
Andrew Morton321.43%150.00%
Total14100.00%2100.00%


static inline int fd_request_dma(void) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)975.00%150.00%
Andrew Morton325.00%150.00%
Total12100.00%2100.00%


static inline void fd_free_dma(void) { }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)562.50%150.00%
Andrew Morton337.50%150.00%
Total8100.00%2100.00%


static inline void fd_clear_dma_ff(void) { }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)562.50%150.00%
Andrew Morton337.50%150.00%
Total8100.00%2100.00%


static inline void fd_set_dma_mode(char mode) { vdma_set_mode(JAZZ_FLOPPY_DMA, mode); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1588.24%150.00%
Andrew Morton211.76%150.00%
Total17100.00%2100.00%


static inline void fd_set_dma_addr(char *a) { vdma_set_addr(JAZZ_FLOPPY_DMA, vdma_phys2log(CPHYSADDR((unsigned long)a))); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1967.86%150.00%
Andrew Morton932.14%150.00%
Total28100.00%2100.00%


static inline void fd_set_dma_count(unsigned int count) { vdma_set_count(JAZZ_FLOPPY_DMA, count); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1688.89%150.00%
Andrew Morton211.11%150.00%
Total18100.00%2100.00%


static inline int fd_get_dma_residue(void) { return vdma_get_residue(JAZZ_FLOPPY_DMA); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1280.00%150.00%
Andrew Morton320.00%150.00%
Total15100.00%2100.00%


static inline void fd_enable_irq(void) { }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)562.50%150.00%
Andrew Morton337.50%150.00%
Total8100.00%2100.00%


static inline void fd_disable_irq(void) { }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)562.50%150.00%
Andrew Morton337.50%150.00%
Total8100.00%2100.00%


static inline int fd_request_irq(void) { return request_irq(FLOPPY_IRQ, floppy_interrupt, 0, "floppy", NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton2295.65%150.00%
Yong Zhang14.35%150.00%
Total23100.00%2100.00%


static inline void fd_free_irq(void) { free_irq(FLOPPY_IRQ, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton1593.75%150.00%
Linus Torvalds (pre-git)16.25%150.00%
Total16100.00%2100.00%


static inline unsigned long fd_getfdaddr1(void) { return JAZZ_FDC_BASE; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)1076.92%150.00%
Andrew Morton323.08%150.00%
Total13100.00%2100.00%


static inline unsigned long fd_dma_mem_alloc(unsigned long size) { unsigned long mem; mem = __get_dma_pages(GFP_KERNEL, get_order(size)); if(!mem) return 0; vdma_alloc(CPHYSADDR(mem), size); /* XXX error checking */ return mem; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)4794.00%375.00%
Andrew Morton36.00%125.00%
Total50100.00%4100.00%


static inline void fd_dma_mem_free(unsigned long addr, unsigned long size) { vdma_free(vdma_phys2log(CPHYSADDR(addr))); free_pages(addr, get_order(size)); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)3391.67%375.00%
Andrew Morton38.33%125.00%
Total36100.00%4100.00%


static inline unsigned long fd_drive_type(unsigned long n) { /* XXX This is wrong for machines with ED 2.88mb disk drives like the Olivetti M700. Anyway, we should suck this from the ARC firmware. */ if (n == 0) return 4; /* 3,5", 1.44mb */ return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)2492.31%266.67%
Andrew Morton27.69%133.33%
Total26100.00%3100.00%

#endif /* __ASM_MACH_JAZZ_FLOPPY_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)31075.61%360.00%
Andrew Morton9924.15%120.00%
Yong Zhang10.24%120.00%
Total410100.00%5100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.