booke/watchdog: refine and clean up the codes