18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 38c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 48c2ecf20Sopenharmony_ci * for more details. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org> 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include <linux/init.h> 108c2ecf20Sopenharmony_ci#include <linux/kernel.h> 118c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 128c2ecf20Sopenharmony_ci#include <bcm63xx_cpu.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cistatic struct resource wdt_resources[] = { 158c2ecf20Sopenharmony_ci { 168c2ecf20Sopenharmony_ci .start = -1, /* filled at runtime */ 178c2ecf20Sopenharmony_ci .end = -1, /* filled at runtime */ 188c2ecf20Sopenharmony_ci .flags = IORESOURCE_MEM, 198c2ecf20Sopenharmony_ci }, 208c2ecf20Sopenharmony_ci}; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cistatic struct platform_device bcm63xx_wdt_device = { 238c2ecf20Sopenharmony_ci .name = "bcm63xx-wdt", 248c2ecf20Sopenharmony_ci .id = -1, 258c2ecf20Sopenharmony_ci .num_resources = ARRAY_SIZE(wdt_resources), 268c2ecf20Sopenharmony_ci .resource = wdt_resources, 278c2ecf20Sopenharmony_ci}; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ciint __init bcm63xx_wdt_register(void) 308c2ecf20Sopenharmony_ci{ 318c2ecf20Sopenharmony_ci wdt_resources[0].start = bcm63xx_regset_address(RSET_WDT); 328c2ecf20Sopenharmony_ci wdt_resources[0].end = wdt_resources[0].start; 338c2ecf20Sopenharmony_ci wdt_resources[0].end += RSET_WDT_SIZE - 1; 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci return platform_device_register(&bcm63xx_wdt_device); 368c2ecf20Sopenharmony_ci} 378c2ecf20Sopenharmony_ciarch_initcall(bcm63xx_wdt_register); 38