if_ep_pccard.c (121515) | if_ep_pccard.c (121588) |
---|---|
1/* 2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/ep/if_ep_pccard.c 121515 2003-10-25 21:28:40Z imp $"); | 32__FBSDID("$FreeBSD: head/sys/dev/ep/if_ep_pccard.c 121588 2003-10-26 22:28:20Z imp $"); |
33 34/* 35 * Pccard support for 3C589 by: 36 * HAMADA Naoki 37 * nao@tom-yam.or.jp 38 */ 39 40#include <sys/cdefs.h> | 33 34/* 35 * Pccard support for 3C589 by: 36 * HAMADA Naoki 37 * nao@tom-yam.or.jp 38 */ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/sys/dev/ep/if_ep_pccard.c 121515 2003-10-25 21:28:40Z imp $"); | 41__FBSDID("$FreeBSD: head/sys/dev/ep/if_ep_pccard.c 121588 2003-10-26 22:28:20Z imp $"); |
42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/kernel.h> 46#include <sys/socket.h> 47#include <sys/module.h> 48#include <sys/bus.h> 49 --- 153 unchanged lines hidden (view full) --- 203 goto bad; 204 } 205 } 206 error = get_e(sc, EEPROM_ADDR_CFG, &result); 207 208 /* ROM size = 0, ROM base = 0 */ 209 /* For now, ignore AUTO SELECT feature of 3C589B and later. */ 210 CSR_WRITE_2(sc, EP_W0_ADDRESS_CFG, result & 0xc000); | 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/kernel.h> 46#include <sys/socket.h> 47#include <sys/module.h> 48#include <sys/bus.h> 49 --- 153 unchanged lines hidden (view full) --- 203 goto bad; 204 } 205 } 206 error = get_e(sc, EEPROM_ADDR_CFG, &result); 207 208 /* ROM size = 0, ROM base = 0 */ 209 /* For now, ignore AUTO SELECT feature of 3C589B and later. */ 210 CSR_WRITE_2(sc, EP_W0_ADDRESS_CFG, result & 0xc000); |
211 | |
212 /* Fake IRQ must be 3 */ | 211 /* Fake IRQ must be 3 */ |
213 CSR_WRITE_2(sc, EP_W0_RESOURCE_CFG, (sc->epb.res_cfg & 0x0fff) | 0x3000); 214 | 212 SET_IRQ(sc, 3); |
215 CSR_WRITE_2(sc, EP_W0_PRODUCT_ID, sc->epb.prod_id); 216 217 if (sc->epb.mii_trans) { 218 /* 219 * turn on the MII transciever 220 */ | 213 CSR_WRITE_2(sc, EP_W0_PRODUCT_ID, sc->epb.prod_id); 214 215 if (sc->epb.mii_trans) { 216 /* 217 * turn on the MII transciever 218 */ |
221 GO_WINDOW(3); | 219 GO_WINDOW(sc, 3); |
222 CSR_WRITE_2(sc, EP_W3_OPTIONS, 0x8040); 223 DELAY(1000); 224 CSR_WRITE_2(sc, EP_W3_OPTIONS, 0xc040); 225 CSR_WRITE_2(sc, EP_COMMAND, RX_RESET); 226 CSR_WRITE_2(sc, EP_COMMAND, TX_RESET); 227 EP_BUSY_WAIT(sc); 228 DELAY(1000); 229 CSR_WRITE_2(sc, EP_W3_OPTIONS, 0x8040); --- 66 unchanged lines hidden --- | 220 CSR_WRITE_2(sc, EP_W3_OPTIONS, 0x8040); 221 DELAY(1000); 222 CSR_WRITE_2(sc, EP_W3_OPTIONS, 0xc040); 223 CSR_WRITE_2(sc, EP_COMMAND, RX_RESET); 224 CSR_WRITE_2(sc, EP_COMMAND, TX_RESET); 225 EP_BUSY_WAIT(sc); 226 DELAY(1000); 227 CSR_WRITE_2(sc, EP_W3_OPTIONS, 0x8040); --- 66 unchanged lines hidden --- |