ssb: extract board_type from SPROM
authorRafał Miłecki <zajec5@gmail.com>
Tue, 19 Mar 2013 12:18:43 +0000 (13:18 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Mar 2013 20:43:40 +0000 (16:43 -0400)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/ssb/pci.c

index 63ff69f9d3eb32c6b67e61cbb88772e03c1ea30a..99bd5adac2642cb85eabf4e52c999f1a913c4df7 100644 (file)
@@ -369,6 +369,7 @@ static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in)
        SPEX(et0mdcport, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET0M, 14);
        SPEX(et1mdcport, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET1M, 15);
        SPEX(board_rev, SSB_SPROM1_BINF, SSB_SPROM1_BINF_BREV, 0);
+       SPEX(board_type, SSB_SPROM1_SPID, 0xFFFF, 0);
        if (out->revision == 1)
                SPEX(country_code, SSB_SPROM1_BINF, SSB_SPROM1_BINF_CCODE,
                     SSB_SPROM1_BINF_CCODE_SHIFT);
@@ -464,6 +465,7 @@ static void sprom_extract_r45(struct ssb_sprom *out, const u16 *in)
        SPEX(et1phyaddr, SSB_SPROM4_ETHPHY, SSB_SPROM4_ETHPHY_ET1A,
             SSB_SPROM4_ETHPHY_ET1A_SHIFT);
        SPEX(board_rev, SSB_SPROM4_BOARDREV, 0xFFFF, 0);
+       SPEX(board_type, SSB_SPROM1_SPID, 0xFFFF, 0);
        if (out->revision == 4) {
                SPEX(alpha2[0], SSB_SPROM4_CCODE, 0xff00, 8);
                SPEX(alpha2[1], SSB_SPROM4_CCODE, 0x00ff, 0);
@@ -535,6 +537,7 @@ static void sprom_extract_r8(struct ssb_sprom *out, const u16 *in)
        sprom_get_mac(out->il0mac, &in[SPOFF(SSB_SPROM8_IL0MAC)]);
 
        SPEX(board_rev, SSB_SPROM8_BOARDREV, 0xFFFF, 0);
+       SPEX(board_type, SSB_SPROM1_SPID, 0xFFFF, 0);
        SPEX(alpha2[0], SSB_SPROM8_CCODE, 0xff00, 8);
        SPEX(alpha2[1], SSB_SPROM8_CCODE, 0x00ff, 0);
        SPEX(boardflags_lo, SSB_SPROM8_BFLLO, 0xFFFF, 0);