Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Pull AL2230S radio support for chips:
details: https://anonhg.NetBSD.org/src/rev/7fbaf3762287
branches: trunk
changeset: 760901:7fbaf3762287
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Jan 16 09:08:29 2011 +0000
description:
Pull AL2230S radio support for chips:
> zyd0: sorry, radio "PV2000" is not supported yet
> zyd0: could not attach RF
mentioned in PR kern/43125. From (FreeBSD via) OpenBSD.
Untested (no hardware here), but should not affect other chips.
diffstat:
sys/dev/usb/if_zyd.c | 18 +++++++++++++++---
sys/dev/usb/if_zydreg.h | 12 ++++++++++--
2 files changed, 25 insertions(+), 5 deletions(-)
diffs (102 lines):
diff -r f2f30d205063 -r 7fbaf3762287 sys/dev/usb/if_zyd.c
--- a/sys/dev/usb/if_zyd.c Sun Jan 16 08:59:08 2011 +0000
+++ b/sys/dev/usb/if_zyd.c Sun Jan 16 09:08:29 2011 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $ */
-/* $NetBSD: if_zyd.c,v 1.27 2010/11/03 22:28:31 dyoung Exp $ */
+/* $NetBSD: if_zyd.c,v 1.28 2011/01/16 09:08:29 tsutsui Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini%free.fr@localhost>
@@ -22,7 +22,7 @@
* ZyDAS ZD1211/ZD1211B USB WLAN driver.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.27 2010/11/03 22:28:31 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.28 2011/01/16 09:08:29 tsutsui Exp $");
#include <sys/param.h>
@@ -124,6 +124,7 @@
ZYD_ZD1211B_DEV(BELKIN, F5D7050C),
ZYD_ZD1211B_DEV(BELKIN, ZD1211B),
ZYD_ZD1211B_DEV(CISCOLINKSYS, WUSBF54G),
+ ZYD_ZD1211B_DEV(CYBERTAN, ZD1211B),
ZYD_ZD1211B_DEV(FIBERLINE, WL430U),
ZYD_ZD1211B_DEV(MELCO, KG54L),
ZYD_ZD1211B_DEV(PHILIPS, SNU5600),
@@ -997,6 +998,7 @@
#define N(a) (sizeof (a) / sizeof ((a)[0]))
struct zyd_softc *sc = rf->rf_sc;
static const struct zyd_phy_pair phyini[] = ZYD_AL2230_PHY;
+ static const struct zyd_phy_pair phy2230s[] = ZYD_AL2230S_PHY_INIT;
static const uint32_t rfini[] = ZYD_AL2230_RF;
int i, error;
@@ -1007,6 +1009,15 @@
return error;
}
+ if (sc->rf_rev == ZYD_RF_AL2230S) {
+ for (i = 0; i < N(phy2230s); i++) {
+ error = zyd_write16(sc, phy2230s[i].reg,
+ phy2230s[i].val);
+ if (error != 0)
+ return error;
+ }
+ }
+
/* init AL2230 radio */
for (i = 0; i < N(rfini); i++) {
if ((error = zyd_rfwrite(sc, rfini[i])) != 0)
@@ -1474,6 +1485,7 @@
rf->width = 24; /* 24-bit RF values */
break;
case ZYD_RF_AL2230:
+ case ZYD_RF_AL2230S:
if (sc->mac_rev == ZYD_ZD1211B)
rf->init = zyd_al2230_init_b;
else
@@ -1526,7 +1538,7 @@
static const char * const zyd_rfs[] = {
"unknown", "unknown", "UW2451", "UCHIP", "AL2230",
"AL7230B", "THETA", "AL2210", "MAXIM_NEW", "GCT",
- "PV2000", "RALINK", "INTERSIL", "RFMD", "MAXIM_NEW2",
+ "AL2230S", "RALINK", "INTERSIL", "RFMD", "MAXIM_NEW2",
"PHILIPS"
};
diff -r f2f30d205063 -r 7fbaf3762287 sys/dev/usb/if_zydreg.h
--- a/sys/dev/usb/if_zydreg.h Sun Jan 16 08:59:08 2011 +0000
+++ b/sys/dev/usb/if_zydreg.h Sun Jan 16 09:08:29 2011 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: if_zydreg.h,v 1.19 2006/11/30 19:28:07 damien Exp $ */
-/* $NetBSD: if_zydreg.h,v 1.5 2010/11/03 22:30:50 dyoung Exp $ */
+/* $NetBSD: if_zydreg.h,v 1.6 2011/01/16 09:08:29 tsutsui Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini%free.fr@localhost>
@@ -160,7 +160,7 @@
#define ZYD_RF_AL2210 0x7
#define ZYD_RF_MAXIM_NEW 0x8
#define ZYD_RF_GCT 0x9
-#define ZYD_RF_PV2000 0xa /* not supported yet */
+#define ZYD_RF_AL2230S 0xa
#define ZYD_RF_RALINK 0xb /* not supported yet */
#define ZYD_RF_INTERSIL 0xc /* not supported yet */
#define ZYD_RF_RFMD 0xd
@@ -638,6 +638,14 @@
{ ZYD_CR252, 0x00 }, { ZYD_CR253, 0x00 } \
}
+#define ZYD_AL2230S_PHY_INIT \
+{ \
+ { ZYD_CR47, 0x1e }, { ZYD_CR106, 0x22 }, { ZYD_CR107, 0x2a }, \
+ { ZYD_CR109, 0x13 }, { ZYD_CR118, 0xf8 }, { ZYD_CR119, 0x12 }, \
+ { ZYD_CR122, 0xe0 }, { ZYD_CR128, 0x10 }, { ZYD_CR129, 0x0e }, \
+ { ZYD_CR130, 0x10 } \
+}
+
#define ZYD_AL2230_RF \
{ \
0x03f790, 0x033331, 0x00000d, 0x0b3331, 0x03b812, 0x00fff3, \
Home |
Main Index |
Thread Index |
Old Index