aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pmc-sierra
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/pmc-sierra')
-rw-r--r--arch/mips/pmc-sierra/yosemite/setup.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c
index 6537d90a25bb..2d3c0dca275d 100644
--- a/arch/mips/pmc-sierra/yosemite/setup.c
+++ b/arch/mips/pmc-sierra/yosemite/setup.c
@@ -79,14 +79,14 @@ unsigned long read_persistent_clock(void)
79 /* Stop the update to the time */ 79 /* Stop the update to the time */
80 m48t37_base->control = 0x40; 80 m48t37_base->control = 0x40;
81 81
82 year = BCD2BIN(m48t37_base->year); 82 year = bcd2bin(m48t37_base->year);
83 year += BCD2BIN(m48t37_base->century) * 100; 83 year += bcd2bin(m48t37_base->century) * 100;
84 84
85 month = BCD2BIN(m48t37_base->month); 85 month = bcd2bin(m48t37_base->month);
86 day = BCD2BIN(m48t37_base->date); 86 day = bcd2bin(m48t37_base->date);
87 hour = BCD2BIN(m48t37_base->hour); 87 hour = bcd2bin(m48t37_base->hour);
88 min = BCD2BIN(m48t37_base->min); 88 min = bcd2bin(m48t37_base->min);
89 sec = BCD2BIN(m48t37_base->sec); 89 sec = bcd2bin(m48t37_base->sec);
90 90
91 /* Start the update to the time again */ 91 /* Start the update to the time again */
92 m48t37_base->control = 0x00; 92 m48t37_base->control = 0x00;
@@ -113,22 +113,22 @@ int rtc_mips_set_time(unsigned long tim)
113 m48t37_base->control = 0x80; 113 m48t37_base->control = 0x80;
114 114
115 /* year */ 115 /* year */
116 m48t37_base->year = BIN2BCD(tm.tm_year % 100); 116 m48t37_base->year = bin2bcd(tm.tm_year % 100);
117 m48t37_base->century = BIN2BCD(tm.tm_year / 100); 117 m48t37_base->century = bin2bcd(tm.tm_year / 100);
118 118
119 /* month */ 119 /* month */
120 m48t37_base->month = BIN2BCD(tm.tm_mon); 120 m48t37_base->month = bin2bcd(tm.tm_mon);
121 121
122 /* day */ 122 /* day */
123 m48t37_base->date = BIN2BCD(tm.tm_mday); 123 m48t37_base->date = bin2bcd(tm.tm_mday);
124 124
125 /* hour/min/sec */ 125 /* hour/min/sec */
126 m48t37_base->hour = BIN2BCD(tm.tm_hour); 126 m48t37_base->hour = bin2bcd(tm.tm_hour);
127 m48t37_base->min = BIN2BCD(tm.tm_min); 127 m48t37_base->min = bin2bcd(tm.tm_min);
128 m48t37_base->sec = BIN2BCD(tm.tm_sec); 128 m48t37_base->sec = bin2bcd(tm.tm_sec);
129 129
130 /* day of week -- not really used, but let's keep it up-to-date */ 130 /* day of week -- not really used, but let's keep it up-to-date */
131 m48t37_base->day = BIN2BCD(tm.tm_wday + 1); 131 m48t37_base->day = bin2bcd(tm.tm_wday + 1);
132 132
133 /* disable writing */ 133 /* disable writing */
134 m48t37_base->control = 0x00; 134 m48t37_base->control = 0x00;