bcma: extract some basic info about board from SPROM
authorRafał Miłecki <zajec5@gmail.com>
Sun, 28 Aug 2011 16:47:23 +0000 (18:47 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Sep 2011 19:42:30 +0000 (15:42 -0400)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/bcma/sprom.c

index 166ed13ec06685667aa00fe9cf381d08a2af71ed..d7292390d236dddf8a8979bf313d904762c76d70 100644 (file)
@@ -133,6 +133,15 @@ static void bcma_sprom_extract_r8(struct bcma_bus *bus, const u16 *sprom)
                v = sprom[SPOFF(SSB_SPROM8_IL0MAC) + i];
                *(((__be16 *)bus->sprom.il0mac) + i) = cpu_to_be16(v);
        }
+
+       bus->sprom.board_rev = sprom[SPOFF(SSB_SPROM8_BOARDREV)];
+
+       bus->sprom.boardflags_lo = sprom[SPOFF(SSB_SPROM8_BFLLO)];
+       bus->sprom.boardflags_hi = sprom[SPOFF(SSB_SPROM8_BFLHI)];
+       bus->sprom.boardflags2_lo = sprom[SPOFF(SSB_SPROM8_BFL2LO)];
+       bus->sprom.boardflags2_hi = sprom[SPOFF(SSB_SPROM8_BFL2HI)];
+
+       bus->sprom.country_code = sprom[SPOFF(SSB_SPROM8_CCODE)];
 }
 
 int bcma_sprom_get(struct bcma_bus *bus)