13 #include <linux/export.h>
61 u32 min_msk = 0, max_msk = 0;
69 bcma_debug(bus,
"PMU resource config unknown or not needed for device 0x%04X\n",
107 static void bcma_pmu_workarounds(
struct bcma_drv_cc *cc)
142 bcma_debug(bus,
"Workarounds unknown or not needed for device 0x%04X\n",
154 bcma_debug(cc->
core->bus,
"Found rev %u PMU (capabilities 0x%08X)\n",
155 cc->
pmu.rev, pmucap);
157 if (cc->
pmu.rev == 1)
164 bcma_pmu_resources_init(cc);
165 bcma_pmu_workarounds(cc);
187 bcma_warn(bus,
"No ALP clock specified for %04X device, pmu rev. %d, using default %d Hz\n",
210 return 133 * 1000000;
226 fc = (p1 * ndiv *
fc) / p2;
229 return (fc / div) * 1000000;
234 u32 tmp, ndiv, p1div, p2div;
251 clock = (25000000 / 4) * ndiv * p2div / p1div;
254 clock = (25000000 / 2) * ndiv * p2div / p1div;
286 bcma_warn(bus,
"No backplane clock specified for %04X device, pmu rev. %d, using default %d Hz\n",
300 if (cc->
pmu.rev >= 5) {
304 return bcma_pmu_clock_bcm4706(cc,
322 return bcma_pmu_get_clockcontrol(cc);
335 u8 phypll_offset = 0;
336 u8 bcm5357_bcm43236_p1div[] = {0x1, 0x5, 0x5};
337 u8 bcm5357_bcm43236_ndiv[] = {0x30, 0xf6, 0xfc};
373 if (spuravoid == 2) {
378 }
else if (spuravoid == 1) {
395 if (spuravoid == 1) {
428 if (spuravoid == 1) {
465 if (spuravoid == 1) {
495 bcma_err(bus,
"Unknown spuravoidance settings for chip 0x%04X, not changing PLL\n",