aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.6/545-bcma-add-bcma_chipco_alp_clock.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2012-11-24 20:07:25 +0000
committerHauke Mehrtens <hauke@openwrt.org>2012-11-24 20:07:25 +0000
commitafc3c7596af4c3e52d3783732babdfb7b60009b7 (patch)
tree90fc287e9ed841c2ec2972694366a16375b511fd /target/linux/brcm47xx/patches-3.6/545-bcma-add-bcma_chipco_alp_clock.patch
parent30832516624b279e20894f349d57bab19ed5372c (diff)
downloadupstream-afc3c7596af4c3e52d3783732babdfb7b60009b7.tar.gz
upstream-afc3c7596af4c3e52d3783732babdfb7b60009b7.tar.bz2
upstream-afc3c7596af4c3e52d3783732babdfb7b60009b7.zip
brcm47xx: update watchdog driver
This watchdog driver should work with SoC having a PMU. This fixes #11720. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34323 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.6/545-bcma-add-bcma_chipco_alp_clock.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.6/545-bcma-add-bcma_chipco_alp_clock.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.6/545-bcma-add-bcma_chipco_alp_clock.patch b/target/linux/brcm47xx/patches-3.6/545-bcma-add-bcma_chipco_alp_clock.patch
new file mode 100644
index 0000000000..f6f0012a7a
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.6/545-bcma-add-bcma_chipco_alp_clock.patch
@@ -0,0 +1,35 @@
+--- a/drivers/bcma/driver_chipcommon.c
++++ b/drivers/bcma/driver_chipcommon.c
+@@ -4,6 +4,7 @@
+ *
+ * Copyright 2005, Broadcom Corporation
+ * Copyright 2006, 2007, Michael Buesch <m@bues.ch>
++ * Copyright 2012, Hauke Mehrtens <hauke@hauke-m.de>
+ *
+ * Licensed under the GNU/GPL. See COPYING for details.
+ */
+@@ -22,6 +23,14 @@ static inline u32 bcma_cc_write32_masked
+ return value;
+ }
+
++static u32 bcma_chipco_alp_clock(struct bcma_drv_cc *cc)
++{
++ if (cc->capabilities & BCMA_CC_CAP_PMU)
++ return bcma_pmu_alp_clock(cc);
++
++ return 20000000;
++}
++
+ void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc)
+ {
+ if (cc->early_setup_done)
+@@ -180,8 +189,7 @@ void bcma_chipco_serial_init(struct bcma
+ struct bcma_serial_port *ports = cc->serial_ports;
+
+ if (ccrev >= 11 && ccrev != 15) {
+- /* Fixed ALP clock */
+- baud_base = bcma_pmu_alp_clock(cc);
++ baud_base = bcma_chipco_alp_clock(cc);
+ if (ccrev >= 21) {
+ /* Turn off UART clock before switching clocksource. */
+ bcma_cc_write32(cc, BCMA_CC_CORECTL,