aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-12-21 05:16:10 -0500
committerJoe Perches <joe@perches.com>2010-12-21 05:16:10 -0500
commit215faf9c5f6e319e97edea9e178123e07825c14d (patch)
tree32fb283f64110ad634a37dc2e133cb91a97988c5 /drivers/net/cxgb3
parent75a84eb5d144dc761e1bb0f7dcacbf2b5cee562c (diff)
drivers/net/*/: Use static const
Using static const generally increases object text and decreases data size. It also generally decreases overall object size. Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/net/cxgb3')
-rw-r--r--drivers/net/cxgb3/ael1002.c24
-rw-r--r--drivers/net/cxgb3/t3_hw.c2
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/cxgb3/ael1002.c b/drivers/net/cxgb3/ael1002.c
index 35cd36729155..2028da95afa1 100644
--- a/drivers/net/cxgb3/ael1002.c
+++ b/drivers/net/cxgb3/ael1002.c
@@ -292,7 +292,7 @@ unknown:
292 */ 292 */
293static int ael2005_setup_sr_edc(struct cphy *phy) 293static int ael2005_setup_sr_edc(struct cphy *phy)
294{ 294{
295 static struct reg_val regs[] = { 295 static const struct reg_val regs[] = {
296 { MDIO_MMD_PMAPMD, 0xc003, 0xffff, 0x181 }, 296 { MDIO_MMD_PMAPMD, 0xc003, 0xffff, 0x181 },
297 { MDIO_MMD_PMAPMD, 0xc010, 0xffff, 0x448a }, 297 { MDIO_MMD_PMAPMD, 0xc010, 0xffff, 0x448a },
298 { MDIO_MMD_PMAPMD, 0xc04a, 0xffff, 0x5200 }, 298 { MDIO_MMD_PMAPMD, 0xc04a, 0xffff, 0x5200 },
@@ -324,11 +324,11 @@ static int ael2005_setup_sr_edc(struct cphy *phy)
324 324
325static int ael2005_setup_twinax_edc(struct cphy *phy, int modtype) 325static int ael2005_setup_twinax_edc(struct cphy *phy, int modtype)
326{ 326{
327 static struct reg_val regs[] = { 327 static const struct reg_val regs[] = {
328 { MDIO_MMD_PMAPMD, 0xc04a, 0xffff, 0x5a00 }, 328 { MDIO_MMD_PMAPMD, 0xc04a, 0xffff, 0x5a00 },
329 { 0, 0, 0, 0 } 329 { 0, 0, 0, 0 }
330 }; 330 };
331 static struct reg_val preemphasis[] = { 331 static const struct reg_val preemphasis[] = {
332 { MDIO_MMD_PMAPMD, 0xc014, 0xffff, 0xfe16 }, 332 { MDIO_MMD_PMAPMD, 0xc014, 0xffff, 0xfe16 },
333 { MDIO_MMD_PMAPMD, 0xc015, 0xffff, 0xa000 }, 333 { MDIO_MMD_PMAPMD, 0xc015, 0xffff, 0xa000 },
334 { 0, 0, 0, 0 } 334 { 0, 0, 0, 0 }
@@ -393,7 +393,7 @@ static int ael2005_intr_clear(struct cphy *phy)
393 393
394static int ael2005_reset(struct cphy *phy, int wait) 394static int ael2005_reset(struct cphy *phy, int wait)
395{ 395{
396 static struct reg_val regs0[] = { 396 static const struct reg_val regs0[] = {
397 { MDIO_MMD_PMAPMD, 0xc001, 0, 1 << 5 }, 397 { MDIO_MMD_PMAPMD, 0xc001, 0, 1 << 5 },
398 { MDIO_MMD_PMAPMD, 0xc017, 0, 1 << 5 }, 398 { MDIO_MMD_PMAPMD, 0xc017, 0, 1 << 5 },
399 { MDIO_MMD_PMAPMD, 0xc013, 0xffff, 0xf341 }, 399 { MDIO_MMD_PMAPMD, 0xc013, 0xffff, 0xf341 },
@@ -403,7 +403,7 @@ static int ael2005_reset(struct cphy *phy, int wait)
403 { MDIO_MMD_PMAPMD, 0xc210, 0xffff, 0 }, 403 { MDIO_MMD_PMAPMD, 0xc210, 0xffff, 0 },
404 { 0, 0, 0, 0 } 404 { 0, 0, 0, 0 }
405 }; 405 };
406 static struct reg_val regs1[] = { 406 static const struct reg_val regs1[] = {
407 { MDIO_MMD_PMAPMD, 0xca00, 0xffff, 0x0080 }, 407 { MDIO_MMD_PMAPMD, 0xca00, 0xffff, 0x0080 },
408 { MDIO_MMD_PMAPMD, 0xca12, 0xffff, 0 }, 408 { MDIO_MMD_PMAPMD, 0xca12, 0xffff, 0 },
409 { 0, 0, 0, 0 } 409 { 0, 0, 0, 0 }
@@ -522,7 +522,7 @@ int t3_ael2005_phy_prep(struct cphy *phy, struct adapter *adapter,
522 */ 522 */
523static int ael2020_setup_sr_edc(struct cphy *phy) 523static int ael2020_setup_sr_edc(struct cphy *phy)
524{ 524{
525 static struct reg_val regs[] = { 525 static const struct reg_val regs[] = {
526 /* set CDR offset to 10 */ 526 /* set CDR offset to 10 */
527 { MDIO_MMD_PMAPMD, 0xcc01, 0xffff, 0x488a }, 527 { MDIO_MMD_PMAPMD, 0xcc01, 0xffff, 0x488a },
528 528
@@ -551,20 +551,20 @@ static int ael2020_setup_sr_edc(struct cphy *phy)
551static int ael2020_setup_twinax_edc(struct cphy *phy, int modtype) 551static int ael2020_setup_twinax_edc(struct cphy *phy, int modtype)
552{ 552{
553 /* set uC to 40MHz */ 553 /* set uC to 40MHz */
554 static struct reg_val uCclock40MHz[] = { 554 static const struct reg_val uCclock40MHz[] = {
555 { MDIO_MMD_PMAPMD, 0xff28, 0xffff, 0x4001 }, 555 { MDIO_MMD_PMAPMD, 0xff28, 0xffff, 0x4001 },
556 { MDIO_MMD_PMAPMD, 0xff2a, 0xffff, 0x0002 }, 556 { MDIO_MMD_PMAPMD, 0xff2a, 0xffff, 0x0002 },
557 { 0, 0, 0, 0 } 557 { 0, 0, 0, 0 }
558 }; 558 };
559 559
560 /* activate uC clock */ 560 /* activate uC clock */
561 static struct reg_val uCclockActivate[] = { 561 static const struct reg_val uCclockActivate[] = {
562 { MDIO_MMD_PMAPMD, 0xd000, 0xffff, 0x5200 }, 562 { MDIO_MMD_PMAPMD, 0xd000, 0xffff, 0x5200 },
563 { 0, 0, 0, 0 } 563 { 0, 0, 0, 0 }
564 }; 564 };
565 565
566 /* set PC to start of SRAM and activate uC */ 566 /* set PC to start of SRAM and activate uC */
567 static struct reg_val uCactivate[] = { 567 static const struct reg_val uCactivate[] = {
568 { MDIO_MMD_PMAPMD, 0xd080, 0xffff, 0x0100 }, 568 { MDIO_MMD_PMAPMD, 0xd080, 0xffff, 0x0100 },
569 { MDIO_MMD_PMAPMD, 0xd092, 0xffff, 0x0000 }, 569 { MDIO_MMD_PMAPMD, 0xd092, 0xffff, 0x0000 },
570 { 0, 0, 0, 0 } 570 { 0, 0, 0, 0 }
@@ -624,7 +624,7 @@ static int ael2020_get_module_type(struct cphy *phy, int delay_ms)
624 */ 624 */
625static int ael2020_intr_enable(struct cphy *phy) 625static int ael2020_intr_enable(struct cphy *phy)
626{ 626{
627 struct reg_val regs[] = { 627 static const struct reg_val regs[] = {
628 /* output Module's Loss Of Signal (LOS) to LED */ 628 /* output Module's Loss Of Signal (LOS) to LED */
629 { MDIO_MMD_PMAPMD, AEL2020_GPIO_CFG+AEL2020_GPIO_LSTAT, 629 { MDIO_MMD_PMAPMD, AEL2020_GPIO_CFG+AEL2020_GPIO_LSTAT,
630 0xffff, 0x4 }, 630 0xffff, 0x4 },
@@ -664,7 +664,7 @@ static int ael2020_intr_enable(struct cphy *phy)
664 */ 664 */
665static int ael2020_intr_disable(struct cphy *phy) 665static int ael2020_intr_disable(struct cphy *phy)
666{ 666{
667 struct reg_val regs[] = { 667 static const struct reg_val regs[] = {
668 /* reset "link status" LED to "off" */ 668 /* reset "link status" LED to "off" */
669 { MDIO_MMD_PMAPMD, AEL2020_GPIO_CTRL, 669 { MDIO_MMD_PMAPMD, AEL2020_GPIO_CTRL,
670 0xffff, 0xb << (AEL2020_GPIO_LSTAT*4) }, 670 0xffff, 0xb << (AEL2020_GPIO_LSTAT*4) },
@@ -701,7 +701,7 @@ static int ael2020_intr_clear(struct cphy *phy)
701 return err ? err : t3_phy_lasi_intr_clear(phy); 701 return err ? err : t3_phy_lasi_intr_clear(phy);
702} 702}
703 703
704static struct reg_val ael2020_reset_regs[] = { 704static const struct reg_val ael2020_reset_regs[] = {
705 /* Erratum #2: CDRLOL asserted, causing PMA link down status */ 705 /* Erratum #2: CDRLOL asserted, causing PMA link down status */
706 { MDIO_MMD_PMAPMD, 0xc003, 0xffff, 0x3101 }, 706 { MDIO_MMD_PMAPMD, 0xc003, 0xffff, 0x3101 },
707 707
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 3a6adf0b3e9d..ec8579a0a808 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -1562,7 +1562,7 @@ static void tp_intr_handler(struct adapter *adapter)
1562 {0} 1562 {0}
1563 }; 1563 };
1564 1564
1565 static struct intr_info tp_intr_info_t3c[] = { 1565 static const struct intr_info tp_intr_info_t3c[] = {
1566 {0x1fffffff, "TP parity error", -1, 1}, 1566 {0x1fffffff, "TP parity error", -1, 1},
1567 {F_FLMRXFLSTEMPTY, "TP out of Rx pages", -1, 1}, 1567 {F_FLMRXFLSTEMPTY, "TP out of Rx pages", -1, 1},
1568 {F_FLMTXFLSTEMPTY, "TP out of Tx pages", -1, 1}, 1568 {F_FLMTXFLSTEMPTY, "TP out of Tx pages", -1, 1},