[U-Boot-Users] [PATCH] Nios: WATCHDOG preparation

Hi all,
attached patch includes the WATCHDOG_RESET() macro at some more points in U-Boot so I can use it in my upcoming new Nios board support. Please, merge it with current CVS tree -- thanks.
-- Best regards, Stephan Linz

Dear Stephan,,
in message 0402161009090A.00467@pcj86 you wrote:
Dear Stephan,,
attached patch includes the WATCHDOG_RESET() macro at some more points in U-Boot so I can use it in my upcoming new Nios board support. Please, merge it with current CVS tree -- thanks.
I would like to ask you to modify your patch.
@@ -1174,7 +1175,11 @@ static void smc_write_phy_register (byte #ifndef CONFIG_SMC91111_EXT_PHY static void smc_wait_ms(unsigned int ms) {
- /* B E W A R N E D :
* DON'T EXCEED YOUR WATCHDOG TIMOUT WITH ARGUMENT 'ms' */
- WATCHDOG_RESET (); udelay(ms*1000);
- WATCHDOG_RESET ();
This should never be necessary. The udelay() function itself is expected to trigger the waitchdog as necessary.
If this is not the case on NIOS, then please fix this first. It might make some more of your modifications redundand, too.
Best regards,
Wolfgang Denk

--snip--
@@ -1174,7 +1175,11 @@ static void smc_write_phy_register (byte #ifndef CONFIG_SMC91111_EXT_PHY static void smc_wait_ms(unsigned int ms) {
- /* B E W A R N E D :
* DON'T EXCEED YOUR WATCHDOG TIMOUT WITH ARGUMENT 'ms' */
- WATCHDOG_RESET (); udelay(ms*1000);
- WATCHDOG_RESET ();
This should never be necessary. The udelay() function itself is expected to trigger the waitchdog as necessary.
If this is not the case on NIOS, then please fix this first. It might make some more of your modifications redundand, too.
Hu, you're right. It isn't the case on NIOS. OK, I'll fix it up and try out this afternoon. You'll get a new patch tomorrow.
Best regards, Stephan Linz

Am Montag, 16. Februar 2004 11:07 schrieb Stephan Linz:
--snip--
@@ -1174,7 +1175,11 @@ static void smc_write_phy_register (byte #ifndef CONFIG_SMC91111_EXT_PHY static void smc_wait_ms(unsigned int ms) {
- /* B E W A R N E D :
* DON'T EXCEED YOUR WATCHDOG TIMOUT WITH ARGUMENT 'ms' */
- WATCHDOG_RESET (); udelay(ms*1000);
- WATCHDOG_RESET ();
This should never be necessary. The udelay() function itself is expected to trigger the waitchdog as necessary.
If this is not the case on NIOS, then please fix this first. It might make some more of your modifications redundand, too.
Hu, you're right. It isn't the case on NIOS. OK, I'll fix it up and try out this afternoon. You'll get a new patch tomorrow.
OK, here is the correct patch. Sorry for the delay :-)
Note: In my opinion this is the first stage. In second stage we should move the WATCHDOG_RESET macro from within udelay() C function into the underlayed assembly function dly_clks(). I've tried it out but without success, so I try again.
Best regards, Stephan Linz

In message 0402171834420D.00467@pcj86 you wrote:
This should never be necessary. The udelay() function itself is expected to trigger the waitchdog as necessary.
...
OK, here is the correct patch. Sorry for the delay :-)
Added.
Note: In my opinion this is the first stage. In second stage we should move the WATCHDOG_RESET macro from within udelay() C function into the underlayed assembly function dly_clks(). I've tried it out but without success, so I try again.
Umm... I think we can keep this in udelay().
Best regards,
Wolfgang Denk
participants (2)
-
Stephan Linz
-
Wolfgang Denk