020-watchdog_support.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. 1. Made the connection between CNS3xxx SOCs(ARCH_CNS3xxx) and MPcore watchdog
  2. since the CNS3xxx SOCs have ARM11 MPcore CPU.
  3. 2. Enable mpcore_watchdog option as module to default configuration at
  4. arch/arm/configs/cns3420vb_defconfig.
  5. Signed-off-by: Tommy Lin <tommy.lin@caviumnetworks.com>
  6. ---
  7. arch/arm/Kconfig | 1 +
  8. arch/arm/configs/cns3420vb_defconfig | 2 ++
  9. arch/arm/mach-cns3xxx/cns3420vb.c | 22 ++++++++++++++++++++++
  10. 3 files changed, 25 insertions(+), 0 deletions(-)
  11. --- a/arch/arm/configs/cns3420vb_defconfig
  12. +++ b/arch/arm/configs/cns3420vb_defconfig
  13. @@ -56,6 +56,8 @@ CONFIG_LEGACY_PTY_COUNT=16
  14. # CONFIG_HW_RANDOM is not set
  15. # CONFIG_HWMON is not set
  16. # CONFIG_VGA_CONSOLE is not set
  17. +CONFIG_WATCHDOG=y
  18. +CONFIG_MPCORE_WATCHDOG=m
  19. # CONFIG_HID_SUPPORT is not set
  20. # CONFIG_USB_SUPPORT is not set
  21. CONFIG_MMC=y
  22. --- a/arch/arm/mach-cns3xxx/cns3420vb.c
  23. +++ b/arch/arm/mach-cns3xxx/cns3420vb.c
  24. @@ -206,10 +206,32 @@ static struct platform_device cns3xxx_us
  25. },
  26. };
  27. +/* Watchdog */
  28. +static struct resource cns3xxx_watchdog_resources[] = {
  29. + [0] = {
  30. + .start = CNS3XXX_TC11MP_TWD_BASE,
  31. + .end = CNS3XXX_TC11MP_TWD_BASE + PAGE_SIZE - 1,
  32. + .flags = IORESOURCE_MEM,
  33. + },
  34. + [1] = {
  35. + .start = IRQ_LOCALWDOG,
  36. + .end = IRQ_LOCALWDOG,
  37. + .flags = IORESOURCE_IRQ,
  38. + }
  39. +};
  40. +
  41. +static struct platform_device cns3xxx_watchdog_device = {
  42. + .name = "mpcore_wdt",
  43. + .id = -1,
  44. + .num_resources = ARRAY_SIZE(cns3xxx_watchdog_resources),
  45. + .resource = cns3xxx_watchdog_resources,
  46. +};
  47. +
  48. /*
  49. * Initialization
  50. */
  51. static struct platform_device *cns3420_pdevs[] __initdata = {
  52. + &cns3xxx_watchdog_device,
  53. &cns3420_nor_pdev,
  54. &cns3xxx_usb_ehci_device,
  55. &cns3xxx_usb_ohci_device,