git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
arch
/
mips
/
pmc-sierra
/
yosemite
/
setup.c
diff --git
a/arch/mips/pmc-sierra/yosemite/setup.c
b/arch/mips/pmc-sierra/yosemite/setup.c
index
7225bbf
..
3f724d6
100644
(file)
--- a/
arch/mips/pmc-sierra/yosemite/setup.c
+++ b/
arch/mips/pmc-sierra/yosemite/setup.c
@@
-73,7
+73,9
@@
void __init bus_error_init(void)
unsigned long m48t37y_get_time(void)
{
unsigned int year, month, day, hour, min, sec;
unsigned long m48t37y_get_time(void)
{
unsigned int year, month, day, hour, min, sec;
+ unsigned long flags;
+ spin_lock_irqsave(&rtc_lock, flags);
/* Stop the update to the time */
m48t37_base->control = 0x40;
/* Stop the update to the time */
m48t37_base->control = 0x40;
@@
-88,6
+90,7
@@
unsigned long m48t37y_get_time(void)
/* Start the update to the time again */
m48t37_base->control = 0x00;
/* Start the update to the time again */
m48t37_base->control = 0x00;
+ spin_unlock_irqrestore(&rtc_lock, flags);
return mktime(year, month, day, hour, min, sec);
}
return mktime(year, month, day, hour, min, sec);
}
@@
-95,11
+98,13
@@
unsigned long m48t37y_get_time(void)
int m48t37y_set_time(unsigned long sec)
{
struct rtc_time tm;
int m48t37y_set_time(unsigned long sec)
{
struct rtc_time tm;
+ unsigned long flags;
/* convert to a more useful format -- note months count from 0 */
to_tm(sec, &tm);
tm.tm_mon += 1;
/* convert to a more useful format -- note months count from 0 */
to_tm(sec, &tm);
tm.tm_mon += 1;
+ spin_lock_irqsave(&rtc_lock, flags);
/* enable writing */
m48t37_base->control = 0x80;
/* enable writing */
m48t37_base->control = 0x80;
@@
-123,6
+128,7
@@
int m48t37y_set_time(unsigned long sec)
/* disable writing */
m48t37_base->control = 0x00;
/* disable writing */
m48t37_base->control = 0x00;
+ spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
return 0;
}
@@
-179,7
+185,7
@@
static void __init py_uart_setup(void)
up.uartclk = TITAN_UART_CLK;
up.regshift = 0;
up.iotype = UPIO_MEM;
up.uartclk = TITAN_UART_CLK;
up.regshift = 0;
up.iotype = UPIO_MEM;
- up.flags =
ASYNC_BOOT_AUTOCONF | ASYNC
_SKIP_TEST;
+ up.flags =
UPF_BOOT_AUTOCONF | UPF
_SKIP_TEST;
up.line = 0;
if (early_serial_setup(&up))
up.line = 0;
if (early_serial_setup(&up))
@@
-192,8
+198,8
@@
static void __init py_rtc_setup(void)
if (!m48t37_base)
printk(KERN_ERR "Mapping the RTC failed\n");
if (!m48t37_base)
printk(KERN_ERR "Mapping the RTC failed\n");
- rtc_get_time = m48t37y_get_time;
- rtc_set_time = m48t37y_set_time;
+ rtc_
mips_
get_time = m48t37y_get_time;
+ rtc_
mips_
set_time = m48t37y_set_time;
write_seqlock(&xtime_lock);
xtime.tv_sec = m48t37y_get_time();
write_seqlock(&xtime_lock);
xtime.tv_sec = m48t37y_get_time();
@@
-212,7
+218,7
@@
static void __init py_late_time_init(void)
py_rtc_setup();
}
py_rtc_setup();
}
-
static int __init pmc_yosemite
_setup(void)
+
void __init plat
_setup(void)
{
board_time_init = yosemite_time_init;
late_time_init = py_late_time_init;
{
board_time_init = yosemite_time_init;
late_time_init = py_late_time_init;
@@
-228,8
+234,4
@@
static int __init pmc_yosemite_setup(void)
OCD_WRITE(RM9000x2_OCD_HTBAR0, HYPERTRANSPORT_BAR0_ADDR);
OCD_WRITE(RM9000x2_OCD_HTMASK0, HYPERTRANSPORT_SIZE0);
#endif
OCD_WRITE(RM9000x2_OCD_HTBAR0, HYPERTRANSPORT_BAR0_ADDR);
OCD_WRITE(RM9000x2_OCD_HTMASK0, HYPERTRANSPORT_SIZE0);
#endif
-
- return 0;
}
}
-
-early_initcall(pmc_yosemite_setup);