ssb: extract boardflags2 for SPROMs rev 4 and 5
Rafał Miłecki [Tue, 8 Feb 2011 22:32:17 +0000 (23:32 +0100)]
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

drivers/ssb/pci.c
include/linux/ssb/ssb_regs.h

index 158449e..5b33b3b 100644 (file)
@@ -468,10 +468,14 @@ static void sprom_extract_r45(struct ssb_sprom *out, const u16 *in)
                SPEX(country_code, SSB_SPROM4_CCODE, 0xFFFF, 0);
                SPEX(boardflags_lo, SSB_SPROM4_BFLLO, 0xFFFF, 0);
                SPEX(boardflags_hi, SSB_SPROM4_BFLHI, 0xFFFF, 0);
+               SPEX(boardflags2_lo, SSB_SPROM4_BFL2LO, 0xFFFF, 0);
+               SPEX(boardflags2_hi, SSB_SPROM4_BFL2HI, 0xFFFF, 0);
        } else {
                SPEX(country_code, SSB_SPROM5_CCODE, 0xFFFF, 0);
                SPEX(boardflags_lo, SSB_SPROM5_BFLLO, 0xFFFF, 0);
                SPEX(boardflags_hi, SSB_SPROM5_BFLHI, 0xFFFF, 0);
+               SPEX(boardflags2_lo, SSB_SPROM5_BFL2LO, 0xFFFF, 0);
+               SPEX(boardflags2_hi, SSB_SPROM5_BFL2HI, 0xFFFF, 0);
        }
        SPEX(ant_available_a, SSB_SPROM4_ANTAVAIL, SSB_SPROM4_ANTAVAIL_A,
             SSB_SPROM4_ANTAVAIL_A_SHIFT);
index 489f7b6..df9211a 100644 (file)
 /* SPROM Revision 4 */
 #define SSB_SPROM4_BFLLO               0x0044  /* Boardflags (low 16 bits) */
 #define SSB_SPROM4_BFLHI               0x0046  /* Board Flags Hi */
+#define SSB_SPROM4_BFL2LO              0x0048  /* Board flags 2 (low 16 bits) */
+#define SSB_SPROM4_BFL2HI              0x004A  /* Board flags 2 Hi */
 #define SSB_SPROM4_IL0MAC              0x004C  /* 6 byte MAC address for a/b/g/n */
 #define SSB_SPROM4_CCODE               0x0052  /* Country Code (2 bytes) */
 #define SSB_SPROM4_GPIOA               0x0056  /* Gen. Purpose IO # 0 and 1 */
 #define SSB_SPROM5_CCODE               0x0044  /* Country Code (2 bytes) */
 #define SSB_SPROM5_BFLLO               0x004A  /* Boardflags (low 16 bits) */
 #define SSB_SPROM5_BFLHI               0x004C  /* Board Flags Hi */
+#define SSB_SPROM5_BFL2LO              0x004E  /* Board flags 2 (low 16 bits) */
+#define SSB_SPROM5_BFL2HI              0x0050  /* Board flags 2 Hi */
 #define SSB_SPROM5_IL0MAC              0x0052  /* 6 byte MAC address for a/b/g/n */
 #define SSB_SPROM5_GPIOA               0x0076  /* Gen. Purpose IO # 0 and 1 */
 #define  SSB_SPROM5_GPIOA_P0           0x00FF  /* Pin 0 */