Created
March 21, 2015 05:31
-
-
Save ao-kenji/55d15e6fc0489f732890 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- console log on LUNA-88K2 | |
| OpenBSD/luna88k (aurora.in.nk-home.net) (console) | |
| login: wdc0 at pcmcia0 function 0 "KME, KXLC005, 00" port 0x190/8,0x396/2wdc0: KME_HACK | |
| : INT1 (irq 5) | |
| wdcattach: KME_HACK reg=41, val=0x81 | |
| wdc0:0: before reset, st0=0x0, st1=0x0 | |
| wdc0:0: wdcwait_reset() end, st0=0x0, er0=0x1, st1=0x30<DWF,DSC>, er1=0x30, reset time=0 msec | |
| wdc0:0: after reset, ret_value=0x3 | |
| wdc0:0:0: after reset, st=0x0, sc=0x1 sn=0x1 cl=0x14 ch=0xeb | |
| wdc0:0:1: after reset, st=0x30<DWF,DSC>, sc=0x30 sn=0x30 cl=0x30 ch=0x30 | |
| wdcwait wdc0:0 | |
| wdcwait: timeout, status 0x30<DWF,DSC> error 0x30 | |
| wdc0:0:1: DRDY test timed out with status 30 | |
| cbus_isrdispatch: stray INT1, IPL=3 | |
| wdcattach: ch_drive_flags 0x2 0x0 | |
| atapiscsi0 at wdc0 channel 0 drive 0 | |
| wdc_probe_caps: wdc_cap 0x3 cf_flags 0x0 | |
| wdc_probe_caps: atap_oldpiotiming=2 | |
| wdc_probe_caps: atap_extensions=0x2, atap_piomode_supp=0x3, atap_dmamode_supp=0x7, atap_udmamode_supp=0x0 | |
| scsibus4 at atapiscsi0: 2 targets | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| wdc_atapi_start: not ready, st = 58 | |
| atapiscsi0(wdc0:0:0): using BIOS timings | |
| -- diff | |
| Index: sys/dev/ic/wdc.c | |
| =================================================================== | |
| RCS file: /cvs/src/sys/dev/ic/wdc.c,v | |
| retrieving revision 1.127 | |
| diff -u -r1.127 wdc.c | |
| --- sys/dev/ic/wdc.c 29 Sep 2014 00:07:55 -0000 1.127 | |
| +++ sys/dev/ic/wdc.c 6 Mar 2015 21:59:00 -0000 | |
| @@ -754,6 +754,13 @@ | |
| if (!chp->_vtbl) | |
| chp->_vtbl = &wdc_default_vtbl; | |
| + /* XXX disable 8bit PIO transfers (?) */ | |
| + if (chp->wdc->quirks & WDC_QUIRK_NO8BITPIO) { | |
| + /* we want to write to ctl register, so _WDC_AUX is needed */ | |
| + CHP_WRITE_REG(chp, _WDC_AUX | wdr_features, WDSF_8BIT_PIO_DS); | |
| + delay(500); /* we need some delay on KME KLXC005 */ | |
| + } | |
| + | |
| for (i = 0; i < 2; i++) { | |
| chp->ch_drive[i].chnl_softc = chp; | |
| chp->ch_drive[i].drive = i; | |
| Index: sys/dev/ic/wdcvar.h | |
| =================================================================== | |
| RCS file: /cvs/src/sys/dev/ic/wdcvar.h,v | |
| retrieving revision 1.54 | |
| diff -u -r1.54 wdcvar.h | |
| --- sys/dev/ic/wdcvar.h 22 Jan 2014 06:05:21 -0000 1.54 | |
| +++ sys/dev/ic/wdcvar.h 6 Mar 2015 21:59:00 -0000 | |
| @@ -171,6 +171,7 @@ | |
| struct channel_softc **channels; /* channels-specific datas (array) */ | |
| u_int16_t quirks; /* per-device oddities */ | |
| #define WDC_QUIRK_NOSHORTDMA 0x0001 /* can't do short DMA transfers */ | |
| +#define WDC_QUIRK_NO8BITPIO 0x0002 /* disable 8bit pio transfers */ | |
| #if 0 | |
| /* | |
| 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 6 Mar 2015 21:59:01 -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 6 Mar 2015 21:59:01 -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 6 Mar 2015 21:59:01 -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 6 Mar 2015 21:59:01 -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,10 @@ | |
| } | |
| if (quirks & WDC_PCMCIA_NO_EXTRA_RESETS) | |
| sc->sc_wdcdev.cap |= WDC_CAPABILITY_NO_EXTRA_RESETS; | |
| + | |
| + /* XXX: KME HACK */ | |
| + if (quirks & WDC_PCMCIA_KME_HACK) | |
| + sc->sc_wdcdev.quirks |= WDC_QUIRK_NO8BITPIO; | |
| /* 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