Deleted Added
sdiff udiff text old ( 226820 ) new ( 226821 )
full compact
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 226820 2011-10-26 23:22:32Z 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_SDI_STATUS, 0x1); /* START */
1318 break;
1319 case BGE_RESET_STOP:
1320 bge_writemem_ind(sc, BGE_SDI_STATUS, 0x2); /* UNLOAD */
1321 break;
1322 }
1323 }
1324}
1325
1326static void
1327bge_sig_post_reset(struct bge_softc *sc, int type)
1328{
1329
1330 if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) {
1331 switch (type) {
1332 case BGE_RESET_START:
1333 bge_writemem_ind(sc, BGE_SDI_STATUS, 0x80000001);
1334 /* START DONE */
1335 break;
1336 case BGE_RESET_STOP:
1337 bge_writemem_ind(sc, BGE_SDI_STATUS, 0x80000002);
1338 break;
1339 }
1340 }
1341}
1342
1343static void
1344bge_sig_legacy(struct bge_softc *sc, int type)
1345{
1346
1347 if (sc->bge_asf_mode) {
1348 switch (type) {
1349 case BGE_RESET_START:
1350 bge_writemem_ind(sc, BGE_SDI_STATUS, 0x1); /* START */
1351 break;
1352 case BGE_RESET_STOP:
1353 bge_writemem_ind(sc, BGE_SDI_STATUS, 0x2); /* UNLOAD */
1354 break;
1355 }
1356 }
1357}
1358
1359static void
1360bge_stop_fw(struct bge_softc *sc)
1361{

--- 4635 unchanged lines hidden ---