3 void tw5864_indir_writeb(struct tw5864_dev
*dev
, u16 addr
, u8 data
)
7 while (tw_readl(TW5864_IND_CTL
) & BIT(31) && --retries
)
10 dev_err(&dev
->pci
->dev
,
11 "tw_indir_writel() retries exhausted before writing\n");
13 tw_writel(TW5864_IND_DATA
, data
);
14 tw_writel(TW5864_IND_CTL
, addr
<< 2 | TW5864_RW
| TW5864_ENABLE
);
17 u8
tw5864_indir_readb(struct tw5864_dev
*dev
, u16 addr
)
21 while (tw_readl(TW5864_IND_CTL
) & BIT(31) && --retries
)
24 dev_err(&dev
->pci
->dev
,
25 "tw_indir_readl() retries exhausted before reading\n");
27 tw_writel(TW5864_IND_CTL
, addr
<< 2 | TW5864_ENABLE
);
30 while (tw_readl(TW5864_IND_CTL
) & BIT(31) && --retries
)
33 dev_err(&dev
->pci
->dev
,
34 "tw_indir_readl() retries exhausted at reading\n");
36 return tw_readl(TW5864_IND_DATA
);