system.c 458 B

12345678910111213141516171819202122232425
  1. /*
  2. * System functions for Telechips TCCxxxx SoCs
  3. *
  4. * Copyright (C) Hans J. Koch <hjk@linutronix.de>
  5. *
  6. * Licensed under the terms of the GPL v2.
  7. *
  8. */
  9. #include <linux/io.h>
  10. #include <mach/tcc8k-regs.h>
  11. /* System reboot */
  12. void plat_tcc_reboot(void)
  13. {
  14. /* Make sure clocks are on */
  15. __raw_writel(0xffffffff, CKC_BASE + BCLKCTR0_OFFS);
  16. /* Enable watchdog reset */
  17. __raw_writel(0x49, TIMER_BASE + TWDCFG_OFFS);
  18. /* Wait for reset */
  19. while(1)
  20. ;
  21. }