Commit 5e73ad3f authored by Yang Ling's avatar Yang Ling Committed by Ralf Baechle

MIPS: Loongson1: Add watchdog support for Loongson1 board

The patch adds watchdog support for Loongson1 board.
Signed-off-by: default avatarYang Ling <gnaygnil@gmail.com>
Cc: keguang.zhang@gmail.com
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14644/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e31e4505
......@@ -74,6 +74,10 @@ CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_GPIOLIB=y
CONFIG_GPIO_LOONGSON1=y
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_WATCHDOG_SYSFS=y
CONFIG_LOONGSON1_WDT=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_HID_GENERIC=m
CONFIG_USB_HID=m
......
......@@ -75,6 +75,10 @@ CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_GPIOLIB=y
CONFIG_GPIO_LOONGSON1=y
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_WATCHDOG_SYSFS=y
CONFIG_LOONGSON1_WDT=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_HID_GENERIC=m
CONFIG_USB_HID=m
......
......@@ -25,11 +25,12 @@ extern struct platform_device ls1x_gpio0_pdev;
extern struct platform_device ls1x_gpio1_pdev;
extern struct platform_device ls1x_nand_pdev;
extern struct platform_device ls1x_rtc_pdev;
extern struct platform_device ls1x_wdt_pdev;
void __init ls1x_clk_init(void);
void __init ls1x_dma_set_platdata(struct plat_ls1x_dma *pdata);
void __init ls1x_nand_set_platdata(struct plat_ls1x_nand *pdata);
void __init ls1x_serial_set_uartclk(struct platform_device *pdev);
void __init ls1x_rtc_set_extclk(struct platform_device *pdev);
void __init ls1x_serial_set_uartclk(struct platform_device *pdev);
#endif /* __ASM_MACH_LOONGSON32_PLATFORM_H */
......@@ -356,3 +356,19 @@ struct platform_device ls1x_rtc_pdev = {
.name = "ls1x-rtc",
.id = -1,
};
/* Watchdog */
static struct resource ls1x_wdt_resources[] = {
{
.start = LS1X_WDT_BASE,
.end = LS1X_WDT_BASE + SZ_16 - 1,
.flags = IORESOURCE_MEM,
},
};
struct platform_device ls1x_wdt_pdev = {
.name = "ls1x-wdt",
.id = -1,
.num_resources = ARRAY_SIZE(ls1x_wdt_resources),
.resource = ls1x_wdt_resources,
};
......@@ -72,6 +72,7 @@ static struct platform_device *ls1b_platform_devices[] __initdata = {
&ls1x_gpio1_pdev,
&ls1x_nand_pdev,
&ls1x_rtc_pdev,
&ls1x_wdt_pdev,
};
static int __init ls1b_platform_init(void)
......
......@@ -13,6 +13,7 @@ static struct platform_device *ls1c_platform_devices[] __initdata = {
&ls1x_uart_pdev,
&ls1x_eth0_pdev,
&ls1x_rtc_pdev,
&ls1x_wdt_pdev,
};
static int __init ls1c_platform_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment