aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2_fw.h
diff options
context:
space:
mode:
authorBenjamin Li <benli@broadcom.com>2008-05-17 01:20:27 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-17 01:20:27 -0400
commit10343cca2bad3f9fdad214385bed0a9aadf4ffd4 (patch)
treedf91bca59ccc1316b918935c348e8bcb840ba121 /drivers/net/bnx2_fw.h
parent601d3d18b2c1e4c197aa3cd902fb77bd99c41f10 (diff)
bnx2: Pre-initialize struct cpu_reg.
Instead of assigning values for the struct cpu_reg's at runtime, we already know these values at compile time. Therefore, we can use designated initializers, to initialize these structures and not have to incur this assignment cost at run-time. Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2_fw.h')
-rw-r--r--drivers/net/bnx2_fw.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/drivers/net/bnx2_fw.h b/drivers/net/bnx2_fw.h
index 3b839d4626fe..e4b1de435567 100644
--- a/drivers/net/bnx2_fw.h
+++ b/drivers/net/bnx2_fw.h
@@ -886,6 +886,23 @@ static struct fw_info bnx2_com_fw_06 = {
886 .rodata = bnx2_COM_b06FwRodata, 886 .rodata = bnx2_COM_b06FwRodata,
887}; 887};
888 888
889/* Initialized Values for the Completion Processor. */
890static const struct cpu_reg cpu_reg_com = {
891 .mode = BNX2_COM_CPU_MODE,
892 .mode_value_halt = BNX2_COM_CPU_MODE_SOFT_HALT,
893 .mode_value_sstep = BNX2_COM_CPU_MODE_STEP_ENA,
894 .state = BNX2_COM_CPU_STATE,
895 .state_value_clear = 0xffffff,
896 .gpr0 = BNX2_COM_CPU_REG_FILE,
897 .evmask = BNX2_COM_CPU_EVENT_MASK,
898 .pc = BNX2_COM_CPU_PROGRAM_COUNTER,
899 .inst = BNX2_COM_CPU_INSTRUCTION,
900 .bp = BNX2_COM_CPU_HW_BREAKPOINT,
901 .spad_base = BNX2_COM_SCRATCH,
902 .mips_view_base = 0x8000000,
903};
904
905
889static u8 bnx2_CP_b06FwText[] = { 906static u8 bnx2_CP_b06FwText[] = {
890 0x9d, 0xbc, 0x0d, 0x78, 0x13, 0xe7, 0x99, 0x2e, 0x7c, 0xcf, 0x48, 0xb2, 907 0x9d, 0xbc, 0x0d, 0x78, 0x13, 0xe7, 0x99, 0x2e, 0x7c, 0xcf, 0x48, 0xb2,
891 0x65, 0x5b, 0xb6, 0xc7, 0xb6, 0x0c, 0x22, 0x65, 0x41, 0x83, 0x47, 0x20, 908 0x65, 0x5b, 0xb6, 0xc7, 0xb6, 0x0c, 0x22, 0x65, 0x41, 0x83, 0x47, 0x20,
@@ -2167,6 +2184,22 @@ static struct fw_info bnx2_cp_fw_06 = {
2167 .rodata = bnx2_CP_b06FwRodata, 2184 .rodata = bnx2_CP_b06FwRodata,
2168}; 2185};
2169 2186
2187/* Initialized Values the Command Processor. */
2188static const struct cpu_reg cpu_reg_cp = {
2189 .mode = BNX2_CP_CPU_MODE,
2190 .mode_value_halt = BNX2_CP_CPU_MODE_SOFT_HALT,
2191 .mode_value_sstep = BNX2_CP_CPU_MODE_STEP_ENA,
2192 .state = BNX2_CP_CPU_STATE,
2193 .state_value_clear = 0xffffff,
2194 .gpr0 = BNX2_CP_CPU_REG_FILE,
2195 .evmask = BNX2_CP_CPU_EVENT_MASK,
2196 .pc = BNX2_CP_CPU_PROGRAM_COUNTER,
2197 .inst = BNX2_CP_CPU_INSTRUCTION,
2198 .bp = BNX2_CP_CPU_HW_BREAKPOINT,
2199 .spad_base = BNX2_CP_SCRATCH,
2200 .mips_view_base = 0x8000000,
2201};
2202
2170static u8 bnx2_RXP_b06FwText[] = { 2203static u8 bnx2_RXP_b06FwText[] = {
2171 0xec, 0x5b, 0x5d, 0x70, 0x5c, 0xd7, 0x5d, 0xff, 0xdf, 0xb3, 0x2b, 0x69, 2204 0xec, 0x5b, 0x5d, 0x70, 0x5c, 0xd7, 0x5d, 0xff, 0xdf, 0xb3, 0x2b, 0x69,
2172 0x2d, 0x4b, 0xf2, 0x95, 0xbc, 0x71, 0x56, 0xa9, 0x92, 0xec, 0x5a, 0x57, 2205 0x2d, 0x4b, 0xf2, 0x95, 0xbc, 0x71, 0x56, 0xa9, 0x92, 0xec, 0x5a, 0x57,
@@ -2946,6 +2979,22 @@ static struct fw_info bnx2_rxp_fw_06 = {
2946 .rodata = bnx2_RXP_b06FwRodata, 2979 .rodata = bnx2_RXP_b06FwRodata,
2947}; 2980};
2948 2981
2982/* Initialized Values for the RX Processor. */
2983static const struct cpu_reg cpu_reg_rxp = {
2984 .mode = BNX2_RXP_CPU_MODE,
2985 .mode_value_halt = BNX2_RXP_CPU_MODE_SOFT_HALT,
2986 .mode_value_sstep = BNX2_RXP_CPU_MODE_STEP_ENA,
2987 .state = BNX2_RXP_CPU_STATE,
2988 .state_value_clear = 0xffffff,
2989 .gpr0 = BNX2_RXP_CPU_REG_FILE,
2990 .evmask = BNX2_RXP_CPU_EVENT_MASK,
2991 .pc = BNX2_RXP_CPU_PROGRAM_COUNTER,
2992 .inst = BNX2_RXP_CPU_INSTRUCTION,
2993 .bp = BNX2_RXP_CPU_HW_BREAKPOINT,
2994 .spad_base = BNX2_RXP_SCRATCH,
2995 .mips_view_base = 0x8000000,
2996};
2997
2949static u8 bnx2_rv2p_proc1[] = { 2998static u8 bnx2_rv2p_proc1[] = {
2950 /* Date: 12/07/2007 15:02 */ 2999 /* Date: 12/07/2007 15:02 */
2951 0xd5, 0x56, 0x41, 0x6b, 0x13, 0x51, 0x10, 0x9e, 0xdd, 0x6c, 0xbb, 0xdb, 3000 0xd5, 0x56, 0x41, 0x6b, 0x13, 0x51, 0x10, 0x9e, 0xdd, 0x6c, 0xbb, 0xdb,
@@ -3651,6 +3700,22 @@ static struct fw_info bnx2_tpat_fw_06 = {
3651 .rodata = bnx2_TPAT_b06FwRodata, 3700 .rodata = bnx2_TPAT_b06FwRodata,
3652}; 3701};
3653 3702
3703/* Initialized Values for the TX Patch-up Processor. */
3704static const struct cpu_reg cpu_reg_tpat = {
3705 .mode = BNX2_TPAT_CPU_MODE,
3706 .mode_value_halt = BNX2_TPAT_CPU_MODE_SOFT_HALT,
3707 .mode_value_sstep = BNX2_TPAT_CPU_MODE_STEP_ENA,
3708 .state = BNX2_TPAT_CPU_STATE,
3709 .state_value_clear = 0xffffff,
3710 .gpr0 = BNX2_TPAT_CPU_REG_FILE,
3711 .evmask = BNX2_TPAT_CPU_EVENT_MASK,
3712 .pc = BNX2_TPAT_CPU_PROGRAM_COUNTER,
3713 .inst = BNX2_TPAT_CPU_INSTRUCTION,
3714 .bp = BNX2_TPAT_CPU_HW_BREAKPOINT,
3715 .spad_base = BNX2_TPAT_SCRATCH,
3716 .mips_view_base = 0x8000000,
3717};
3718
3654static u8 bnx2_TXP_b06FwText[] = { 3719static u8 bnx2_TXP_b06FwText[] = {
3655 0xad, 0x7b, 0x7f, 0x70, 0x9b, 0x75, 0x7a, 0xe7, 0xe7, 0xd5, 0x0f, 0x5b, 3720 0xad, 0x7b, 0x7f, 0x70, 0x9b, 0x75, 0x7a, 0xe7, 0xe7, 0xd5, 0x0f, 0x5b,
3656 0xb2, 0x65, 0x59, 0x0e, 0x4a, 0x90, 0x77, 0xbd, 0x8d, 0x5e, 0xf4, 0xca, 3721 0xb2, 0x65, 0x59, 0x0e, 0x4a, 0x90, 0x77, 0xbd, 0x8d, 0x5e, 0xf4, 0xca,
@@ -4531,3 +4596,18 @@ static struct fw_info bnx2_txp_fw_06 = {
4531 .rodata = bnx2_TXP_b06FwRodata, 4596 .rodata = bnx2_TXP_b06FwRodata,
4532}; 4597};
4533 4598
4599/* Initialized Values for the TX Processor. */
4600static const struct cpu_reg cpu_reg_txp = {
4601 .mode = BNX2_TXP_CPU_MODE,
4602 .mode_value_halt = BNX2_TXP_CPU_MODE_SOFT_HALT,
4603 .mode_value_sstep = BNX2_TXP_CPU_MODE_STEP_ENA,
4604 .state = BNX2_TXP_CPU_STATE,
4605 .state_value_clear = 0xffffff,
4606 .gpr0 = BNX2_TXP_CPU_REG_FILE,
4607 .evmask = BNX2_TXP_CPU_EVENT_MASK,
4608 .pc = BNX2_TXP_CPU_PROGRAM_COUNTER,
4609 .inst = BNX2_TXP_CPU_INSTRUCTION,
4610 .bp = BNX2_TXP_CPU_HW_BREAKPOINT,
4611 .spad_base = BNX2_TXP_SCRATCH,
4612 .mips_view_base = 0x8000000,
4613};