The patch titled ssb-chipcommon: Add function to get processor clock has been added to the -mm tree. Its filename is ssb-chipcommon-add-function-to-get-processor-clock.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ssb-chipcommon: Add function to get processor clock From: Aurelien Jarno <aurelien@xxxxxxxxxxx> Add a new function to get the processor clock. It originally comes from the OpenWrt patches. Cc: Felix Fietkau <nbd@xxxxxxxxxxx> Signed-off-by: Aurelien Jarno <aurelien@xxxxxxxxxxx> Signed-off-by: Michael Buesch <mb@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/ssb/driver_chipcommon.c | 24 ++++++++++++++++++++ include/linux/ssb/ssb_driver_chipcommon.h | 2 + 2 files changed, 26 insertions(+) diff -puN drivers/ssb/driver_chipcommon.c~ssb-chipcommon-add-function-to-get-processor-clock drivers/ssb/driver_chipcommon.c --- a/drivers/ssb/driver_chipcommon.c~ssb-chipcommon-add-function-to-get-processor-clock +++ a/drivers/ssb/driver_chipcommon.c @@ -256,6 +256,30 @@ void ssb_chipco_resume(struct ssb_chipco ssb_chipco_set_clockmode(cc, SSB_CLKMODE_FAST); } +/* Get the processor clock */ +void ssb_chipco_get_clockcpu(struct ssb_chipcommon *cc, + u32 *plltype, u32 *n, u32 *m) +{ + *n = chipco_read32(cc, SSB_CHIPCO_CLOCK_N); + *plltype = (cc->capabilities & SSB_CHIPCO_CAP_PLLT); + switch (*plltype) { + case SSB_PLLTYPE_2: + case SSB_PLLTYPE_4: + case SSB_PLLTYPE_6: + case SSB_PLLTYPE_7: + *m = chipco_read32(cc, SSB_CHIPCO_CLOCK_MIPS); + break; + case SSB_PLLTYPE_3: + /* 5350 uses m2 to control mips */ + *m = chipco_read32(cc, SSB_CHIPCO_CLOCK_M2); + break; + default: + *m = chipco_read32(cc, SSB_CHIPCO_CLOCK_SB); + break; + } +} + +/* Get the bus clock */ void ssb_chipco_get_clockcontrol(struct ssb_chipcommon *cc, u32 *plltype, u32 *n, u32 *m) { diff -puN include/linux/ssb/ssb_driver_chipcommon.h~ssb-chipcommon-add-function-to-get-processor-clock include/linux/ssb/ssb_driver_chipcommon.h --- a/include/linux/ssb/ssb_driver_chipcommon.h~ssb-chipcommon-add-function-to-get-processor-clock +++ a/include/linux/ssb/ssb_driver_chipcommon.h @@ -363,6 +363,8 @@ extern void ssb_chipcommon_init(struct s extern void ssb_chipco_suspend(struct ssb_chipcommon *cc, pm_message_t state); extern void ssb_chipco_resume(struct ssb_chipcommon *cc); +extern void ssb_chipco_get_clockcpu(struct ssb_chipcommon *cc, + u32 *plltype, u32 *n, u32 *m); extern void ssb_chipco_get_clockcontrol(struct ssb_chipcommon *cc, u32 *plltype, u32 *n, u32 *m); extern void ssb_chipco_timing_init(struct ssb_chipcommon *cc, _ Patches currently in -mm which might be from aurelien@xxxxxxxxxxx are origin.patch git-kvm.patch git-wireless.patch ssb-compile-fix.patch watchdog-support-3.patch ssb-chipcommon-add-function-to-get-processor-clock.patch ssb-chipcommon-add-function-to-get-processor-clock-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html