static void brcms_b_update_slot_timing(struct brcms_hardware *wlc_hw,
bool shortslot)
{
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
regs = wlc_hw->regs;
const struct d11init *inits)
{
int i;
- u8 *base;
- u8 *addr;
+ u8 __iomem *base;
+ u8 __iomem *addr;
u16 size;
u32 value;
BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
- base = (u8 *)wlc_hw->regs;
+ base = (u8 __iomem *)wlc_hw->regs;
for (i = 0; inits[i].addr != cpu_to_le16(0xffff); i++) {
size = le16_to_cpu(inits[i].size);
addr = base + le16_to_cpu(inits[i].addr);
value = le32_to_cpu(inits[i].value);
if (size == 2)
- W_REG((u16 *)addr, value);
+ W_REG((u16 __iomem *)addr, value);
else if (size == 4)
- W_REG((u32 *)addr, value);
+ W_REG((u32 __iomem *)addr, value);
else
break;
}
{
bool morepending = false;
struct brcms_c_info *wlc = wlc_hw->wlc;
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
struct tx_status txstatus, *txs;
u32 s1, s2;
uint n = 0;
{
u32 macintstatus;
struct brcms_hardware *wlc_hw = wlc->hw;
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
bool fatal = false;
struct wiphy *wiphy = wlc->wiphy;
}
}
-static struct dma64regs *
+static struct dma64regs __iomem *
dmareg(struct brcms_hardware *hw, uint direction, uint fifonum)
{
if (direction == DMA_TX)
brcms_b_set_addrmatch(struct brcms_hardware *wlc_hw, int match_reg_offset,
const u8 *addr)
{
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
u16 mac_l;
u16 mac_m;
u16 mac_h;
brcms_b_write_template_ram(struct brcms_hardware *wlc_hw, int offset, int len,
void *buf)
{
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
u32 word;
__le32 word_le;
__be32 word_be;
brcms_c_write_hw_bcntemplate0(struct brcms_hardware *wlc_hw, u16 bcn[],
int len)
{
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
brcms_b_write_template_ram(wlc_hw, T_BCN0_TPL_BASE, (len + 3) & ~3,
bcn);
brcms_c_write_hw_bcntemplate1(struct brcms_hardware *wlc_hw, u16 bcn[],
int len)
{
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
brcms_b_write_template_ram(wlc_hw, T_BCN1_TPL_BASE, (len + 3) & ~3,
bcn);
*/
if ((wlc_hw->sih->chip == BCM43224_CHIP_ID) ||
(wlc_hw->sih->chip == BCM43225_CHIP_ID))
- wlc_hw->regs = (struct d11regs *)
+ wlc_hw->regs = (struct d11regs __iomem *)
ai_setcore(wlc_hw->sih, D11_CORE_ID, 0);
ai_core_reset(wlc_hw->sih, flags, resetbits);
brcms_c_mctrl_reset(wlc_hw);
*/
void brcms_b_corereset(struct brcms_hardware *wlc_hw, u32 flags)
{
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
uint i;
bool fastclk;
u32 resetbits = 0;
*/
static void brcms_b_corerev_fifofixup(struct brcms_hardware *wlc_hw)
{
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
u16 fifo_nu;
u16 txfifo_startblk = TXFIFO_START_BLK, txfifo_endblk;
u16 txfifo_def, txfifo_def1;
void brcms_b_switch_macfreq(struct brcms_hardware *wlc_hw, u8 spurmode)
{
- struct d11regs *regs;
- regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
if ((wlc_hw->sih->chip == BCM43224_CHIP_ID) ||
(wlc_hw->sih->chip == BCM43225_CHIP_ID)) {
static void brcms_c_gpio_init(struct brcms_c_info *wlc)
{
struct brcms_hardware *wlc_hw = wlc->hw;
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
u32 gc, gm;
regs = wlc_hw->regs;
static void brcms_ucode_write(struct brcms_hardware *wlc_hw,
const __le32 ucode[], const size_t nbytes)
{
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
uint i;
uint count;
bool fatal = false;
uint unit;
uint intstatus, idx;
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
struct wiphy *wiphy = wlc_hw->wlc->wiphy;
unit = wlc_hw->unit;
static inline u32 wlc_intstatus(struct brcms_c_info *wlc, bool in_isr)
{
struct brcms_hardware *wlc_hw = wlc->hw;
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
u32 macintstatus;
/* macintstatus includes a DMA interrupt summary bit */
void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc)
{
struct brcms_hardware *wlc_hw = wlc->hw;
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
u32 mc, mi;
struct wiphy *wiphy = wlc->wiphy;
void brcms_c_enable_mac(struct brcms_c_info *wlc)
{
struct brcms_hardware *wlc_hw = wlc->hw;
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
u32 mc, mi;
BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit,
static bool brcms_b_validate_chip_access(struct brcms_hardware *wlc_hw)
{
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
u32 w, val;
struct wiphy *wiphy = wlc_hw->wlc->wiphy;
void brcms_b_core_phypll_ctl(struct brcms_hardware *wlc_hw, bool on)
{
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
u32 tmp;
BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
static u16
brcms_b_read_objmem(struct brcms_hardware *wlc_hw, uint offset, u32 sel)
{
- struct d11regs *regs = wlc_hw->regs;
- u16 *objdata_lo = (u16 *)®s->objdata;
- u16 *objdata_hi = objdata_lo + 1;
+ struct d11regs __iomem *regs = wlc_hw->regs;
+ u16 __iomem *objdata_lo = (u16 __iomem *)®s->objdata;
+ u16 __iomem *objdata_hi = objdata_lo + 1;
u16 v;
W_REG(®s->objaddr, sel | (offset >> 2));
brcms_b_write_objmem(struct brcms_hardware *wlc_hw, uint offset, u16 v,
u32 sel)
{
- struct d11regs *regs = wlc_hw->regs;
- u16 *objdata_lo = (u16 *)®s->objdata;
- u16 *objdata_hi = objdata_lo + 1;
+ struct d11regs __iomem *regs = wlc_hw->regs;
+ u16 __iomem *objdata_lo = (u16 __iomem *)®s->objdata;
+ u16 __iomem *objdata_hi = objdata_lo + 1;
W_REG(®s->objaddr, sel | (offset >> 2));
(void)R_REG(®s->objaddr);
static void brcms_b_coreinit(struct brcms_c_info *wlc)
{
struct brcms_hardware *wlc_hw = wlc->hw;
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
u32 sflags;
uint bcnint_us;
uint i = 0;
void brcms_c_init(struct brcms_c_info *wlc)
{
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
u16 chanspec;
bool mute = false;
struct pci_dev *btparam)
{
struct brcms_hardware *wlc_hw;
- struct d11regs *regs;
+ struct d11regs __iomem *regs;
char *macaddr = NULL;
char *vars;
uint err = 0;
wlc_hw->deviceid = device;
/* set bar0 window to point at D11 core */
- wlc_hw->regs = (struct d11regs *) ai_setcore(wlc_hw->sih, D11_CORE_ID,
- 0);
+ wlc_hw->regs = (struct d11regs __iomem *)
+ ai_setcore(wlc_hw->sih, D11_CORE_ID, 0);
wlc_hw->corerev = ai_corerev(wlc_hw->sih);
regs = wlc_hw->regs;
*/
if ((wlc_hw->sih->chip == BCM43224_CHIP_ID) ||
(wlc_hw->sih->chip == BCM43225_CHIP_ID))
- wlc_hw->regs = (struct d11regs *)
+ wlc_hw->regs = (struct d11regs __iomem *)
ai_setcore(wlc_hw->sih, D11_CORE_ID, 0);
/*
brcms_b_read_tsf(struct brcms_hardware *wlc_hw, u32 *tsf_l_ptr,
u32 *tsf_h_ptr)
{
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
/* read the tsf timer low, then high to get an atomic read */
*tsf_l_ptr = R_REG(®s->tsf_timerlow);
brcms_b_write_hw_bcntemplates(struct brcms_hardware *wlc_hw, u16 bcn[],
int len, bool both)
{
- struct d11regs *regs = wlc_hw->regs;
+ struct d11regs __iomem *regs = wlc_hw->regs;
if (both) {
brcms_c_write_hw_bcntemplate0(wlc_hw, bcn, len);
/* Hardware beaconing for this config */
u16 bcn[BCN_TMPL_LEN / 2];
u32 both_valid = MCMD_BCN0VLD | MCMD_BCN1VLD;
- struct d11regs *regs = wlc->regs;
+ struct d11regs __iomem *regs = wlc->regs;
/* Check if both templates are in use, if so sched. an interrupt
* that will call back into this routine