aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKATO Takenori <kato@FreeBSD.org>1997-10-21 09:48:38 +0000
committerKATO Takenori <kato@FreeBSD.org>1997-10-21 09:48:38 +0000
commitb2bf5e1cfdc26914b68775a0a5c03eeb42ca910a (patch)
treecbfa8c0dd95f4b20b29ab623fbf4410d71285d3d
parentb966cc2394453de434ced75e8a857466023de3eb (diff)
Notes
-rw-r--r--sys/pc98/cbus/fdc.c17
-rw-r--r--sys/pc98/pc98/fd.c17
2 files changed, 30 insertions, 4 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index f51eca063dae..99b3c03ab287 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.23 1997/09/22 12:23:47 kato Exp $
+ * $Id: fd.c,v 1.24 1997/09/24 08:21:26 kato Exp $
*
*/
@@ -96,6 +96,12 @@
/* misuse a flag to identify format operation */
#define B_FORMAT B_XXX
+/* configuration flags */
+#define FDC_PRETEND_D0 (1 << 0) /* pretend drive 0 to be there */
+
+/* internally used only, not really from CMOS: */
+#define RTCFDT_144M_PRETENDED 0x1000
+
/*
* this biotab field doubles as a field for the physical unit number
* on the controller
@@ -779,7 +785,10 @@ fdattach(struct isa_device *dev)
fdt = FDT_NONE;
break;
#else
- case 0: fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
+ case 0: if (dev->id_flags & FDC_PRETEND_D0)
+ fdt = RTCFDT_144M | RTCFDT_144M_PRETENDED;
+ else
+ fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
break;
case 1: fdt = ((rtcin(RTC_FDISKETTE) << 4) & 0xf0);
break;
@@ -945,6 +954,10 @@ fdattach(struct isa_device *dev)
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
break;
+ case RTCFDT_144M | RTCFDT_144M_PRETENDED:
+ printf("config-pretended ");
+ fdt = RTCFDT_144M;
+ /* fallthrough */
case RTCFDT_144M:
printf("1.44MB 3.5in\n");
fd->type = FD_1440;
diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c
index f51eca063dae..99b3c03ab287 100644
--- a/sys/pc98/pc98/fd.c
+++ b/sys/pc98/pc98/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.23 1997/09/22 12:23:47 kato Exp $
+ * $Id: fd.c,v 1.24 1997/09/24 08:21:26 kato Exp $
*
*/
@@ -96,6 +96,12 @@
/* misuse a flag to identify format operation */
#define B_FORMAT B_XXX
+/* configuration flags */
+#define FDC_PRETEND_D0 (1 << 0) /* pretend drive 0 to be there */
+
+/* internally used only, not really from CMOS: */
+#define RTCFDT_144M_PRETENDED 0x1000
+
/*
* this biotab field doubles as a field for the physical unit number
* on the controller
@@ -779,7 +785,10 @@ fdattach(struct isa_device *dev)
fdt = FDT_NONE;
break;
#else
- case 0: fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
+ case 0: if (dev->id_flags & FDC_PRETEND_D0)
+ fdt = RTCFDT_144M | RTCFDT_144M_PRETENDED;
+ else
+ fdt = (rtcin(RTC_FDISKETTE) & 0xf0);
break;
case 1: fdt = ((rtcin(RTC_FDISKETTE) << 4) & 0xf0);
break;
@@ -945,6 +954,10 @@ fdattach(struct isa_device *dev)
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
break;
+ case RTCFDT_144M | RTCFDT_144M_PRETENDED:
+ printf("config-pretended ");
+ fdt = RTCFDT_144M;
+ /* fallthrough */
case RTCFDT_144M:
printf("1.44MB 3.5in\n");
fd->type = FD_1440;