Lines Matching refs:sprom

64 		   bus->sprom.revision);
75 static void bcma_sprom_read(struct bcma_bus *bus, u16 offset, u16 *sprom,
80 sprom[i] = bcma_read16(bus->drv_cc.core, offset + (i * 2));
127 static u8 bcma_sprom_crc(const u16 *sprom, size_t words)
133 crc = bcma_crc8(crc, sprom[word] & 0x00FF);
134 crc = bcma_crc8(crc, (sprom[word] & 0xFF00) >> 8);
136 crc = bcma_crc8(crc, sprom[words - 1] & 0x00FF);
142 static int bcma_sprom_check_crc(const u16 *sprom, size_t words)
148 crc = bcma_sprom_crc(sprom, words);
149 tmp = sprom[words - 1] & SSB_SPROM_REVISION_CRC;
157 static int bcma_sprom_valid(struct bcma_bus *bus, const u16 *sprom,
163 err = bcma_sprom_check_crc(sprom, words);
167 revision = sprom[words - 1] & SSB_SPROM_REVISION_REV;
173 bus->sprom.revision = revision;
186 bus->sprom._field = ((sprom[SPOFF(_offset)] & (_mask)) >> (_shift))
189 bus->sprom._field = ((((u32)sprom[SPOFF((_offset)+2)] << 16 | \
190 sprom[SPOFF(_offset)]) & (_mask)) >> (_shift))
221 static void bcma_sprom_extract_r8(struct bcma_bus *bus, const u16 *sprom)
230 ARRAY_SIZE(bus->sprom.core_pwr_info));
233 v = sprom[SPOFF(SSB_SPROM8_IL0MAC) + i];
234 *(((__be16 *)bus->sprom.il0mac) + i) = cpu_to_be16(v);
401 bus->sprom.antenna_gain.a0 = sprom_extract_antgain(sprom,
405 bus->sprom.antenna_gain.a1 = sprom_extract_antgain(sprom,
409 bus->sprom.antenna_gain.a2 = sprom_extract_antgain(sprom,
413 bus->sprom.antenna_gain.a3 = sprom_extract_antgain(sprom,
580 u16 *sprom;
607 * Now we ask the arch code if there is some sprom
610 err = bcma_fill_sprom_with_fallback(bus, &bus->sprom);
623 sprom = kcalloc(words, sizeof(u16), GFP_KERNEL);
624 if (!sprom)
627 bcma_sprom_read(bus, offset, sprom, words);
628 err = bcma_sprom_valid(bus, sprom, words);
632 kfree(sprom);
641 err = bcma_fill_sprom_with_fallback(bus, &bus->sprom);
643 bcma_sprom_extract_r8(bus, sprom);
644 kfree(sprom);