Lines Matching refs:priv

27 	struct rtl8180_priv *priv = dev->priv;  in rtl8225_write()  local
34 reg80 = rtl818x_ioread16(priv, &priv->map->RFPinsOutput) & 0xfff3; in rtl8225_write()
35 reg82 = rtl818x_ioread16(priv, &priv->map->RFPinsEnable); in rtl8225_write()
37 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, reg82 | 0x7); in rtl8225_write()
39 reg84 = rtl818x_ioread16(priv, &priv->map->RFPinsSelect); in rtl8225_write()
40 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84 | 0x7 | 0x400); in rtl8225_write()
41 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_write()
44 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write()
45 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_write()
47 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80); in rtl8225_write()
48 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_write()
58 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg); in rtl8225_write()
60 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg | (1 << 1)); in rtl8225_write()
61 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg | (1 << 1)); in rtl8225_write()
64 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg); in rtl8225_write()
67 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write()
68 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_write()
71 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_write()
72 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84 | 0x400); in rtl8225_write()
73 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF); in rtl8225_write()
78 struct rtl8180_priv *priv = dev->priv; in rtl8225_read() local
82 reg80 = rtl818x_ioread16(priv, &priv->map->RFPinsOutput); in rtl8225_read()
83 reg82 = rtl818x_ioread16(priv, &priv->map->RFPinsEnable); in rtl8225_read()
84 reg84 = rtl818x_ioread16(priv, &priv->map->RFPinsSelect) | 0x400; in rtl8225_read()
88 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, reg82 | 0x000F); in rtl8225_read()
89 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84 | 0x000F); in rtl8225_read()
91 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2)); in rtl8225_read()
92 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
94 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80); in rtl8225_read()
95 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
102 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg); in rtl8225_read()
103 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
107 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
109 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
111 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
113 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
117 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg); in rtl8225_read()
118 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
123 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x000E); in rtl8225_read()
124 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, 0x040E); in rtl8225_read()
125 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
126 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
128 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
130 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
132 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
134 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
136 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
141 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
143 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
145 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
147 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
149 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
151 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
153 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
155 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
158 if (rtl818x_ioread16(priv, &priv->map->RFPinsInput) & (1 << 1)) in rtl8225_read()
161 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
163 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
167 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, in rtl8225_read()
169 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_read()
172 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, reg82); in rtl8225_read()
173 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, reg84); in rtl8225_read()
174 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, 0x03A0); in rtl8225_read()
260 struct rtl8180_priv *priv = dev->priv; in rtl8225_rf_set_tx_power() local
266 cck_power = priv->channels[channel - 1].hw_value & 0xFF; in rtl8225_rf_set_tx_power()
267 ofdm_power = priv->channels[channel - 1].hw_value >> 8; in rtl8225_rf_set_tx_power()
272 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, in rtl8225_rf_set_tx_power()
287 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); in rtl8225_rf_set_tx_power()
288 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3); in rtl8225_rf_set_tx_power()
289 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg | RTL818X_CONFIG3_ANAPARAM_WRITE); in rtl8225_rf_set_tx_power()
290 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, RTL8225_ANAPARAM2_ON); in rtl8225_rf_set_tx_power()
291 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE); in rtl8225_rf_set_tx_power()
292 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); in rtl8225_rf_set_tx_power()
294 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM, in rtl8225_rf_set_tx_power()
307 struct rtl8180_priv *priv = dev->priv; in rtl8225_rf_init() local
310 rtl8180_set_anaparam(priv, RTL8225_ANAPARAM_ON); in rtl8225_rf_init()
313 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, 0x0480); in rtl8225_rf_init()
314 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF); in rtl8225_rf_init()
315 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, 0x0488); in rtl8225_rf_init()
316 rtl818x_iowrite8(priv, &priv->map->GP_ENABLE, 0); in rtl8225_rf_init()
317 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225_rf_init()
319 rtl818x_iowrite8(priv, &priv->map->GP_ENABLE, 0xFF & ~(1 << 6)); in rtl8225_rf_init()
321 rtl818x_iowrite32(priv, &priv->map->RF_TIMING, 0x000a8008); in rtl8225_rf_init()
324 rtl818x_ioread16(priv, &priv->map->BRSR); in rtl8225_rf_init()
325 rtl818x_iowrite16(priv, &priv->map->BRSR, 0xFFFF); in rtl8225_rf_init()
326 rtl818x_iowrite32(priv, &priv->map->RF_PARA, 0x00100044); in rtl8225_rf_init()
327 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); in rtl8225_rf_init()
328 rtl818x_iowrite8(priv, &priv->map->CONFIG3, 0x44); in rtl8225_rf_init()
329 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); in rtl8225_rf_init()
359 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF); in rtl8225_rf_init()
436 rtl818x_iowrite8(priv, &priv->map->TESTR, 0x0D); msleep(1); in rtl8225_rf_init()
444 rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */ in rtl8225_rf_init()
446 rtl818x_iowrite32(priv, (__le32 __iomem *)((void __iomem *)priv->map + 0x94), 0x15c00002); in rtl8225_rf_init()
447 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF); in rtl8225_rf_init()
477 struct rtl8180_priv *priv = dev->priv; in rtl8225z2_rf_set_tx_power() local
482 cck_power = priv->channels[channel - 1].hw_value & 0xFF; in rtl8225z2_rf_set_tx_power()
483 ofdm_power = priv->channels[channel - 1].hw_value >> 8; in rtl8225z2_rf_set_tx_power()
503 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, cck_power); in rtl8225z2_rf_set_tx_power()
504 rtl818x_ioread8(priv, &priv->map->TX_GAIN_CCK); in rtl8225z2_rf_set_tx_power()
508 rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM, ofdm_power); in rtl8225z2_rf_set_tx_power()
536 struct rtl8180_priv *priv = dev->priv; in rtl8225z2_rf_init() local
539 rtl8180_set_anaparam(priv, RTL8225_ANAPARAM_ON); in rtl8225z2_rf_init()
542 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, 0x0480); in rtl8225z2_rf_init()
543 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF); in rtl8225z2_rf_init()
544 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, 0x0488); in rtl8225z2_rf_init()
545 rtl818x_iowrite8(priv, &priv->map->GP_ENABLE, 0); in rtl8225z2_rf_init()
546 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8225z2_rf_init()
548 rtl818x_iowrite8(priv, &priv->map->GP_ENABLE, 0xFF & ~(1 << 6)); in rtl8225z2_rf_init()
550 rtl818x_iowrite32(priv, &priv->map->RF_TIMING, 0x00088008); in rtl8225z2_rf_init()
553 rtl818x_ioread16(priv, &priv->map->BRSR); in rtl8225z2_rf_init()
554 rtl818x_iowrite16(priv, &priv->map->BRSR, 0xFFFF); in rtl8225z2_rf_init()
555 rtl818x_iowrite32(priv, &priv->map->RF_PARA, 0x00100044); in rtl8225z2_rf_init()
556 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); in rtl8225z2_rf_init()
557 rtl818x_iowrite8(priv, &priv->map->CONFIG3, 0x44); in rtl8225z2_rf_init()
558 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); in rtl8225z2_rf_init()
560 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF); in rtl8225z2_rf_init()
607 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF); in rtl8225z2_rf_init()
688 rtl818x_iowrite8(priv, (u8 __iomem *)((void __iomem *)priv->map + 0x5B), 0x0D); msleep(1); in rtl8225z2_rf_init()
696 rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */ in rtl8225z2_rf_init()
698 rtl818x_iowrite32(priv, (__le32 __iomem *)((void __iomem *)priv->map + 0x94), 0x15c00002); in rtl8225z2_rf_init()
699 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF); in rtl8225z2_rf_init()
704 struct rtl8180_priv *priv = dev->priv; in rtl8225_rf_stop() local
709 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG); in rtl8225_rf_stop()
710 reg = rtl818x_ioread8(priv, &priv->map->CONFIG3); in rtl8225_rf_stop()
711 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg | RTL818X_CONFIG3_ANAPARAM_WRITE); in rtl8225_rf_stop()
712 rtl818x_iowrite32(priv, &priv->map->ANAPARAM2, RTL8225_ANAPARAM2_OFF); in rtl8225_rf_stop()
713 rtl818x_iowrite32(priv, &priv->map->ANAPARAM, RTL8225_ANAPARAM_OFF); in rtl8225_rf_stop()
714 rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE); in rtl8225_rf_stop()
715 rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL); in rtl8225_rf_stop()
721 struct rtl8180_priv *priv = dev->priv; in rtl8225_rf_set_channel() local
725 if (priv->rf->init == rtl8225_rf_init) in rtl8225_rf_set_channel()
750 struct rtl8180_priv *priv = dev->priv; in rtl8180_detect_rf() local
753 rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, 0x0480); in rtl8180_detect_rf()
754 rtl818x_iowrite16(priv, &priv->map->RFPinsSelect, 0x0488); in rtl8180_detect_rf()
755 rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF); in rtl8180_detect_rf()
756 rtl818x_ioread8(priv, &priv->map->EEPROM_CMD); in rtl8180_detect_rf()