diff options
Diffstat (limited to 'drivers/rtc/rtc-s3c.c')
| -rw-r--r-- | drivers/rtc/rtc-s3c.c | 26 | 
1 files changed, 12 insertions, 14 deletions
| diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 404651464d45..fb994e9ddc15 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
| @@ -115,7 +115,7 @@ static int s3c_rtc_setaie(struct device *dev, unsigned int enabled) | |||
| 115 | { | 115 | { | 
| 116 | unsigned int tmp; | 116 | unsigned int tmp; | 
| 117 | 117 | ||
| 118 | pr_debug("%s: aie=%d\n", __func__, enabled); | 118 | dev_dbg(dev, "%s: aie=%d\n", __func__, enabled); | 
| 119 | 119 | ||
| 120 | clk_enable(rtc_clk); | 120 | clk_enable(rtc_clk); | 
| 121 | tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN; | 121 | tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN; | 
| @@ -203,7 +203,7 @@ static int s3c_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) | |||
| 203 | 203 | ||
| 204 | rtc_tm->tm_year += 100; | 204 | rtc_tm->tm_year += 100; | 
| 205 | 205 | ||
| 206 | pr_debug("read time %04d.%02d.%02d %02d:%02d:%02d\n", | 206 | dev_dbg(dev, "read time %04d.%02d.%02d %02d:%02d:%02d\n", | 
| 207 | 1900 + rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, | 207 | 1900 + rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, | 
| 208 | rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); | 208 | rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); | 
| 209 | 209 | ||
| @@ -218,7 +218,7 @@ static int s3c_rtc_settime(struct device *dev, struct rtc_time *tm) | |||
| 218 | void __iomem *base = s3c_rtc_base; | 218 | void __iomem *base = s3c_rtc_base; | 
| 219 | int year = tm->tm_year - 100; | 219 | int year = tm->tm_year - 100; | 
| 220 | 220 | ||
| 221 | pr_debug("set time %04d.%02d.%02d %02d:%02d:%02d\n", | 221 | dev_dbg(dev, "set time %04d.%02d.%02d %02d:%02d:%02d\n", | 
| 222 | 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, | 222 | 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, | 
| 223 | tm->tm_hour, tm->tm_min, tm->tm_sec); | 223 | tm->tm_hour, tm->tm_min, tm->tm_sec); | 
| 224 | 224 | ||
| @@ -259,7 +259,7 @@ static int s3c_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
| 259 | 259 | ||
| 260 | alrm->enabled = (alm_en & S3C2410_RTCALM_ALMEN) ? 1 : 0; | 260 | alrm->enabled = (alm_en & S3C2410_RTCALM_ALMEN) ? 1 : 0; | 
| 261 | 261 | ||
| 262 | pr_debug("read alarm %d, %04d.%02d.%02d %02d:%02d:%02d\n", | 262 | dev_dbg(dev, "read alarm %d, %04d.%02d.%02d %02d:%02d:%02d\n", | 
| 263 | alm_en, | 263 | alm_en, | 
| 264 | 1900 + alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday, | 264 | 1900 + alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday, | 
| 265 | alm_tm->tm_hour, alm_tm->tm_min, alm_tm->tm_sec); | 265 | alm_tm->tm_hour, alm_tm->tm_min, alm_tm->tm_sec); | 
| @@ -310,7 +310,7 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
| 310 | unsigned int alrm_en; | 310 | unsigned int alrm_en; | 
| 311 | 311 | ||
| 312 | clk_enable(rtc_clk); | 312 | clk_enable(rtc_clk); | 
| 313 | pr_debug("s3c_rtc_setalarm: %d, %04d.%02d.%02d %02d:%02d:%02d\n", | 313 | dev_dbg(dev, "s3c_rtc_setalarm: %d, %04d.%02d.%02d %02d:%02d:%02d\n", | 
| 314 | alrm->enabled, | 314 | alrm->enabled, | 
| 315 | 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, | 315 | 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, | 
| 316 | tm->tm_hour, tm->tm_min, tm->tm_sec); | 316 | tm->tm_hour, tm->tm_min, tm->tm_sec); | 
| @@ -333,7 +333,7 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
| 333 | writeb(bin2bcd(tm->tm_hour), base + S3C2410_ALMHOUR); | 333 | writeb(bin2bcd(tm->tm_hour), base + S3C2410_ALMHOUR); | 
| 334 | } | 334 | } | 
| 335 | 335 | ||
| 336 | pr_debug("setting S3C2410_RTCALM to %08x\n", alrm_en); | 336 | dev_dbg(dev, "setting S3C2410_RTCALM to %08x\n", alrm_en); | 
| 337 | 337 | ||
| 338 | writeb(alrm_en, base + S3C2410_RTCALM); | 338 | writeb(alrm_en, base + S3C2410_RTCALM); | 
| 339 | 339 | ||
| @@ -459,7 +459,7 @@ static int s3c_rtc_probe(struct platform_device *pdev) | |||
| 459 | int ret; | 459 | int ret; | 
| 460 | int tmp; | 460 | int tmp; | 
| 461 | 461 | ||
| 462 | pr_debug("%s: probe=%p\n", __func__, pdev); | 462 | dev_dbg(&pdev->dev, "%s: probe=%p\n", __func__, pdev); | 
| 463 | 463 | ||
| 464 | /* find the IRQs */ | 464 | /* find the IRQs */ | 
| 465 | 465 | ||
| @@ -475,7 +475,7 @@ static int s3c_rtc_probe(struct platform_device *pdev) | |||
| 475 | return s3c_rtc_alarmno; | 475 | return s3c_rtc_alarmno; | 
| 476 | } | 476 | } | 
| 477 | 477 | ||
| 478 | pr_debug("s3c2410_rtc: tick irq %d, alarm irq %d\n", | 478 | dev_dbg(&pdev->dev, "s3c2410_rtc: tick irq %d, alarm irq %d\n", | 
| 479 | s3c_rtc_tickno, s3c_rtc_alarmno); | 479 | s3c_rtc_tickno, s3c_rtc_alarmno); | 
| 480 | 480 | ||
| 481 | /* get the memory region */ | 481 | /* get the memory region */ | 
| @@ -486,11 +486,9 @@ static int s3c_rtc_probe(struct platform_device *pdev) | |||
| 486 | return -ENOENT; | 486 | return -ENOENT; | 
| 487 | } | 487 | } | 
| 488 | 488 | ||
| 489 | s3c_rtc_base = devm_request_and_ioremap(&pdev->dev, res); | 489 | s3c_rtc_base = devm_ioremap_resource(&pdev->dev, res); | 
| 490 | if (s3c_rtc_base == NULL) { | 490 | if (IS_ERR(s3c_rtc_base)) | 
| 491 | dev_err(&pdev->dev, "failed to ioremap memory region\n"); | 491 | return PTR_ERR(s3c_rtc_base); | 
| 492 | return -EINVAL; | ||
| 493 | } | ||
| 494 | 492 | ||
| 495 | rtc_clk = devm_clk_get(&pdev->dev, "rtc"); | 493 | rtc_clk = devm_clk_get(&pdev->dev, "rtc"); | 
| 496 | if (IS_ERR(rtc_clk)) { | 494 | if (IS_ERR(rtc_clk)) { | 
| @@ -506,7 +504,7 @@ static int s3c_rtc_probe(struct platform_device *pdev) | |||
| 506 | 504 | ||
| 507 | s3c_rtc_enable(pdev, 1); | 505 | s3c_rtc_enable(pdev, 1); | 
| 508 | 506 | ||
| 509 | pr_debug("s3c2410_rtc: RTCCON=%02x\n", | 507 | dev_dbg(&pdev->dev, "s3c2410_rtc: RTCCON=%02x\n", | 
| 510 | readw(s3c_rtc_base + S3C2410_RTCCON)); | 508 | readw(s3c_rtc_base + S3C2410_RTCCON)); | 
| 511 | 509 | ||
| 512 | device_init_wakeup(&pdev->dev, 1); | 510 | device_init_wakeup(&pdev->dev, 1); | 
