Lines Matching refs:dev

457 u32 b43_lcntab_read(struct b43_wldev *dev, u32 offset)  in b43_lcntab_read()  argument
467 b43_phy_write(dev, B43_PHY_LCN_TABLE_ADDR, offset); in b43_lcntab_read()
468 value = b43_phy_read(dev, B43_PHY_LCN_TABLE_DATALO) & 0xFF; in b43_lcntab_read()
471 b43_phy_write(dev, B43_PHY_LCN_TABLE_ADDR, offset); in b43_lcntab_read()
472 value = b43_phy_read(dev, B43_PHY_LCN_TABLE_DATALO); in b43_lcntab_read()
475 b43_phy_write(dev, B43_PHY_LCN_TABLE_ADDR, offset); in b43_lcntab_read()
476 value = b43_phy_read(dev, B43_PHY_LCN_TABLE_DATALO); in b43_lcntab_read()
477 value |= (b43_phy_read(dev, B43_PHY_LCN_TABLE_DATAHI) << 16); in b43_lcntab_read()
487 void b43_lcntab_read_bulk(struct b43_wldev *dev, u32 offset, in b43_lcntab_read_bulk() argument
498 b43_phy_write(dev, B43_PHY_LCN_TABLE_ADDR, offset); in b43_lcntab_read_bulk()
503 *data = b43_phy_read(dev, in b43_lcntab_read_bulk()
508 *((u16 *)data) = b43_phy_read(dev, in b43_lcntab_read_bulk()
513 *((u32 *)data) = b43_phy_read(dev, in b43_lcntab_read_bulk()
515 *((u32 *)data) |= (b43_phy_read(dev, in b43_lcntab_read_bulk()
525 void b43_lcntab_write(struct b43_wldev *dev, u32 offset, u32 value) in b43_lcntab_write() argument
535 b43_phy_write(dev, B43_PHY_LCN_TABLE_ADDR, offset); in b43_lcntab_write()
536 b43_phy_write(dev, B43_PHY_LCN_TABLE_DATALO, value); in b43_lcntab_write()
540 b43_phy_write(dev, B43_PHY_LCN_TABLE_ADDR, offset); in b43_lcntab_write()
541 b43_phy_write(dev, B43_PHY_LCN_TABLE_DATALO, value); in b43_lcntab_write()
544 b43_phy_write(dev, B43_PHY_LCN_TABLE_ADDR, offset); in b43_lcntab_write()
545 b43_phy_write(dev, B43_PHY_LCN_TABLE_DATAHI, value >> 16); in b43_lcntab_write()
546 b43_phy_write(dev, B43_PHY_LCN_TABLE_DATALO, value & 0xFFFF); in b43_lcntab_write()
555 void b43_lcntab_write_bulk(struct b43_wldev *dev, u32 offset, in b43_lcntab_write_bulk() argument
566 b43_phy_write(dev, B43_PHY_LCN_TABLE_ADDR, offset); in b43_lcntab_write_bulk()
574 b43_phy_write(dev, B43_PHY_LCN_TABLE_DATALO, value); in b43_lcntab_write_bulk()
580 b43_phy_write(dev, B43_PHY_LCN_TABLE_DATALO, value); in b43_lcntab_write_bulk()
585 b43_phy_write(dev, B43_PHY_LCN_TABLE_DATAHI, in b43_lcntab_write_bulk()
587 b43_phy_write(dev, B43_PHY_LCN_TABLE_DATALO, in b43_lcntab_write_bulk()
600 #define lcntab_upload(dev, offset, data) do { \ argument
601 b43_lcntab_write_bulk(dev, offset, ARRAY_SIZE(data), data); \
603 static void b43_phy_lcn_upload_static_tables(struct b43_wldev *dev) in b43_phy_lcn_upload_static_tables() argument
605 lcntab_upload(dev, B43_LCNTAB16(0x02, 0), b43_lcntab_0x02); in b43_phy_lcn_upload_static_tables()
606 lcntab_upload(dev, B43_LCNTAB16(0x01, 0), b43_lcntab_0x01); in b43_phy_lcn_upload_static_tables()
607 lcntab_upload(dev, B43_LCNTAB32(0x0b, 0), b43_lcntab_0x0b); in b43_phy_lcn_upload_static_tables()
608 lcntab_upload(dev, B43_LCNTAB32(0x0c, 0), b43_lcntab_0x0c); in b43_phy_lcn_upload_static_tables()
609 lcntab_upload(dev, B43_LCNTAB32(0x0d, 0), b43_lcntab_0x0d); in b43_phy_lcn_upload_static_tables()
610 lcntab_upload(dev, B43_LCNTAB16(0x0e, 0), b43_lcntab_0x0e); in b43_phy_lcn_upload_static_tables()
611 lcntab_upload(dev, B43_LCNTAB16(0x0f, 0), b43_lcntab_0x0f); in b43_phy_lcn_upload_static_tables()
612 lcntab_upload(dev, B43_LCNTAB16(0x10, 0), b43_lcntab_0x10); in b43_phy_lcn_upload_static_tables()
613 lcntab_upload(dev, B43_LCNTAB16(0x11, 0), b43_lcntab_0x11); in b43_phy_lcn_upload_static_tables()
614 lcntab_upload(dev, B43_LCNTAB32(0x12, 0), b43_lcntab_0x12); in b43_phy_lcn_upload_static_tables()
615 lcntab_upload(dev, B43_LCNTAB16(0x14, 0), b43_lcntab_0x14); in b43_phy_lcn_upload_static_tables()
616 lcntab_upload(dev, B43_LCNTAB16(0x17, 0), b43_lcntab_0x17); in b43_phy_lcn_upload_static_tables()
617 lcntab_upload(dev, B43_LCNTAB16(0x00, 0), b43_lcntab_0x00); in b43_phy_lcn_upload_static_tables()
618 lcntab_upload(dev, B43_LCNTAB32(0x18, 0), b43_lcntab_0x18); in b43_phy_lcn_upload_static_tables()
621 static void b43_phy_lcn_load_tx_gain_tab(struct b43_wldev *dev, in b43_phy_lcn_load_tx_gain_tab() argument
628 if (dev->dev->bus_sprom->boardflags_lo & B43_BFL_FEM) in b43_phy_lcn_load_tx_gain_tab()
636 b43_lcntab_write(dev, B43_LCNTAB32(0x7, 0xc0 + i), val); in b43_phy_lcn_load_tx_gain_tab()
639 val = b43_lcntab_read(dev, B43_LCNTAB32(0x7, 0x140 + i)); in b43_phy_lcn_load_tx_gain_tab()
643 b43_lcntab_write(dev, B43_LCNTAB32(0x7, 0x140 + i), val); in b43_phy_lcn_load_tx_gain_tab()
648 static void b43_phy_lcn_load_rfpower(struct b43_wldev *dev) in b43_phy_lcn_load_rfpower() argument
654 bbmult = b43_lcntab_read(dev, B43_LCNTAB32(0x7, 0x140 + i)); in b43_phy_lcn_load_rfpower()
656 rfgain = b43_lcntab_read(dev, B43_LCNTAB32(0x7, 0xc0 + i)); in b43_phy_lcn_load_rfpower()
665 static void b43_phy_lcn_rewrite_rfpower_table(struct b43_wldev *dev) in b43_phy_lcn_rewrite_rfpower_table() argument
670 tmp = b43_lcntab_read(dev, B43_LCNTAB32(0x7, 0x240 + i)); in b43_phy_lcn_rewrite_rfpower_table()
671 b43_lcntab_write(dev, B43_LCNTAB32(0x7, 0x240 + i), tmp); in b43_phy_lcn_rewrite_rfpower_table()
676 static void b43_phy_lcn_clean_papd_comp_table(struct b43_wldev *dev) in b43_phy_lcn_clean_papd_comp_table() argument
681 b43_lcntab_write(dev, B43_LCNTAB32(0x18, i), 0x80000); in b43_phy_lcn_clean_papd_comp_table()
685 void b43_phy_lcn_tables_init(struct b43_wldev *dev) in b43_phy_lcn_tables_init() argument
687 struct ssb_sprom *sprom = dev->dev->bus_sprom; in b43_phy_lcn_tables_init()
689 b43_phy_lcn_upload_static_tables(dev); in b43_phy_lcn_tables_init()
691 if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { in b43_phy_lcn_tables_init()
693 b43_phy_lcn_load_tx_gain_tab(dev, in b43_phy_lcn_tables_init()
696 b43err(dev->wl, in b43_phy_lcn_tables_init()
702 b43_lcntab_write_bulk(dev, B43_LCNTAB16(0xf, 0), in b43_phy_lcn_tables_init()
706 b43err(dev->wl, "SW ctl table is unknown for this card\n"); in b43_phy_lcn_tables_init()
708 b43_phy_lcn_load_rfpower(dev); in b43_phy_lcn_tables_init()
709 b43_phy_lcn_rewrite_rfpower_table(dev); in b43_phy_lcn_tables_init()
710 b43_phy_lcn_clean_papd_comp_table(dev); in b43_phy_lcn_tables_init()