From: Rafał Miłecki Date: Wed, 11 Feb 2015 14:41:07 +0000 (+0000) Subject: bcm53xx: use bcm47xx_wdt for restarting device X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=b5310e180da5f1f3dd15fa994041cbdf9ee7af02;p=openwrt%2Fstaging%2Fwigyori.git bcm53xx: use bcm47xx_wdt for restarting device Signed-off-by: Rafał Miłecki SVN-Revision: 44408 --- diff --git a/target/linux/bcm53xx/config-3.18 b/target/linux/bcm53xx/config-3.18 index bf2b8fe818..e55d898ee8 100644 --- a/target/linux/bcm53xx/config-3.18 +++ b/target/linux/bcm53xx/config-3.18 @@ -52,7 +52,7 @@ CONFIG_B53=y CONFIG_B53_SRAB_DRIVER=y CONFIG_BCM47XX_NVRAM=y CONFIG_BCM47XX_SPROM=y -# CONFIG_BCM47XX_WDT is not set +CONFIG_BCM47XX_WDT=y CONFIG_BCMA=y CONFIG_BCMA_BLOCKIO=y CONFIG_BCMA_DEBUG=y @@ -276,6 +276,7 @@ CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_VECTORS_BASE=0xffff0000 # CONFIG_VFP is not set +CONFIG_WATCHDOG_CORE=y # CONFIG_XEN is not set CONFIG_XPS=y CONFIG_XZ_DEC_ARM=y diff --git a/target/linux/bcm53xx/patches-3.18/131-ARM-BCM5301X-add-restart-support.patch b/target/linux/bcm53xx/patches-3.18/131-ARM-BCM5301X-add-restart-support.patch deleted file mode 100644 index a977116a53..0000000000 --- a/target/linux/bcm53xx/patches-3.18/131-ARM-BCM5301X-add-restart-support.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 28b11a8b1258214b3b5d58bb6e3bbcb0fc9fd4fe Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 31 Jul 2014 07:28:05 +0200 -Subject: [PATCH] ARM: BCM5301X: add restart support -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Rafał Miłecki ---- - arch/arm/mach-bcm/bcm_5301x.c | 31 +++++++++++++++++++++++++++++++ - 1 file changed, 31 insertions(+) - ---- a/arch/arm/mach-bcm/bcm_5301x.c -+++ b/arch/arm/mach-bcm/bcm_5301x.c -@@ -12,9 +12,26 @@ - #include - #include - -+#include - - static bool first_fault = true; - -+static struct bcma_bus *bcm5301x_get_bcma_bus(void) -+{ -+ struct device_node *np; -+ struct platform_device *pdev; -+ -+ np = of_find_compatible_node(NULL, NULL, "brcm,bus-axi"); -+ if (!np) -+ return NULL; -+ -+ pdev = of_find_device_by_node(np); -+ if (!pdev) -+ return NULL; -+ -+ return platform_get_drvdata(pdev); -+} -+ - static int bcm5301x_abort_handler(unsigned long addr, unsigned int fsr, - struct pt_regs *regs) - { -@@ -43,6 +60,19 @@ static void __init bcm5301x_init_early(v - "imprecise external abort"); - } - -+static void bcm5301x_restart(enum reboot_mode mode, const char *cmd) -+{ -+ struct bcma_bus *bus = bcm5301x_get_bcma_bus(); -+ -+ if (bus) -+ bcma_chipco_watchdog_timer_set(&bus->drv_cc, 1); -+ else -+ pr_warn("Unable to access bcma bus\n"); -+ -+ while (1) -+ ; -+} -+ - static const char __initconst *bcm5301x_dt_compat[] = { - "brcm,bcm4708", - NULL, -@@ -52,5 +82,6 @@ DT_MACHINE_START(BCM5301X, "BCM5301X") - .l2c_aux_val = 0, - .l2c_aux_mask = ~0, - .init_early = bcm5301x_init_early, -+ .restart = bcm5301x_restart, - .dt_compat = bcm5301x_dt_compat, - MACHINE_END