fdc.c (b31da03fd83d59b6a6a901674fb2428e38d33e00) | fdc.c (19a388e651aa0a3036fccc3d9519c4451df8838b) |
---|---|
1/*- 2 * Copyright (c) 2004 Poul-Henning Kamp 3 * Copyright (c) 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Don Ahn. 8 * --- 497 unchanged lines hidden (view full) --- 506 /* Try a software reset, default precomp, and 500 kb/s */ 507 fddsr_wr(fdc, I8207X_DSR_SR); 508 } else { 509 /* Try a hardware reset, keep motor on */ 510 fdout_wr(fdc, fdc->fdout & ~(FDO_FRST|FDO_FDMAEN)); 511 DELAY(100); 512 /* enable FDC, but defer interrupts a moment */ 513 fdout_wr(fdc, fdc->fdout & ~FDO_FDMAEN); | 1/*- 2 * Copyright (c) 2004 Poul-Henning Kamp 3 * Copyright (c) 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Don Ahn. 8 * --- 497 unchanged lines hidden (view full) --- 506 /* Try a software reset, default precomp, and 500 kb/s */ 507 fddsr_wr(fdc, I8207X_DSR_SR); 508 } else { 509 /* Try a hardware reset, keep motor on */ 510 fdout_wr(fdc, fdc->fdout & ~(FDO_FRST|FDO_FDMAEN)); 511 DELAY(100); 512 /* enable FDC, but defer interrupts a moment */ 513 fdout_wr(fdc, fdc->fdout & ~FDO_FDMAEN); |
514 DELAY(100); 515 fdout_wr(fdc, fdc->fdout); | |
516 } | 514 } |
515 DELAY(100); 516 fdout_wr(fdc, fdc->fdout); |
|
517 518 /* XXX after a reset, silently believe the FDC will accept commands */ 519 if (fdc_cmd(fdc, 3, NE7CMD_SPECIFY, spec1, spec2, 0)) 520 device_printf(fdc->fdc_dev, " SPECIFY failed in reset\n"); 521 522 if (fdc->fdct == FDC_ENHANCED) { 523 if (fdc_cmd(fdc, 4, 524 I8207X_CONFIGURE, --- 1514 unchanged lines hidden --- | 517 518 /* XXX after a reset, silently believe the FDC will accept commands */ 519 if (fdc_cmd(fdc, 3, NE7CMD_SPECIFY, spec1, spec2, 0)) 520 device_printf(fdc->fdc_dev, " SPECIFY failed in reset\n"); 521 522 if (fdc->fdct == FDC_ENHANCED) { 523 if (fdc_cmd(fdc, 4, 524 I8207X_CONFIGURE, --- 1514 unchanged lines hidden --- |