aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-01-23 03:31:06 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-23 03:31:06 -0500
commit51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (patch)
tree9f54936c87764bef75e97395cb56b7d1e0df24c6 /drivers/watchdog
parent4276e47e2d1c85a2477caf0d22b91c4f2377fba8 (diff)
parent6be325719b3e54624397e413efd4b33a997e55a3 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/adx_wdt.c4
-rw-r--r--drivers/watchdog/at32ap700x_wdt.c2
-rw-r--r--drivers/watchdog/davinci_wdt.c2
-rw-r--r--drivers/watchdog/iTCO_wdt.c49
-rw-r--r--drivers/watchdog/mpcore_wdt.c2
-rw-r--r--drivers/watchdog/mv64x60_wdt.c2
-rw-r--r--drivers/watchdog/omap_wdt.c9
-rw-r--r--drivers/watchdog/pnx4008_wdt.c2
-rw-r--r--drivers/watchdog/s3c2410_wdt.c2
-rw-r--r--drivers/watchdog/txx9wdt.c6
10 files changed, 62 insertions, 18 deletions
diff --git a/drivers/watchdog/adx_wdt.c b/drivers/watchdog/adx_wdt.c
index 9c6594473d3b..9d7d155364f8 100644
--- a/drivers/watchdog/adx_wdt.c
+++ b/drivers/watchdog/adx_wdt.c
@@ -242,14 +242,14 @@ static int __devinit adx_wdt_probe(struct platform_device *pdev)
242 } 242 }
243 243
244 res = devm_request_mem_region(&pdev->dev, res->start, 244 res = devm_request_mem_region(&pdev->dev, res->start,
245 res->end - res->start + 1, res->name); 245 resource_size(res), res->name);
246 if (!res) { 246 if (!res) {
247 dev_err(&pdev->dev, "cannot request I/O memory region\n"); 247 dev_err(&pdev->dev, "cannot request I/O memory region\n");
248 return -ENXIO; 248 return -ENXIO;
249 } 249 }
250 250
251 wdt->base = devm_ioremap_nocache(&pdev->dev, res->start, 251 wdt->base = devm_ioremap_nocache(&pdev->dev, res->start,
252 res->end - res->start + 1); 252 resource_size(res));
253 if (!wdt->base) { 253 if (!wdt->base) {
254 dev_err(&pdev->dev, "cannot remap I/O memory region\n"); 254 dev_err(&pdev->dev, "cannot remap I/O memory region\n");
255 return -ENXIO; 255 return -ENXIO;
diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c
index e8ae638e5804..037847923dcb 100644
--- a/drivers/watchdog/at32ap700x_wdt.c
+++ b/drivers/watchdog/at32ap700x_wdt.c
@@ -326,7 +326,7 @@ static int __init at32_wdt_probe(struct platform_device *pdev)
326 return -ENOMEM; 326 return -ENOMEM;
327 } 327 }
328 328
329 wdt->regs = ioremap(regs->start, regs->end - regs->start + 1); 329 wdt->regs = ioremap(regs->start, resource_size(regs));
330 if (!wdt->regs) { 330 if (!wdt->regs) {
331 ret = -ENOMEM; 331 ret = -ENOMEM;
332 dev_dbg(&pdev->dev, "could not map I/O memory\n"); 332 dev_dbg(&pdev->dev, "could not map I/O memory\n");
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 9d7520fa9e9c..887136de1857 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -221,7 +221,7 @@ static int __devinit davinci_wdt_probe(struct platform_device *pdev)
221 return -ENOENT; 221 return -ENOENT;
222 } 222 }
223 223
224 size = res->end - res->start + 1; 224 size = resource_size(res);
225 wdt_mem = request_mem_region(res->start, size, pdev->name); 225 wdt_mem = request_mem_region(res->start, size, pdev->name);
226 226
227 if (wdt_mem == NULL) { 227 if (wdt_mem == NULL) {
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index e44fbb31bc6f..4bdb7f1a9077 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -29,7 +29,9 @@
29 * document number 313056-003, 313057-017: 82801H (ICH8) 29 * document number 313056-003, 313057-017: 82801H (ICH8)
30 * document number 316972-004, 316973-012: 82801I (ICH9) 30 * document number 316972-004, 316973-012: 82801I (ICH9)
31 * document number 319973-002, 319974-002: 82801J (ICH10) 31 * document number 319973-002, 319974-002: 82801J (ICH10)
32 * document number 322169-001, 322170-001: 5 Series, 3400 Series (PCH) 32 * document number 322169-001, 322170-003: 5 Series, 3400 Series (PCH)
33 * document number 320066-003, 320257-008: EP80597 (IICH)
34 * document number TBD : Cougar Point (CPT)
33 */ 35 */
34 36
35/* 37/*
@@ -99,7 +101,22 @@ enum iTCO_chipsets {
99 TCO_ICH10DO, /* ICH10DO */ 101 TCO_ICH10DO, /* ICH10DO */
100 TCO_PCH, /* PCH Desktop Full Featured */ 102 TCO_PCH, /* PCH Desktop Full Featured */
101 TCO_PCHM, /* PCH Mobile Full Featured */ 103 TCO_PCHM, /* PCH Mobile Full Featured */
104 TCO_P55, /* P55 */
105 TCO_PM55, /* PM55 */
106 TCO_H55, /* H55 */
107 TCO_QM57, /* QM57 */
108 TCO_H57, /* H57 */
109 TCO_HM55, /* HM55 */
110 TCO_Q57, /* Q57 */
111 TCO_HM57, /* HM57 */
102 TCO_PCHMSFF, /* PCH Mobile SFF Full Featured */ 112 TCO_PCHMSFF, /* PCH Mobile SFF Full Featured */
113 TCO_QS57, /* QS57 */
114 TCO_3400, /* 3400 */
115 TCO_3420, /* 3420 */
116 TCO_3450, /* 3450 */
117 TCO_EP80579, /* EP80579 */
118 TCO_CPTD, /* CPT Desktop */
119 TCO_CPTM, /* CPT Mobile */
103}; 120};
104 121
105static struct { 122static struct {
@@ -142,7 +159,22 @@ static struct {
142 {"ICH10DO", 2}, 159 {"ICH10DO", 2},
143 {"PCH Desktop Full Featured", 2}, 160 {"PCH Desktop Full Featured", 2},
144 {"PCH Mobile Full Featured", 2}, 161 {"PCH Mobile Full Featured", 2},
162 {"P55", 2},
163 {"PM55", 2},
164 {"H55", 2},
165 {"QM57", 2},
166 {"H57", 2},
167 {"HM55", 2},
168 {"Q57", 2},
169 {"HM57", 2},
145 {"PCH Mobile SFF Full Featured", 2}, 170 {"PCH Mobile SFF Full Featured", 2},
171 {"QS57", 2},
172 {"3400", 2},
173 {"3420", 2},
174 {"3450", 2},
175 {"EP80579", 2},
176 {"CPT Desktop", 2},
177 {"CPT Mobile", 2},
146 {NULL, 0} 178 {NULL, 0}
147}; 179};
148 180
@@ -213,7 +245,22 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = {
213 { ITCO_PCI_DEVICE(0x3a14, TCO_ICH10DO)}, 245 { ITCO_PCI_DEVICE(0x3a14, TCO_ICH10DO)},
214 { ITCO_PCI_DEVICE(0x3b00, TCO_PCH)}, 246 { ITCO_PCI_DEVICE(0x3b00, TCO_PCH)},
215 { ITCO_PCI_DEVICE(0x3b01, TCO_PCHM)}, 247 { ITCO_PCI_DEVICE(0x3b01, TCO_PCHM)},
248 { ITCO_PCI_DEVICE(0x3b02, TCO_P55)},
249 { ITCO_PCI_DEVICE(0x3b03, TCO_PM55)},
250 { ITCO_PCI_DEVICE(0x3b06, TCO_H55)},
251 { ITCO_PCI_DEVICE(0x3b07, TCO_QM57)},
252 { ITCO_PCI_DEVICE(0x3b08, TCO_H57)},
253 { ITCO_PCI_DEVICE(0x3b09, TCO_HM55)},
254 { ITCO_PCI_DEVICE(0x3b0a, TCO_Q57)},
255 { ITCO_PCI_DEVICE(0x3b0b, TCO_HM57)},
216 { ITCO_PCI_DEVICE(0x3b0d, TCO_PCHMSFF)}, 256 { ITCO_PCI_DEVICE(0x3b0d, TCO_PCHMSFF)},
257 { ITCO_PCI_DEVICE(0x3b0f, TCO_QS57)},
258 { ITCO_PCI_DEVICE(0x3b12, TCO_3400)},
259 { ITCO_PCI_DEVICE(0x3b14, TCO_3420)},
260 { ITCO_PCI_DEVICE(0x3b16, TCO_3450)},
261 { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)},
262 { ITCO_PCI_DEVICE(0x1c42, TCO_CPTD)},
263 { ITCO_PCI_DEVICE(0x1c43, TCO_CPTM)},
217 { 0, }, /* End of list */ 264 { 0, }, /* End of list */
218}; 265};
219MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); 266MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl);
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index 83fa34b214b4..a2dc07c2ed49 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -350,7 +350,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev)
350 ret = -ENXIO; 350 ret = -ENXIO;
351 goto err_free; 351 goto err_free;
352 } 352 }
353 wdt->base = ioremap(res->start, res->end - res->start + 1); 353 wdt->base = ioremap(res->start, resource_size(res));
354 if (!wdt->base) { 354 if (!wdt->base) {
355 ret = -ENOMEM; 355 ret = -ENOMEM;
356 goto err_free; 356 goto err_free;
diff --git a/drivers/watchdog/mv64x60_wdt.c b/drivers/watchdog/mv64x60_wdt.c
index acf589dc057c..a51dbe4c43da 100644
--- a/drivers/watchdog/mv64x60_wdt.c
+++ b/drivers/watchdog/mv64x60_wdt.c
@@ -275,7 +275,7 @@ static int __devinit mv64x60_wdt_probe(struct platform_device *dev)
275 if (!r) 275 if (!r)
276 return -ENODEV; 276 return -ENODEV;
277 277
278 mv64x60_wdt_regs = ioremap(r->start, r->end - r->start + 1); 278 mv64x60_wdt_regs = ioremap(r->start, resource_size(r));
279 if (mv64x60_wdt_regs == NULL) 279 if (mv64x60_wdt_regs == NULL)
280 return -ENOMEM; 280 return -ENOMEM;
281 281
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 429ea99eaee5..c6aaf2845741 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -277,8 +277,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
277 goto err_busy; 277 goto err_busy;
278 } 278 }
279 279
280 mem = request_mem_region(res->start, res->end - res->start + 1, 280 mem = request_mem_region(res->start, resource_size(res), pdev->name);
281 pdev->name);
282 if (!mem) { 281 if (!mem) {
283 ret = -EBUSY; 282 ret = -EBUSY;
284 goto err_busy; 283 goto err_busy;
@@ -306,7 +305,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
306 goto err_clk; 305 goto err_clk;
307 } 306 }
308 307
309 wdev->base = ioremap(res->start, res->end - res->start + 1); 308 wdev->base = ioremap(res->start, resource_size(res));
310 if (!wdev->base) { 309 if (!wdev->base) {
311 ret = -ENOMEM; 310 ret = -ENOMEM;
312 goto err_ioremap; 311 goto err_ioremap;
@@ -358,7 +357,7 @@ err_clk:
358 kfree(wdev); 357 kfree(wdev);
359 358
360err_kzalloc: 359err_kzalloc:
361 release_mem_region(res->start, res->end - res->start + 1); 360 release_mem_region(res->start, resource_size(res));
362 361
363err_busy: 362err_busy:
364err_get_resource: 363err_get_resource:
@@ -383,7 +382,7 @@ static int __devexit omap_wdt_remove(struct platform_device *pdev)
383 return -ENOENT; 382 return -ENOENT;
384 383
385 misc_deregister(&(wdev->omap_wdt_miscdev)); 384 misc_deregister(&(wdev->omap_wdt_miscdev));
386 release_mem_region(res->start, res->end - res->start + 1); 385 release_mem_region(res->start, resource_size(res));
387 platform_set_drvdata(pdev, NULL); 386 platform_set_drvdata(pdev, NULL);
388 387
389 clk_put(wdev->ick); 388 clk_put(wdev->ick);
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 4d227b152001..430a5848a9a5 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -264,7 +264,7 @@ static int __devinit pnx4008_wdt_probe(struct platform_device *pdev)
264 return -ENOENT; 264 return -ENOENT;
265 } 265 }
266 266
267 size = res->end - res->start + 1; 267 size = resource_size(res);
268 wdt_mem = request_mem_region(res->start, size, pdev->name); 268 wdt_mem = request_mem_region(res->start, size, pdev->name);
269 269
270 if (wdt_mem == NULL) { 270 if (wdt_mem == NULL) {
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 85b93e15d011..8760a26ab2a3 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -421,7 +421,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev)
421 return -ENOENT; 421 return -ENOENT;
422 } 422 }
423 423
424 size = (res->end - res->start) + 1; 424 size = resource_size(res);
425 wdt_mem = request_mem_region(res->start, size, pdev->name); 425 wdt_mem = request_mem_region(res->start, size, pdev->name);
426 if (wdt_mem == NULL) { 426 if (wdt_mem == NULL) {
427 dev_err(dev, "failed to get memory region\n"); 427 dev_err(dev, "failed to get memory region\n");
diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c
index 6adab77fbbb0..d635566e9307 100644
--- a/drivers/watchdog/txx9wdt.c
+++ b/drivers/watchdog/txx9wdt.c
@@ -214,12 +214,10 @@ static int __init txx9wdt_probe(struct platform_device *dev)
214 res = platform_get_resource(dev, IORESOURCE_MEM, 0); 214 res = platform_get_resource(dev, IORESOURCE_MEM, 0);
215 if (!res) 215 if (!res)
216 goto exit_busy; 216 goto exit_busy;
217 if (!devm_request_mem_region(&dev->dev, 217 if (!devm_request_mem_region(&dev->dev, res->start, resource_size(res),
218 res->start, res->end - res->start + 1,
219 "txx9wdt")) 218 "txx9wdt"))
220 goto exit_busy; 219 goto exit_busy;
221 txx9wdt_reg = devm_ioremap(&dev->dev, 220 txx9wdt_reg = devm_ioremap(&dev->dev, res->start, resource_size(res));
222 res->start, res->end - res->start + 1);
223 if (!txx9wdt_reg) 221 if (!txx9wdt_reg)
224 goto exit_busy; 222 goto exit_busy;
225 223