Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137380
b: refs/heads/master
c: f5273fa
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Clouter authored and Nicolas Pitre committed Feb 25, 2009
1 parent 2764f29 commit 87f9cd6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1f5465782a96201798ef1e8167ed3ffaefdb30d
refs/heads/master: f5273fa3102fa4c25819f3034b8834c37d3e62a3
22 changes: 14 additions & 8 deletions trunk/arch/arm/mach-orion5x/ts78xx-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ static struct platform_device ts78xx_ts_rtc_device = {
*/
static int ts78xx_ts_rtc_load(void)
{
int rc;
unsigned char tmp_rtc0, tmp_rtc1;

tmp_rtc0 = ts78xx_ts_rtc_readbyte(126);
Expand All @@ -130,16 +131,18 @@ static int ts78xx_ts_rtc_load(void)
&& ts78xx_ts_rtc_readbyte(126) == 0x00) {
ts78xx_ts_rtc_writebyte(tmp_rtc0, 126);
ts78xx_ts_rtc_writebyte(tmp_rtc1, 127);

if (ts78xx_fpga.supports.ts_rtc.init == 0) {
ts78xx_fpga.supports.ts_rtc.init = 1;
platform_device_register(&ts78xx_ts_rtc_device);
rc = platform_device_register(&ts78xx_ts_rtc_device);
if (!rc)
ts78xx_fpga.supports.ts_rtc.init = 1;
} else
platform_device_add(&ts78xx_ts_rtc_device);
return 0;
rc = platform_device_add(&ts78xx_ts_rtc_device);

return rc;
}
}

ts78xx_fpga.supports.ts_rtc.present = 0;
return -ENODEV;
};

Expand All @@ -150,7 +153,7 @@ static void ts78xx_ts_rtc_unload(void)
#else
static int ts78xx_ts_rtc_load(void)
{
return 0;
return -ENODEV;
}

static void ts78xx_ts_rtc_unload(void)
Expand Down Expand Up @@ -184,8 +187,11 @@ static int ts78xx_fpga_load_devices(void)

if (ts78xx_fpga.supports.ts_rtc.present == 1) {
tmp = ts78xx_ts_rtc_load();
if (tmp)
printk(KERN_INFO "TS-78xx RTC not detected or enabled\n");
if (tmp) {
printk(KERN_INFO "TS-78xx RTC"
" not detected or enabled\n");
ts78xx_fpga.supports.ts_rtc.present = 0;
}
ret |= tmp;
}

Expand Down

0 comments on commit 87f9cd6

Please sign in to comment.