* [PATCH] MIPS: BCM47XX: make reboot more relaiable
@ 2014-07-28 21:53 Hauke Mehrtens
2014-07-30 18:06 ` Rafał Miłecki
0 siblings, 1 reply; 4+ messages in thread
From: Hauke Mehrtens @ 2014-07-28 21:53 UTC (permalink / raw)
To: ralf; +Cc: zajec5, linux-mips, Hauke Mehrtens
The reboot on the BCM47XX SoCs is done, by setting the watchdog counter
to 1 and let it trigger a reboot, when it reaches 0. Some devices with
a BCM4705/BCM4785 SoC do not reboot when the counter is set to 1 and
decreased to 0 by the hardware. It looks like it works more reliable
when we set it to 3. As far as I understand the hardware, this should
not make any difference, but I do not have access to any documentation
for this SoC.
It is still not 100% reliable.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
arch/mips/bcm47xx/setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
index 8c8e7cd..2b63e7e 100644
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -59,12 +59,12 @@ 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, 1);
+ ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 3);
break;
#endif
#ifdef CONFIG_BCM47XX_BCMA
case BCM47XX_BUS_TYPE_BCMA:
- bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 1);
+ bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 3);
break;
#endif
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: make reboot more relaiable
2014-07-28 21:53 [PATCH] MIPS: BCM47XX: make reboot more relaiable Hauke Mehrtens
@ 2014-07-30 18:06 ` Rafał Miłecki
2014-07-30 18:50 ` Hauke Mehrtens
0 siblings, 1 reply; 4+ messages in thread
From: Rafał Miłecki @ 2014-07-30 18:06 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: Ralf Baechle, linux-mips@linux-mips.org
On 28 July 2014 23:53, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> The reboot on the BCM47XX SoCs is done, by setting the watchdog counter
> to 1 and let it trigger a reboot, when it reaches 0. Some devices with
> a BCM4705/BCM4785 SoC do not reboot when the counter is set to 1 and
> decreased to 0 by the hardware. It looks like it works more reliable
> when we set it to 3. As far as I understand the hardware, this should
> not make any difference, but I do not have access to any documentation
> for this SoC.
> It is still not 100% reliable.
Did you see code in hndmips.c of Broadcom SDK? Maybe we need this
magic ASM code they have it there?
if (CHIPID(sih->chip) == BCM4785_CHIP_ID)
MTC0(C0_BROADCOM, 4, (1 << 22));
si_watchdog(sih, 1);
if (CHIPID(sih->chip) == BCM4785_CHIP_ID) {
__asm__ __volatile__(
".set\tmips3\n\t"
"sync\n\t"
"wait\n\t"
".set\tmips0");
}
while (1);
Maybe it'll work better and more reliable?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: make reboot more relaiable
2014-07-30 18:06 ` Rafał Miłecki
@ 2014-07-30 18:50 ` Hauke Mehrtens
2014-07-31 5:14 ` Rafał Miłecki
0 siblings, 1 reply; 4+ messages in thread
From: Hauke Mehrtens @ 2014-07-30 18:50 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: Ralf Baechle, linux-mips@linux-mips.org
On 07/30/2014 08:06 PM, Rafał Miłecki wrote:
> On 28 July 2014 23:53, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> The reboot on the BCM47XX SoCs is done, by setting the watchdog counter
>> to 1 and let it trigger a reboot, when it reaches 0. Some devices with
>> a BCM4705/BCM4785 SoC do not reboot when the counter is set to 1 and
>> decreased to 0 by the hardware. It looks like it works more reliable
>> when we set it to 3. As far as I understand the hardware, this should
>> not make any difference, but I do not have access to any documentation
>> for this SoC.
>> It is still not 100% reliable.
>
> Did you see code in hndmips.c of Broadcom SDK? Maybe we need this
> magic ASM code they have it there?
>
> if (CHIPID(sih->chip) == BCM4785_CHIP_ID)
> MTC0(C0_BROADCOM, 4, (1 << 22));
> si_watchdog(sih, 1);
> if (CHIPID(sih->chip) == BCM4785_CHIP_ID) {
> __asm__ __volatile__(
> ".set\tmips3\n\t"
> "sync\n\t"
> "wait\n\t"
> ".set\tmips0");
> }
> while (1);
>
> Maybe it'll work better and more reliable?
>
This looks interesting, I haven't seen this.
Please drop this patch for now, I will create a new one
Hauke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: BCM47XX: make reboot more relaiable
2014-07-30 18:50 ` Hauke Mehrtens
@ 2014-07-31 5:14 ` Rafał Miłecki
0 siblings, 0 replies; 4+ messages in thread
From: Rafał Miłecki @ 2014-07-31 5:14 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: Ralf Baechle, linux-mips@linux-mips.org
On 30 July 2014 20:50, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> On 07/30/2014 08:06 PM, Rafał Miłecki wrote:
>> Did you see code in hndmips.c of Broadcom SDK? Maybe we need this
>> magic ASM code they have it there?
>>
>> if (CHIPID(sih->chip) == BCM4785_CHIP_ID)
>> MTC0(C0_BROADCOM, 4, (1 << 22));
>> si_watchdog(sih, 1);
>> if (CHIPID(sih->chip) == BCM4785_CHIP_ID) {
>> __asm__ __volatile__(
>> ".set\tmips3\n\t"
>> "sync\n\t"
>> "wait\n\t"
>> ".set\tmips0");
>> }
>> while (1);
>>
>> Maybe it'll work better and more reliable?
>>
> This looks interesting, I haven't seen this.
>
> Please drop this patch for now, I will create a new one
Ralf, I'm afraid you didn't drop this patch.
--
Rafał
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-31 5:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28 21:53 [PATCH] MIPS: BCM47XX: make reboot more relaiable Hauke Mehrtens
2014-07-30 18:06 ` Rafał Miłecki
2014-07-30 18:50 ` Hauke Mehrtens
2014-07-31 5:14 ` Rafał Miłecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox