mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 21:24:00 +08:00
staging: vt6655: BBbReadEmbedded replace __iomem with vnt_private
Changing callers to point to private Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
377f5bc00f
commit
8e8a9f5133
@ -1961,8 +1961,10 @@ void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length,
|
||||
* Return Value: true if succeeded; false if failed.
|
||||
*
|
||||
*/
|
||||
bool BBbReadEmbedded(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char *pbyData)
|
||||
bool BBbReadEmbedded(struct vnt_private *priv,
|
||||
unsigned char byBBAddr, unsigned char *pbyData)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
unsigned short ww;
|
||||
unsigned char byValue;
|
||||
|
||||
@ -2222,7 +2224,7 @@ BBvSetShortSlotTime(struct vnt_private *priv)
|
||||
unsigned char byBBRxConf = 0;
|
||||
unsigned char byBBVGA = 0;
|
||||
|
||||
BBbReadEmbedded(priv->PortOffset, 0x0A, &byBBRxConf); /* CR10 */
|
||||
BBbReadEmbedded(priv, 0x0A, &byBBRxConf); /* CR10 */
|
||||
|
||||
if (priv->bShortSlotTime)
|
||||
byBBRxConf &= 0xDF; /* 1101 1111 */
|
||||
@ -2230,7 +2232,7 @@ BBvSetShortSlotTime(struct vnt_private *priv)
|
||||
byBBRxConf |= 0x20; /* 0010 0000 */
|
||||
|
||||
/* patch for 3253B0 Baseband with Cardbus module */
|
||||
BBbReadEmbedded(priv->PortOffset, 0xE7, &byBBVGA);
|
||||
BBbReadEmbedded(priv, 0xE7, &byBBVGA);
|
||||
if (byBBVGA == priv->abyBBVGA[0])
|
||||
byBBRxConf |= 0x20; /* 0010 0000 */
|
||||
|
||||
@ -2243,7 +2245,7 @@ void BBvSetVGAGainOffset(struct vnt_private *priv, unsigned char byData)
|
||||
|
||||
BBbWriteEmbedded(priv, 0xE7, byData);
|
||||
|
||||
BBbReadEmbedded(priv->PortOffset, 0x0A, &byBBRxConf); /* CR10 */
|
||||
BBbReadEmbedded(priv, 0x0A, &byBBRxConf); /* CR10 */
|
||||
/* patch for 3253B0 Baseband with Cardbus module */
|
||||
if (byData == priv->abyBBVGA[0])
|
||||
byBBRxConf |= 0x20; /* 0010 0000 */
|
||||
@ -2291,10 +2293,9 @@ BBvSoftwareReset(struct vnt_private *priv)
|
||||
void
|
||||
BBvPowerSaveModeON(struct vnt_private *priv)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
unsigned char byOrgData;
|
||||
|
||||
BBbReadEmbedded(dwIoBase, 0x0D, &byOrgData);
|
||||
BBbReadEmbedded(priv, 0x0D, &byOrgData);
|
||||
byOrgData |= BIT(0);
|
||||
BBbWriteEmbedded(priv, 0x0D, byOrgData);
|
||||
}
|
||||
@ -2314,10 +2315,9 @@ BBvPowerSaveModeON(struct vnt_private *priv)
|
||||
void
|
||||
BBvPowerSaveModeOFF(struct vnt_private *priv)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
unsigned char byOrgData;
|
||||
|
||||
BBbReadEmbedded(dwIoBase, 0x0D, &byOrgData);
|
||||
BBbReadEmbedded(priv, 0x0D, &byOrgData);
|
||||
byOrgData &= ~(BIT(0));
|
||||
BBbWriteEmbedded(priv, 0x0D, byOrgData);
|
||||
}
|
||||
@ -2339,10 +2339,9 @@ BBvPowerSaveModeOFF(struct vnt_private *priv)
|
||||
void
|
||||
BBvSetTxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
unsigned char byBBTxConf;
|
||||
|
||||
BBbReadEmbedded(dwIoBase, 0x09, &byBBTxConf); /* CR09 */
|
||||
BBbReadEmbedded(priv, 0x09, &byBBTxConf); /* CR09 */
|
||||
if (byAntennaMode == ANT_DIVERSITY) {
|
||||
/* bit 1 is diversity */
|
||||
byBBTxConf |= 0x02;
|
||||
@ -2373,10 +2372,9 @@ BBvSetTxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode)
|
||||
void
|
||||
BBvSetRxAntennaMode(struct vnt_private *priv, unsigned char byAntennaMode)
|
||||
{
|
||||
void __iomem *dwIoBase = priv->PortOffset;
|
||||
unsigned char byBBRxConf;
|
||||
|
||||
BBbReadEmbedded(dwIoBase, 0x0A, &byBBRxConf); /* CR10 */
|
||||
BBbReadEmbedded(priv, 0x0A, &byBBRxConf); /* CR10 */
|
||||
if (byAntennaMode == ANT_DIVERSITY) {
|
||||
byBBRxConf |= 0x01;
|
||||
|
||||
|
@ -77,7 +77,7 @@ BBuGetFrameTime(
|
||||
void vnt_get_phy_field(struct vnt_private *, u32 frame_length,
|
||||
u16 tx_rate, u8 pkt_type, struct vnt_phy_field *);
|
||||
|
||||
bool BBbReadEmbedded(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char *pbyData);
|
||||
bool BBbReadEmbedded(struct vnt_private *, unsigned char byBBAddr, unsigned char *pbyData);
|
||||
bool BBbWriteEmbedded(struct vnt_private *, unsigned char byBBAddr, unsigned char byData);
|
||||
|
||||
void BBvSetShortSlotTime(struct vnt_private *);
|
||||
|
@ -223,14 +223,14 @@ bool CARDbSetPhyParameter(struct vnt_private *pDevice, CARD_PHY_TYPE ePHYType,
|
||||
pDevice->abyBBVGA[0] = 0x20;
|
||||
pDevice->abyBBVGA[2] = 0x10;
|
||||
pDevice->abyBBVGA[3] = 0x10;
|
||||
BBbReadEmbedded(pDevice->PortOffset, 0xE7, &byData);
|
||||
BBbReadEmbedded(pDevice, 0xE7, &byData);
|
||||
if (byData == 0x1C)
|
||||
BBbWriteEmbedded(pDevice, 0xE7, pDevice->abyBBVGA[0]);
|
||||
|
||||
} else if (pDevice->byRFType == RF_UW2452) {
|
||||
MACvSetBBType(pDevice->PortOffset, BB_TYPE_11A);
|
||||
pDevice->abyBBVGA[0] = 0x18;
|
||||
BBbReadEmbedded(pDevice->PortOffset, 0xE7, &byData);
|
||||
BBbReadEmbedded(pDevice, 0xE7, &byData);
|
||||
if (byData == 0x14) {
|
||||
BBbWriteEmbedded(pDevice, 0xE7, pDevice->abyBBVGA[0]);
|
||||
BBbWriteEmbedded(pDevice, 0xE1, 0x57);
|
||||
@ -249,13 +249,13 @@ bool CARDbSetPhyParameter(struct vnt_private *pDevice, CARD_PHY_TYPE ePHYType,
|
||||
pDevice->abyBBVGA[0] = 0x1C;
|
||||
pDevice->abyBBVGA[2] = 0x00;
|
||||
pDevice->abyBBVGA[3] = 0x00;
|
||||
BBbReadEmbedded(pDevice->PortOffset, 0xE7, &byData);
|
||||
BBbReadEmbedded(pDevice, 0xE7, &byData);
|
||||
if (byData == 0x20)
|
||||
BBbWriteEmbedded(pDevice, 0xE7, pDevice->abyBBVGA[0]);
|
||||
|
||||
} else if (pDevice->byRFType == RF_UW2452) {
|
||||
pDevice->abyBBVGA[0] = 0x14;
|
||||
BBbReadEmbedded(pDevice->PortOffset, 0xE7, &byData);
|
||||
BBbReadEmbedded(pDevice, 0xE7, &byData);
|
||||
if (byData == 0x18) {
|
||||
BBbWriteEmbedded(pDevice, 0xE7, pDevice->abyBBVGA[0]);
|
||||
BBbWriteEmbedded(pDevice, 0xE1, 0xD3);
|
||||
@ -272,13 +272,13 @@ bool CARDbSetPhyParameter(struct vnt_private *pDevice, CARD_PHY_TYPE ePHYType,
|
||||
pDevice->abyBBVGA[0] = 0x1C;
|
||||
pDevice->abyBBVGA[2] = 0x00;
|
||||
pDevice->abyBBVGA[3] = 0x00;
|
||||
BBbReadEmbedded(pDevice->PortOffset, 0xE7, &byData);
|
||||
BBbReadEmbedded(pDevice, 0xE7, &byData);
|
||||
if (byData == 0x20)
|
||||
BBbWriteEmbedded(pDevice, 0xE7, pDevice->abyBBVGA[0]);
|
||||
|
||||
} else if (pDevice->byRFType == RF_UW2452) {
|
||||
pDevice->abyBBVGA[0] = 0x14;
|
||||
BBbReadEmbedded(pDevice->PortOffset, 0xE7, &byData);
|
||||
BBbReadEmbedded(pDevice, 0xE7, &byData);
|
||||
if (byData == 0x18) {
|
||||
BBbWriteEmbedded(pDevice, 0xE7, pDevice->abyBBVGA[0]);
|
||||
BBbWriteEmbedded(pDevice, 0xE1, 0xD3);
|
||||
|
Loading…
Reference in New Issue
Block a user