Skip to content
Snippets Groups Projects
Commit 8c4dba1a authored by Michal Simek's avatar Michal Simek Committed by Tom Rini
Browse files

microblaze: Fix watchdog initialization


The patch:
"blackfin: Move blackfin watchdog driver out of the blackfin arch folder."
(sha1: e9a389a1)
changed hw_watchdog_init() prototype which didn't match
with Microblaze one.
This patch fixes the driver and Microblaze initialization.

Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 100ea07e
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,6 @@ extern char __text_start[]; ...@@ -16,7 +16,6 @@ extern char __text_start[];
void board_init(void); void board_init(void);
/* Watchdog functions */ /* Watchdog functions */
extern int hw_watchdog_init(void);
extern void hw_watchdog_disable(void); extern void hw_watchdog_disable(void);
#endif /* __ASM_MICROBLAZE_PROCESSOR_H */ #endif /* __ASM_MICROBLAZE_PROCESSOR_H */
...@@ -46,9 +46,6 @@ init_fnc_t *init_sequence[] = { ...@@ -46,9 +46,6 @@ init_fnc_t *init_sequence[] = {
serial_init, serial_init,
console_init_f, console_init_f,
interrupts_init, interrupts_init,
#ifdef CONFIG_XILINX_TB_WATCHDOG
hw_watchdog_init,
#endif
timer_init, timer_init,
NULL, NULL,
}; };
...@@ -97,6 +94,9 @@ void board_init_f(ulong not_used) ...@@ -97,6 +94,9 @@ void board_init_f(ulong not_used)
serial_initialize(); serial_initialize();
#ifdef CONFIG_XILINX_TB_WATCHDOG
hw_watchdog_init();
#endif
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
WATCHDOG_RESET(); WATCHDOG_RESET();
if ((*init_fnc_ptr) () != 0) if ((*init_fnc_ptr) () != 0)
......
...@@ -54,7 +54,7 @@ static void hw_watchdog_isr(void *arg) ...@@ -54,7 +54,7 @@ static void hw_watchdog_isr(void *arg)
hw_watchdog_reset(); hw_watchdog_reset();
} }
int hw_watchdog_init(void) void hw_watchdog_init(void)
{ {
int ret; int ret;
...@@ -65,7 +65,5 @@ int hw_watchdog_init(void) ...@@ -65,7 +65,5 @@ int hw_watchdog_init(void)
ret = install_interrupt_handler(CONFIG_WATCHDOG_IRQ, ret = install_interrupt_handler(CONFIG_WATCHDOG_IRQ,
hw_watchdog_isr, NULL); hw_watchdog_isr, NULL);
if (ret) if (ret)
return 1; puts("Watchdog IRQ registration failed.");
return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment