* [PATCH] MIPS: BCM47XX: fix reboot problem on BCM4705/BCM4785
@ 2014-08-08 22:49 Hauke Mehrtens
2014-08-09 5:30 ` Rafał Miłecki
2014-08-12 22:06 ` Jonas Gorski
0 siblings, 2 replies; 3+ messages in thread
From: Hauke Mehrtens @ 2014-08-08 22:49 UTC (permalink / raw)
To: ralf; +Cc: zajec5, linux-mips, Hauke Mehrtens
This adds some code based on code from the Broadcom GPL tar to fix the
reboot problems on BCM4705/BCM4785. I tried rebooting my device for ~10
times and have never seen a problem. This reverts the changes in the
previous commit and adds the real fix as suggested by Rafał.
Setting bit 22 in Reg 22, sel 4 puts the BIU (Bus Interface Unit) into
async mode.
The previous try was this:
commit 316cad5c1d4daee998cd1f83ccdb437f6f20d45c
Author: Hauke Mehrtens <hauke@hauke-m.de>
Date: Mon Jul 28 23:53:57 2014 +0200
MIPS: BCM47XX: make reboot more relaiable
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/setup.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
index 2b63e7e..2c35af4 100644
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -59,12 +59,21 @@ static void bcm47xx_machine_restart(char *command)
switch (bcm47xx_bus_type) {
#ifdef CONFIG_BCM47XX_SSB
case BCM47XX_BUS_TYPE_SSB:
- ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 3);
+ if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785)
+ write_c0_diag4(1 << 22);
+ ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 1);
+ if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785) {
+ __asm__ __volatile__(
+ ".set\tmips3\n\t"
+ "sync\n\t"
+ "wait\n\t"
+ ".set\tmips0");
+ }
break;
#endif
#ifdef CONFIG_BCM47XX_BCMA
case BCM47XX_BUS_TYPE_BCMA:
- bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 3);
+ bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 1);
break;
#endif
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: fix reboot problem on BCM4705/BCM4785
2014-08-08 22:49 [PATCH] MIPS: BCM47XX: fix reboot problem on BCM4705/BCM4785 Hauke Mehrtens
@ 2014-08-09 5:30 ` Rafał Miłecki
2014-08-12 22:06 ` Jonas Gorski
1 sibling, 0 replies; 3+ messages in thread
From: Rafał Miłecki @ 2014-08-09 5:30 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: Ralf Baechle, linux-mips
On 9 August 2014 00:49, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> This adds some code based on code from the Broadcom GPL tar to fix the
> reboot problems on BCM4705/BCM4785. I tried rebooting my device for ~10
> times and have never seen a problem. This reverts the changes in the
> previous commit and adds the real fix as suggested by Rafał.
>
> Setting bit 22 in Reg 22, sel 4 puts the BIU (Bus Interface Unit) into
> async mode.
Nice work, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: fix reboot problem on BCM4705/BCM4785
2014-08-08 22:49 [PATCH] MIPS: BCM47XX: fix reboot problem on BCM4705/BCM4785 Hauke Mehrtens
2014-08-09 5:30 ` Rafał Miłecki
@ 2014-08-12 22:06 ` Jonas Gorski
1 sibling, 0 replies; 3+ messages in thread
From: Jonas Gorski @ 2014-08-12 22:06 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: Ralf Baechle, Rafał Miłecki, MIPS Mailing List
On Sat, Aug 9, 2014 at 12:49 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> This adds some code based on code from the Broadcom GPL tar to fix the
> reboot problems on BCM4705/BCM4785. I tried rebooting my device for ~10
> times and have never seen a problem. This reverts the changes in the
> previous commit and adds the real fix as suggested by Rafał.
>
> Setting bit 22 in Reg 22, sel 4 puts the BIU (Bus Interface Unit) into
> async mode.
>
> The previous try was this:
> commit 316cad5c1d4daee998cd1f83ccdb437f6f20d45c
> Author: Hauke Mehrtens <hauke@hauke-m.de>
> Date: Mon Jul 28 23:53:57 2014 +0200
>
> MIPS: BCM47XX: make reboot more relaiable
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
> arch/mips/bcm47xx/setup.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
> index 2b63e7e..2c35af4 100644
> --- a/arch/mips/bcm47xx/setup.c
> +++ b/arch/mips/bcm47xx/setup.c
> @@ -59,12 +59,21 @@ static void bcm47xx_machine_restart(char *command)
> switch (bcm47xx_bus_type) {
> #ifdef CONFIG_BCM47XX_SSB
> case BCM47XX_BUS_TYPE_SSB:
> - ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 3);
> + if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785)
> + write_c0_diag4(1 << 22);
> + ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 1);
> + if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785) {
As our buildbot noticed:
arch/mips/bcm47xx/setup.c: In function 'bcm47xx_machine_restart':
arch/mips/bcm47xx/setup.c:63:18: error: 'union bcm47xx_bus' has no
member named 'bcma'
if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785)
^
arch/mips/bcm47xx/setup.c:66:18: error: 'union bcm47xx_bus' has no
member named 'bcma'
if (bcm47xx_bus.bcma.bus.chipinfo.id == 0x4785) {
I guess you meant bcm47xx_bus.ssb.bus.chipinfo.id or so.
Jonas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-12 22:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-08 22:49 [PATCH] MIPS: BCM47XX: fix reboot problem on BCM4705/BCM4785 Hauke Mehrtens
2014-08-09 5:30 ` Rafał Miłecki
2014-08-12 22:06 ` Jonas Gorski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.