111-arm-gemini-add-watchdog-device.patch 958 B

123456789101112131415161718192021222324252627282930313233
  1. --- a/arch/arm/mach-gemini/devices.c
  2. +++ b/arch/arm/mach-gemini/devices.c
  3. @@ -116,3 +116,20 @@ int __init platform_register_rtc(void)
  4. return platform_device_register(&gemini_rtc_device);
  5. }
  6. +static struct resource wdt_resource = {
  7. + .start = GEMINI_WAQTCHDOG_BASE,
  8. + .end = GEMINI_WAQTCHDOG_BASE + 0x18,
  9. + .flags = IORESOURCE_MEM,
  10. +};
  11. +
  12. +static struct platform_device wdt_device = {
  13. + .name = "gemini-wdt",
  14. + .id = 0,
  15. + .resource = &wdt_resource,
  16. + .num_resources = 1,
  17. +};
  18. +
  19. +int __init platform_register_watchdog(void)
  20. +{
  21. + return platform_device_register(&wdt_device);
  22. +}
  23. --- a/arch/arm/mach-gemini/common.h
  24. +++ b/arch/arm/mach-gemini/common.h
  25. @@ -27,6 +27,7 @@ extern int platform_register_uart(void);
  26. extern int platform_register_pflash(unsigned int size,
  27. struct mtd_partition *parts,
  28. unsigned int nr_parts);
  29. +extern int platform_register_watchdog(void);
  30. extern void gemini_restart(enum reboot_mode mode, const char *cmd);