All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Chan" <mchan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 15/17][BNX2]: Download 5709 firmware.
Date: Thu, 16 Nov 2006 19:14:44 -0800	[thread overview]
Message-ID: <1163733284.6658.48.camel@rh4> (raw)
In-Reply-To: <1163731443.6658.8.camel@rh4>

[BNX2]: Download 5709 firmware.

Signed-off-by: Michael Chan <mchan@broadcom.com>

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 52fe620..92897ef 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -53,6 +53,7 @@
 
 #include "bnx2.h"
 #include "bnx2_fw.h"
+#include "bnx2_fw2.h"
 
 #define DRV_MODULE_NAME		"bnx2"
 #define PFX DRV_MODULE_NAME	": "
@@ -2410,7 +2411,10 @@ bnx2_init_cpus(struct bnx2 *bp)
 	cpu_reg.spad_base = BNX2_RXP_SCRATCH;
 	cpu_reg.mips_view_base = 0x8000000;
 
-	fw = &bnx2_rxp_fw_06;
+	if (CHIP_NUM(bp) == CHIP_NUM_5709)
+		fw = &bnx2_rxp_fw_09;
+	else
+		fw = &bnx2_rxp_fw_06;
 
 	rc = load_cpu_fw(bp, &cpu_reg, fw);
 	if (rc)
@@ -2430,7 +2434,10 @@ bnx2_init_cpus(struct bnx2 *bp)
 	cpu_reg.spad_base = BNX2_TXP_SCRATCH;
 	cpu_reg.mips_view_base = 0x8000000;
 
-	fw = &bnx2_txp_fw_06;
+	if (CHIP_NUM(bp) == CHIP_NUM_5709)
+		fw = &bnx2_txp_fw_09;
+	else
+		fw = &bnx2_txp_fw_06;
 
 	rc = load_cpu_fw(bp, &cpu_reg, fw);
 	if (rc)
@@ -2450,7 +2457,10 @@ bnx2_init_cpus(struct bnx2 *bp)
 	cpu_reg.spad_base = BNX2_TPAT_SCRATCH;
 	cpu_reg.mips_view_base = 0x8000000;
 
-	fw = &bnx2_tpat_fw_06;
+	if (CHIP_NUM(bp) == CHIP_NUM_5709)
+		fw = &bnx2_tpat_fw_09;
+	else
+		fw = &bnx2_tpat_fw_06;
 
 	rc = load_cpu_fw(bp, &cpu_reg, fw);
 	if (rc)
@@ -2470,12 +2480,36 @@ bnx2_init_cpus(struct bnx2 *bp)
 	cpu_reg.spad_base = BNX2_COM_SCRATCH;
 	cpu_reg.mips_view_base = 0x8000000;
 
-	fw = &bnx2_com_fw_06;
+	if (CHIP_NUM(bp) == CHIP_NUM_5709)
+		fw = &bnx2_com_fw_09;
+	else
+		fw = &bnx2_com_fw_06;
 
 	rc = load_cpu_fw(bp, &cpu_reg, fw);
 	if (rc)
 		goto init_cpu_err;
 
+	/* Initialize the Command Processor. */
+	cpu_reg.mode = BNX2_CP_CPU_MODE;
+	cpu_reg.mode_value_halt = BNX2_CP_CPU_MODE_SOFT_HALT;
+	cpu_reg.mode_value_sstep = BNX2_CP_CPU_MODE_STEP_ENA;
+	cpu_reg.state = BNX2_CP_CPU_STATE;
+	cpu_reg.state_value_clear = 0xffffff;
+	cpu_reg.gpr0 = BNX2_CP_CPU_REG_FILE;
+	cpu_reg.evmask = BNX2_CP_CPU_EVENT_MASK;
+	cpu_reg.pc = BNX2_CP_CPU_PROGRAM_COUNTER;
+	cpu_reg.inst = BNX2_CP_CPU_INSTRUCTION;
+	cpu_reg.bp = BNX2_CP_CPU_HW_BREAKPOINT;
+	cpu_reg.spad_base = BNX2_CP_SCRATCH;
+	cpu_reg.mips_view_base = 0x8000000;
+
+	if (CHIP_NUM(bp) == CHIP_NUM_5709) {
+		fw = &bnx2_cp_fw_09;
+
+		load_cpu_fw(bp, &cpu_reg, fw);
+		if (rc)
+			goto init_cpu_err;
+	}
 init_cpu_err:
 	bnx2_gunzip_end(bp);
 	return rc;



  parent reply	other threads:[~2006-11-17  2:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1163731443.6658.8.camel@rh4>
2006-11-17  2:58 ` [PATCH 2.6.20 0/17][BNX2]: patches Michael Chan
2006-11-17  2:55   ` Jeff Garzik
2006-11-19 22:15   ` David Miller
2006-11-17  2:59 ` [PATCH 1/17][BNX2]: Fix Xen problem Michael Chan
2006-11-17  2:59 ` [PATCH 2/17][BNX2]: Improve SerDes handling Michael Chan
2006-11-17  2:59 ` [PATCH 4/17][BNX2]: Add 5708S parallel detection Michael Chan
2006-11-17  2:59 ` [PATCH 5/17][BNX2]: Remove udelay() in copper PHY code Michael Chan
2006-11-17  3:00 ` [PATCH 6/17][BNX2]: Re-organize firmware structures Michael Chan
2006-11-17  3:03 ` [PATCH 7/17][BNX2]: Add new 5709 registers (part 1) Michael Chan
2006-11-17  3:03 ` [PATCH 8/17][BNX2]: Add new 5709 registers (part 2) Michael Chan
2006-11-17  3:05 ` [PATCH 9/17][BNX2]: Add 5709 init code Michael Chan
2006-11-17  3:05 ` [PATCH 10/17][BNX2]: Add 5709 reset and runtime code Michael Chan
2006-11-17  3:07 ` [PATCH 11/17][BNX2]: New firmware to support 5709 (part 1) Michael Chan
2006-11-17  3:11 ` [PATCH 12/17][BNX2]: New firmware to support 5709 (part 2) Michael Chan
2006-11-17  3:11 ` [PATCH 13/17][BNX2]: New firmware to support 5709 (part 3) Michael Chan
2006-11-17  3:11 ` [PATCH 14/17][BNX2]: New firmware to support 5709 (part 4) Michael Chan
2006-11-17  3:14 ` Michael Chan [this message]
2006-11-17  3:14 ` [PATCH 16/17][BNX2]: Add 5709 PCI ID Michael Chan
2006-11-17  3:15 ` [PATCH 17/17][BNX2]: Update version and rel date Michael Chan
2006-11-17  3:20 ` [PATCH 3/17][BNX2]: Add bnx2_5706_serdes_timer() Michael Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1163733284.6658.48.camel@rh4 \
    --to=mchan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.