From b3cbb64300132c2ff5f523c43c3d991f2aa05bc0 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Tue, 20 Jun 2000 05:01:12 +0000 Subject: Almost make a Megahertz card working, still rx probs though --- sys/dev/pcmcia/if_sm_pcmcia.c | 6 ++-- sys/dev/pcmcia/pcmcia_cis_quirks.c | 62 +++++++++++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/sys/dev/pcmcia/if_sm_pcmcia.c b/sys/dev/pcmcia/if_sm_pcmcia.c index 6b80cc5cf9e..e3a294c1131 100644 --- a/sys/dev/pcmcia/if_sm_pcmcia.c +++ b/sys/dev/pcmcia/if_sm_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sm_pcmcia.c,v 1.12 2000/04/24 19:43:36 niklas Exp $ */ +/* $OpenBSD: if_sm_pcmcia.c,v 1.13 2000/06/20 05:01:11 niklas Exp $ */ /* $NetBSD: if_sm_pcmcia.c,v 1.11 1998/08/15 20:47:32 thorpej Exp $ */ /*- @@ -117,10 +117,10 @@ struct sm_pcmcia_product { } sm_pcmcia_prod[] = { { PCMCIA_VENDOR_MEGAHERTZ2, PCMCIA_PRODUCT_MEGAHERTZ2_XJACK, 0 }, - + { PCMCIA_VENDOR_MEGAHERTZ2, PCMCIA_PRODUCT_MEGAHERTZ2_XJEM1144, + 0 }, { PCMCIA_VENDOR_NEWMEDIA, PCMCIA_PRODUCT_NEWMEDIA_BASICS, 0 }, - { PCMCIA_VENDOR_SMC, PCMCIA_PRODUCT_SMC_8020, 0 } }; diff --git a/sys/dev/pcmcia/pcmcia_cis_quirks.c b/sys/dev/pcmcia/pcmcia_cis_quirks.c index 9d4c22922e6..96ebcaeafdf 100644 --- a/sys/dev/pcmcia/pcmcia_cis_quirks.c +++ b/sys/dev/pcmcia/pcmcia_cis_quirks.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcmcia_cis_quirks.c,v 1.3 1999/10/06 13:35:47 fgsch Exp $ */ +/* $OpenBSD: pcmcia_cis_quirks.c,v 1.4 2000/06/20 05:01:11 niklas Exp $ */ /* $NetBSD: pcmcia_cis_quirks.c,v 1.3 1998/12/29 09:00:28 marc Exp $ */ /* @@ -89,6 +89,47 @@ static struct pcmcia_config_entry pcmcia_3cxem556_func1_cfe0 = { 0, /* maxtwins */ }; +struct pcmcia_function pcmcia_megahertz_xjem1144_func0 = { + 0, /* function number */ + PCMCIA_FUNCTION_NETWORK, + 0x07, /* last cfe number */ + 0x200, /* ccr_base */ + 0x63, /* ccr_mask */ +}; + +struct pcmcia_config_entry pcmcia_megahertz_xjem1144_func0_cfe0 = { + 0x07, /* cfe number */ + PCMCIA_CFE_IO8 | PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL, + PCMCIA_IFTYPE_IO, + 1, /* num_iospace */ + 4, /* iomask */ + { { 0x0010, 0 } }, /* iospace */ + 0xffff, /* irqmask */ + 0, /* num_memspace */ + { }, /* memspace */ + 0, /* maxtwins */ +}; + +static struct pcmcia_function pcmcia_megahertz_xjem1144_func1 = { + 1, /* function number */ + PCMCIA_FUNCTION_SERIAL, + 0x35, /* last cfe number */ + 0x300, /* ccr_base */ + 0x3, /* ccr_mask */ +}; + +static struct pcmcia_config_entry pcmcia_megahertz_xjem1144_func1_cfe0 = { + 0x35, /* cfe number */ + PCMCIA_CFE_IO8 | PCMCIA_CFE_IRQLEVEL, PCMCIA_IFTYPE_IO, + 1, /* num_iospace */ + 0, /* iomask */ + { { 0x0008, 0x2f8 } }, /* iospace */ + 0xffff, /* irqmask */ + 0, /* num_memspace */ + { }, /* memspace */ + 0, /* maxtwins */ +}; + static struct pcmcia_function pcmcia_sveclancard_func0 = { 0, /* function number */ PCMCIA_FUNCTION_NETWORK, @@ -112,15 +153,26 @@ static struct pcmcia_config_entry pcmcia_sveclancard_func0_cfe0 = { }; static struct pcmcia_cis_quirk pcmcia_cis_quirks[] = { - { PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556, PCMCIA_CIS_INVALID, + { PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556, PCMCIA_CIS_INVALID, &pcmcia_3cxem556_func0, &pcmcia_3cxem556_func0_cfe0 }, { PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556, PCMCIA_CIS_INVALID, &pcmcia_3cxem556_func1, &pcmcia_3cxem556_func1_cfe0 }, - { PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556B, PCMCIA_CIS_INVALID, + { PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556B, + PCMCIA_CIS_INVALID, &pcmcia_3cxem556_func0, &pcmcia_3cxem556_func0_cfe0 }, - { PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556B, PCMCIA_CIS_INVALID, + { PCMCIA_VENDOR_3COM, PCMCIA_PRODUCT_3COM_3CXEM556B, + PCMCIA_CIS_INVALID, &pcmcia_3cxem556_func1, &pcmcia_3cxem556_func1_cfe0 }, - { PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID, PCMCIA_CIS_SVEC_LANCARD, + { PCMCIA_VENDOR_MEGAHERTZ2, PCMCIA_PRODUCT_MEGAHERTZ2_XJEM1144, + PCMCIA_CIS_INVALID, + &pcmcia_megahertz_xjem1144_func0, + &pcmcia_megahertz_xjem1144_func0_cfe0 }, + { PCMCIA_VENDOR_MEGAHERTZ2, PCMCIA_PRODUCT_MEGAHERTZ2_XJEM1144, + PCMCIA_CIS_INVALID, + &pcmcia_megahertz_xjem1144_func1, + &pcmcia_megahertz_xjem1144_func1_cfe0 }, + { PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID, + PCMCIA_CIS_SVEC_LANCARD, &pcmcia_sveclancard_func0, &pcmcia_sveclancard_func0_cfe0 }, }; -- cgit v1.2.3