Skip to content

Instantly share code, notes, and snippets.

@ao-kenji
Created March 3, 2015 13:55
Show Gist options
  • Select an option

  • Save ao-kenji/fd24cad026a4c76c5006 to your computer and use it in GitHub Desktop.

Select an option

Save ao-kenji/fd24cad026a4c76c5006 to your computer and use it in GitHub Desktop.
Index: sys/dev/pci/pciide.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/pciide.c,v
retrieving revision 1.351
diff -u -r1.351 pciide.c
--- sys/dev/pci/pciide.c 9 Jan 2015 07:29:45 -0000 1.351
+++ sys/dev/pci/pciide.c 3 Mar 2015 13:53:53 -0000
@@ -1537,7 +1537,7 @@
sc->sc_dmactl_write = pciide_dmactl_write;
sc->sc_dmatbl_write = pciide_dmatbl_write;
- WDCDEBUG_PRINT((" sc_pc=%p, sc_tag=%p, pa_class=0x%x\n", sc->sc_pc,
+ WDCDEBUG_PRINT((" sc_pc=%p, sc_tag=%x, pa_class=0x%x\n", sc->sc_pc,
sc->sc_tag, pa->pa_class), DEBUG_PROBE);
sc->sc_pp->chip_map(sc, pa);
Index: sys/dev/pcmcia/pcmciadevs
===================================================================
RCS file: /cvs/src/sys/dev/pcmcia/pcmciadevs,v
retrieving revision 1.133
diff -u -r1.133 pcmciadevs
--- sys/dev/pcmcia/pcmciadevs 26 May 2009 19:37:22 -0000 1.133
+++ sys/dev/pcmcia/pcmciadevs 3 Mar 2015 13:53:54 -0000
@@ -328,6 +328,7 @@
/* Panasonic */
product PANASONIC KXLC002 0x0304 Panasonic 4X CD-ROM Interface
product PANASONIC KXLC003 0x0504 Panasonic 8X CD-ROM Interface
+product PANASONIC KXLC005 0x0704 Panasonic 20X CD-ROM Interface
product PANASONIC KME 0x2604 Panasonic CD-R/RW Interface
/* Proxim */
Index: sys/dev/pcmcia/pcmciadevs.h
===================================================================
RCS file: /cvs/src/sys/dev/pcmcia/pcmciadevs.h,v
retrieving revision 1.136
diff -u -r1.136 pcmciadevs.h
--- sys/dev/pcmcia/pcmciadevs.h 26 May 2009 19:37:35 -0000 1.136
+++ sys/dev/pcmcia/pcmciadevs.h 3 Mar 2015 13:53:54 -0000
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmciadevs.h,v 1.136 2009/05/26 19:37:35 fgsch Exp $ */
+/* $OpenBSD$ */
/*
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
@@ -453,6 +453,8 @@
#define PCMCIA_PRODUCT_PANASONIC_KXLC002 0x0304
#define PCMCIA_CIS_PANASONIC_KXLC003 { NULL, NULL, NULL, NULL }
#define PCMCIA_PRODUCT_PANASONIC_KXLC003 0x0504
+#define PCMCIA_CIS_PANASONIC_KXLC005 { NULL, NULL, NULL, NULL }
+#define PCMCIA_PRODUCT_PANASONIC_KXLC005 0x0704
#define PCMCIA_CIS_PANASONIC_KME { NULL, NULL, NULL, NULL }
#define PCMCIA_PRODUCT_PANASONIC_KME 0x2604
Index: sys/dev/pcmcia/wdc_pcmcia.c
===================================================================
RCS file: /cvs/src/sys/dev/pcmcia/wdc_pcmcia.c,v
retrieving revision 1.31
diff -u -r1.31 wdc_pcmcia.c
--- sys/dev/pcmcia/wdc_pcmcia.c 14 Sep 2014 14:17:25 -0000 1.31
+++ sys/dev/pcmcia/wdc_pcmcia.c 3 Mar 2015 13:53:54 -0000
@@ -90,6 +90,7 @@
int wpp_quirk_flag; /* Quirk flags */
#define WDC_PCMCIA_FORCE_16BIT_IO 0x01 /* Don't use PCMCIA_WIDTH_AUTO */
#define WDC_PCMCIA_NO_EXTRA_RESETS 0x02 /* Only reset ctrl once */
+#define WDC_PCMCIA_KME_HACK 0x04 /* XXX: hack for KME */
const char *wpp_cis_info[4]; /* XXX necessary? */
} wdc_pcmcia_pr[] = {
@@ -121,6 +122,10 @@
/* Archos MiniCD */
{ PCMCIA_VENDOR_ARCHOS, PCMCIA_PRODUCT_ARCHOS_ARC_ATAPI,
0, PCMCIA_CIS_ARCHOS_ARC_ATAPI },
+
+ /* Panasonic KXLC005 */
+ { PCMCIA_VENDOR_PANASONIC, PCMCIA_PRODUCT_PANASONIC_KXLC005,
+ WDC_PCMCIA_KME_HACK, PCMCIA_CIS_PANASONIC_KXLC005 },
};
struct wdc_pcmcia_disk_device_interface_args {
@@ -347,6 +352,14 @@
}
if (quirks & WDC_PCMCIA_NO_EXTRA_RESETS)
sc->sc_wdcdev.cap |= WDC_CAPABILITY_NO_EXTRA_RESETS;
+
+ /* XXX */
+ if (quirks & WDC_PCMCIA_KME_HACK) {
+printf("%s: KME_HACK, wdc_channel.ctl_ioh=0x%lx\n", __func__, sc->wdc_channel.ctl_ioh);
+ bus_space_write_1(sc->wdc_channel.ctl_iot,
+ sc->wdc_channel.ctl_ioh, 1, 0x81);
+ DELAY(500);
+ }
/* Establish the interrupt handler. */
sc->sc_ih = pcmcia_intr_establish(sc->sc_pf, IPL_BIO, wdcintr,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment