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