/* SPDX-License-Identifier: GPL-2.0 */ /* sun3xflop.h: Sun3/80 specific parts of the floppy driver. * * Derived partially from asm-sparc/floppy.h, which is: * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * * Sun3x version 2/4/2000 Sam Creasey (sammy@sammy.net)
*/
/* We don't need no stinkin' I/O port allocation crap. */ #undef release_region #undef request_region #define release_region(X, Y) do { } while(0) #define request_region(X, Y, Z) (1)
/* Routines unique to each controller type on a Sun. */ staticunsignedchar sun3x_82072_fd_inb(int port)
{ staticint once = 0; // udelay(5); switch(port & 7) { default:
pr_crit("floppy: Asked to read unknown port %d\n", port);
panic("floppy: Port bolixed."); case 4: /* FD_STATUS */ return (*sun3x_fdc.status_r) & ~STATUS_DMA; case 5: /* FD_DATA */ return (*sun3x_fdc.data_r); case 7: /* FD_DIR */ /* ugly hack, I can't find a way to actually detect the disk */ if(!once) {
once = 1; return 0x80;
} return 0;
};
panic("sun_82072_fd_inb: How did I get here?");
}
staticvoid sun3x_82072_fd_outb(unsignedchar value, int port)
{ // udelay(5); switch(port & 7) { default:
pr_crit("floppy: Asked to write to unknown port %d\n", port);
panic("floppy: Port bolixed."); case 2: /* FD_DOR */ /* Oh geese, 82072 on the Sun has no DOR register, * so we make do with taunting the FCR. * * ASSUMPTIONS: There will only ever be one floppy * drive attached to a Sun controller * and it will be at drive zero.
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.