• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/block/

Lines Matching defs:fdc

235 static int set_dor(int fdc, char mask, char data);
299 #define UNIT(x) ((x) & 0x03) /* drive on fdc */
300 #define FDC(x) (((x) & 0x04) >> 2) /* fdc of drive */
301 /* reverse mapping from unit and fdc to drive */
302 #define REVDRIVE(fdc, unit) ((unit) + ((fdc) << 2))
307 #define FDCS (&fdc_state[fdc])
588 /* fdc related variables, should end up in a struct */
590 static int fdc; /* current fdc */
726 int fdc = FDC(drive);
731 (FDCS->dor & 3) != UNIT(drive) || fdc != FDC(drive)) {
733 DPRINT("drive=%d fdc=%d dor=%x\n", drive, FDC(drive),
780 static int set_dor(int fdc, char mask, char data)
795 drive = REVDRIVE(fdc, unit);
805 drive = REVDRIVE(fdc, unit);
822 * Reset all driver information about the current fdc.
834 if (FDC(drive) == fdc && (mode || UDRS->track != NEED_1_RECAL))
838 /* selects the fdc and drive, and enables the fdc's input/dma. */
842 fdc = FDC(drive);
845 if (fdc != 1 && fdc != 0) {
846 pr_info("bad fdc value\n");
849 set_dor(fdc, ~0, 8);
851 set_dor(1 - fdc, ~8, 0);
863 "Trying to lock fdc while usage count=0\n"))
871 __reschedule_timeout(drive, "lock fdc");
911 int fdc = FDC(drive);
950 if (!(set_dor(fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) &
954 set_dor(fdc, ~(0x10 << UNIT(drive)), 0);
1108 /* waits until the fdc becomes ready */
1122 DPRINT("Getstatus times out (%x) on fdc %d\n", status, fdc);
1129 /* sends a command byte to the fdc */
1148 byte, fdc, status);
1154 /* gets the response from the fdc */
1177 fdc, status, i);
1185 /* does the fdc need more output? */
1607 set_dor(fdc, ~(0x10 << UNIT(current_drive)), 0);
1707 if (fdc >= N_FDC || FDCS->address == -1) {
1710 pr_info("floppy interrupt on bizarre fdc %d\n", fdc);
1712 is_alive(__func__, "bizarre fdc");
1896 set_dor(fdc, mask, data);
2899 /* fdc busy, this new request will be treated when the
3167 if (FDC(drive) != fdc)
3883 pr_info("FDC %d is an 8272A\n", fdc);
3888 fdc, r);
3893 pr_info("FDC %d is an 82072\n", fdc);
3901 pr_info("FDC %d is an 82072A\n", fdc);
3908 pr_info("FDC %d is a pre-1991 82077\n", fdc);
3914 fdc, r);
3921 fdc, r);
3925 pr_info("FDC %d is a post-1991 82077\n", fdc);
3931 pr_info("FDC %d is an 82078.\n", fdc);
3934 pr_info("FDC %d is a 44pin 82078\n", fdc);
3937 pr_info("FDC %d is a S82078B\n", fdc);
3940 pr_info("FDC %d is a National Semiconductor PC87306\n", fdc);
3944 fdc, reply_buffer[0] >> 5);
4100 int fdc;
4102 for (fdc = 0; fdc < N_FDC; fdc++)
4196 fdc = i;
4220 fdc = 0; /* reset fdc in case of unexpected interrupt */
4247 fdc = i;
4256 floppy_release_regions(fdc);
4265 floppy_release_regions(fdc);
4279 fdc = 0;
4351 static void floppy_release_allocated_regions(int fdc, const struct io_region *p)
4361 static int floppy_request_regions(int fdc)
4370 floppy_release_allocated_regions(fdc, p);
4377 static void floppy_release_regions(int fdc)
4379 floppy_release_allocated_regions(fdc, ARRAY_END(io_regions));
4411 for (fdc = 0; fdc < N_FDC; fdc++) {
4413 if (floppy_request_regions(fdc))
4417 for (fdc = 0; fdc < N_FDC; fdc++) {
4423 fdc = 0;
4426 for (fdc = 0; fdc < N_FDC; fdc++)
4433 fdc = 0;
4439 while (--fdc >= 0)
4440 floppy_release_regions(fdc);
4489 old_fdc = fdc;
4490 for (fdc = 0; fdc < N_FDC; fdc++)
4492 floppy_release_regions(fdc);
4493 fdc = old_fdc;