aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorAndreas Mohr <andi@lisas.de>2006-08-15 02:54:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:54:39 -0400
commit50da859d4e566fba90ebda87b843970d902c903e (patch)
tree43d7e49e429afe62b61920ba4d8d4278bcf6ced1 /drivers/net/tg3.c
parent90d41122f79c8c3687d965dde4c6d30a6e0cac4c (diff)
[TG3]: Constify firmware structs
Constify largish areas of firmware data in Tigon3 ethernet driver. non-const: lsmod: tg3 101404 0 objdump -x: .rodata 000003e8 .data 00004a0c ls -l: -rw-r--r-- 1 root root 114404 2006-08-19 21:36 drivers/net/tg3.ko const: lsmod: tg3 101404 0 objdump -x: .rodata 000042c8 .data 00000b4c ls -l: -rw-r--r-- 1 root root 114532 2006-08-19 21:06 drivers/net/tg3.ko Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 6f5d3a38c58..34078a7c1a8 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -264,7 +264,7 @@ static struct pci_device_id tg3_pci_tbl[] = {
264 264
265MODULE_DEVICE_TABLE(pci, tg3_pci_tbl); 265MODULE_DEVICE_TABLE(pci, tg3_pci_tbl);
266 266
267static struct { 267static const struct {
268 const char string[ETH_GSTRING_LEN]; 268 const char string[ETH_GSTRING_LEN];
269} ethtool_stats_keys[TG3_NUM_STATS] = { 269} ethtool_stats_keys[TG3_NUM_STATS] = {
270 { "rx_octets" }, 270 { "rx_octets" },
@@ -345,7 +345,7 @@ static struct {
345 { "nic_tx_threshold_hit" } 345 { "nic_tx_threshold_hit" }
346}; 346};
347 347
348static struct { 348static const struct {
349 const char string[ETH_GSTRING_LEN]; 349 const char string[ETH_GSTRING_LEN];
350} ethtool_test_keys[TG3_NUM_TEST] = { 350} ethtool_test_keys[TG3_NUM_TEST] = {
351 { "nvram test (online) " }, 351 { "nvram test (online) " },
@@ -4969,7 +4969,7 @@ static int tg3_halt(struct tg3 *tp, int kind, int silent)
4969#define TG3_FW_BSS_ADDR 0x08000a70 4969#define TG3_FW_BSS_ADDR 0x08000a70
4970#define TG3_FW_BSS_LEN 0x10 4970#define TG3_FW_BSS_LEN 0x10
4971 4971
4972static u32 tg3FwText[(TG3_FW_TEXT_LEN / sizeof(u32)) + 1] = { 4972static const u32 tg3FwText[(TG3_FW_TEXT_LEN / sizeof(u32)) + 1] = {
4973 0x00000000, 0x10000003, 0x00000000, 0x0000000d, 0x0000000d, 0x3c1d0800, 4973 0x00000000, 0x10000003, 0x00000000, 0x0000000d, 0x0000000d, 0x3c1d0800,
4974 0x37bd3ffc, 0x03a0f021, 0x3c100800, 0x26100000, 0x0e000018, 0x00000000, 4974 0x37bd3ffc, 0x03a0f021, 0x3c100800, 0x26100000, 0x0e000018, 0x00000000,
4975 0x0000000d, 0x3c1d0800, 0x37bd3ffc, 0x03a0f021, 0x3c100800, 0x26100034, 4975 0x0000000d, 0x3c1d0800, 0x37bd3ffc, 0x03a0f021, 0x3c100800, 0x26100034,
@@ -5063,7 +5063,7 @@ static u32 tg3FwText[(TG3_FW_TEXT_LEN / sizeof(u32)) + 1] = {
5063 0x27bd0008, 0x03e00008, 0x00000000, 0x00000000, 0x00000000 5063 0x27bd0008, 0x03e00008, 0x00000000, 0x00000000, 0x00000000
5064}; 5064};
5065 5065
5066static u32 tg3FwRodata[(TG3_FW_RODATA_LEN / sizeof(u32)) + 1] = { 5066static const u32 tg3FwRodata[(TG3_FW_RODATA_LEN / sizeof(u32)) + 1] = {
5067 0x35373031, 0x726c7341, 0x00000000, 0x00000000, 0x53774576, 0x656e7430, 5067 0x35373031, 0x726c7341, 0x00000000, 0x00000000, 0x53774576, 0x656e7430,
5068 0x00000000, 0x726c7045, 0x76656e74, 0x31000000, 0x556e6b6e, 0x45766e74, 5068 0x00000000, 0x726c7045, 0x76656e74, 0x31000000, 0x556e6b6e, 0x45766e74,
5069 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x66617461, 0x6c457272, 5069 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x66617461, 0x6c457272,
@@ -5128,13 +5128,13 @@ static int tg3_halt_cpu(struct tg3 *tp, u32 offset)
5128struct fw_info { 5128struct fw_info {
5129 unsigned int text_base; 5129 unsigned int text_base;
5130 unsigned int text_len; 5130 unsigned int text_len;
5131 u32 *text_data; 5131 const u32 *text_data;
5132 unsigned int rodata_base; 5132 unsigned int rodata_base;
5133 unsigned int rodata_len; 5133 unsigned int rodata_len;
5134 u32 *rodata_data; 5134 const u32 *rodata_data;
5135 unsigned int data_base; 5135 unsigned int data_base;
5136 unsigned int data_len; 5136 unsigned int data_len;
5137 u32 *data_data; 5137 const u32 *data_data;
5138}; 5138};
5139 5139
5140/* tp->lock is held. */ 5140/* tp->lock is held. */
@@ -5266,7 +5266,7 @@ static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp)
5266#define TG3_TSO_FW_BSS_ADDR 0x08001b80 5266#define TG3_TSO_FW_BSS_ADDR 0x08001b80
5267#define TG3_TSO_FW_BSS_LEN 0x894 5267#define TG3_TSO_FW_BSS_LEN 0x894
5268 5268
5269static u32 tg3TsoFwText[(TG3_TSO_FW_TEXT_LEN / 4) + 1] = { 5269static const u32 tg3TsoFwText[(TG3_TSO_FW_TEXT_LEN / 4) + 1] = {
5270 0x0e000003, 0x00000000, 0x08001b24, 0x00000000, 0x10000003, 0x00000000, 5270 0x0e000003, 0x00000000, 0x08001b24, 0x00000000, 0x10000003, 0x00000000,
5271 0x0000000d, 0x0000000d, 0x3c1d0800, 0x37bd4000, 0x03a0f021, 0x3c100800, 5271 0x0000000d, 0x0000000d, 0x3c1d0800, 0x37bd4000, 0x03a0f021, 0x3c100800,
5272 0x26100000, 0x0e000010, 0x00000000, 0x0000000d, 0x27bdffe0, 0x3c04fefe, 5272 0x26100000, 0x0e000010, 0x00000000, 0x0000000d, 0x27bdffe0, 0x3c04fefe,
@@ -5553,7 +5553,7 @@ static u32 tg3TsoFwText[(TG3_TSO_FW_TEXT_LEN / 4) + 1] = {
5553 0xac470014, 0xac4a0018, 0x03e00008, 0xac4b001c, 0x00000000, 0x00000000, 5553 0xac470014, 0xac4a0018, 0x03e00008, 0xac4b001c, 0x00000000, 0x00000000,
5554}; 5554};
5555 5555
5556static u32 tg3TsoFwRodata[] = { 5556static const u32 tg3TsoFwRodata[] = {
5557 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, 5557 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000,
5558 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x496e0000, 0x73746b6f, 5558 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x496e0000, 0x73746b6f,
5559 0x66662a2a, 0x00000000, 0x53774576, 0x656e7430, 0x00000000, 0x00000000, 5559 0x66662a2a, 0x00000000, 0x53774576, 0x656e7430, 0x00000000, 0x00000000,
@@ -5561,7 +5561,7 @@ static u32 tg3TsoFwRodata[] = {
5561 0x00000000, 5561 0x00000000,
5562}; 5562};
5563 5563
5564static u32 tg3TsoFwData[] = { 5564static const u32 tg3TsoFwData[] = {
5565 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x362e3000, 0x00000000, 5565 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x362e3000, 0x00000000,
5566 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 5566 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
5567 0x00000000, 5567 0x00000000,
@@ -5583,7 +5583,7 @@ static u32 tg3TsoFwData[] = {
5583#define TG3_TSO5_FW_BSS_ADDR 0x00010f50 5583#define TG3_TSO5_FW_BSS_ADDR 0x00010f50
5584#define TG3_TSO5_FW_BSS_LEN 0x88 5584#define TG3_TSO5_FW_BSS_LEN 0x88
5585 5585
5586static u32 tg3Tso5FwText[(TG3_TSO5_FW_TEXT_LEN / 4) + 1] = { 5586static const u32 tg3Tso5FwText[(TG3_TSO5_FW_TEXT_LEN / 4) + 1] = {
5587 0x0c004003, 0x00000000, 0x00010f04, 0x00000000, 0x10000003, 0x00000000, 5587 0x0c004003, 0x00000000, 0x00010f04, 0x00000000, 0x10000003, 0x00000000,
5588 0x0000000d, 0x0000000d, 0x3c1d0001, 0x37bde000, 0x03a0f021, 0x3c100001, 5588 0x0000000d, 0x0000000d, 0x3c1d0001, 0x37bde000, 0x03a0f021, 0x3c100001,
5589 0x26100000, 0x0c004010, 0x00000000, 0x0000000d, 0x27bdffe0, 0x3c04fefe, 5589 0x26100000, 0x0c004010, 0x00000000, 0x0000000d, 0x27bdffe0, 0x3c04fefe,
@@ -5742,14 +5742,14 @@ static u32 tg3Tso5FwText[(TG3_TSO5_FW_TEXT_LEN / 4) + 1] = {
5742 0x00000000, 0x00000000, 0x00000000, 5742 0x00000000, 0x00000000, 0x00000000,
5743}; 5743};
5744 5744
5745static u32 tg3Tso5FwRodata[(TG3_TSO5_FW_RODATA_LEN / 4) + 1] = { 5745static const u32 tg3Tso5FwRodata[(TG3_TSO5_FW_RODATA_LEN / 4) + 1] = {
5746 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, 5746 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000,
5747 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 5747 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000,
5748 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 0x66617461, 0x6c457272, 5748 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 0x66617461, 0x6c457272,
5749 0x00000000, 0x00000000, 0x00000000, 5749 0x00000000, 0x00000000, 0x00000000,
5750}; 5750};
5751 5751
5752static u32 tg3Tso5FwData[(TG3_TSO5_FW_DATA_LEN / 4) + 1] = { 5752static const u32 tg3Tso5FwData[(TG3_TSO5_FW_DATA_LEN / 4) + 1] = {
5753 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x322e3000, 0x00000000, 5753 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x322e3000, 0x00000000,
5754 0x00000000, 0x00000000, 0x00000000, 5754 0x00000000, 0x00000000, 0x00000000,
5755}; 5755};