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