Commit 57579f76 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnx2: Use request_firmware()

Based on original patch by Ben Hutchings <ben@decadent.org.uk> and
Bastian Blank <waldi@debian.org>, with the following main changes:

Separated the mips firmware and rv2p firmware into different files
to make it easier to update them separately.

Added some code to fixup the rv2p code with run-time information
such as PAGE_SIZE.

Update version to 2.0.0.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5d4d9e8a
......@@ -2234,7 +2234,7 @@ config BNX2
tristate "Broadcom NetXtremeII support"
depends on PCI
select CRC32
select ZLIB_INFLATE
select FW_LOADER
help
This driver supports Broadcom NetXtremeII gigabit Ethernet cards.
......
This diff is collapsed.
......@@ -6885,6 +6885,8 @@ struct bnx2 {
u32 idle_chk_status_idx;
const struct firmware *mips_firmware;
const struct firmware *rv2p_firmware;
};
#define REG_RD(bp, offset) \
......@@ -6915,44 +6917,41 @@ struct cpu_reg {
u32 mips_view_base;
};
struct fw_info {
const u32 ver_major;
const u32 ver_minor;
const u32 ver_fix;
const u32 start_addr;
/* Text section. */
const u32 text_addr;
const u32 text_len;
const u32 text_index;
__le32 *text;
u8 *gz_text;
const u32 gz_text_len;
/* Data section. */
const u32 data_addr;
const u32 data_len;
const u32 data_index;
const u32 *data;
/* SBSS section. */
const u32 sbss_addr;
const u32 sbss_len;
const u32 sbss_index;
/* BSS section. */
const u32 bss_addr;
const u32 bss_len;
const u32 bss_index;
/* Read-only section. */
const u32 rodata_addr;
const u32 rodata_len;
const u32 rodata_index;
const u32 *rodata;
struct bnx2_fw_file_section {
__be32 addr;
__be32 len;
__be32 offset;
};
struct bnx2_mips_fw_file_entry {
__be32 start_addr;
struct bnx2_fw_file_section text;
struct bnx2_fw_file_section data;
struct bnx2_fw_file_section rodata;
};
struct bnx2_rv2p_fw_file_entry {
struct bnx2_fw_file_section rv2p;
__be32 fixup[8];
};
struct bnx2_mips_fw_file {
struct bnx2_mips_fw_file_entry com;
struct bnx2_mips_fw_file_entry cp;
struct bnx2_mips_fw_file_entry rxp;
struct bnx2_mips_fw_file_entry tpat;
struct bnx2_mips_fw_file_entry txp;
};
struct bnx2_rv2p_fw_file {
struct bnx2_rv2p_fw_file_entry proc1;
struct bnx2_rv2p_fw_file_entry proc2;
};
#define RV2P_P1_FIXUP_PAGE_SIZE_IDX 0
#define RV2P_BD_PAGE_SIZE_MSK 0xffff
#define RV2P_BD_PAGE_SIZE ((BCM_PAGE_SIZE / 16) - 1)
#define RV2P_PROC1 0
#define RV2P_PROC2 1
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -32,6 +32,10 @@ fw-shipped-$(CONFIG_ADAPTEC_STARFIRE) += adaptec/starfire_rx.bin \
adaptec/starfire_tx.bin
fw-shipped-$(CONFIG_ATARI_DSP56K) += dsp56k/bootstrap.bin
fw-shipped-$(CONFIG_ATM_AMBASSADOR) += atmsar11.fw
fw-shipped-$(CONFIG_BNX2) += bnx2/bnx2-mips-09-4.6.17.fw \
bnx2/bnx2-rv2p-09-4.6.15.fw \
bnx2/bnx2-mips-06-4.6.16.fw \
bnx2/bnx2-rv2p-06-4.6.16.fw
fw-shipped-$(CONFIG_CASSINI) += sun/cassini.bin
fw-shipped-$(CONFIG_COMPUTONE) += intelliport2.bin
fw-shipped-$(CONFIG_CHELSIO_T3) += cxgb3/t3b_psram-1.1.0.bin \
......
......@@ -553,3 +553,23 @@ Licence: Unknown
Found in hex form in kernel source.
--------------------------------------------------------------------------
Driver: BNX2 - Broadcom NetXtremeII
File: bnx2/bnx2-mips-06-4.6.16.fw
File: bnx2/bnx2-rv2p-06-4.6.16.fw
File: bnx2/bnx2-mips-09-4.6.17.fw
File: bnx2/bnx2-rv2p-09-4.6.15.fw
Licence:
This file contains firmware data derived from proprietary unpublished
source code, Copyright (c) 2004 - 2009 Broadcom Corporation.
Permission is hereby granted for the distribution of this firmware data
in hexadecimal or equivalent format, provided this copyright notice is
accompanying it.
Found in hex form in kernel source.
--------------------------------------------------------------------------
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment