bcma: add serial console support
[pandora-kernel.git] / drivers / bcma / driver_chipcommon_pmu.c
index fcc63db..354caee 100644 (file)
@@ -136,3 +136,29 @@ void bcma_pmu_init(struct bcma_drv_cc *cc)
        bcma_pmu_swreg_init(cc);
        bcma_pmu_workarounds(cc);
 }
+
+u32 bcma_pmu_alp_clock(struct bcma_drv_cc *cc)
+{
+       struct bcma_bus *bus = cc->core->bus;
+
+       switch (bus->chipinfo.id) {
+       case 0x4716:
+       case 0x4748:
+       case 47162:
+       case 0x4313:
+       case 0x5357:
+       case 0x4749:
+       case 53572:
+               /* always 20Mhz */
+               return 20000 * 1000;
+       case 0x5356:
+       case 0x5300:
+               /* always 25Mhz */
+               return 25000 * 1000;
+       default:
+               pr_warn("No ALP clock specified for %04X device, "
+                       "pmu rev. %d, using default %d Hz\n",
+                       bus->chipinfo.id, cc->pmu.rev, BCMA_CC_PMU_ALP_CLOCK);
+       }
+       return BCMA_CC_PMU_ALP_CLOCK;
+}