Maybe supported LAN9218 Family.
This commit is contained in:
parent
5f6578a865
commit
7fe24103db
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lan9118.c,v 1.9 2009/11/29 10:17:01 kiyohara Exp $ */
|
||||
/* $NetBSD: lan9118.c,v 1.10 2009/12/02 12:51:50 kiyohara Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
|
@ -25,11 +25,10 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.9 2009/11/29 10:17:01 kiyohara Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.10 2009/12/02 12:51:50 kiyohara Exp $");
|
||||
|
||||
/*
|
||||
* The LAN9118 Family
|
||||
*
|
||||
* * The LAN9118 is targeted for 32-bit applications requiring high
|
||||
* performance, and provides the highest level of performance possible for
|
||||
* a non-PCI 10/100 Ethernet controller.
|
||||
|
@ -43,6 +42,9 @@ __KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.9 2009/11/29 10:17:01 kiyohara Exp $")
|
|||
* is for 32-bit host processors, while the LAN9115 is for 16-bit
|
||||
* applications, which may also require an external PHY. Both devices
|
||||
* deliver superior levels of performance.
|
||||
*
|
||||
* The LAN9218 Family
|
||||
* Also support HP Auto-MDIX.
|
||||
*/
|
||||
|
||||
#include "bpfilter.h"
|
||||
|
@ -178,8 +180,8 @@ lan9118_attach(struct lan9118_softc *sc)
|
|||
sc->sc_id = LAN9118_ID_REV_ID(val);
|
||||
sc->sc_rev = LAN9118_ID_REV_REV(val);
|
||||
|
||||
#define LAN9xxx_ID(id) ((id) >= 0x9000 ? (id) & 0xfff : \
|
||||
((id) >= 0x1000 ? ((id) >> 4) + 0x100 : (id)))
|
||||
#define LAN9xxx_ID(id) \
|
||||
(IS_LAN9118(id) ? (id) : (IS_LAN9218(id) ? ((id) >> 4) + 0x100 : (id) & 0xfff))
|
||||
|
||||
aprint_normal(": SMSC LAN9%03x Rev %d\n",
|
||||
LAN9xxx_ID(sc->sc_id), sc->sc_rev);
|
||||
|
@ -236,7 +238,8 @@ lan9118_attach(struct lan9118_softc *sc)
|
|||
* number that above.
|
||||
*/
|
||||
sc->sc_mii.mii_instance++;
|
||||
if (sc->sc_id == LAN9118_ID_9115 || sc->sc_id == LAN9118_ID_9117) {
|
||||
if (sc->sc_id == LAN9118_ID_9115 || sc->sc_id == LAN9118_ID_9117 ||
|
||||
sc->sc_id == LAN9218_ID_9215 || sc->sc_id == LAN9218_ID_9217) {
|
||||
if (bus_space_read_4(sc->sc_iot, sc->sc_ioh, LAN9118_HW_CFG) &
|
||||
LAN9118_HW_CFG_EXT_PHY_DET) {
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lan9118reg.h,v 1.1 2009/08/09 06:40:10 kiyohara Exp $ */
|
||||
/* $NetBSD: lan9118reg.h,v 1.2 2009/12/02 12:51:50 kiyohara Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
|
@ -30,10 +30,16 @@
|
|||
|
||||
#define LAN9118_IOSIZE 0x100
|
||||
|
||||
#define LAN9118_ID_9115 0x115
|
||||
#define LAN9118_ID_9116 0x116
|
||||
#define LAN9118_ID_9117 0x117
|
||||
#define LAN9118_ID_9118 0x118
|
||||
#define LAN9118_ID_9115 0x0115
|
||||
#define LAN9118_ID_9116 0x0116
|
||||
#define LAN9118_ID_9117 0x0117
|
||||
#define LAN9118_ID_9118 0x0118
|
||||
#define LAN9218_ID_9215 0x115a
|
||||
#define LAN9218_ID_9217 0x117a
|
||||
#define LAN9218_ID_9218 0x118a
|
||||
|
||||
#define IS_LAN9118(id) ((id) >= LAN9118_ID_9115 && (id) <= LAN9118_ID_9118)
|
||||
#define IS_LAN9218(id) ((id) >= LAN9218_ID_9215 && (id) <= LAN9218_ID_9218)
|
||||
|
||||
#define LAN9118_IPHY_ADDR 0x01 /* Internal PHY Address */
|
||||
|
||||
|
|
Loading…
Reference in New Issue