From ded1e9d727f0e7cb1cf7f243dac2a87974ae048f Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Fri, 23 Aug 2013 08:31:30 +0200 Subject: [PATCH] MIPS: ralink: mt7620: Improve clock frequency detection The current code assumes that the peripheral clock always runs at 40MHz which is not true in all configuration. The peripheral clock can also use the reference clock instead of the fixed 40MHz rate. If the reference clock runs at a different rate, various peripheries are behaving incorrectly. Additionally, the currectly calculated system clock is also wrong. The actual value what the code computes is the rate of the DRAM which can be different from the system clock. Add new helper functions to get the rate of the different clocks and use the correct values for the registered clock devices. Signed-off-by: Gabor Juhos Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5755/ Signed-off-by: Ralf Baechle --- Reading git-format-patch failed