diff options
Diffstat (limited to 'drivers/rtc/rtc-fm3130.c')
-rw-r--r-- | drivers/rtc/rtc-fm3130.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c index 04e93c6597f8..bff3cdc5140e 100644 --- a/drivers/rtc/rtc-fm3130.c +++ b/drivers/rtc/rtc-fm3130.c | |||
@@ -116,17 +116,7 @@ static int fm3130_get_time(struct device *dev, struct rtc_time *t) | |||
116 | 116 | ||
117 | fm3130_rtc_mode(dev, FM3130_MODE_NORMAL); | 117 | fm3130_rtc_mode(dev, FM3130_MODE_NORMAL); |
118 | 118 | ||
119 | dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x %02x" | 119 | dev_dbg(dev, "%s: %15ph\n", "read", fm3130->regs); |
120 | "%02x %02x %02x %02x %02x %02x %02x\n", | ||
121 | "read", | ||
122 | fm3130->regs[0], fm3130->regs[1], | ||
123 | fm3130->regs[2], fm3130->regs[3], | ||
124 | fm3130->regs[4], fm3130->regs[5], | ||
125 | fm3130->regs[6], fm3130->regs[7], | ||
126 | fm3130->regs[8], fm3130->regs[9], | ||
127 | fm3130->regs[0xa], fm3130->regs[0xb], | ||
128 | fm3130->regs[0xc], fm3130->regs[0xd], | ||
129 | fm3130->regs[0xe]); | ||
130 | 120 | ||
131 | t->tm_sec = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); | 121 | t->tm_sec = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); |
132 | t->tm_min = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); | 122 | t->tm_min = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); |
@@ -175,12 +165,7 @@ static int fm3130_set_time(struct device *dev, struct rtc_time *t) | |||
175 | tmp = t->tm_year - 100; | 165 | tmp = t->tm_year - 100; |
176 | buf[FM3130_RTC_YEARS] = bin2bcd(tmp); | 166 | buf[FM3130_RTC_YEARS] = bin2bcd(tmp); |
177 | 167 | ||
178 | dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x" | 168 | dev_dbg(dev, "%s: %15ph\n", "write", buf); |
179 | "%02x %02x %02x %02x %02x %02x %02x %02x\n", | ||
180 | "write", buf[0], buf[1], buf[2], buf[3], | ||
181 | buf[4], buf[5], buf[6], buf[7], | ||
182 | buf[8], buf[9], buf[0xa], buf[0xb], | ||
183 | buf[0xc], buf[0xd], buf[0xe]); | ||
184 | 169 | ||
185 | fm3130_rtc_mode(dev, FM3130_MODE_WRITE); | 170 | fm3130_rtc_mode(dev, FM3130_MODE_WRITE); |
186 | 171 | ||
@@ -517,18 +502,8 @@ bad_alarm: | |||
517 | bad_clock: | 502 | bad_clock: |
518 | 503 | ||
519 | if (!fm3130->data_valid || !fm3130->alarm_valid) | 504 | if (!fm3130->data_valid || !fm3130->alarm_valid) |
520 | dev_dbg(&client->dev, | 505 | dev_dbg(&client->dev, "%s: %15ph\n", "bogus registers", |
521 | "%s: %02x %02x %02x %02x %02x %02x %02x %02x" | 506 | fm3130->regs); |
522 | "%02x %02x %02x %02x %02x %02x %02x\n", | ||
523 | "bogus registers", | ||
524 | fm3130->regs[0], fm3130->regs[1], | ||
525 | fm3130->regs[2], fm3130->regs[3], | ||
526 | fm3130->regs[4], fm3130->regs[5], | ||
527 | fm3130->regs[6], fm3130->regs[7], | ||
528 | fm3130->regs[8], fm3130->regs[9], | ||
529 | fm3130->regs[0xa], fm3130->regs[0xb], | ||
530 | fm3130->regs[0xc], fm3130->regs[0xd], | ||
531 | fm3130->regs[0xe]); | ||
532 | 507 | ||
533 | /* We won't bail out here because we just got invalid data. | 508 | /* We won't bail out here because we just got invalid data. |
534 | Time setting from u-boot doesn't work anyway */ | 509 | Time setting from u-boot doesn't work anyway */ |