diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-19 01:28:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-19 01:28:40 +0000 |
commit | 8abb719409c9060a7c0676f76e9182c1e0b8ca46 (patch) | |
tree | b88cc5a6cd513a04a512b7e6215c873c90a1c5dd /include/asm-i386 | |
parent | f01bd7aeafd95a08aafc9e3636bb26974df69d82 (diff) |
Merge with 2.3.99-pre1.
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/mca_dma.h | 76 | ||||
-rw-r--r-- | include/asm-i386/mman.h | 6 | ||||
-rw-r--r-- | include/asm-i386/parport.h | 41 | ||||
-rw-r--r-- | include/asm-i386/unistd.h | 3 |
4 files changed, 89 insertions, 37 deletions
diff --git a/include/asm-i386/mca_dma.h b/include/asm-i386/mca_dma.h index 791152f3d..fb42da38d 100644 --- a/include/asm-i386/mca_dma.h +++ b/include/asm-i386/mca_dma.h @@ -55,17 +55,41 @@ #define MCA_DMA_MODE_16 0x40 /* 16 bit xfers */ +/** + * mca_enable_dma - channel to enable DMA on + * @dmanr: DMA channel + * + * Enable the MCA bus DMA on a channel. This can be called from + * IRQ context. + */ static __inline__ void mca_enable_dma(unsigned int dmanr) { outb(MCA_DMA_FN_RESET_MASK | dmanr, MCA_DMA_REG_FN); } +/** + * mca_disble_dma - channel to disable DMA on + * @dmanr: DMA channel + * + * Enable the MCA bus DMA on a channel. This can be called from + * IRQ context. + */ + static __inline__ void mca_disable_dma(unsigned int dmanr) { outb(MCA_DMA_FN_MASK | dmanr, MCA_DMA_REG_FN); } +/** + * mca_set_dma_addr - load a 24bit DMA address + * @dmanr: DMA channel + * @a: 24bit bus address + * + * Load the address register in the DMA controller. This has a 24bit + * limitation (16Mb). + */ + static __inline__ void mca_set_dma_addr(unsigned int dmanr, unsigned int a) { outb(MCA_DMA_FN_SET_ADDR | dmanr, MCA_DMA_REG_FN); @@ -74,6 +98,14 @@ static __inline__ void mca_set_dma_addr(unsigned int dmanr, unsigned int a) outb((a >> 16) & 0xff, MCA_DMA_REG_EXE); } +/** + * mca_get_dma_addr - load a 24bit DMA address + * @dmanr: DMA channel + * + * Read the address register in the DMA controller. This has a 24bit + * limitation (16Mb). The return is a bus address. + */ + static __inline__ unsigned int mca_get_dma_addr(unsigned int dmanr) { unsigned int addr; @@ -86,6 +118,15 @@ static __inline__ unsigned int mca_get_dma_addr(unsigned int dmanr) return addr; } +/** + * mca_set_dma_count - load a 16bit transfer count + * @dmanr: DMA channel + * @count: count + * + * Set the DMA count for this channel. This can be up to 64Kbytes. + * Setting a count of zero will not do what you expect. + */ + static __inline__ void mca_set_dma_count(unsigned int dmanr, unsigned int count) { count--; /* transfers one more than count -- correct for this */ @@ -95,6 +136,14 @@ static __inline__ void mca_set_dma_count(unsigned int dmanr, unsigned int count) outb((count >> 8) & 0xff, MCA_DMA_REG_EXE); } +/** + * mca_get_dma_residue - get the remaining bytes to transfer + * @dmanr: DMA channel + * + * This function returns the number of bytes left to transfer + * on this DMA channel. + */ + static __inline__ unsigned int mca_get_dma_residue(unsigned int dmanr) { unsigned short count; @@ -106,6 +155,15 @@ static __inline__ unsigned int mca_get_dma_residue(unsigned int dmanr) return count; } +/** + * mca_set_dma_io - set the port for an I/O transfer + * @dmanr: DMA channel + * @io_addr: an I/O port number + * + * Unlike the ISA bus DMA controllers the DMA on MCA bus can transfer + * with an I/O port target. + */ + static __inline__ void mca_set_dma_io(unsigned int dmanr, unsigned int io_addr) { /* @@ -117,6 +175,24 @@ static __inline__ void mca_set_dma_io(unsigned int dmanr, unsigned int io_addr) outb((io_addr >> 8) & 0xff, MCA_DMA_REG_EXE); } +/** + * mca_set_dma_mode - set the DMA mode + * @dmanr: DMA channel + * @mode: The mode to set + * + * The DMA controller supports several modes. The mode values you can + * set are + * + * MCA_DMA_MODE_READ when reading from the DMA device. + * + * MCA_DMA_MODE_WRITE to writing to the DMA device. + * + * MCA_DMA_MODE_IO to do DMA to or from an I/O port. + * + * MCA_DMA_MODE_16 to do 16bit transfers. + * + */ + static __inline__ void mca_set_dma_mode(unsigned int dmanr, unsigned int mode) { outb(MCA_DMA_FN_SET_MODE | dmanr, MCA_DMA_REG_FN); diff --git a/include/asm-i386/mman.h b/include/asm-i386/mman.h index c5bd25f73..f953c436c 100644 --- a/include/asm-i386/mman.h +++ b/include/asm-i386/mman.h @@ -25,6 +25,12 @@ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ +#define MADV_NORMAL 0x0 /* default page-in behavior */ +#define MADV_RANDOM 0x1 /* page-in minimum required */ +#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ +#define MADV_WILLNEED 0x3 /* pre-fault pages */ +#define MADV_DONTNEED 0x4 /* discard these pages */ + /* compatibility flags */ #define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 diff --git a/include/asm-i386/parport.h b/include/asm-i386/parport.h index 2f7e8d295..fa0e321e4 100644 --- a/include/asm-i386/parport.h +++ b/include/asm-i386/parport.h @@ -1,7 +1,7 @@ /* * parport.h: ia32-specific parport initialisation * - * Copyright (C) 1999 Tim Waugh <tim@cyberelk.demon.co.uk> + * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk> * * This file should only be included by drivers/parport/parport_pc.c. */ @@ -9,43 +9,10 @@ #ifndef _ASM_I386_PARPORT_H #define _ASM_I386_PARPORT_H 1 -/* Maximum number of ports to support. It is useless to set this greater - than PARPORT_MAX (in <linux/parport.h>). */ -#define PARPORT_PC_MAX_PORTS 8 - -static int parport_pc_init_pci(int irq, int dma); -static int parport_pc_init_superio(void); - -static int user_specified __devinitdata = 0; -int __init -parport_pc_init(int *io, int *io_hi, int *irq, int *dma) +static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); +static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) { - int count = 0, i = 0; - - if (io && *io) { - /* Only probe the ports we were given. */ - user_specified = 1; - do { - if (!*io_hi) *io_hi = 0x400 + *io; - if (parport_pc_probe_port(*(io++), *(io_hi++), - *(irq++), *(dma++), NULL)) - count++; - } while (*io && (++i < PARPORT_PC_MAX_PORTS)); - } else { - count += parport_pc_init_superio (); - - if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL)) - count++; - if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL)) - count++; - if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL)) - count++; - - /* probe for other PCI parallel devices */ - count += parport_pc_init_pci (irq[0], dma[0]); - } - - return count; + return parport_pc_find_isa_ports (autoirq, autodma); } #endif /* !(_ASM_I386_PARPORT_H) */ diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 6ec03679f..36f4e3176 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h @@ -222,6 +222,9 @@ #define __NR_setfsuid32 215 #define __NR_setfsgid32 216 #define __NR_pivot_root 217 +#define __NR_mincore 218 +#define __NR_madvise 219 +#define __NR_madvise1 219 /* delete when C lib stub is removed */ /* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */ |