floppy.h (4b4193256c8d3bc3a5397b5cd9494c2ad386317d) | floppy.h (06cc5cf16591c3b1d63af2bbc9d33a66419ced98) |
---|---|
1/* 2 * Architecture specific parts of the Floppy driver 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 1995 --- 29 unchanged lines hidden (view full) --- 38alpha_fd_dma_setup(char *addr, unsigned long size, int mode, int io) 39{ 40 static unsigned long prev_size; 41 static dma_addr_t bus_addr = 0; 42 static char *prev_addr; 43 static int prev_dir; 44 int dir; 45 | 1/* 2 * Architecture specific parts of the Floppy driver 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 1995 --- 29 unchanged lines hidden (view full) --- 38alpha_fd_dma_setup(char *addr, unsigned long size, int mode, int io) 39{ 40 static unsigned long prev_size; 41 static dma_addr_t bus_addr = 0; 42 static char *prev_addr; 43 static int prev_dir; 44 int dir; 45 |
46 dir = (mode != DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE; | 46 dir = (mode != DMA_MODE_READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; |
47 48 if (bus_addr 49 && (addr != prev_addr || size != prev_size || dir != prev_dir)) { 50 /* different from last time -- unmap prev */ | 47 48 if (bus_addr 49 && (addr != prev_addr || size != prev_size || dir != prev_dir)) { 50 /* different from last time -- unmap prev */ |
51 pci_unmap_single(isa_bridge, bus_addr, prev_size, prev_dir); | 51 dma_unmap_single(&isa_bridge->dev, bus_addr, prev_size, 52 prev_dir); |
52 bus_addr = 0; 53 } 54 55 if (!bus_addr) /* need to map it */ | 53 bus_addr = 0; 54 } 55 56 if (!bus_addr) /* need to map it */ |
56 bus_addr = pci_map_single(isa_bridge, addr, size, dir); | 57 bus_addr = dma_map_single(&isa_bridge->dev, addr, size, dir); |
57 58 /* remember this one as prev */ 59 prev_addr = addr; 60 prev_size = size; 61 prev_dir = dir; 62 63 fd_clear_dma_ff(); 64 fd_set_dma_mode(mode); --- 49 unchanged lines hidden --- | 58 59 /* remember this one as prev */ 60 prev_addr = addr; 61 prev_size = size; 62 prev_dir = dir; 63 64 fd_clear_dma_ff(); 65 fd_set_dma_mode(mode); --- 49 unchanged lines hidden --- |