1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2001 4 * Bill Paul <wpaul@windriver.com>. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/bge/if_bge.c 226821 2011-10-26 23:52:02Z yongari $"); |
36 37/* 38 * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. 39 * 40 * The Broadcom BCM5700 is based on technology originally developed by 41 * Alteon Networks as part of the Tigon I and Tigon II gigabit ethernet 42 * MAC chips. The BCM5700, sometimes referred to as the Tigon III, has 43 * two on-board MIPS R4000 CPUs and can have as much as 16MB of external --- 1265 unchanged lines hidden (view full) --- 1309 * Some chips don't like this so only do this if ASF is enabled 1310 */ 1311 if (sc->bge_asf_mode) 1312 bge_writemem_ind(sc, BGE_SRAM_FW_MB, BGE_SRAM_FW_MB_MAGIC); 1313 1314 if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) { 1315 switch (type) { 1316 case BGE_RESET_START: |
1317 bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, 1318 BGE_FW_DRV_STATE_START); |
1319 break; 1320 case BGE_RESET_STOP: |
1321 bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, 1322 BGE_FW_DRV_STATE_UNLOAD); |
1323 break; 1324 } 1325 } 1326} 1327 1328static void 1329bge_sig_post_reset(struct bge_softc *sc, int type) 1330{ 1331 1332 if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) { 1333 switch (type) { 1334 case BGE_RESET_START: |
1335 bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, 1336 BGE_FW_DRV_STATE_START_DONE); |
1337 /* START DONE */ 1338 break; 1339 case BGE_RESET_STOP: |
1340 bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, 1341 BGE_FW_DRV_STATE_UNLOAD_DONE); |
1342 break; 1343 } 1344 } 1345} 1346 1347static void 1348bge_sig_legacy(struct bge_softc *sc, int type) 1349{ 1350 1351 if (sc->bge_asf_mode) { 1352 switch (type) { 1353 case BGE_RESET_START: |
1354 bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, 1355 BGE_FW_DRV_STATE_START); |
1356 break; 1357 case BGE_RESET_STOP: |
1358 bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, 1359 BGE_FW_DRV_STATE_UNLOAD); |
1360 break; 1361 } 1362 } 1363} 1364 1365static void 1366bge_stop_fw(struct bge_softc *sc) 1367{ --- 4635 unchanged lines hidden --- |