Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[WATCHDOG] omap_wdt.c: sync linux-omap changes

These are changes that have been sitting in linux-omap
and were never sent upstream.

Hopefully, it'll never happen again at least for this
driver.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Felipe Balbi and committed by
Wim Van Sebroeck
2817142f e6bb42e3

+203 -129
+13 -8
arch/arm/plat-omap/devices.c
··· 441 441 442 442 #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) 443 443 444 - #ifdef CONFIG_ARCH_OMAP24XX 445 - #define OMAP_WDT_BASE 0x48022000 446 - #else 447 - #define OMAP_WDT_BASE 0xfffeb000 448 - #endif 449 - 450 444 static struct resource wdt_resources[] = { 451 445 { 452 - .start = OMAP_WDT_BASE, 453 - .end = OMAP_WDT_BASE + 0x4f, 454 446 .flags = IORESOURCE_MEM, 455 447 }, 456 448 }; ··· 456 464 457 465 static void omap_init_wdt(void) 458 466 { 467 + if (cpu_is_omap16xx()) 468 + wdt_resources[0].start = 0xfffeb000; 469 + else if (cpu_is_omap2420()) 470 + wdt_resources[0].start = 0x48022000; /* WDT2 */ 471 + else if (cpu_is_omap2430()) 472 + wdt_resources[0].start = 0x49016000; /* WDT2 */ 473 + else if (cpu_is_omap343x()) 474 + wdt_resources[0].start = 0x48314000; /* WDT2 */ 475 + else 476 + return; 477 + 478 + wdt_resources[0].end = wdt_resources[0].start + 0x4f; 479 + 459 480 (void) platform_device_register(&omap_wdt_device); 460 481 } 461 482 #else
+181 -102
drivers/watchdog/omap_wdt.c
··· 1 1 /* 2 - * linux/drivers/char/watchdog/omap_wdt.c 2 + * omap_wdt.c 3 3 * 4 - * Watchdog driver for the TI OMAP 16xx & 24xx 32KHz (non-secure) watchdog 4 + * Watchdog driver for the TI OMAP 16xx & 24xx/34xx 32KHz (non-secure) watchdog 5 5 * 6 6 * Author: MontaVista Software, Inc. 7 7 * <gdavis@mvista.com> or <source@mvista.com> ··· 47 47 48 48 #include "omap_wdt.h" 49 49 50 + static struct platform_device *omap_wdt_dev; 51 + 50 52 static unsigned timer_margin; 51 53 module_param(timer_margin, uint, 0); 52 54 MODULE_PARM_DESC(timer_margin, "initial watchdog timeout (in seconds)"); 53 55 54 - static int omap_wdt_users; 55 - static struct clk *armwdt_ck; 56 - static struct clk *mpu_wdt_ick; 57 - static struct clk *mpu_wdt_fck; 58 - 59 56 static unsigned int wdt_trgr_pattern = 0x1234; 60 57 static spinlock_t wdt_lock; 61 58 62 - static void omap_wdt_ping(void) 59 + struct omap_wdt_dev { 60 + void __iomem *base; /* physical */ 61 + struct device *dev; 62 + int omap_wdt_users; 63 + struct clk *armwdt_ck; 64 + struct clk *mpu_wdt_ick; 65 + struct clk *mpu_wdt_fck; 66 + struct resource *mem; 67 + struct miscdevice omap_wdt_miscdev; 68 + }; 69 + 70 + static void omap_wdt_ping(struct omap_wdt_dev *wdev) 63 71 { 72 + void __iomem *base = wdev->base; 64 73 /* wait for posted write to complete */ 65 - while ((omap_readl(OMAP_WATCHDOG_WPS)) & 0x08) 74 + while ((omap_readl(base + OMAP_WATCHDOG_WPS)) & 0x08) 66 75 cpu_relax(); 67 76 wdt_trgr_pattern = ~wdt_trgr_pattern; 68 - omap_writel(wdt_trgr_pattern, (OMAP_WATCHDOG_TGR)); 77 + omap_writel(wdt_trgr_pattern, (base + OMAP_WATCHDOG_TGR)); 69 78 /* wait for posted write to complete */ 70 - while ((omap_readl(OMAP_WATCHDOG_WPS)) & 0x08) 79 + while ((omap_readl(base + OMAP_WATCHDOG_WPS)) & 0x08) 71 80 cpu_relax(); 72 81 /* reloaded WCRR from WLDR */ 73 82 } 74 83 75 - static void omap_wdt_enable(void) 84 + static void omap_wdt_enable(struct omap_wdt_dev *wdev) 76 85 { 86 + void __iomem *base; 87 + base = wdev->base; 77 88 /* Sequence to enable the watchdog */ 78 - omap_writel(0xBBBB, OMAP_WATCHDOG_SPR); 79 - while ((omap_readl(OMAP_WATCHDOG_WPS)) & 0x10) 89 + omap_writel(0xBBBB, base + OMAP_WATCHDOG_SPR); 90 + while ((omap_readl(base + OMAP_WATCHDOG_WPS)) & 0x10) 80 91 cpu_relax(); 81 - omap_writel(0x4444, OMAP_WATCHDOG_SPR); 82 - while ((omap_readl(OMAP_WATCHDOG_WPS)) & 0x10) 92 + omap_writel(0x4444, base + OMAP_WATCHDOG_SPR); 93 + while ((omap_readl(base + OMAP_WATCHDOG_WPS)) & 0x10) 83 94 cpu_relax(); 84 95 } 85 96 86 - static void omap_wdt_disable(void) 97 + static void omap_wdt_disable(struct omap_wdt_dev *wdev) 87 98 { 99 + void __iomem *base; 100 + base = wdev->base; 88 101 /* sequence required to disable watchdog */ 89 - omap_writel(0xAAAA, OMAP_WATCHDOG_SPR); /* TIMER_MODE */ 90 - while (omap_readl(OMAP_WATCHDOG_WPS) & 0x10) 102 + omap_writel(0xAAAA, base + OMAP_WATCHDOG_SPR); /* TIMER_MODE */ 103 + while (omap_readl(base + OMAP_WATCHDOG_WPS) & 0x10) 91 104 cpu_relax(); 92 - omap_writel(0x5555, OMAP_WATCHDOG_SPR); /* TIMER_MODE */ 93 - while (omap_readl(OMAP_WATCHDOG_WPS) & 0x10) 105 + omap_writel(0x5555, base + OMAP_WATCHDOG_SPR); /* TIMER_MODE */ 106 + while (omap_readl(base + OMAP_WATCHDOG_WPS) & 0x10) 94 107 cpu_relax(); 95 108 } 96 109 ··· 116 103 timer_margin = new_timeout; 117 104 } 118 105 119 - static void omap_wdt_set_timeout(void) 106 + static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev) 120 107 { 121 108 u32 pre_margin = GET_WLDR_VAL(timer_margin); 109 + void __iomem *base; 110 + base = wdev->base; 122 111 123 112 /* just count up at 32 KHz */ 124 - while (omap_readl(OMAP_WATCHDOG_WPS) & 0x04) 113 + while (omap_readl(base + OMAP_WATCHDOG_WPS) & 0x04) 125 114 cpu_relax(); 126 - omap_writel(pre_margin, OMAP_WATCHDOG_LDR); 127 - while (omap_readl(OMAP_WATCHDOG_WPS) & 0x04) 115 + omap_writel(pre_margin, base + OMAP_WATCHDOG_LDR); 116 + while (omap_readl(base + OMAP_WATCHDOG_WPS) & 0x04) 128 117 cpu_relax(); 129 118 } 130 119 ··· 136 121 137 122 static int omap_wdt_open(struct inode *inode, struct file *file) 138 123 { 139 - if (test_and_set_bit(1, (unsigned long *)&omap_wdt_users)) 124 + struct omap_wdt_dev *wdev; 125 + void __iomem *base; 126 + wdev = platform_get_drvdata(omap_wdt_dev); 127 + base = wdev->base; 128 + if (test_and_set_bit(1, (unsigned long *)&(wdev->omap_wdt_users))) 140 129 return -EBUSY; 141 130 142 131 if (cpu_is_omap16xx()) 143 - clk_enable(armwdt_ck); /* Enable the clock */ 132 + clk_enable(wdev->armwdt_ck); /* Enable the clock */ 144 133 145 - if (cpu_is_omap24xx()) { 146 - clk_enable(mpu_wdt_ick); /* Enable the interface clock */ 147 - clk_enable(mpu_wdt_fck); /* Enable the functional clock */ 134 + if (cpu_is_omap24xx() || cpu_is_omap34xx()) { 135 + clk_enable(wdev->mpu_wdt_ick); /* Enable the interface clock */ 136 + clk_enable(wdev->mpu_wdt_fck); /* Enable the functional clock */ 148 137 } 149 138 150 139 /* initialize prescaler */ 151 - while (omap_readl(OMAP_WATCHDOG_WPS) & 0x01) 140 + while (omap_readl(base + OMAP_WATCHDOG_WPS) & 0x01) 152 141 cpu_relax(); 153 - omap_writel((1 << 5) | (PTV << 2), OMAP_WATCHDOG_CNTRL); 154 - while (omap_readl(OMAP_WATCHDOG_WPS) & 0x01) 142 + omap_writel((1 << 5) | (PTV << 2), base + OMAP_WATCHDOG_CNTRL); 143 + while (omap_readl(base + OMAP_WATCHDOG_WPS) & 0x01) 155 144 cpu_relax(); 156 145 157 - omap_wdt_set_timeout(); 158 - omap_wdt_enable(); 146 + file->private_data = (void *) wdev; 147 + 148 + omap_wdt_set_timeout(wdev); 149 + omap_wdt_enable(wdev); 159 150 return nonseekable_open(inode, file); 160 151 } 161 152 162 153 static int omap_wdt_release(struct inode *inode, struct file *file) 163 154 { 155 + struct omap_wdt_dev *wdev; 156 + wdev = file->private_data; 164 157 /* 165 158 * Shut off the timer unless NOWAYOUT is defined. 166 159 */ 167 160 #ifndef CONFIG_WATCHDOG_NOWAYOUT 168 - omap_wdt_disable(); 169 161 170 - if (cpu_is_omap16xx()) { 171 - clk_disable(armwdt_ck); /* Disable the clock */ 172 - clk_put(armwdt_ck); 173 - armwdt_ck = NULL; 174 - } 162 + omap_wdt_disable(wdev); 175 163 176 - if (cpu_is_omap24xx()) { 177 - clk_disable(mpu_wdt_ick); /* Disable the clock */ 178 - clk_disable(mpu_wdt_fck); /* Disable the clock */ 179 - clk_put(mpu_wdt_ick); 180 - clk_put(mpu_wdt_fck); 181 - mpu_wdt_ick = NULL; 182 - mpu_wdt_fck = NULL; 164 + if (cpu_is_omap16xx()) 165 + clk_disable(wdev->armwdt_ck); /* Disable the clock */ 166 + 167 + if (cpu_is_omap24xx() || cpu_is_omap34xx()) { 168 + clk_disable(wdev->mpu_wdt_ick); /* Disable the clock */ 169 + clk_disable(wdev->mpu_wdt_fck); /* Disable the clock */ 183 170 } 184 171 #else 185 172 printk(KERN_CRIT "omap_wdt: Unexpected close, not stopping!\n"); 186 173 #endif 187 - omap_wdt_users = 0; 174 + wdev->omap_wdt_users = 0; 188 175 return 0; 189 176 } 190 177 191 178 static ssize_t omap_wdt_write(struct file *file, const char __user *data, 192 179 size_t len, loff_t *ppos) 193 180 { 181 + struct omap_wdt_dev *wdev; 182 + wdev = file->private_data; 194 183 /* Refresh LOAD_TIME. */ 195 184 if (len) { 196 185 spin_lock(&wdt_lock); 197 - omap_wdt_ping(); 186 + omap_wdt_ping(wdev); 198 187 spin_unlock(&wdt_lock); 199 188 } 200 189 return len; ··· 207 188 static long omap_wdt_ioctl(struct file *file, unsigned int cmd, 208 189 unsigned long arg) 209 190 { 191 + struct omap_wdt_dev *wdev; 210 192 int new_margin; 211 193 static const struct watchdog_info ident = { 212 194 .identity = "OMAP Watchdog", 213 195 .options = WDIOF_SETTIMEOUT, 214 196 .firmware_version = 0, 215 197 }; 198 + wdev = file->private_data; 216 199 217 200 switch (cmd) { 218 201 case WDIOC_GETSUPPORT: ··· 231 210 (int __user *)arg); 232 211 case WDIOC_KEEPALIVE: 233 212 spin_lock(&wdt_lock); 234 - omap_wdt_ping(); 213 + omap_wdt_ping(wdev); 235 214 spin_unlock(&wdt_lock); 236 215 return 0; 237 216 case WDIOC_SETTIMEOUT: ··· 240 219 omap_wdt_adjust_timeout(new_margin); 241 220 242 221 spin_lock(&wdt_lock); 243 - omap_wdt_disable(); 244 - omap_wdt_set_timeout(); 245 - omap_wdt_enable(); 222 + omap_wdt_disable(wdev); 223 + omap_wdt_set_timeout(wdev); 224 + omap_wdt_enable(wdev); 246 225 247 - omap_wdt_ping(); 226 + omap_wdt_ping(wdev); 248 227 spin_unlock(&wdt_lock); 249 228 /* Fall */ 250 229 case WDIOC_GETTIMEOUT: ··· 262 241 .release = omap_wdt_release, 263 242 }; 264 243 265 - static struct miscdevice omap_wdt_miscdev = { 266 - .minor = WATCHDOG_MINOR, 267 - .name = "watchdog", 268 - .fops = &omap_wdt_fops, 269 - }; 270 244 271 245 static int __init omap_wdt_probe(struct platform_device *pdev) 272 246 { 273 247 struct resource *res, *mem; 274 248 int ret; 249 + struct omap_wdt_dev *wdev; 275 250 276 251 /* reserve static register mappings */ 277 252 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 278 253 if (!res) 279 254 return -ENOENT; 280 255 256 + if (omap_wdt_dev) 257 + return -EBUSY; 258 + 281 259 mem = request_mem_region(res->start, res->end - res->start + 1, 282 260 pdev->name); 283 261 if (mem == NULL) 284 262 return -EBUSY; 285 263 286 - platform_set_drvdata(pdev, mem); 287 - 288 - omap_wdt_users = 0; 264 + wdev = kzalloc(sizeof(struct omap_wdt_dev), GFP_KERNEL); 265 + if (!wdev) { 266 + ret = -ENOMEM; 267 + goto fail; 268 + } 269 + wdev->omap_wdt_users = 0; 270 + wdev->mem = mem; 289 271 290 272 if (cpu_is_omap16xx()) { 291 - armwdt_ck = clk_get(&pdev->dev, "armwdt_ck"); 292 - if (IS_ERR(armwdt_ck)) { 293 - ret = PTR_ERR(armwdt_ck); 294 - armwdt_ck = NULL; 273 + wdev->armwdt_ck = clk_get(&pdev->dev, "armwdt_ck"); 274 + if (IS_ERR(wdev->armwdt_ck)) { 275 + ret = PTR_ERR(wdev->armwdt_ck); 276 + wdev->armwdt_ck = NULL; 295 277 goto fail; 296 278 } 297 279 } 298 280 299 281 if (cpu_is_omap24xx()) { 300 - mpu_wdt_ick = clk_get(&pdev->dev, "mpu_wdt_ick"); 301 - if (IS_ERR(mpu_wdt_ick)) { 302 - ret = PTR_ERR(mpu_wdt_ick); 303 - mpu_wdt_ick = NULL; 282 + wdev->mpu_wdt_ick = clk_get(&pdev->dev, "mpu_wdt_ick"); 283 + if (IS_ERR(wdev->mpu_wdt_ick)) { 284 + ret = PTR_ERR(wdev->mpu_wdt_ick); 285 + wdev->mpu_wdt_ick = NULL; 304 286 goto fail; 305 287 } 306 - mpu_wdt_fck = clk_get(&pdev->dev, "mpu_wdt_fck"); 307 - if (IS_ERR(mpu_wdt_fck)) { 308 - ret = PTR_ERR(mpu_wdt_fck); 309 - mpu_wdt_fck = NULL; 288 + wdev->mpu_wdt_fck = clk_get(&pdev->dev, "mpu_wdt_fck"); 289 + if (IS_ERR(wdev->mpu_wdt_fck)) { 290 + ret = PTR_ERR(wdev->mpu_wdt_fck); 291 + wdev->mpu_wdt_fck = NULL; 310 292 goto fail; 311 293 } 312 294 } 313 295 314 - omap_wdt_disable(); 296 + if (cpu_is_omap34xx()) { 297 + wdev->mpu_wdt_ick = clk_get(&pdev->dev, "wdt2_ick"); 298 + if (IS_ERR(wdev->mpu_wdt_ick)) { 299 + ret = PTR_ERR(wdev->mpu_wdt_ick); 300 + wdev->mpu_wdt_ick = NULL; 301 + goto fail; 302 + } 303 + wdev->mpu_wdt_fck = clk_get(&pdev->dev, "wdt2_fck"); 304 + if (IS_ERR(wdev->mpu_wdt_fck)) { 305 + ret = PTR_ERR(wdev->mpu_wdt_fck); 306 + wdev->mpu_wdt_fck = NULL; 307 + goto fail; 308 + } 309 + } 310 + wdev->base = (void __iomem *) (mem->start); 311 + platform_set_drvdata(pdev, wdev); 312 + 313 + omap_wdt_disable(wdev); 315 314 omap_wdt_adjust_timeout(timer_margin); 316 315 317 - omap_wdt_miscdev.parent = &pdev->dev; 318 - ret = misc_register(&omap_wdt_miscdev); 316 + wdev->omap_wdt_miscdev.parent = &pdev->dev; 317 + wdev->omap_wdt_miscdev.minor = WATCHDOG_MINOR; 318 + wdev->omap_wdt_miscdev.name = "watchdog"; 319 + wdev->omap_wdt_miscdev.fops = &omap_wdt_fops; 320 + 321 + ret = misc_register(&(wdev->omap_wdt_miscdev)); 319 322 if (ret) 320 323 goto fail; 321 324 322 - pr_info("OMAP Watchdog Timer: initial timeout %d sec\n", timer_margin); 325 + pr_info("OMAP Watchdog Timer Rev 0x%02x: initial timeout %d sec\n", 326 + omap_readl(wdev->base + OMAP_WATCHDOG_REV) & 0xFF, 327 + timer_margin); 323 328 324 329 /* autogate OCP interface clock */ 325 - omap_writel(0x01, OMAP_WATCHDOG_SYS_CONFIG); 330 + omap_writel(0x01, wdev->base + OMAP_WATCHDOG_SYS_CONFIG); 331 + 332 + omap_wdt_dev = pdev; 333 + 326 334 return 0; 327 335 328 336 fail: 329 - if (armwdt_ck) 330 - clk_put(armwdt_ck); 331 - if (mpu_wdt_ick) 332 - clk_put(mpu_wdt_ick); 333 - if (mpu_wdt_fck) 334 - clk_put(mpu_wdt_fck); 335 - release_resource(mem); 337 + if (wdev) { 338 + platform_set_drvdata(pdev, NULL); 339 + if (wdev->armwdt_ck) 340 + clk_put(wdev->armwdt_ck); 341 + if (wdev->mpu_wdt_ick) 342 + clk_put(wdev->mpu_wdt_ick); 343 + if (wdev->mpu_wdt_fck) 344 + clk_put(wdev->mpu_wdt_fck); 345 + kfree(wdev); 346 + } 347 + if (mem) { 348 + release_mem_region(res->start, res->end - res->start + 1); 349 + } 336 350 return ret; 337 351 } 338 352 339 353 static void omap_wdt_shutdown(struct platform_device *pdev) 340 354 { 341 - omap_wdt_disable(); 355 + struct omap_wdt_dev *wdev; 356 + wdev = platform_get_drvdata(pdev); 357 + 358 + if (wdev->omap_wdt_users) 359 + omap_wdt_disable(wdev); 342 360 } 343 361 344 362 static int omap_wdt_remove(struct platform_device *pdev) 345 363 { 346 - struct resource *mem = platform_get_drvdata(pdev); 347 - misc_deregister(&omap_wdt_miscdev); 348 - release_resource(mem); 349 - if (armwdt_ck) 350 - clk_put(armwdt_ck); 351 - if (mpu_wdt_ick) 352 - clk_put(mpu_wdt_ick); 353 - if (mpu_wdt_fck) 354 - clk_put(mpu_wdt_fck); 364 + struct omap_wdt_dev *wdev; 365 + wdev = platform_get_drvdata(pdev); 366 + struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 367 + 368 + if (!res) 369 + return -ENOENT; 370 + 371 + misc_deregister(&(wdev->omap_wdt_miscdev)); 372 + release_mem_region(res->start, res->end - res->start + 1); 373 + platform_set_drvdata(pdev, NULL); 374 + if (wdev->armwdt_ck) { 375 + clk_put(wdev->armwdt_ck); 376 + wdev->armwdt_ck = NULL; 377 + } 378 + if (wdev->mpu_wdt_ick) { 379 + clk_put(wdev->mpu_wdt_ick); 380 + wdev->mpu_wdt_ick = NULL; 381 + } 382 + if (wdev->mpu_wdt_fck) { 383 + clk_put(wdev->mpu_wdt_fck); 384 + wdev->mpu_wdt_fck = NULL; 385 + } 386 + kfree(wdev); 387 + omap_wdt_dev = NULL; 355 388 return 0; 356 389 } 357 390 ··· 419 344 420 345 static int omap_wdt_suspend(struct platform_device *pdev, pm_message_t state) 421 346 { 422 - if (omap_wdt_users) 423 - omap_wdt_disable(); 347 + struct omap_wdt_dev *wdev; 348 + wdev = platform_get_drvdata(pdev); 349 + if (wdev->omap_wdt_users) 350 + omap_wdt_disable(wdev); 424 351 return 0; 425 352 } 426 353 427 354 static int omap_wdt_resume(struct platform_device *pdev) 428 355 { 429 - if (omap_wdt_users) { 430 - omap_wdt_enable(); 431 - omap_wdt_ping(); 356 + struct omap_wdt_dev *wdev; 357 + wdev = platform_get_drvdata(pdev); 358 + if (wdev->omap_wdt_users) { 359 + omap_wdt_enable(wdev); 360 + omap_wdt_ping(wdev); 432 361 } 433 362 return 0; 434 363 }
+9 -19
drivers/watchdog/omap_wdt.h
··· 30 30 #ifndef _OMAP_WATCHDOG_H 31 31 #define _OMAP_WATCHDOG_H 32 32 33 - #define OMAP1610_WATCHDOG_BASE 0xfffeb000 34 - #define OMAP2420_WATCHDOG_BASE 0x48022000 /*WDT Timer 2 */ 35 - 36 - #ifdef CONFIG_ARCH_OMAP24XX 37 - #define OMAP_WATCHDOG_BASE OMAP2420_WATCHDOG_BASE 38 - #else 39 - #define OMAP_WATCHDOG_BASE OMAP1610_WATCHDOG_BASE 40 - #define RM_RSTST_WKUP 0 41 - #endif 42 - 43 - #define OMAP_WATCHDOG_REV (OMAP_WATCHDOG_BASE + 0x00) 44 - #define OMAP_WATCHDOG_SYS_CONFIG (OMAP_WATCHDOG_BASE + 0x10) 45 - #define OMAP_WATCHDOG_STATUS (OMAP_WATCHDOG_BASE + 0x14) 46 - #define OMAP_WATCHDOG_CNTRL (OMAP_WATCHDOG_BASE + 0x24) 47 - #define OMAP_WATCHDOG_CRR (OMAP_WATCHDOG_BASE + 0x28) 48 - #define OMAP_WATCHDOG_LDR (OMAP_WATCHDOG_BASE + 0x2c) 49 - #define OMAP_WATCHDOG_TGR (OMAP_WATCHDOG_BASE + 0x30) 50 - #define OMAP_WATCHDOG_WPS (OMAP_WATCHDOG_BASE + 0x34) 51 - #define OMAP_WATCHDOG_SPR (OMAP_WATCHDOG_BASE + 0x48) 33 + #define OMAP_WATCHDOG_REV (0x00) 34 + #define OMAP_WATCHDOG_SYS_CONFIG (0x10) 35 + #define OMAP_WATCHDOG_STATUS (0x14) 36 + #define OMAP_WATCHDOG_CNTRL (0x24) 37 + #define OMAP_WATCHDOG_CRR (0x28) 38 + #define OMAP_WATCHDOG_LDR (0x2c) 39 + #define OMAP_WATCHDOG_TGR (0x30) 40 + #define OMAP_WATCHDOG_WPS (0x34) 41 + #define OMAP_WATCHDOG_SPR (0x48) 52 42 53 43 /* Using the prescaler, the OMAP watchdog could go for many 54 44 * months before firing. These limits work without scaling,