Lines Matching +full:half +full:- +full:dbm

5  * Copyright 2011, 2012, Hauke Mehrtens <hauke@hauke-m.de>
16 #include <linux/dma-mapping.h>
22 * bcma_arch_register_fallback_sprom - Registers a method providing a
33 * This function is useful for weird architectures that have a half-assed
43 return -EEXIST; in bcma_arch_register_fallback_sprom()
55 err = -ENOENT; in bcma_fill_sprom_with_fallback()
64 bus->sprom.revision); in bcma_fill_sprom_with_fallback()
80 sprom[i] = bcma_read16(bus->drv_cc.core, offset + (i * 2)); in bcma_sprom_read()
132 for (word = 0; word < words - 1; word++) { in bcma_sprom_crc()
136 crc = bcma_crc8(crc, sprom[words - 1] & 0x00FF); in bcma_sprom_crc()
149 tmp = sprom[words - 1] & SSB_SPROM_REVISION_CRC; in bcma_sprom_check_crc()
152 return -EPROTO; in bcma_sprom_check_crc()
167 revision = sprom[words - 1] & SSB_SPROM_REVISION_REV; in bcma_sprom_valid()
170 return -ENOENT; in bcma_sprom_valid()
173 bus->sprom.revision = revision; in bcma_sprom_valid()
186 bus->sprom._field = ((sprom[SPOFF(_offset)] & (_mask)) >> (_shift))
189 bus->sprom._field = ((((u32)sprom[SPOFF((_offset)+2)] << 16 | \
212 gain = 8; /* If unset use 2dBm */ in sprom_extract_antgain()
230 ARRAY_SIZE(bus->sprom.core_pwr_info)); in bcma_sprom_extract_r8()
234 *(((__be16 *)bus->sprom.il0mac) + i) = cpu_to_be16(v); in bcma_sprom_extract_r8()
401 bus->sprom.antenna_gain.a0 = sprom_extract_antgain(sprom, in bcma_sprom_extract_r8()
405 bus->sprom.antenna_gain.a1 = sprom_extract_antgain(sprom, in bcma_sprom_extract_r8()
409 bus->sprom.antenna_gain.a2 = sprom_extract_antgain(sprom, in bcma_sprom_extract_r8()
413 bus->sprom.antenna_gain.a3 = sprom_extract_antgain(sprom, in bcma_sprom_extract_r8()
486 if (bus->drv_cc.core->id.rev >= 31) { in bcma_sprom_ext_available()
487 if (!(bus->drv_cc.capabilities & BCMA_CC_CAP_SPROM)) in bcma_sprom_ext_available()
490 srom_control = bcma_read32(bus->drv_cc.core, in bcma_sprom_ext_available()
496 chip_status = bcma_read32(bus->drv_cc.core, BCMA_CC_CHIPSTAT); in bcma_sprom_ext_available()
497 switch (bus->chipinfo.id) { in bcma_sprom_ext_available()
514 * Indicates that on-chip OTP memory is present and enabled.
522 chip_status = bcma_read32(bus->drv_cc.core, BCMA_CC_CHIPSTAT); in bcma_sprom_onchip_available()
523 switch (bus->chipinfo.id) { in bcma_sprom_onchip_available()
550 otpsize = bus->drv_cc.capabilities & BCMA_CC_CAP_OTPS; in bcma_sprom_onchip_available()
565 struct bcma_device *cc = bus->drv_cc.core; in bcma_sprom_onchip_offset()
588 if (!bus->drv_cc.core) in bcma_sprom_get()
589 return -EOPNOTSUPP; in bcma_sprom_get()
596 * on-chip OTP only when no external SPROM in bcma_sprom_get()
610 err = bcma_fill_sprom_with_fallback(bus, &bus->sprom); in bcma_sprom_get()
615 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 || in bcma_sprom_get()
616 bus->chipinfo.id == BCMA_CHIP_ID_BCM43431) in bcma_sprom_get()
617 bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false); in bcma_sprom_get()
625 return -ENOMEM; in bcma_sprom_get()
635 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 || in bcma_sprom_get()
636 bus->chipinfo.id == BCMA_CHIP_ID_BCM43431) in bcma_sprom_get()
637 bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true); in bcma_sprom_get()
641 err = bcma_fill_sprom_with_fallback(bus, &bus->sprom); in bcma_sprom_get()