Lines Matching refs:core

12 static bool bcma_core_wait_value(struct bcma_device *core, u16 reg, u32 mask,
19 val = bcma_aread32(core, reg);
26 bcma_warn(core->bus, "Timeout waiting for register 0x%04X!\n", reg);
31 bool bcma_core_is_enabled(struct bcma_device *core)
33 if ((bcma_aread32(core, BCMA_IOCTL) & (BCMA_IOCTL_CLK | BCMA_IOCTL_FGC))
36 if (bcma_aread32(core, BCMA_RESET_CTL) & BCMA_RESET_CTL_RESET)
42 void bcma_core_disable(struct bcma_device *core, u32 flags)
44 if (bcma_aread32(core, BCMA_RESET_CTL) & BCMA_RESET_CTL_RESET)
47 bcma_core_wait_value(core, BCMA_RESET_ST, ~0, 0, 300);
49 bcma_awrite32(core, BCMA_RESET_CTL, BCMA_RESET_CTL_RESET);
50 bcma_aread32(core, BCMA_RESET_CTL);
53 bcma_awrite32(core, BCMA_IOCTL, flags);
54 bcma_aread32(core, BCMA_IOCTL);
59 int bcma_core_enable(struct bcma_device *core, u32 flags)
61 bcma_core_disable(core, flags);
63 bcma_awrite32(core, BCMA_IOCTL, (BCMA_IOCTL_CLK | BCMA_IOCTL_FGC | flags));
64 bcma_aread32(core, BCMA_IOCTL);
66 bcma_awrite32(core, BCMA_RESET_CTL, 0);
67 bcma_aread32(core, BCMA_RESET_CTL);
70 bcma_awrite32(core, BCMA_IOCTL, (BCMA_IOCTL_CLK | flags));
71 bcma_aread32(core, BCMA_IOCTL);
78 void bcma_core_set_clockmode(struct bcma_device *core,
83 WARN_ON(core->id.id != BCMA_CORE_CHIPCOMMON &&
84 core->id.id != BCMA_CORE_PCIE &&
85 core->id.id != BCMA_CORE_80211);
89 bcma_set32(core, BCMA_CLKCTLST, BCMA_CLKCTLST_FORCEHT);
92 if (bcma_read32(core, BCMA_CLKCTLST) &
100 bcma_err(core->bus, "HT force timeout\n");
103 bcma_set32(core, BCMA_CLKCTLST, ~BCMA_CLKCTLST_FORCEHT);
109 void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status, bool on)
117 bcma_set32(core, BCMA_CLKCTLST, req);
119 if ((bcma_read32(core, BCMA_CLKCTLST) & status) ==
127 bcma_err(core->bus, "PLL enable timeout\n");
132 * core using it.
134 bcma_mask32(core, BCMA_CLKCTLST, ~req);
135 bcma_read32(core, BCMA_CLKCTLST);
140 u32 bcma_core_dma_translation(struct bcma_device *core)
142 switch (core->bus->hosttype) {
146 if (bcma_aread32(core, BCMA_IOST) & BCMA_IOST_DMA64)
151 bcma_err(core->bus, "DMA translation unknown for host %d\n",
152 core->bus->hosttype);