summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.6/548-bcma-register-watchdog-driver.patch
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-12 22:42:18 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-12 22:42:18 +0000
commit811c287737892fe00307b9e7afb832fd459f6e6a (patch)
tree361f1acf0bb77a59cdddefa0a8427afb494fe932 /target/linux/brcm47xx/patches-3.6/548-bcma-register-watchdog-driver.patch
parent9c0265ae1924e58fd92470bc395ea63f1e9c81cf (diff)
kernel: update bcma and ssb to master-2012-12-11-2 from wireless-testing
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34651 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.6/548-bcma-register-watchdog-driver.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.6/548-bcma-register-watchdog-driver.patch92
1 files changed, 0 insertions, 92 deletions
diff --git a/target/linux/brcm47xx/patches-3.6/548-bcma-register-watchdog-driver.patch b/target/linux/brcm47xx/patches-3.6/548-bcma-register-watchdog-driver.patch
deleted file mode 100644
index 457df36d8..000000000
--- a/target/linux/brcm47xx/patches-3.6/548-bcma-register-watchdog-driver.patch
+++ /dev/null
@@ -1,92 +0,0 @@
---- a/drivers/bcma/bcma_private.h
-+++ b/drivers/bcma/bcma_private.h
-@@ -85,6 +85,8 @@ extern void __exit bcma_host_pci_exit(vo
- /* driver_pci.c */
- u32 bcma_pcie_read(struct bcma_drv_pci *pc, u32 address);
-
-+extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc);
-+
- #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
- bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc);
- void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
---- a/drivers/bcma/driver_chipcommon.c
-+++ b/drivers/bcma/driver_chipcommon.c
-@@ -12,6 +12,7 @@
- #include "bcma_private.h"
- #include <linux/bcm47xx_wdt.h>
- #include <linux/export.h>
-+#include <linux/platform_device.h>
- #include <linux/bcma/bcma.h>
-
- static inline u32 bcma_cc_write32_masked(struct bcma_drv_cc *cc, u16 offset,
-@@ -87,6 +88,27 @@ static int bcma_chipco_watchdog_ticks_pe
- }
- }
-
-+int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc)
-+{
-+ struct bcm47xx_wdt wdt = {};
-+ struct platform_device *pdev;
-+
-+ wdt.driver_data = cc;
-+ wdt.timer_set = bcma_chipco_watchdog_timer_set_wdt;
-+ wdt.timer_set_ms = bcma_chipco_watchdog_timer_set_ms_wdt;
-+ wdt.max_timer_ms = bcma_chipco_watchdog_get_max_timer(cc) / cc->ticks_per_ms;
-+
-+ pdev = platform_device_register_data(NULL, "bcm47xx-wdt",
-+ cc->core->bus->num, &wdt,
-+ sizeof(wdt));
-+ if (IS_ERR(pdev))
-+ return PTR_ERR(pdev);
-+
-+ cc->watchdog = pdev;
-+
-+ return 0;
-+}
-+
- void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc)
- {
- if (cc->early_setup_done)
---- a/drivers/bcma/main.c
-+++ b/drivers/bcma/main.c
-@@ -173,6 +173,12 @@ static int bcma_register_cores(struct bc
- }
- #endif
-
-+ if (bus->hosttype == BCMA_HOSTTYPE_SOC) {
-+ err = bcma_chipco_watchdog_register(&bus->drv_cc);
-+ if (err)
-+ bcma_err(bus, "Error registering watchdog driver\n");
-+ }
-+
- return 0;
- }
-
-@@ -185,6 +191,8 @@ static void bcma_unregister_cores(struct
- if (core->dev_registered)
- device_unregister(&core->dev);
- }
-+ if (bus->hosttype == BCMA_HOSTTYPE_SOC)
-+ platform_device_unregister(bus->drv_cc.watchdog);
- }
-
- int __devinit bcma_bus_register(struct bcma_bus *bus)
---- a/include/linux/bcma/bcma_driver_chipcommon.h
-+++ b/include/linux/bcma/bcma_driver_chipcommon.h
-@@ -4,6 +4,8 @@
- #include <linux/mtd/bcm47xx_sflash.h>
- #include <linux/mtd/bcm47xx_nand.h>
-
-+#include <linux/platform_device.h>
-+
- /** ChipCommon core registers. **/
- #define BCMA_CC_ID 0x0000
- #define BCMA_CC_ID_ID 0x0000FFFF
-@@ -555,6 +557,7 @@ struct bcma_drv_cc {
- /* Lock for GPIO register access. */
- spinlock_t gpio_lock;
- u32 ticks_per_ms;
-+ struct platform_device *watchdog;
- };
-
- /* Register access */