Home
last modified time | relevance | path

Searched refs:sprom (Results 1 – 25 of 33) sorted by relevance

12

/linux-2.6.39/drivers/ssb/
Dsprom.c23 static int sprom2hex(const u16 *sprom, char *buf, size_t buf_len, in sprom2hex() argument
30 "%04X", swab16(sprom[i]) & 0xFFFF); in sprom2hex()
36 static int hex2sprom(u16 *sprom, const char *dump, size_t len, in hex2sprom() argument
60 sprom[cnt++] = swab16((u16)parsed); in hex2sprom()
68 int (*sprom_read)(struct ssb_bus *bus, u16 *sprom)) in ssb_attr_sprom_show() argument
70 u16 *sprom; in ssb_attr_sprom_show() local
75 sprom = kcalloc(sprom_size_words, sizeof(u16), GFP_KERNEL); in ssb_attr_sprom_show()
76 if (!sprom) in ssb_attr_sprom_show()
85 err = sprom_read(bus, sprom); in ssb_attr_sprom_show()
89 count = sprom2hex(sprom, buf, PAGE_SIZE, sprom_size_words); in ssb_attr_sprom_show()
[all …]
Dsdio.c475 struct ssb_sprom *sprom = &iv->sprom; in ssb_sdio_get_invariants() local
481 memset(sprom, 0xFF, sizeof(*sprom)); in ssb_sdio_get_invariants()
482 sprom->boardflags_lo = 0; in ssb_sdio_get_invariants()
483 sprom->boardflags_hi = 0; in ssb_sdio_get_invariants()
496 memcpy(sprom->il0mac, mac, ETH_ALEN); in ssb_sdio_get_invariants()
497 memcpy(sprom->et1mac, mac, ETH_ALEN); in ssb_sdio_get_invariants()
508 sprom->revision = tuple->data[1]; in ssb_sdio_get_invariants()
520 sprom->board_rev = tuple->data[1]; in ssb_sdio_get_invariants()
526 sprom->pa0b0 = tuple->data[1] | in ssb_sdio_get_invariants()
528 sprom->pa0b1 = tuple->data[3] | in ssb_sdio_get_invariants()
[all …]
Dpcmcia.c532 static int ssb_pcmcia_sprom_read_all(struct ssb_bus *bus, u16 *sprom) in ssb_pcmcia_sprom_read_all() argument
537 err = ssb_pcmcia_sprom_read(bus, i, &sprom[i]); in ssb_pcmcia_sprom_read_all()
546 static int ssb_pcmcia_sprom_write_all(struct ssb_bus *bus, const u16 *sprom) in ssb_pcmcia_sprom_write_all() argument
572 err = ssb_pcmcia_sprom_write(bus, i, sprom[i]); in ssb_pcmcia_sprom_write_all()
595 static int ssb_pcmcia_sprom_check_crc(const u16 *sprom, size_t size) in ssb_pcmcia_sprom_check_crc() argument
612 struct ssb_sprom *sprom = priv; in ssb_pcmcia_get_mac() local
620 memcpy(sprom->il0mac, &tuple->TupleData[2], ETH_ALEN); in ssb_pcmcia_get_mac()
629 struct ssb_sprom *sprom = &iv->sprom; in ssb_pcmcia_do_get_invariants() local
645 sprom->board_rev = tuple->TupleData[1]; in ssb_pcmcia_do_get_invariants()
651 sprom->pa0b0 = tuple->TupleData[1] | in ssb_pcmcia_do_get_invariants()
[all …]
Dpci.c222 static u8 ssb_sprom_crc(const u16 *sprom, u16 size) in ssb_sprom_crc() argument
228 crc = ssb_crc8(crc, sprom[word] & 0x00FF); in ssb_sprom_crc()
229 crc = ssb_crc8(crc, (sprom[word] & 0xFF00) >> 8); in ssb_sprom_crc()
231 crc = ssb_crc8(crc, sprom[size - 1] & 0x00FF); in ssb_sprom_crc()
237 static int sprom_check_crc(const u16 *sprom, size_t size) in sprom_check_crc() argument
243 crc = ssb_sprom_crc(sprom, size); in sprom_check_crc()
244 tmp = sprom[size - 1] & SSB_SPROM_REVISION_CRC; in sprom_check_crc()
252 static int sprom_do_read(struct ssb_bus *bus, u16 *sprom) in sprom_do_read() argument
257 sprom[i] = ioread16(bus->mmio + bus->sprom_offset + (i * 2)); in sprom_do_read()
262 static int sprom_do_write(struct ssb_bus *bus, const u16 *sprom) in sprom_do_write() argument
[all …]
Dssb_private.h168 int (*sprom_read)(struct ssb_bus *bus, u16 *sprom));
172 int (*sprom_check_crc)(const u16 *sprom, size_t size),
173 int (*sprom_write)(struct ssb_bus *bus, const u16 *sprom));
DMakefile4 ssb-$(CONFIG_SSB_SPROM) += sprom.o
/linux-2.6.39/arch/mips/bcm47xx/
Dsetup.c61 sprom->_outvar = simple_strtoul(buf, NULL, 0);
63 static void bcm47xx_fill_sprom(struct ssb_sprom *sprom) in bcm47xx_fill_sprom() argument
68 memset(sprom, 0, sizeof(struct ssb_sprom)); in bcm47xx_fill_sprom()
70 sprom->revision = 1; /* Fallback: Old hardware does not define this. */ in bcm47xx_fill_sprom()
73 nvram_parse_macaddr(buf, sprom->il0mac); in bcm47xx_fill_sprom()
75 nvram_parse_macaddr(buf, sprom->et0mac); in bcm47xx_fill_sprom()
77 nvram_parse_macaddr(buf, sprom->et1mac); in bcm47xx_fill_sprom()
131 sprom->boardflags_lo = (boardflags & 0x0000FFFFU); in bcm47xx_fill_sprom()
132 sprom->boardflags_hi = (boardflags & 0xFFFF0000U) >> 16; in bcm47xx_fill_sprom()
138 sprom->boardflags2_lo = (boardflags & 0x0000FFFFU); in bcm47xx_fill_sprom()
[all …]
Dwgt634u.c136 u8 *et0mac = ssb_bcm47xx.sprom.et0mac; in wgt634u_init()
/linux-2.6.39/drivers/net/wireless/b43legacy/
Dleds.c192 u8 sprom[4]; in b43legacy_leds_init() local
197 sprom[0] = bus->sprom.gpio0; in b43legacy_leds_init()
198 sprom[1] = bus->sprom.gpio1; in b43legacy_leds_init()
199 sprom[2] = bus->sprom.gpio2; in b43legacy_leds_init()
200 sprom[3] = bus->sprom.gpio3; in b43legacy_leds_init()
203 if (sprom[i] == 0xFF) { in b43legacy_leds_init()
230 behaviour = sprom[i] & B43legacy_LED_BEHAVIOUR; in b43legacy_leds_init()
231 activelow = !!(sprom[i] & B43legacy_LED_ACTIVELOW); in b43legacy_leds_init()
Dphy.c442 if (dev->dev->bus->sprom.boardflags_lo & B43legacy_BFL_PACTRL) in b43legacy_phy_inita()
544 if (dev->dev->bus->sprom.boardflags_lo & B43legacy_BFL_RSSI) { in b43legacy_phy_initb4()
702 if (dev->dev->bus->sprom.boardflags_lo & 0x8000) { in b43legacy_phy_initb6()
800 if (dev->dev->bus->sprom.boardflags_lo & in b43legacy_phy_initb6()
924 if (dev->dev->bus->sprom.boardflags_lo & B43legacy_BFL_EXTLNA) { in b43legacy_calc_loopback_gain()
1079 if (dev->dev->bus->sprom.boardflags_lo & in b43legacy_phy_initg()
1094 if (!(dev->dev->bus->sprom.boardflags_lo & B43legacy_BFL_RSSI)) { in b43legacy_phy_initg()
1842 max_pwr = dev->dev->bus->sprom.maxpwr_bg; in b43legacy_phy_xmitpower()
1844 if ((dev->dev->bus->sprom.boardflags_lo in b43legacy_phy_xmitpower()
1852 dev->dev->bus->sprom.maxpwr_bg = max_pwr; in b43legacy_phy_xmitpower()
[all …]
Dradio.c831 if (!(dev->dev->bus->sprom.boardflags_lo & in b43legacy_calc_nrssi_threshold()
861 !(dev->dev->bus->sprom.boardflags_lo & in b43legacy_calc_nrssi_threshold()
1410 if (phy->rev < 7 || !(dev->dev->bus->sprom.boardflags_lo in b43legacy_get_812_value()
1463 if (phy->rev >= 7 && dev->dev->bus->sprom.boardflags_lo in b43legacy_get_812_value()
1554 !(dev->dev->bus->sprom.boardflags_lo in b43legacy_radio_init2050()
1790 if (dev->dev->bus->sprom.country_code == 5) /* JAPAN) */ in b43legacy_radio_selectchannel()
Dmain.c1893 if (dev->dev->bus->sprom.boardflags_lo & B43legacy_BFL_PACTRL) { in b43legacy_gpio_init()
2273 if (dev->dev->bus->sprom.boardflags_lo & B43legacy_BFL_RSSI) { in b43legacy_periodic_every60sec()
3249 struct ssb_sprom *sprom = &dev->dev->bus->sprom; in b43legacy_wireless_core_init() local
3295 if (sprom->boardflags_lo & B43legacy_BFL_PACTRL) in b43legacy_wireless_core_init()
3788 bus->sprom.boardflags_lo |= B43legacy_BFL_PACTRL; in b43legacy_sprom_fixup()
3802 struct ssb_sprom *sprom = &dev->bus->sprom; in b43legacy_wireless_init() local
3826 if (is_valid_ether_addr(sprom->et1mac)) in b43legacy_wireless_init()
3827 SET_IEEE80211_PERM_ADDR(hw, sprom->et1mac); in b43legacy_wireless_init()
3829 SET_IEEE80211_PERM_ADDR(hw, sprom->il0mac); in b43legacy_wireless_init()
/linux-2.6.39/drivers/net/wireless/b43/
Dleds.c219 u8 sprom[4]; in b43_led_get_sprominfo() local
221 sprom[0] = bus->sprom.gpio0; in b43_led_get_sprominfo()
222 sprom[1] = bus->sprom.gpio1; in b43_led_get_sprominfo()
223 sprom[2] = bus->sprom.gpio2; in b43_led_get_sprominfo()
224 sprom[3] = bus->sprom.gpio3; in b43_led_get_sprominfo()
226 if (sprom[led_index] == 0xFF) { in b43_led_get_sprominfo()
254 *behaviour = sprom[led_index] & B43_LED_BEHAVIOUR; in b43_led_get_sprominfo()
255 *activelow = !!(sprom[led_index] & B43_LED_ACTIVELOW); in b43_led_get_sprominfo()
Dphy_lp.c95 lpphy->tx_isolation_med_band = bus->sprom.tri2g; in lpphy_read_band_sprom()
96 lpphy->bx_arch = bus->sprom.bxa2g; in lpphy_read_band_sprom()
97 lpphy->rx_pwr_offset = bus->sprom.rxpo2g; in lpphy_read_band_sprom()
98 lpphy->rssi_vf = bus->sprom.rssismf2g; in lpphy_read_band_sprom()
99 lpphy->rssi_vc = bus->sprom.rssismc2g; in lpphy_read_band_sprom()
100 lpphy->rssi_gs = bus->sprom.rssisav2g; in lpphy_read_band_sprom()
101 lpphy->txpa[0] = bus->sprom.pa0b0; in lpphy_read_band_sprom()
102 lpphy->txpa[1] = bus->sprom.pa0b1; in lpphy_read_band_sprom()
103 lpphy->txpa[2] = bus->sprom.pa0b2; in lpphy_read_band_sprom()
104 maxpwr = bus->sprom.maxpwr_bg; in lpphy_read_band_sprom()
[all …]
Dphy_a.c314 (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL)) { in b43_phy_inita()
326 pab0 = (s16) (dev->dev->bus->sprom.pa1b0); in b43_aphy_init_tssi2dbm_table()
327 pab1 = (s16) (dev->dev->bus->sprom.pa1b1); in b43_aphy_init_tssi2dbm_table()
328 pab2 = (s16) (dev->dev->bus->sprom.pa1b2); in b43_aphy_init_tssi2dbm_table()
333 if ((s8) dev->dev->bus->sprom.itssi_a != 0 && in b43_aphy_init_tssi2dbm_table()
334 (s8) dev->dev->bus->sprom.itssi_a != -1) in b43_aphy_init_tssi2dbm_table()
336 (s8) (dev->dev->bus->sprom.itssi_a); in b43_aphy_init_tssi2dbm_table()
Dphy_g.c721 !(dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) { in b43_calc_nrssi_threshold()
1117 struct ssb_sprom *sprom = &(dev->dev->bus->sprom); in radio2050_rfover_val() local
1152 !(sprom->boardflags_lo & B43_BFL_EXTLNA)) { in radio2050_rfover_val()
1192 !(sprom->boardflags_lo & B43_BFL_EXTLNA)) { in radio2050_rfover_val()
1623 if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_ALTIQ) { in b43_phy_initb6()
1790 if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_EXTLNA) { in b43_calc_loopback_gain()
2056 if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) in b43_phy_initg()
2069 if (!(dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI)) { in b43_phy_initg()
2108 if (dev->dev->bus->sprom.country_code == in b43_gphy_channel_switch()
2387 pab0 = (s16) (dev->dev->bus->sprom.pa0b0); in b43_gphy_init_tssi2dbm_table()
[all …]
Dphy_n.c302 struct ssb_sprom *sprom = &(dev->dev->bus->sprom); in b43_nphy_tx_power_fix() local
316 } else if (sprom->revision < 4) { in b43_nphy_tx_power_fix()
321 txpi[0] = sprom->txpid2g[0]; in b43_nphy_tx_power_fix()
322 txpi[1] = sprom->txpid2g[1]; in b43_nphy_tx_power_fix()
324 txpi[0] = sprom->txpid5gl[0]; in b43_nphy_tx_power_fix()
325 txpi[1] = sprom->txpid5gl[1]; in b43_nphy_tx_power_fix()
327 txpi[0] = sprom->txpid5g[0]; in b43_nphy_tx_power_fix()
328 txpi[1] = sprom->txpid5g[1]; in b43_nphy_tx_power_fix()
330 txpi[0] = sprom->txpid5gh[0]; in b43_nphy_tx_power_fix()
331 txpi[1] = sprom->txpid5gh[1]; in b43_nphy_tx_power_fix()
[all …]
Dmain.c1424 antenna_mask = dev->dev->bus->sprom.ant_available_bg; in b43_ieee80211_antenna_sanitize()
1426 antenna_mask = dev->dev->bus->sprom.ant_available_a; in b43_ieee80211_antenna_sanitize()
2585 if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_PACTRL) { in b43_gpio_init()
4189 struct ssb_sprom *sprom = &dev->dev->bus->sprom; in b43_bluetooth_coext_enable() local
4194 if (!(sprom->boardflags_lo & B43_BFL_BTCOEXIST)) in b43_bluetooth_coext_enable()
4200 if (sprom->boardflags_lo & B43_BFL_BTCMOD) in b43_bluetooth_coext_enable()
4318 struct ssb_sprom *sprom = &bus->sprom; in b43_wireless_core_init() local
4358 if (sprom->boardflags_lo & B43_BFL_PACTRL) in b43_wireless_core_init()
4367 if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW) in b43_wireless_core_init()
4414 ssb_bus_powerup(bus, !(sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)); in b43_wireless_core_init()
[all …]
Dlo.c101 if ((dev->dev->bus->sprom.boardflags_lo & B43_BFL_EXTLNA) in lo_measure_feedthrough()
390 struct ssb_sprom *sprom = &dev->dev->bus->sprom; in lo_measure_setup() local
429 (sprom->boardflags_lo & B43_BFL_EXTLNA)) { in lo_measure_setup()
/linux-2.6.39/include/linux/ssb/
Dssb.h340 struct ssb_sprom sprom; member
369 struct ssb_sprom sprom; member
407 extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom);
Dssb_driver_gige.h75 return !!(dev->dev->bus->sprom.boardflags_lo & in ssb_gige_have_roboswitch()
/linux-2.6.39/drivers/staging/brcm80211/util/
Dpci_core.h53 u16 sprom[36]; /* SPROM shadow Area */ member
Dnicpci.c464 reg16 = &pcieregs->sprom[SRSH_ASPM_OFFSET]; in pcie_war_aspm_clkreq()
485 reg16 = &pcieregs->sprom[SRSH_CLKREQ_OFFSET_REV5]; in pcie_war_aspm_clkreq()
521 reg16 = &pcieregs->sprom[SRSH_PCIE_MISC_CONFIG]; in pcie_misc_config_fixup()
544 reg16 = &pcieregs->sprom[SRSH_BD_OFFSET]; in pcie_war_noplldown()
Dbcmsrom.c78 static int sprom_read_pci(si_t *sih, u16 *sprom,
1453 sprom_read_pci(si_t *sih, u16 *sprom, uint wordoff, in sprom_read_pci() argument
1468 ccregs = (void *)((u8 *) sprom - CC_SROM_OTP); in sprom_read_pci()
1475 buf[i] = R_REG(&sprom[wordoff + i]); in sprom_read_pci()
1477 buf[i] = R_REG(&sprom[wordoff + i]); in sprom_read_pci()
/linux-2.6.39/drivers/staging/brcm80211/include/
Dpcie_core.h79 u16 sprom[64]; /* SPROM shadow Area */ member

12